Learn R Programming

reghelper (version 0.3.3)

summary.block_lm: Summarizing block regression.

Description

summary method for class "block_lm".

Usage

# S3 method for block_lm
summary(object, ...)

Arguments

object

An object of class "block_lm", usually, a result of a call to build_model.

...

Further arguments passed to or from other methods.

Value

The function computes and returns a named list of summary statistics of the fitted linear models given in model. The list has the following elements:

formulas A list of the regression formulas used for each block.
residuals A matrix with quantiles of the residuals for each model.
coefficients A list with a matrix of coefficients for each model, as well as the standard error, t-statistic, and p-value.
overall A data frame with information about the overall models, including the multiple R-squared value; adjusted R-squared; F-statistic, degrees of freedom, and p-value for each overall model; and the delta R-squared (change in R-squared) and its associated F-statistic and p-value.

See Also

build_model, print.block_lm_summary

Examples

Run this code
# NOT RUN {
# 2 blocks: Petal.Length; Petal.Length + Petal.Width
model1 <- build_model(Sepal.Length, Petal.Length, Petal.Width, data=iris, model='lm')
summary(model1)
coef(model1)

# 2 blocks: Species; Species + Petal.Length + Petal.Width + Petal.Length:Petal.Width
model2 <- build_model(Sepal.Length, Species, c(Petal.Length * Petal.Width), data=iris, model='lm')
summary(model2)
coef(model2)
# }

Run the code above in your browser using DataLab