outlier.t.test {alr3}R Documentation

Bonferroni test for outliers in linear models

Description

Compute significance levels for the mean-shift outlier model using the Bonferroni inequality

Usage

outlier.t.test(m, order=TRUE, bound=1)

Arguments

m

A model of type lm.

order

If TRUE, order the cases according to the p-value. If FALSE, don't order.

bound

Ignore cases with p-value bigger or equal to this value.

Details

Returns length(res)*2*(1-pt(abs(res),df)), where res = rstandard(m) is the vector of Studentized residuals. These are two-sided Bonferroni significance levels for testing a single outlier.

Value

A data frame with columns giving the value of the studentized residual and corresponding Bonferroni p-value, and one row for each case for which the bound is satisfied.

Author(s)

Sanford Weisberg, sandy@stat.umn.edu

References

Weisberg, S. (2005). Applied Linear Regression, third edition, Wiley.

Examples

data(cloud)
m1 <- lm(logb(Rain,2)~S+logb(C,2)+logb(P,2)+E+A,data=cloud,subset=-2)
outlier.t.test(m1)

[Package alr3 version 1.1.12 Index]