Skip to contents

standardize_model() post-processes the output of modsem_da() (or of modsem()) when method = "lms" / method = "qml"), replacing the unstandardized coefficient vector ($coefs) and its variance–covariance matrix ($vcov) with fully standardized counterparts (including the measurement model).The procedure is purely algebraic— no re-estimation is carried out —and is therefore fast and deterministic.

Usage

standardize_model(model, monte.carlo = FALSE, mc.reps = 10000, ...)

Arguments

model

A fitted object of class modsem_da. Passing any other object triggers an error.

monte.carlo

Logical. If TRUE, the function will use Monte Carlo simulation to obtain the standard errors of the standardized estimates. If FALSE, the delta method is used. Default is FALSE.

mc.reps

Number of Monte Carlo replications. Default is 10,000. Ignored if monte.carlo = FALSE.

...

Arguments passed on to other functions

Value

The same object (returned invisibly) with three slots overwritten

$parTable

Parameter table whose columns est and std.error now hold standardized estimates and their (delta-method) standard errors, as produced by standardized_estimates().

$coefs

Named numeric vector of standardized coefficients. Intercepts (operator ~1) are removed, because a standardized variable has mean 0 by definition.

$vcov

Variance–covariance matrix corresponding to the updated coefficient vector. Rows/columns for intercepts are dropped, and the sub-matrix associated with rescaled parameters is adjusted so that its diagonal equals the squared standardized standard errors.

The object keeps its class attributes, allowing seamless use by downstream S3 methods such as summary(), coef(), or vcov().

Because the function merely transforms existing estimates, parameter constraints imposed through shared labels remain satisfied.

See also

standardized_estimates()

Obtains the fully standardized parameter table used here.

modsem()

Fit model using LMS or QML approaches.

modsem_da()

Fit model using LMS or QML approaches.

Examples

if (FALSE) { # \dontrun{
# Latent interaction estimated with LMS and standardized afterwards
syntax <- "
  X =~ x1 + x2 + x3
  Y =~ y1 + y2 + y3
  Z =~ z1 + z2 + z3
  Y ~ X + Z + X:Z
"
fit  <- modsem_da(syntax, data = oneInt, method = "lms")
sfit <- standardize_model(fit, monte.carlo = TRUE)

# Compare unstandardized vs. standardized summaries
summary(fit)  # unstandardized
summary(sfit) # standardized 
} # }