dpsdSim {hbmem} | R Documentation |
Simulates data from a hierarchical DPSD model.
dpsdSim(I = 30, J = 200, K = 6, muN = -0.7, s2aN = 0.2, s2bN = 0.2,muS = 0, s2aS = 0.2, s2bS = 0.2, muR = qnorm(0.25), s2aR = 0.2,s2bR = 0.2, crit = matrix(rep(c(-1.6, -0.5, 0, 0.5, 1.6),each = I), ncol = (K - 1)))
I |
Number of participants. |
J |
Number of items. |
K |
Number of response options. |
muN |
Mean of new-item distribution |
s2aN |
Variance of participant effects on mean of new-item distribution. |
s2bN |
Variance of item effects on mean of new-item distribution. |
muS |
Mean of studied-item distribution |
s2aS |
Variance of participant effects on mean of studied-item distribution. |
s2bS |
Variance of item effects on mean of studied-item distribution. |
muR |
Mean recollection, on probit space. |
s2aR |
Variance of participant effects recollection. |
s2bR |
Variance of item effects on recollection. |
crit |
Matrix of criteria (not including -Inf or Inf). Columns correspond to criteria, rows correspond to participants. |
The function returns an internally defined "dpsdSim" structure.
Michael S. Pratte
See Pratte, Rouder, & Morey (2009)
hbmem
#Data from hiererchial model sim=dpsdSim() slotNames(sim) table(sim@resp,sim@cond) #Usefull to make data.frame for passing to functions dat=as.data.frame(cbind(sim@subj,sim@item,sim@cond,sim@lag,sim@resp)) colnames(dat)=c("sub","item","cond","lag","resp") table(dat$resp,dat$cond)