[R-sig-teaching] Creating data

G. Jay Kerns gkerns at ysu.edu
Thu Mar 26 00:15:38 CET 2009


Dear Doug and Achim,


On 3/25/09, Achim Zeileis <Achim.Zeileis at wu-wien.ac.at> wrote:
>
> Thanks for including us and advertising our package, Doug!
>
> Actually, we use our "exams" package to generate simple two-way ANOVA
> examples in our stats exams at WU Wien. The approach is very similar to
> the one previously suggested: generate some random regressors, compute the
> model matrix, draw random coefficients, set certain coefficients to zero
> (if there should be only some main effects) and then simulate the final
> data.
>
> For a one-way ANOVA, there is an example in the package, see
>    library("exams")
>    exams("anova")
> and see the underlying code in ~/inst/exercises/anova.Rnw.
>
> hth,
> Z
>


Thanks for the pointer to and example from the exams package.  I had
heard about the package and flipped through the vignette, but didn't
appreciate just how powerful this package could be.  Very, very cool.

Regards,
Jay




More information about the R-sig-teaching mailing list