linreg-class: Linear Regression

Description Details Source Examples

Description

linreg performs linear regression, stores its result and offers methods for analysis.

Details

linreg is an RC class. Upon object instantiation, in the initialize method, it performs all calculations of quantities of interest, namely estimated coefficients, fitted dependent variable values, residuals, degrees of freedom of the system, residual variance, the variance of the coefficients, t-values and p-values for each coefficient.

Residuals, predicted values and coefficients can be obtained through the methods resid(), pred() and coef().

print() prints out the input information used in the regression and the resulting coefficients.

summary() prints out statistics about the regression.

plot() plots interesting graphics about the performed regression.

Source

Read more at https://en.wikipedia.org/wiki/Linear_regression

Examples

1
2
3
4
5
6
data(iris)
regression_object = linreg(Petal.Length~Species, data = iris)
regression_object$resid()
regression_object$pred()
regression_object$coef()
regression_object$summary()

Efaq/lab4elife599carde734 documentation built on Dec. 17, 2021, 6:23 p.m.