Extract the coefficient of determination from a linear model object.
Source:R/FSAUtils.R
rSquared.Rd
Extracts the coefficient of determination (i.e., “r-squared”) from a linear model (i.e., lm
) object.
Usage
rSquared(object, ...)
# S3 method for default
rSquared(object, ...)
# S3 method for lm
rSquared(object, digits = getOption("digits"), percent = FALSE, ...)
Arguments
- object
An object saved from
lm
.- ...
Additional arguments for methods.
- digits
A single number that is the number of digits to round the returned result to.
- percent
A logical that indicates if the result should be returned as a percentage (
=TRUE
) or as a proportion (=FALSE
; default).