hanova: ANOVA table for adequacy of a subset in a linear model)

Description Usage Arguments Details Value Author(s) References Examples

Description

Prepares the Analysis of Variance table for testing adequacy of a subset model within a linear model.

Usage

1
hanova(lm1, lm2)

Arguments

lm1

An lm object describing full model.

lm2

An lm object describing subset model.

Details

Normal distribution of response (given explanatory variables and/or factors) is assumed. The program simply reformats the output of the anova function.

Value

Returns analysis of variance table for testing adequacy of lm2 within lm1.

Author(s)

Debasis Sengupta <shairiksengupta@gmail.com>, Jinwen Qiu <qjwsnow_ctw@hotmail.com>

References

Sengupta and Jammalamadaka (2019), Linear Models and Regression with R: An Integrated Approach.

Examples

1
2
3
4
data(birthwt)
lmbw <- lm(BWT ~ SMOKE+factor(RACE), data = birthwt)
lm1 <- lm(BWT ~ SMOKE, data = birthwt)
hanova(lm1,lmbw)

marutter/lmreg documentation built on May 8, 2019, 1:51 p.m.