coef.outference: Extract coefficients from an '"outference"' object

Description Usage Arguments Value Author(s) See Also Examples

View source: R/outference.R

Description

This function extracts the estimated regression coefficients from an "outference" object.

Usage

1
2
## S3 method for class 'outference'
coef(object, model = c("removed", "original"), ...)

Arguments

object,

an object of class "outference".

model,

if model = "removed", then the coefficients are from the fit with outliers removed; if model = "original", then the coefficients are from the fit with all the data.

...,

other arguments.

Value

This function returns the desired vector of regression coefficients.

Author(s)

Shuxiao Chen <[email protected]>

See Also

outference for model fitting;

summary.outference for summaries;

confint.outference for confidence intervals of regression coefficients;

plot.outference for plotting the outlying measure;

predict.outference for making predictions.

Examples

1
2
3
4
5
6
7
## Brownlee’s Stack Loss Plant Data
data("stackloss")
## fit the model
## detect outlier using Cook's distance with cutoff = 4
fit <- outference(stack.loss ~ ., data = stackloss, method = "cook", cutoff = 4)
coef(fit, model = "original")    # the coefficients from the fit using all the data
coef(fit, model = "removed")     # the coefficients from the fit after outlier removal

shuxiaoc/outference documentation built on Dec. 5, 2017, 3:48 a.m.