stdcoef: Standardized Regression Coefficients

View source: R/standardize.R

stdcoefR Documentation

Standardized Regression Coefficients

Description

Computes standardized ("beta") regression coefficients for a fitted lm or mlm object, i.e. the coefficients that would result from fitting the same model with all numeric variables rescaled to mean 0, SD 1.

For an "mlm" object, standardization follows stdmodel()'s convention: the response(s) and numeric predictors are standardized; factor predictors are left raw.

Usage

stdcoef(object, ...)

## S3 method for class 'lm'
stdcoef(object, ...)

## S3 method for class 'mlm'
stdcoef(object, ...)

Arguments

object

A fitted "lm" or "mlm" object

...

Additional arguments. Not used.

Value

For an "lm" object, a named numeric vector of standardized coefficients (intercept excluded). For an "mlm" object, a numeric matrix of standardized coefficients (parameters x responses, intercept row excluded).

Author(s)

Michael Friendly

See Also

stdmodel(), coefplot.mlm(). For standard errors, test statistics and p-values on the standardized scale, run lmtest::coeftest() (and, for a tidy data frame, broom::tidy.coeftest()) on stdmodel()'s result.

Other multivariate linear models: coefplot(), glance.mlm(), stdmodel()

Examples

data(Prestige, package = "carData")
prestige.mod <- lm(prestige ~ income + education, data = Prestige)
stdcoef(prestige.mod)

rohwer.mod <- lm(cbind(SAT, PPVT, Raven) ~ SES + n + s + ns + na + ss, data = Rohwer)
stdcoef(rohwer.mod)


heplots documentation built on Sept. 13, 2026, 5:06 p.m.