outlierTest {car} | R Documentation |
Reports the Bonferroni p-values for Studentized residuals in linear and generalized linear models, based on a t-test for linear models and normal-distribution test for generalized linear models.
outlierTest(model, ...) ## S3 method for class 'lm' outlierTest(model, cutoff=0.05, n.max=10, order=TRUE, labels=names(rstudent), ...) ## S3 method for class 'outlierTest' print(x, digits=5, ...)
model |
an |
cutoff |
observations with Bonferonni p-values exceeding
|
n.max |
maximum number of observations to report (default, |
order |
report Studenized residuals in descending order of magnitude?
(default, |
labels |
an optional vector of observation names. |
... |
arguments passed down to methods functions. |
x |
|
digits |
number of digits for reported p-values. |
For a linear model, p-values reported use the t distribution with degrees of
freedom one less than the residual df for the model. For a generalized
linear model, p-values are based on the standard-normal distribution. The Bonferroni
adjustment multiplies the usual two-sided p-value by the number of
observations. The lm
method works for glm
objects. To show all
of the observations set cutoff=Inf
and n.max=Inf
.
an object of class outlierTest
, which is normally just
printed.
John Fox jfox@mcmaster.ca and Sanford Weisberg
Cook, R. D. and Weisberg, S. (1982) Residuals and Influence in Regression. Chapman and Hall.
Fox, J. (2008) Applied Regression Analysis and Generalized Linear Models, Second Edition. Sage.
Fox, J. and Weisberg, S. (2011) An R Companion to Applied Regression, Second Edition, Sage.
Weisberg, S. (2005) Applied Linear Regression, Third Edition, Wiley.
Williams, D. A. (1987) Generalized linear model diagnostics using the deviance and single case deletions. Applied Statistics 36, 181–191.
outlierTest(lm(prestige ~ income + education, data=Duncan))