Learn R Programming

reghelper (version 0.3.3)

beta.lme: Standardized coeffients of a model.

Description

beta.lme returns the summary of a linear model where all variables have been standardized.

Usage

# S3 method for lme
beta(model, x = TRUE, y = TRUE, skip = NULL, ...)

Arguments

model

A fitted linear model of type 'lme'.

x

Logical. Whether or not to standardize predictor variables.

y

Logical. Whether or not to standardize criterion variables.

skip

A string vector indicating any variables you do not wish to be standarized.

...

Not currently implemented; used to ensure consistency with S3 generic.

Value

Returns the summary of a multi-level linear model, with the output showing the beta coefficients, standard error, t-values, and p-values for each predictor.

Details

This function takes a multi-level model and standardizes the variables, in order to produce standardized (i.e., beta) coefficients rather than unstandardized (i.e., B) coefficients.

Unlike similar functions, this function properly calculates standardized estimates for interaction terms (by first standardizing each of the individual predictor variables).

See Also

beta.lm, beta.glm, beta.merMod

Examples

Run this code
# NOT RUN {
# iris data
if (require(nlme, quietly=TRUE)) {
    model <- lme(Sepal.Width ~ Sepal.Length + Petal.Length, random=~1|Species, data=iris)
    beta(model)  # all three variables standardized

    beta(model, skip='Petal.Length')  # all variables except Petal.Length standardized
}
# }

Run the code above in your browser using DataLab