sim.step1: Simulate Data for the Predictive Distribution

Description Usage Arguments Value Author(s) See Also

View source: R/sim.step1.R

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

1
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.

Author(s)

M. A. J. Zondervan-Zwijnenburg

See Also

simulateData


Replication documentation built on April 14, 2020, 6:15 p.m.