sam | R Documentation |
Fit a Structural Equation Model (SEM) using the Structural After Measurement (SAM) approach.
sam(model = NULL, data = NULL, cmd = "sem", se = "twostep", mm.list = NULL, mm.args = list(bounds = "standard", se = "standard"), struc.args = list(estimator = "ML", se = "standard"), sam.method = "local", alpha.correction = 0L, ..., local.options = list(M.method = "ML", veta.force.pd = TRUE, twolevel.method = "h1"), global.options = list(), output = "lavaan")
model |
A description of the user-specified model. Typically, the model
is described using the lavaan model syntax. See
|
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 |
se |
Character. The type of standard errors that are used in the
final (structural) model. If |
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 |
struc.args |
List. Optional arguments for the fitting function of the
structural part only. See |
sam.method |
Character. Can be set to |
alpha.correction |
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. |
... |
Many more additional options can be defined, using 'name = value'.
See |
local.options |
List. Options specific for local SAM method (these options may change over time). |
global.options |
List. Options specific for global SAM method (not used for now). |
output |
Character. If |
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.
If output = "lavaan"
, an object of class
lavaan
, for which several methods
are available, including a summary
method. If output = "list"
,
a list.
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
lavaan
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.