View source: R/lav_object_methods.R
| standardizedSolution | R Documentation |
Standardized solution of a latent variable model.
standardizedSolution(object, type = "std_all", se = TRUE, zstat = TRUE,
pvalue = TRUE, ci = TRUE, level = 0.95,
boot_ci_type = "perc", cov_std = TRUE,
remove_eq = TRUE, remove_ineq = TRUE, remove_def = FALSE,
remove_aux = TRUE,
partable = NULL, glist = NULL, est = NULL,
output = "data.frame", ...)
object |
An object of class |
type |
Character (dots and underscores are interchangeable:
|
se |
Logical. If TRUE, standard errors for the standardized parameters will be computed, together with a z-statistic and a p-value. |
zstat |
Logical. If |
pvalue |
Logical. If |
ci |
If |
level |
The confidence level required. |
boot_ci_type |
Character. Only used if the model was fitted with
|
cov_std |
Logical. If TRUE, the (residual) observed covariances are scaled by the square root of the ‘Theta’ diagonal elements, and the (residual) latent covariances are scaled by the square root of the ‘Psi’ diagonal elements. If FALSE, the (residual) observed covariances are scaled by the square root of the diagonal elements of the observed model-implied covariance matrix (Sigma), and the (residual) latent covariances are scaled by the square root of diagonal elements of the model-implied covariance matrix of the latent variables. |
remove_eq |
Logical. If TRUE, filter the output by removing all rows containing equality constraints, if any. |
remove_ineq |
Logical. If TRUE, filter the output by removing all rows containing inequality constraints, if any. |
remove_def |
Logical. If TRUE, filter the output by removing all rows containing parameter definitions, if any. |
remove_aux |
Logical. If TRUE (the default), filter the output by
removing all rows corresponding to auxiliary ( |
glist |
List of model matrices. If provided, they will be used
instead of the GLIST inside the object@Model slot. Only works if the
|
est |
Numeric. Parameter values (as in the ‘est’ column of a
parameter table). If provided, they will be used instead of
the parameters that can be extracted from object. Only works if the |
partable |
A custom |
output |
Character. If |
... |
To support old argument names. |
The standardized estimates are functions of the (unstandardized) free
parameters and of (a subset of) the model-implied (co)variances used for
scaling. The standard errors reported by standardizedSolution are
therefore standard errors for the standardized parameters, and they
will in general differ from the standard errors of the unstandardized
parameters reported by parameterEstimates (or in the
summary() output). They are also not the same as the standard errors
that would be obtained by simply rescaling the unstandardized standard errors.
How the standard errors are computed depends on how the model was originally
fitted (in particular on the se= argument of lavaan,
cfa, sem, ...):
By default (se = "standard", "robust.sem",
"robust.huber.white", ...), the standard errors are obtained with
the delta method: the Jacobian of the standardization function is
computed (numerically) and combined with the variance-covariance matrix of
the (unstandardized) parameter estimates. Any robustness present in that
variance-covariance matrix (for example robust or sandwich-type standard
errors) is automatically propagated to the standardized solution.
If the model was fitted with se = "bootstrap" (and the bootstrap
draws are available), bootstrap standard errors and bootstrap confidence
intervals are reported instead. These are obtained by re-standardizing each
bootstrap draw and computing the standard deviation (for the standard
error) and the requested interval type (see boot_ci_type) of the
resulting standardized values. Note that, as in
parameterEstimates, the p-value is still computed by
referring the z-statistic (standardized estimate divided by its bootstrap
standard error) to a standard normal distribution.
There is no separate argument to choose the type of standard error
within standardizedSolution: the type always follows the se=
setting that was used when the model was fitted. To obtain, say, robust or
bootstrap standard errors for the standardized solution, refit the model with
the corresponding se= argument.
A data.frame containing standardized model parameters.
If the model was fitted with se = "bootstrap" (and the bootstrap
draws are available), the standardized estimates in the bootstrap samples
are stored as the "boot_std" attribute of the returned data.frame (a
matrix with one row per bootstrap draw and one column per row of the
returned solution). These can be retrieved with
attr(x, "boot_std"), analogous to
lavInspect(object, "coef_boot") for the unstandardized solution.
In addition, if boot_ci_type = "bca", the empirical-influence design
matrix used to compute the acceleration constant is stored as the
"design" attribute (retrieve with attr(x, "design")).
The est, glist, and partable arguments are not meant for
everyday users, but for authors of external R packages that depend on
lavaan. Only to be used with great caution.
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
fit <- cfa(HS.model, data=HolzingerSwineford1939)
standardizedSolution(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.