summary.lmHetero: Function: Summerize lmHetero model estimates

Description Usage Arguments Details Value Author(s) Examples

View source: R/summary.lmHetero.R

Description

summary.lmHetero provides relevant summary information of a heteroscedastic regression model estimated by lmHetero.

Usage

1
2
## S3 method for class 'lmHetero'
summary(object, ...)

Arguments

object

An object of S3-class lmHetero.

...

Currently not in use.

Details

Regression tables for the estimate regression coefficients and the coefficients of the weights model are provided as well as a maximum likelihood ratio test is performed against a model, which assumes homoscedasticity.

Value

the input 'object' is returned silently.

Author(s)

Michael Tiefelsdorf tiefelsdorf@utdallas.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
library(sp)
data(tractShp)
validTractShp <- tractShp[!is.na(tractShp$BUYPOW), ]         # Remove 2 tracts with NA's
## Population at risk
totPop <- validTractShp$MALE+validTractShp$FEMALE

## H0 model
mod.lm <- mod.lmH <- lmHetero(PERCAPINC~PCTNOHINS+PCTMINOR+PCTUNIVDEG+PCTWHITE,
                              data=validTractShp)
summary(mod.lm)

## Preferred function call
mod.lmH <- lmHetero(PERCAPINC~PCTNOHINS+PCTMINOR+PCTUNIVDEG+PCTWHITE|log(totPop),
                    data=validTractShp)
summary(mod.lmH)

## Alternative function call
mod.lmH <- lmHetero(PERCAPINC~PCTNOHINS+PCTMINOR+PCTUNIVDEG+PCTWHITE, hetero=~log(totPop),
                    data=validTractShp)
summary(mod.lmH)

## Use estimated weights as input for weighted lm
mod.lmW <- lm(PERCAPINC~PCTNOHINS+PCTMINOR+PCTUNIVDEG+PCTWHITE, weights=mod.lmH$weights,
              data=validTractShp)
summary(mod.lmW)
hist(weighted.residuals(mod.lmW))

TexMix documentation built on March 1, 2020, 5:10 p.m.