knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(lab04)
linreg is used to fit linear models. It can be used to carry out regression, variance and analysis of covariance.
linreg(formula, data)
formula
: an object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted. The details of model specification are given under ‘Details’.
data : a vector specifying a subset of observations to be used in the fitting process.
An object of class linreg is a list containing at least the following components:
reg_coef : a named vector of coefficients
residuals : the residuals, that is response minus fitted values.
fitted_val : the fitted mean values.
degree_of_freedom : test
residul_variance : test
variance_reg_coef : test
t_value : test
p_value : test
R packages by Hadley Wickham
item <- linreg(formula = Petal.Length~Species, data = iris) item$print() item$summary()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.