Learn R Programming

RAMpath (version 0.5.1)

powerLCS: Power analysis for univariate latent change score models

Description

Calculate power for univariate latent change score models based on Monte Carlo simulation.

Usage

powerLCS(N=100, T=5, R=1000, betay=0, my0=0, mys=0, 
varey=1, vary0=1, varys=1, vary0ys=0, alpha=0.05, ...)

Value

model

The lavaan model specification of the bivariate latent change score model

lavaan

The lavaan output

ram

Output in terms of RAM matrices

Arguments

N

Sample size, can be a scalar or a vector. For better performance, make sure N is at least two times of T

T

Number of times, occasions or waves of measurements, can be a scalar or a vector

R

Number of replications to run in Monte Carlo simulation. Recommended 1000 or more

betay

Population parameter values

my0

Population parameter values

mys

Population parameter values

varey

Population parameter values

vary0

Population parameter values

varys

Population parameter values

vary0ys

Population parameter values

alpha

Significance level

...

Options can be used for lavaan

References

Zhang, Z., & Liu, H. (2018). Sample size and measurement occasion planning for latent change score models through Monte Carlo simulation. In E. Ferrer, S. M. Boker, and K. J. Grimm (Eds.), Advances in longitudinal models for multivariate psychology: A festschrift for Jack McArdle (pp. 189-211). New York, NY: Routledge.

Examples

Run this code
if (FALSE) {
powerLCS(R=1000)
}

Run the code above in your browser using DataLab