Rescales fitted path coefficients so they are comparable across predictors. Two scalings and two standardization bases are offered, reported on each component's link scale:
Usage
standardize(object, method = c("sd_x", "latent"), scale = c("1sd", "2sd"), ...)
# S3 method for class 'drm_sem'
standardize(object, method = c("sd_x", "latent"), scale = c("1sd", "2sd"), ...)
# S3 method for class 'drm_psem'
standardize(object, method = c("sd_x", "latent"), scale = c("1sd", "2sd"), ...)Value
An object of class c("drm_standardized_paths", "drm_paths", "data.frame")
containing the paths() table with an added std.estimate column (link scale).
Details
"sd_x"multiplies each coefficient by the standard deviation of its predictor (or twice the SD underscale = "2sd"), giving the link-scale change in the component per one-SD (or 2-SD) change in the predictor."latent"additionally divides by the standard deviation of the fitted linear predictor of that component (incorporating distribution-specific latent error variance for GLM mean paths), the latent-scale standardization used for generalized responses (after Grace & Bollen 2005; Grace et al. 2018).
Conventions & Gelman 2-SD Scaling
See docs/design/08-standardization.md for the full rationale and citations.
Link scale only. Standardized coefficients are reported on each component's link scale (the
linkcolumn ofpaths()), where the linear-predictor algebra is valid. They are not back-transformed: under a nonlinear link a standardized coefficient has no constant response-scale counterpart. For response-scale, functional interpretations use the effect engine (direct_effects(),total_effects()) instead.Factor and binary predictors (SD = 1). Categorical factor dummies and binary 0/1 indicators use a scale multiplier of 1, so their standardized coefficient reflects the raw per-contrast effect (lavaan's
std.noxconvention; piecewiseSEM likewise does not SD-rescale categorical predictors).Gelman (2008) 2-SD scaling (
scale = "2sd"). Underscale = "2sd", continuous numeric predictors are scaled by \(2 \times \text{SD}(X)\) while binary and factor predictors retain a scale multiplier of 1. This places continuous and binary predictors on a directly comparable footing, as a 2-SD shift in a symmetric continuous variable spans the middle 50–80% of its distribution, corresponding to a 0-to-1 transition.Per-component
latent. Thelatentdivisor is the SD of that component's own linear predictor, so asigmaorzipath is standardized on its own (log / logit) link scale — there is no marginal outcome SD for a non-mucomponent. This per-component latent standardization is drmSEM's distributional generalization of Grace & Bollen.
GLM mean paths (Theoretical Link Variance)
For a mu path on a generalized link, the latent divisor is
\(\sqrt{\text{Var}(\eta) + \sigma_E^2}\), adding the link's
distribution-specific latent-scale error variance \(\sigma_E^2\):
Logit: \(\pi^2 / 3 \approx 3.290\) (logistic threshold distribution)
Probit: \(1\) (standard normal threshold distribution)
Cloglog: \(\pi^2 / 6 \approx 1.645\) (Gumbel threshold distribution)
Log: \(\log(1 + 1 / \bar{\mu})\) observation-level delta-method variance where \(\bar{\mu} = \text{mean}(\exp(\eta))\) (Nakagawa & Schielzeth 2010; Grace et al. 2018).
Identity links and non-mu components are unchanged (the divisor is
sd(eta) on the component's own link scale).
References
Grace JB, Bollen KA (2005). “Interpreting the Results from Multiple Regression and Structural Equation Models.” Bulletin of the Ecological Society of America, 86(4), 283–295. doi:10.1890/0012-9623(2005)86[283:ITRFMR]2.0.CO;2 .
Grace JB, Bollen KA (2008). “Representing General Theoretical Concepts in Structural Equation Models: The Role of Composite Variables.” Environmental and Ecological Statistics, 15(2), 191–213. doi:10.1007/s10651-007-0047-7 .
Grace JB, Johnson DJ, Lefcheck JS, Byrnes JEK (2018). “Quantifying Relative Importance: Computing Standardized Effects in Models with Binary Outcomes.” Ecosphere, 9(6), e02283. doi:10.1002/ecs2.2283 .
Gelman A (2008). “Scaling Regression Inputs by Dividing by Two Standard Deviations.” Statistics in Medicine, 27(15), 2865–2873. doi:10.1002/sim.3107 .
Nakagawa S, Schielzeth H (2010). “Repeatability for Gaussian and Non-Gaussian Data: A Practical Guide for Biologists.” Biological Reviews, 85(4), 935–956. doi:10.1111/j.1469-185X.2010.00141.x .
Examples
if (FALSE) { # \dontrun{
sem <- drm_sem(
size = drm_node(drmTMB::bf(size ~ temp + habitat, sigma ~ temp),
family = stats::gaussian()),
abundance = drm_node(drmTMB::bf(abundance ~ size + temp, zi ~ habitat),
family = drmTMB::nbinom2()),
data = dat)
standardize(sem, method = "latent", scale = "2sd")
} # }