| lavNames | R Documentation |
Extract variable names from a fitted lavaan object.
lavNames(object, type = "ov", ...)
object |
An object of class |
type |
Character. The type of variables whose names should be extracted.
See details for a complete list. Dots and underscores are interchangeable
( |
... |
Additional selection criteria. For example, |
The order of the variable names, as returned by lav_object_vnames,
determines the order in which the variables are listed in the parameter
table, and therefore also in the summary output.
The following variable types are available:
"ov": observed variables
"ov_x": (pure) exogenous observed variables (no mediators)
"ov_nox": non-exogenous observed variables
"ov_model": modeled observed variables (joint vs conditional)
"ov_y": (pure) endogenous variables (dependent only) (no mediators)
"ov_num": numeric observed variables
"ov_ord": ordinal observed variables
"ov_ind": observed indicators of latent variables
"ov_orphan": isolated observed variables (only their intercepts or variances appear in the model syntax)
"ov_interaction": interaction terms (defined by the colon operator)
"th": threshold names (ordinal variables only)
"th_mean": threshold names (ordinal and numeric variables, if any)
"lv": latent variables
"lv_regular": measured latent variables (defined by =~ only)
"lv_composite": composites (defined by <~ only)
"lv_x": (pure) exogenous variables
"lv_y": (pure) endogenous variables
"lv_nox": non-exogenous latent variables
"lv_nonnormal": latent variables with non-normal indicators
"lv_interaction": interaction terms at the latent level
"eqs_y": variables that appear as dependent variables in a
regression formula (but not indicators of latent
variables)
"eqs_x": variables that appear as independent variables in
a regression formula
lavParTable, parTable
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
fit <- cfa(HS.model, data=HolzingerSwineford1939)
lavNames(fit, "ov")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.