jackLM: Jackknife linear model according to Quenouille 1956

View source: R/jackLM.R

jackLMR Documentation

Jackknife linear model according to Quenouille 1956

Description

Jackknife (Leave-One-Out) method for parameter estimation and confidence interval of a linear model.

Usage

jackLM(formula, data = NULL, alpha = 0.05) 

Arguments

formula

a formula of type y ~ x for the linear model.

data

an optional data frame, list or environment containing the variables in the model.

alpha

the α-level to use as the threshold border.

Details

For all (x_i, y_i) datapoints, a linear model is created by leaving out each entry successively, Y_{-i} = X_{-i}β + \varepsilon. Pseudovalues from obtained and original coefficients are then created, P_{-i} = (N \cdot β) - ((N - 1) * β_{-i}), from which the average \overline{P_{-i}} and standard error \frac{σ}{√ N} is calculated to obtain the classical confidence interval \overline{X}_n \pm t_{α,ν}\frac{S_n}{√{n}}.

Value

A dataframe containg the estimated coefficients, their standard error, lower an upper confidence values and p-values.

Author(s)

Andrej-Nikolai Spiess

References

Notes on bias in estimation.
Quenouille MH.
Biometrika, 43, 1956, 353-36l.

Examples

## Example #1 with single influencers and insignificant model (p = 0.115).
## Jackknife estimates are robust w.r.t. outlier #18.
set.seed(123)
a <- 1:20
b <- 5 + 0.08 * a + rnorm(20, 0, 1)
LM1 <- lm(b ~ a)
jackLM(LM1)

anspiess/reverseR documentation built on May 14, 2022, 9:43 a.m.