Replication (version 0.1.0)

sim.step1: Simulate Data for the Predictive Distribution

Description

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.

Usage

sim.step1(n.r, nsim, post, pT, free.i, group=NULL, n.groups)

Arguments

n.r

Sample size for the new data (y.r)

nsim

Number of datasets y.s to be created.

post

Matrix with samples from the posterior distribution for the original data y.o

pT

The blavaan parameter table.

free.i

A vector with indices for the freely estimated parameters as given in pT.

group

If applicable, the name of the grouping variable.

n.groups

If applicable, the number of groups.

Value

y.s

A list containing all y.s.

See Also

simulateData