outEff | R Documentation |
Plots the effect of a variable sequentially removing outlying observations.
outEff(
obj,
var,
data,
stat = c("cooksD", "hat", "deviance", "pearson"),
nOut = 10,
whichOut = NULL,
cumulative = FALSE
)
obj |
An object of class |
var |
A character string giving the name of the variable to be used. |
data |
A data frame. |
stat |
Which statistic to use to evaluate ‘outlyingness’. |
nOut |
Number of outliers to be removed. |
whichOut |
If not |
cumulative |
Logical indicating whether the outliers should be removed cumulatively, or each one in turn, replacing the other outlying observations. |
An effects plot that shows the effect of sequentially removing outliers as defined by 'stat'.
Dave Armstrong
data(aclp)
mod <- glm(democ ~ gdpw + popg,
data = subset(aclp, year == 1980),
family=binomial)
outEff(mod, "gdpw", subset(aclp, year==1980))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.