ModelResponse: Linear Model Response

Description Usage Initialize Details

Description

R6 object containing all necessary information of a linear model object

Usage

1
2
3
radon_model <- lm(Uppm ~ typebldg + basement + dupflag, data = radon_mn)
result <- extract_model(radon_model)
result$as_json()

Initialize

This should only be called by methods within the package

Details

$model_type: short description of the model information. "linear model"

$model_call: character value of the call made to produce the model

$response_variable: character value of the response in the linear model

$beta_variables: character vector of beta variables used in the linear model

$diag_model: single row data.frame information about the linear model Contains

'r.squared'

The percent of variance explained by the model

'adj.r.squared'

r.squared adjusted based on the degrees of freedom

'sigma'

Estimate of residual standard deviation when corresponding observation is dropped from model

'statistic'

F-statistic

'p.value'

p-value from the F test, describing whether the full regression is significant

'df'

Degrees of freedom used by the coefficients

'logLik'

the data's log-likelihood under the model

'AIC'

the Akaike Information Criterion

'BIC'

the Bayesian Information Criterion

'deviance'

deviance

'df.residual'

residual degrees of freedom

$diag_coefs: 'p' row data.frame information about the linear model coefficients.

'term'

The term in the linear model being estimated and tested

'estimate'

The estimated coefficient

'std.error'

The standard error from the linear model

'statistic'

t-statistic

'p.value'

two-sided p-value

$diag_data: 'n' row data.frame information about the linear model data.

'.fitted'

Fitted values of model

'.se.fit'

Standard errors of fitted values

'.resid'

Residuals

'.hat'

Diagonal of the hat matrix

'.sigma'

Estimate of residual standard deviation when corresponding observation is dropped from model

'.cooksd'

Cooks distance, ‘cooks.distance’

'.std.resid'

Standardised residuals. (Some unusual "lm" objects, such as "rlm" from MASS, may omit ‘.cooksd’ and ‘.std.resid’. "gam" from mgcv omits ‘.sigma’)


d3m-purdue/d3mLm documentation built on May 20, 2019, 2:25 p.m.