Description Usage Arguments Details Value Methods Note Author(s) See Also Examples
This functions can be used to validate some assumptions of linear regressions, generalized linear regressions and probably more. The idea of this functions is to illustrate possibilities, not to provide fully functional code. The functions work for regression models with continous variables only.
1 2 3 4 5 6 7 8 9 10 | inspect(mymodel, which = c("select", "sequence", "all"), id = c("all", "none"), ...)
dep(mymodel, id= c("all", "none"), ...)
hnp(mymodel, id= c("all", "none"), ...)
ihp(mymodel, id= c("all", "none"), ...)
ilp(mymodel, id= c("all", "none"), ...)
irp(mymodel, id= c("all", "none"), ...)
lep(mymodel, id= c("all", "none"), ...)
prp(mymodel, id= c("all", "none"), ...)
ryp(mymodel, id= c("all", "none"), ...)
rpp(mymodel, id= c("all", "none"), ...)
|
mymodel |
an object of class |
which |
a character string defining how the inspection plots for
the class of mymodel are presented; one of the following:
|
id |
a character string or numeric value; in which panel should it be possible to interactively identify values |
... |
further arguments |
The function inspect calls other functions (depending on their class) to inspect the model assumptions.
A list with identified values (row names), one slot for each inspection function.
signature(mymodel = "ANY")
signature(mymodel = "glm")
signature(mymodel = "lm")
On some devices you are not allowed to resize the window before interactively selecting points
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(swiss)
model <- lm(Fertility ~ ., data = swiss)
## Not run: i.lm <- inspect(model, which = "sequence")
## Not run: model2 <- lm(Fertility ~ ., data = swiss[-i.lm,]
## Not run: i.lm <- inspect(model, which = "all", id = "none")
### for printing
## Not run:
pdf(~/temp/diagnostic.pdf)
inspect(model)
dev.off()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.