linreg-class: calculate the statistics using ordinary least squares

Description Fields

Description

calculate the statistics using ordinary least squares

Fields

beta:

regression coefficient

y_hat:

fitted value

e_hat

: residuals (e with a hat)

df

: degree of fredom

sigma_square:

variance of residuals

variance_beta:

variance of regression coefficient

t_beta:

t value of regression coefficient

Form:

input formula

data

: input dataframe(the data reference of formula)

dfname:

name of dataframe

Formulaf

: string of formula(without bracket)

X:

created by model.matrix()

y:

true value in dataframe not estimated value


Xiaolin-Jiang/lab4 documentation built on Dec. 18, 2021, 7:22 p.m.