Learn R Programming

simsem (version 0.2-8)

getCutoff: Find fit indices cutoff given a priori alpha level

Description

Extract fit indices information from the SimResult and getCutoff of fit indices given a priori alpha level

Usage

getCutoff(object, alpha, revDirec = FALSE, usedFit = NULL, ...)

Arguments

object
SimResult that saves the analysis results from multiple replications
alpha
A priori alpha level
revDirec
The default is to find criticl point on the side that indicates worse fit (the right side of RMSEA or the left side of CFI). If specifying as TRUE, the directions are reversed.
usedFit
Vector of names of fit indices that researchers wish to getCutoffs from. The default is to getCutoffs of all fit indices.
...
Additional arguments.

Value

  • One-tailed cutoffs of several fit indices with a priori alpha level

See Also

SimResult for a detail of simResult

Examples

Run this code
loading <- matrix(0, 6, 2)
loading[1:3, 1] <- NA
loading[4:6, 2] <- NA
loadingValues <- matrix(0, 6, 2)
loadingValues[1:3, 1] <- 0.7
loadingValues[4:6, 2] <- 0.7
LX <- simMatrix(loading, loadingValues)
latent.cor <- matrix(NA, 2, 2)
diag(latent.cor) <- 1
RPH <- symMatrix(latent.cor, 0.5)
error.cor <- matrix(0, 6, 6)
diag(error.cor) <- 1
RTD <- symMatrix(error.cor)
CFA.Model <- simSetCFA(LY = LX, RPS = RPH, RTE = RTD)
SimData <- simData(CFA.Model, 200)
SimModel <- simModel(CFA.Model)
# We make the examples running only 5 replications to save time.
# In reality, more replications are needed.
Output <- simResult(5, SimData, SimModel)
getCutoff(Output, 0.05)

# Finding the cutoff when the sample size is varied.
Output2 <- simResult(NULL, SimData, SimModel, n=seq(50, 100, 10))
getCutoff(Output2, 0.05, nVal = 75)

Run the code above in your browser using DataLab