Simulates data y.s using lavaan simulateData. The data y.s are based on samples from the posterior and represent samples from the predictive distribution.
sim.step1(n.r, nsim, post, pT, free.i, group=NULL, n.groups)
Sample size for the new data (y.r)
Number of datasets y.s to be created.
Matrix with samples from the posterior distribution for the original data y.o
The blavaan parameter table.
A vector with indices for the freely estimated parameters as given in pT.
If applicable, the name of the grouping variable.
If applicable, the number of groups.
A list containing all y.s.