hanova {lmreg}R Documentation

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

Description

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

Usage

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

data(birthwt)
lmbw <- lm(bwt ~ smoke+factor(race), data = birthwt)
lm1 <- lm(bwt ~ smoke, data = birthwt)
hanova(lm1,lmbw)

[Package lmreg version 1.2 Index]