Get Standardized Estimates
standardized_estimates.Rd
Computes standardized estimates of model parameters for various types of modsem
objects.
Usage
standardized_estimates(object, ...)
# S3 method for class 'modsem_da'
standardized_estimates(
object,
monte.carlo = FALSE,
mc.reps = 10000,
tolerance.zero = 1e-10,
...
)
# S3 method for class 'modsem_pi'
standardized_estimates(
object,
correction = FALSE,
std.errors = c("rescale", "delta", "monte.carlo"),
mc.reps = 10000,
colon.pi = FALSE,
...
)
Arguments
- object
An object of class
modsem_da
,modsem_mplus
,modsem_pi
, or a parameter table (parTable
) of classdata.frame
.- ...
Additional arguments passed on to
lavaan::standardizedSolution()
.- monte.carlo
Logical. If
TRUE
, use Monte Carlo simulation to estimate standard errors; ifFALSE
, use the delta method (default).- mc.reps
Integer. Number of Monte Carlo replications to use if
std.errors = "monte.carlo"
.- tolerance.zero
Threshold below which standard errors are set to
NA
.- correction
Logical. Whether to apply a correction to the standardized estimates of the interaction term. By default,
FALSE
, which standardizes the interaction term such that \(\sigma^2(XZ) = 1\), consistent withlavaan
's treatment of latent interactions. This is usually wrong, as it does not account for the fact that the interaction term is a product of two variables, which means that the variance of the interaction term of standardized variables (usually) is not equal to 1.Hence the scale of the interaction effect changes, such that the standardized interaction term does not correspond to one (standardized) unit change in the moderating variables. If
TRUE
a correction is applied, by computing the interaction term \(b_3 = \frac{B_3 \sigma(X) \sigma(Z)}{\sigma(Y)}\) (where \(B_3\) is the unstandardized coefficient for the interaction term), and solving for \(\sigma(XZ)\), which is used to correct the variance of the interaction term, and its covariances.- std.errors
Character string indicating the method used to compute standard errors when
correction = TRUE
. Options include:- "rescale"
Simply rescales the standard errors. Fastest option.
- "delta"
Uses the delta method to approximate standard errors.
- "monte.carlo"
Uses Monte Carlo simulation to estimate standard errors.
Ignored if
correction = FALSE
.- colon.pi
Logical. If
TRUE
, the interaction terms in the output will be will be formatted using:
to seperate the elements in the interaction term. Default isFALSE
, using the default formatting fromlavaan
. Only relevant ifstd.errors != "rescale"
andcorrection == TRUE
.
Details
For modsem_da
and modsem_mplus
objects, the interaction term is not a formal
variable in the model and therefore lacks a defined variance. Under assumptions of normality
and zero-mean variables, the interaction variance is estimated as:
$$var(xz) = var(x) * var(z) + cov(x, z)^2$$
This means the standardized estimate for the interaction differs from approaches like
lavaan
, which treats the interaction as a latent variable with unit variance.
For modsem_pi
objects, the interaction term is standardized by default assuming
var(xz) = 1
, but this can be overridden using the correction
argument.
NOTE: Standardized estimates are always placed in the est
column,
not est.std
, regardless of model type.
Methods (by class)
standardized_estimates(modsem_da)
: Method for `modsem_da` objectsstandardized_estimates(modsem_pi)
: Method formodsem_pi
objects
Examples
m1 <- '
# Outer Model
X =~ x1 + x2 + x3
Z =~ z1 + z2 + z3
Y =~ y1 + y2 + y3
# Inner Model
Y ~ X + Z + X:Z
'
# Double centering approach
est_dca <- modsem(m1, oneInt)
std1 <- standardized_estimates(est_dca) # no correction
summarize_partable(std1)
#> modsem (version 1.0.11)
#>
#> Number of model parameters 82
#> Number of latent variables 4
#> Number of observed variables 18
#>
#> Latent Variables:
#> Estimate Std.Error z.value P(>|z|)
#> X =~
#> x1 0.927 0.005 197.805 0.000
#> x2 0.892 0.006 156.888 0.000
#> x3 0.914 0.005 180.631 0.000
#> Z =~
#> z1 0.926 0.005 197.375 0.000
#> z2 0.899 0.005 164.838 0.000
#> z3 0.913 0.005 180.409 0.000
#> Y =~
#> y1 0.969 0.002 493.285 0.000
#> y2 0.955 0.002 390.119 0.000
#> y3 0.962 0.002 435.067 0.000
#> XZ =~
#> x1z1 0.878 0.007 129.129 0.000
#> x2z1 0.836 0.008 105.776 0.000
#> x3z1 0.843 0.008 108.821 0.000
#> x1z2 0.833 0.008 102.749 0.000
#> x2z2 0.804 0.009 90.666 0.000
#> x3z2 0.812 0.009 93.853 0.000
#> x1z3 0.867 0.007 121.949 0.000
#> x2z3 0.829 0.008 102.106 0.000
#> x3z3 0.826 0.008 100.718 0.000
#>
#> Regressions:
#> Estimate Std.Error z.value P(>|z|)
#> Y ~
#> X 0.424 0.016 26.787 0.000
#> Z 0.358 0.016 22.372 0.000
#> XZ 0.455 0.016 28.971 0.000
#>
#> Covariances:
#> Estimate Std.Error z.value P(>|z|)
#> x1z1 ~~
#> x2z2 0.000 0.000
#> x2z3 0.000 0.000
#> x3z2 0.000 0.000
#> x3z3 0.000 0.000
#> x1z2 0.384 0.018 21.659 0.000
#> x1z3 0.393 0.019 20.928 0.000
#> x2z1 0.415 0.017 24.499 0.000
#> x3z1 0.440 0.017 25.573 0.000
#> x2z1 ~~
#> x1z2 0.000 0.000
#> x1z3 0.000 0.000
#> x3z2 0.000 0.000
#> x3z3 0.000 0.000
#> x2z2 0.510 0.014 35.404 0.000
#> x2z3 0.542 0.014 38.238 0.000
#> x3z1 0.370 0.016 22.694 0.000
#> x1z2 ~~
#> x2z3 0.000 0.000
#> x3z3 0.000 0.000
#> x1z3 0.367 0.018 20.929 0.000
#> x2z2 0.486 0.014 33.698 0.000
#> x3z2 0.520 0.014 36.545 0.000
#> x3z1 ~~
#> x1z2 0.000 0.000
#> x1z3 0.000 0.000
#> x2z2 0.000 0.000
#> x2z3 0.000 0.000
#> x3z2 0.464 0.015 30.577 0.000
#> x3z3 0.507 0.015 34.430 0.000
#> x2z2 ~~
#> x1z3 0.000 0.000
#> x3z3 0.000 0.000
#> x2z3 0.486 0.015 33.189 0.000
#> x3z2 0.456 0.014 31.605 0.000
#> x3z2 ~~
#> x1z3 0.000 0.000
#> x2z3 0.000 0.000
#> x3z3 0.464 0.015 31.361 0.000
#> x1z3 ~~
#> x2z3 0.450 0.016 28.177 0.000
#> x3z3 0.474 0.016 29.999 0.000
#> x2z3 ~~
#> x3z3 0.404 0.015 26.242 0.000
#> X ~~
#> Z 0.201 0.023 8.786 0.000
#> XZ 0.015 0.024 0.628 0.530
#> Z ~~
#> XZ 0.060 0.024 2.462 0.014
#>
#> Variances:
#> Estimate Std.Error z.value P(>|z|)
#> x1 0.140 0.009 16.115 0.000
#> x2 0.204 0.010 20.047 0.000
#> x3 0.165 0.009 17.875 0.000
#> z1 0.142 0.009 16.321 0.000
#> z2 0.191 0.010 19.481 0.000
#> z3 0.167 0.009 18.042 0.000
#> y1 0.060 0.004 15.807 0.000
#> y2 0.089 0.005 18.988 0.000
#> y3 0.075 0.004 17.723 0.000
#> x1z1 0.229 0.012 19.190 0.000
#> x2z1 0.301 0.013 22.788 0.000
#> x3z1 0.289 0.013 22.109 0.000
#> x1z2 0.306 0.014 22.696 0.000
#> x2z2 0.353 0.014 24.786 0.000
#> x3z2 0.341 0.014 24.264 0.000
#> x1z3 0.249 0.012 20.178 0.000
#> x2z3 0.313 0.013 23.291 0.000
#> x3z3 0.317 0.014 23.421 0.000
#> X 1.000 0.000
#> Z 1.000 0.000
#> Y 0.398 0.016 25.401 0.000
#> XZ 1.000 0.000
#>
std2 <- standardized_estimates(est_dca, correction = TRUE) # apply correction
summarize_partable(std2)
#> modsem (version 1.0.11)
#>
#> Number of model parameters 82
#> Number of latent variables 4
#> Number of observed variables 18
#>
#> Latent Variables:
#> Estimate Std.Error z.value P(>|z|)
#> X =~
#> x1 0.927 0.005 197.805 0.000
#> x2 0.892 0.006 156.888 0.000
#> x3 0.914 0.005 180.631 0.000
#> Z =~
#> z1 0.926 0.005 197.375 0.000
#> z2 0.899 0.005 164.838 0.000
#> z3 0.913 0.005 180.409 0.000
#> Y =~
#> y1 0.969 0.002 493.285 0.000
#> y2 0.955 0.002 390.119 0.000
#> y3 0.962 0.002 435.067 0.000
#> XZ =~
#> x1z1 0.878 0.007 129.129 0.000
#> x2z1 0.836 0.008 105.776 0.000
#> x3z1 0.843 0.008 108.821 0.000
#> x1z2 0.833 0.008 102.749 0.000
#> x2z2 0.804 0.009 90.666 0.000
#> x3z2 0.812 0.009 93.853 0.000
#> x1z3 0.867 0.007 121.949 0.000
#> x2z3 0.829 0.008 102.106 0.000
#> x3z3 0.826 0.008 100.718 0.000
#>
#> Regressions:
#> Estimate Std.Error z.value P(>|z|)
#> Y ~
#> X 0.424 0.016 26.787 0.000
#> Z 0.358 0.016 22.372 0.000
#> XZ 0.444 0.015 28.971 0.000
#>
#> Covariances:
#> Estimate Std.Error z.value P(>|z|)
#> x1z1 ~~
#> x2z2 0.000 0.000
#> x2z3 0.000 0.000
#> x3z2 0.000 0.000
#> x3z3 0.000 0.000
#> x1z2 0.384 0.018 21.659 0.000
#> x1z3 0.393 0.019 20.928 0.000
#> x2z1 0.415 0.017 24.499 0.000
#> x3z1 0.440 0.017 25.573 0.000
#> x2z1 ~~
#> x1z2 0.000 0.000
#> x1z3 0.000 0.000
#> x3z2 0.000 0.000
#> x3z3 0.000 0.000
#> x2z2 0.510 0.014 35.404 0.000
#> x2z3 0.542 0.014 38.238 0.000
#> x3z1 0.370 0.016 22.694 0.000
#> x1z2 ~~
#> x2z3 0.000 0.000
#> x3z3 0.000 0.000
#> x1z3 0.367 0.018 20.929 0.000
#> x2z2 0.486 0.014 33.698 0.000
#> x3z2 0.520 0.014 36.545 0.000
#> x3z1 ~~
#> x1z2 0.000 0.000
#> x1z3 0.000 0.000
#> x2z2 0.000 0.000
#> x2z3 0.000 0.000
#> x3z2 0.464 0.015 30.577 0.000
#> x3z3 0.507 0.015 34.430 0.000
#> x2z2 ~~
#> x1z3 0.000 0.000
#> x3z3 0.000 0.000
#> x2z3 0.486 0.015 33.189 0.000
#> x3z2 0.456 0.014 31.605 0.000
#> x3z2 ~~
#> x1z3 0.000 0.000
#> x2z3 0.000 0.000
#> x3z3 0.464 0.015 31.361 0.000
#> x1z3 ~~
#> x2z3 0.450 0.016 28.177 0.000
#> x3z3 0.474 0.016 29.999 0.000
#> x2z3 ~~
#> x3z3 0.404 0.015 26.242 0.000
#> X ~~
#> Z 0.201 0.023 8.786 0.000
#> XZ 0.016 0.025 0.628 0.530
#> Z ~~
#> XZ 0.062 0.025 2.462 0.014
#>
#> Variances:
#> Estimate Std.Error z.value P(>|z|)
#> x1 0.140 0.009 16.115 0.000
#> x2 0.204 0.010 20.047 0.000
#> x3 0.165 0.009 17.875 0.000
#> z1 0.142 0.009 16.321 0.000
#> z2 0.191 0.010 19.481 0.000
#> z3 0.167 0.009 18.042 0.000
#> y1 0.060 0.004 15.807 0.000
#> y2 0.089 0.005 18.988 0.000
#> y3 0.075 0.004 17.723 0.000
#> x1z1 0.229 0.012 19.190 0.000
#> x2z1 0.301 0.013 22.788 0.000
#> x3z1 0.289 0.013 22.109 0.000
#> x1z2 0.306 0.014 22.696 0.000
#> x2z2 0.353 0.014 24.786 0.000
#> x3z2 0.341 0.014 24.264 0.000
#> x1z3 0.249 0.012 20.178 0.000
#> x2z3 0.313 0.013 23.291 0.000
#> x3z3 0.317 0.014 23.421 0.000
#> X 1.000 0.000
#> Z 1.000 0.000
#> Y 0.398 0.016 25.401 0.000
#> XZ 1.049 0.000
#>
if (FALSE) { # \dontrun{
est_lms <- modsem(m1, oneInt, method = "lms")
standardized_estimates(est_lms) # correction not relevant for lms
} # }