Learn R Programming

alr3 (version 1.1.12)

outlier.t.test: 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.

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.

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.

References

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

Examples

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

Run the code above in your browser using DataLab