linreg-class: A Reference Class to represent a linear regression package in...

Description Value Fields

Description

Listed functions are as methods in the object included:

- print() prints out the coefficients and coefficient names, similar as done by the lm class

- plot() plots the two plots using ggplot2

1. plot "Residuals vs Fitted" 2. plot "Scale<e2><88><92>Location"

- resid() returns the vector of residuals e

- pred() returns the predicted values y

- coef() returns the coefficients as a named vector.

- summary() returns a similar printout as printed for lm objects,

- but only presents the coefficients with their standard error,

- t-value and p-value as well as the estimate of <cf><83><cb><86> and the degrees of freedom in the model.

Value

Nothing

Fields

X

the values of X as matrix

y

the values of y as matrix

regressions_coef

the regression coefficients, saved as matrix

fitted_values

the fitted values, saved as matrix

resi

the residuals, saved as matrix

n

the number of observations, saged as integer

p

the number of parameters in the model, saved as integer

dof

the degree of freedom, saved as integer

regressions_var

the variance of the regression coefficent, saved as matrix

resi_var

is the variance of residuals

t_value

is the t-value, saved as matrix

m_formula

is the formula

m_data

will return the name of the data


Philhoels/Lab4AdvR documentation built on May 23, 2019, 6:02 p.m.