linreg-class: A multiple linear regression function.

Description Fields Methods

Description

Multiple linear regression function which returns the coeficients (the regression weights) of the independent variables with their error, t-value and p-value also an a estimate for a residual variance and the degrees of freedom in the model. The description of the linear model can be found here: https://en.wikipedia.org/wiki/Regression_analysis

Fields

formula:

an object of class object, the model to fitted

data:

an data frame, contain the variables in the model

coefficients:

an matrix, regressions coefficients

fitted_values:

an matrix, fitted values

residuals:

an matrix, the residulas

df:

an integer, the degrees of freedom

residual_var:

numeric, the residual variance

coefficients_var:

numeric, the variance of the regression coefficients

t_values:

an matrix, the t-values for each coefficient

Methods

coef()

Return coeficients

initialize(formula, data)

Initialize all regression variables

plot()

Show residuals vs fitted plot and scale-location plot

pred()

Return fitted values

print()

Show linreg formula and coefficients of indepentends

resid()

Return residuals

summary()

Show resituals, coefficients with their estimate, standard error, t-value and p-value


shihs/LiUAdRLab4 documentation built on May 9, 2019, 8:19 a.m.