Learn R Programming

⚠️There's a newer version (0.5-17) of this package.Take me there.

simsem (version 0.5-14)

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

789

Version

0.5-14

License

GPL (>= 2)

Maintainer

Terry Jorgensen

Last Published

June 3rd, 2018

Functions in simsem (0.5-14)

analyze

Data analysis using the model specification
coef

Extract parameter estimates from a simulation result
findIndIntercept

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

Find coverage rate of model parameters
getCIwidth

Find confidence interval width
findIndMean

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

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

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

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

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

Extract the data generation population model underlying a result object
getPower

Find power of model parameters
combineSim

Combine result objects
findFactorTotalVar

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

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

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

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

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

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

Extract information from a simulation result
getExtraOutput

Get extra outputs from the result of simulation
model.lavaan

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

Test whether all objects are equal
plotCutoffNonNested

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

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

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

Provide summary of parameter estimates and standard error across replications
rawDraw

Draw values from vector or matrix objects
popMisfitMACS

Find population misfit by sufficient statistics
plotPowerFitNonNested

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

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

Find fit indices cutoff given a priori alpha level
getCutoffNested

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

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

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

Make a plot of confidence interval coverage rates
findIndTotalVar

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

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

Plot sampling distributions of fit indices with fit indices cutoffs
plotMisfit

Plot the population misfit in the result object
plotCIwidth

Plot a confidence interval width of a target parameter
setPopulation

Set the data generation population model underlying an object
popDiscrepancy

Find the discrepancy value between two means and covariance matrices
summaryFit

Provide summary of model fit across replications
plotPower

Make a power plot of a parameter given varying parameters
summaryConverge

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

Run a monte carlo simulation with a structural equation model.
summaryShort

Provide short summary of an object.
summaryTime

Time summary
findCoverage

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

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

Specify matrices for Monte Carlo simulation of structural equation models
bindDist

Create a data distribution object.
findPossibleFactorCor

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

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

Group variables regarding the position in mediation chain
generate

Generate data using SimSem template
miss

Specifying the missing template to impose on a dataset
plotDist

Plot a distribution of a data distribution object
model

Data generation template and analysis template for simulation.
plotLogitMiss

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

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

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

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

Summary of a seed number
anova

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

Matrix object: Random parameters matrix
SimMissing-class

Class "SimMissing"
SimResult-class

Class "SimResult": Simulation Result Object
SimVector-class

Vector object: Random parameters vector
draw

Draw parameters from a '>SimSem object.
SimDataDist-class

Class "SimDataDist": Data distribution object
SimSem-class

Class "SimSem"
createData

Create data from a set of drawn parameters.
estmodel

Shortcut for data analysis template for simulation.
exportData

Export data sets for analysis with outside SEM program.
findFactorMean

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

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