Data simulation

55 views
Skip to first unread message

ibaldauf

unread,
Nov 4, 2015, 10:57:44 AM11/4/15
to mirt-package
Dear Phil,
I have a question about your example on github (https://github.com/philchalmers/mirt/blob/master/R/simdata.R).
Why do you use a lognormal distribution with mean 0.2 and standard deviation 0.3 for simulating the a Matrix?

a <- matrix(rlnorm(20,.2,.3))
# for the graded model, ensure that there is enough space between the intercepts,
# otherwise closer categories will not be selected often (minimum distance of 0.3 here)
diffs <- t(apply(matrix(runif(20*4, .3, 1), 20), 1, cumsum))
diffs <- -(diffs - rowMeans(diffs))
d <- diffs + rnorm(20)
dat <- simdata(a, d, 500, itemtype = 'graded')

Thanks for your help
Isabell

Phil Chalmers

unread,
Nov 6, 2015, 9:37:12 AM11/6/15
to ibaldauf, mirt-package
Mainly just convention. Slopes are often believed to follow log-normal distributions for unidimensional models, which matches the popular log-normal prior in software like BILOG-MG. But of course you can choose any distribution you'd like (in published simulation work people also tend to choose uniform distributions). Really depends on what you are trying to emulate. Cheers. 

Phil

--
You received this message because you are subscribed to the Google Groups "mirt-package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages