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

Description Usage Arguments Details Value Author(s) References Examples

View source: R/hanova.R

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)

lmreg documentation built on May 2, 2019, 9:29 a.m.

Related to hanova in lmreg...