Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

summaryConverge

Provide a comparison between the characteristics of convergent replications and nonconvergent replications


Description

This function provides a comparison between the characteristics of convergent replications and nonconvergent replications. The comparison includes sample size (if varying), percent missing completely at random (if varying), percent missing at random (if varying), parameter values, misspecified-parameter values (if applicable), and population misfit (if applicable).

Usage

summaryConverge(object, std = FALSE, improper = TRUE)

Arguments

object

SimResult object being described

std

If TRUE, the standardized parameter values are used instead of unstandardized parameter values.

improper

If TRUE, include the replications that provided improper solutions

Value

A list with the following elements:

  • Converged The number of convergent and nonconvergent replications

  • n Sample size

  • pmMCAR Percent missing completely at random

  • pmMAR Percent missing at random

  • paramValue Parameter values

  • misspecValue Misspecified-parameter values

  • popFit Population misfit. See details of each element at summaryMisspec.

Each element will provide the head-to-head comparison between convergent and nonconvergent replications properties.

Author(s)

Sunthud Pornprasertmanit (psunthud@gmail.com)

Examples

## Not run: 
path.BE <- matrix(0, 4, 4)
path.BE[3, 1:2] <- NA
path.BE[4, 3] <- NA
starting.BE <- matrix("", 4, 4)
starting.BE[3, 1:2] <- "runif(1, 0.3, 0.5)"
starting.BE[4, 3] <- "runif(1, 0.5, 0.7)"
mis.path.BE <- matrix(0, 4, 4)
mis.path.BE[4, 1:2] <- "runif(1, -0.1, 0.1)"
BE <- bind(path.BE, starting.BE, misspec=mis.path.BE)

residual.error <- diag(4)
residual.error[1,2] <- residual.error[2,1] <- NA
RPS <- binds(residual.error, "rnorm(1, 0.3, 0.1)")

loading <- matrix(0, 12, 4)
loading[1:3, 1] <- NA
loading[4:6, 2] <- NA
loading[7:9, 3] <- NA
loading[10:12, 4] <- NA
mis.loading <- matrix("runif(1, -0.3, 0.3)", 12, 4)
mis.loading[is.na(loading)] <- 0
LY <- bind(loading, "runif(1, 0.7, 0.9)", misspec=mis.loading)

mis.error.cor <- matrix("rnorm(1, 0, 0.1)", 12, 12)
diag(mis.error.cor) <- 0
RTE <- binds(diag(12), misspec=mis.error.cor)

SEM.Model <- model(RPS = RPS, BE = BE, LY=LY, RTE=RTE, modelType="SEM")

n1 <- list(mean = 0, sd = 0.1)
chi5 <- list(df = 5)

facDist <- bindDist(c("chisq", "chisq", "norm", "norm"), chi5, chi5, n1, n1)

# In reality, more than 50 replications are needed.
simOut <- sim(50, n=500, SEM.Model, sequential=TRUE, facDist=facDist, estimator="mlr")

# Summary the convergent and nonconvergent replications
summaryConverge(simOut)

## End(Not run)

simsem

SIMulated Structural Equation Modeling

v0.5-16
GPL (>= 2)
Authors
Sunthud Pornprasertmanit [aut], Patrick Miller [aut], Alexander Schoemann [aut] (<https://orcid.org/0000-0002-8479-8798>), Terrence D. Jorgensen [aut, cre] (<https://orcid.org/0000-0001-5111-6773>), Corbin Quick [ctb]
Initial release
2021-03-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.