Description Usage Arguments Details Value Author(s) Examples
View source: R/summary.lmHetero.R
summary.lmHetero
provides relevant summary information of a
heteroscedastic regression model estimated by lmHetero
.
1 2 |
object |
An object of S3-class |
... |
Currently not in use. |
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.
the input 'object' is returned silently.
Michael Tiefelsdorf tiefelsdorf@utdallas.edu
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.