Learn R Programming

MBESS (version 4.9.3)

ss.aipe.rmsea.sensitivity: a priori Monte Carlo simulation for sample size planning for RMSEA in SEM

Description

Conduct a priori Monte Carlo simulation to empirically study the effects of (mis)specifications of input information on the calculated sample size. The sample size is planned so that the expected width of a confidence interval for the population RMSEA is no larger than desired. Random data are generated from the true covariance matrix but fit to the proposed model, whereas sample size is calculated based on the input covariance matrix and proposed model.

Usage

ss.aipe.rmsea.sensitivity(width, model, Sigma, N=NULL, 
conf.level=0.95, G=200, save.file="sim.results.txt", ...)

Value

successful.replication

the number of successful replications

w

the G random confidence interval widths

RMSEA.hat

the G estimated RMSEA values based on the G random samples

sample.size

the sample size calculated

df

degrees of freedom of the proposed model

RMSEA.pop

the input RMSEA value that is used to calculated the necessary sample size

desired.width

desired confidence interval width

mean.width

mean of the random confidence interval widths

median.width

median of the random confidence interval widths

assurance

the proportion of confidence interval widths narrower than desired

quantile.width

99, 97, 95, 90, 80, 70, and 60 percentiles of the random confidence interval widths

alpha.upper

the upper empirical Type I error rate

alpha.lower

the lower empirical Type I error rate

alpha

total empirical Type I error rate

conf.level

confidence level

sim.results.txt

a text file that saves the simulation results; it updates after each replication. 'sim.results.txt' is the default file name

Arguments

width

desired confidence interval width for the model parameter of interest

model

the model the researcher proposes, may or may not be the true model. This argument should be an RAM (reticular action model; e.g., McArdle & McDonald, 1984) specification of a structural equation model, and should be of class mod. The model is specified in the same manner as does the sem package; see sem and specify.model for detailed documentation about model specifications in the RAM notation.

Sigma

the true population covariance matrix, which will be used to generate random data for the simulation study. The row names and column names of Sigma should be the same as the manifest variables in model.

N

if N is specified, random sample of the specified N size will be generated. Otherwise the sample size is calculated with the sample size planning method with the goal that the expected width of a confidence interval for population RMSEA is no larger than desired.

conf.level

confidence level (i.e., 1- Type I error rate)

G

number of replications in the Monte Carlo simulation

save.file

the name of the file that simulation results will be saved to

...

allows one to potentially include parameter values for inner functions

Author

Keke Lai (University of California -- Merced) and Ken Kelley (University of Notre Dame; KKelley@ND.Edu)

Details

This function implements the sample size planning methods proposed in Kelley and Lai (2010). It depends on the function sem in the sem package to fit the proposed model to random data, and uses the same notation to specify SEM models as does sem. Please refer to sem for more detailed documentation about model specifications, the RAM notation, and model fitting techniques. For technical discussion on how to obtain the model implied covariance matrix in the RAM notation given model parameters, see McArdle and McDonald (1984)

References

Cudeck, R., & Browne, M. W. (1992). Constructing a covariance matrix that yields a specified minimizer and a specified minimum discrepancy function value. Psychometrika, 57, 357--369.

Fox, J. (2006). Structural equation modeling with the sem package in R. Structural Equation Modeling, 13, 465--486.

Kelley, K., & Lai, K. (2010). Accuracy in parameter estimation for the root mean square of approximation: Sample size planning for narrow confidence intervals. Manuscript under review.

McArdle, J. J., & McDonald, R. P. (1984). Some algebraic properties of the reticular action model. British Journal of Mathematical and Statistical Psychology, 37, 234--251.

See Also

sem; specify.model; ss.aipe.rmsea; theta.2.Sigma.theta; Sigma.2.SigmaStar