Fit Structural Equation Models using the SAM approach
sam.RdFit a Structural Equation Model (SEM) using the Structural After Measurement (SAM) approach.
Usage
sam(model = NULL, data = NULL, cmd = "sem", se = "twostep",
mm.list = NULL, mm.args = list(bounds = "wide.zerovar"),
struc.args = list(estimator = "ML"),
sam.method = "local", ...,
local.options = list(M.method = "ML", lambda.correction = TRUE,
alpha.correction = 0L, twolevel.method = "h1"),
global.options = list(),
bootstrap.args = list(R = 1000L, type = "ordinary", show.progress = FALSE),
output = "lavaan")Arguments
- model
A description of the user-specified model. Typically, the model is described using the lavaan model syntax. See
model.syntaxfor more information. Alternatively, a parameter table (eg. the output of thelavParTable()function) is also accepted.- data
A data frame containing the observed variables used in the model.
- cmd
Character. Which command is used to run the sem models. The possible choices are
"sem","cfa"or"lavaan", determining how we deal with default options.- se
Character. The type of standard errors that are used in the final (structural) model. If
"twostep"(the default), the standard errors take the estimation uncertainty of the first (measurement) stage into account. If"standard", this uncertainty is ignored, and we treat the measurement information as known. If"none", no standard errors are computed.- mm.list
List. Define the measurement blocks. Each element of the list should be either a single name of a latent variable, or a vector of latent variable names. If omitted, a separate measurement block is used for each latent variable.
- mm.args
List. Optional arguments for the fitting function(s) of the measurement block(s) only. See
lavOptionsfor a complete list.- struc.args
List. Optional arguments for the fitting function of the structural part only. See
lavOptionsfor a complete list.- sam.method
Character. Can be set to
"local","global"or"fsr". In the latter case, the results are the same as if Bartlett factor scores were used, without any bias correction.- ...
Many more additional options can be defined, using 'name = value'. See
lavOptionsfor a complete list. These options affect both the measurement blocks and the structural part.- local.options
List. Options specific for local SAM method (these options may change over time). If
lambda.correction = TRUE, we ensure that the variance matrix of the latent variables (VETA) is positive definite. Thealpha.correctionoptions must be an integer. Acceptable values are in the range 0 till N-1. If zero (the default), no small sample correction is performed, and the bias-correction is the same as with local SAM. When equal to N-1, the bias-correction is eliminated, and the results are the same as naive FSR. Typical values are 0, P+1 (where P is the number of predictors in the structural model), P+5, and (N-1)/2.- global.options
List. Options specific for global SAM method (not used for now).
- bootstrap.args
List. Only used when
se = "bootstrap". Typical elements of this list areR: the number of bootstrap samples, andtype, which can be set to"ordinary"(the default) or"parametric".- output
Character. If
"lavaan", a lavaan object returned. If"list", a list is returned with all the ingredients from the different stages.
Details
The sam function tries to automate the SAM approach, by first
estimating the measurement part of the model,
and then the structural part of the model. See reference for more
details.
Note that in the current implementation, all indicators of latent variables have to be observed. This implies: no support for second-order factor structures (for now).
Value
If output = "lavaan", an object of class
lavaan, for which several methods
are available, including a summary method. If output = "list",
a list.
References
Rosseel and Loh (2021). A structural-after-measurement approach to Structural Equation Modeling. Psychological Methods. Advance online publication. https://dx.doi.org/10.1037/met0000503
Examples
## The industrialization and Political Democracy Example
## Bollen (1989), page 332
model <- '
# latent variable definitions
ind60 =~ x1 + x2 + x3
dem60 =~ y1 + a*y2 + b*y3 + c*y4
dem65 =~ y5 + a*y6 + b*y7 + c*y8
# regressions
dem60 ~ ind60
dem65 ~ ind60 + dem60
# residual correlations
y1 ~~ y5
y2 ~~ y4 + y6
y3 ~~ y7
y4 ~~ y8
y6 ~~ y8
'
fit.sam <- sam(model, data = PoliticalDemocracy,
mm.list = list(ind = "ind60", dem = c("dem60", "dem65")))
summary(fit.sam)
#> This is lavaan 0.6-21 -- using the SAM approach to SEM
#>
#> SAM method LOCAL
#> Mapping matrix M method ML
#> Number of measurement blocks 2
#> Estimator measurement part ML
#> Estimator structural part ML
#>
#> Number of observations 75
#>
#> Summary Information Measurement + Structural:
#>
#> Block Latent Nind Chisq Df
#> 1 ind60 3 0.00 0
#> 2 dem60,dem65 8 15.32 16
#>
#> Model-based reliability latent variables:
#>
#> ind60 dem60 dem65
#> 0.966 0.868 0.87
#>
#> Summary Information Structural part:
#>
#> chisq df cfi rmsea srmr
#> 0 0 1 0 0
#>
#> Parameter Estimates:
#>
#> Standard errors Twostep
#> Information Expected
#> Information saturated (h1) model Structured
#>
#> Regressions:
#> Estimate Std.Err z-value P(>|z|)
#> dem60 ~
#> ind60 1.454 0.389 3.741 0.000
#> dem65 ~
#> ind60 0.558 0.225 2.480 0.013
#> dem60 0.871 0.076 11.497 0.000
#>
#> Variances:
#> Estimate Std.Err z-value P(>|z|)
#> ind60 0.446 0.087 5.135 0.000
#> .dem60 3.766 0.848 4.439 0.000
#> .dem65 0.189 0.224 0.843 0.399
#>