summary.block_lm | R Documentation |
These functions offer useful methods for objects created by the
build_model
function: block_lm
, block_aov
, and
block_glm
.
## S3 method for class 'block_lm'
summary(object, ...)
## S3 method for class 'block_lm_summary'
print(
x,
digits = max(3L, getOption("digits") - 3L),
signif.stars = getOption("show.signif.stars"),
...
)
## S3 method for class 'block_lm'
coef(object, num = NULL, ...)
## S3 method for class 'block_lm'
residuals(object, num = NULL, ...)
## S3 method for class 'block_lm'
fitted(object, num = NULL, ...)
## S3 method for class 'block_aov'
summary(object, ...)
## S3 method for class 'block_aov_summary'
print(
x,
digits = max(3L, getOption("digits") - 3L),
signif.stars = getOption("show.signif.stars"),
...
)
## S3 method for class 'block_aov'
coef(object, num = NULL, ...)
## S3 method for class 'block_aov'
residuals(object, num = NULL, ...)
## S3 method for class 'block_aov'
fitted(object, num = NULL, ...)
## S3 method for class 'block_glm'
summary(object, ...)
## S3 method for class 'block_glm_summary'
print(
x,
digits = max(3L, getOption("digits") - 3L),
signif.stars = getOption("show.signif.stars"),
...
)
## S3 method for class 'block_glm'
coef(object, num = NULL, ...)
## S3 method for class 'block_glm'
residuals(object, num = NULL, ...)
## S3 method for class 'block_glm'
fitted(object, num = NULL, ...)
object |
An object of class |
... |
Further arguments passed to or from other methods. |
x |
An object of class |
digits |
The number of significant digits to use when printing. |
signif.stars |
Logical. If |
num |
Numeric vector with the index of model(s) from which to return the requested output. If NULL, will return output from all blocks. |
The summary
function computes and returns a named list of
summary statistics of the fitted linear models given in object
. 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. |
The other functions listed here provide convenient access to the individual components of this summary.
# 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) # returns coefficients from both blocks 1 and 2
# 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, num=2) # returns coefficients from second block only
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.