Learn R Programming

simsem (version 0.5-16)

SIMulated Structural Equation Modeling

Description

Provides an easy framework for Monte Carlo simulation in structural equation modeling, which can be used for various purposes, such as such as model fit evaluation, power analysis, or missing data handling and planning.

Copy Link

Version

Install

install.packages('simsem')

Monthly Downloads

653

Version

0.5-16

License

GPL (>= 2)

Maintainer

Last Published

March 28th, 2021

Functions in simsem (0.5-16)

SimMissing-class

Class "SimMissing"
anova

Provide a comparison of nested models and nonnested models across replications
SimSem-class

Class "SimSem"
analyze

Data analysis using the model specification
SimDataDist-class

Class "SimDataDist": Data distribution object
SimVector-class

Vector object: Random parameters vector
SimMatrix-class

Matrix object: Random parameters matrix
SimResult-class

Class "SimResult": Simulation Result Object
bindDist

Create a data distribution object.
bind

Specify matrices for Monte Carlo simulation of structural equation models
findCoverage

Find a value of independent variables that provides a given value of coverage rate
createData

Create data from a set of drawn parameters.
estmodel

Shortcut for data analysis template for simulation.
continuousPower

Find power of model parameters when simulations have randomly varying parameters
findIndMean

Find indicator total means from factor loading matrix, total factor mean, and indicator intercept.
findIndIntercept

Find indicator intercepts from factor loading matrix, total factor mean, and indicator mean.
continuousCoverage

Find coverage rate of model parameters when simulations have randomly varying parameters
findIndResidualVar

Find indicator residual variances from factor loading matrix, total factor covariance, and total indicator variances.
findIndTotalVar

Find indicator total variances from factor loading matrix, total factor covariance, and indicator residual variances.
exportData

Export data sets for analysis with outside SEM program.
findPower

Find a value of independent variables that provides a given value of power.
findFactorTotalCov

Find factor total covariance from regression coefficient matrix, factor residual covariance
findPossibleFactorCor

Find the appropriate position for freely estimated correlation (or covariance) given a regression coefficient matrix
findFactorIntercept

Find factor intercept from regression coefficient matrix and factor total means
combineSim

Combine result objects
coef

Extract parameter estimates from a simulation result
getCutoff

Find fit indices cutoff given a priori alpha level
draw

Draw parameters from a '>SimSem object.
getCutoffNonNested

Find fit indices cutoff for non-nested model comparison given a priori alpha level
findFactorTotalVar

Find factor total variances from regression coefficient matrix, factor (residual) correlations, and factor residual variances
getPowerFitNested

Find power in rejecting nested models based on the differences in fit indices
findFactorResidualVar

Find factor residual variances from regression coefficient matrix, factor (residual) correlations, and total factor variances
generate

Generate data using SimSem template
findFactorMean

Find factor total means from regression coefficient matrix and factor intercept
findRecursiveSet

Group variables regarding the position in mediation chain
getPowerFit

Find power in rejecting alternative models based on fit indices criteria
getPopulation

Extract the data generation population model underlying a result object
getPower

Find power of model parameters
plotCoverage

Make a plot of confidence interval coverage rates
model.lavaan

Build the data generation template and analysis template from the lavaan result
multipleAllEqual

Test whether all objects are equal
inspect

Extract information from a simulation result
getCutoffNested

Find fit indices cutoff for nested model comparison given a priori alpha level
plotCutoff

Plot sampling distributions of fit indices with fit indices cutoffs
plotCutoffNonNested

Plot sampling distributions of the differences in fit indices between non-nested models with fit indices cutoffs
plotCutoffNested

Plot sampling distributions of the differences in fit indices between nested models with fit indices cutoffs
getCIwidth

Find confidence interval width
miss

Specifying the missing template to impose on a dataset
getExtraOutput

Get extra outputs from the result of simulation
model

Data generation template and analysis template for simulation.
plotCIwidth

Plot a confidence interval width of a target parameter
pValueNonNested

Find p-values (1 - percentile) for a non-nested model comparison
plotPowerFit

Plot sampling distributions of fit indices that visualize power of rejecting datasets underlying misspecified models
plotPowerFitNested

Plot power of rejecting a nested model in a nested model comparison by each fit index
summarySeed

Summary of a seed number
plotPowerFitNonNested

Plot power of rejecting a non-nested model based on a difference in fit index
popDiscrepancy

Find the discrepancy value between two means and covariance matrices
summaryPopulation

Summarize the population model used for data generation underlying a result object
pValue

Find p-values (1 - percentile) by comparing a single analysis output from the result object
pValueNested

Find p-values (1 - percentile) for a nested model comparison
summaryConverge

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

Make a power plot of a parameter given varying parameters
plotMisfit

Plot the population misfit in the result object
likRatioFit

Find the likelihood ratio (or Bayes factor) based on the bivariate distribution of fit indices
getCoverage

Find coverage rate of model parameters
setPopulation

Set the data generation population model underlying an object
sim

Run a Monte Carlo simulation with a structural equation model.
summaryMisspec

Provide summary of the population misfit and misspecified-parameter values across replications
getPowerFitNonNested

Find power in rejecting non-nested models based on the differences in fit indices
summaryParam

Provide summary of parameter estimates and standard error across replications
popMisfitMACS

Find population misfit by sufficient statistics
plotDist

Plot a distribution of a data distribution object
rawDraw

Draw values from vector or matrix objects
plotLogitMiss

Visualize the missing proportion when the logistic regression method is used.
imposeMissing

Impose MAR, MCAR, planned missingness, or attrition on a data set
summaryTime

Time summary
summaryShort

Provide short summary of an object.
summaryFit

Provide summary of model fit across replications