jackLM: Jackknife linear model

View source: R/jackLM.R

jackLMR Documentation

Jackknife linear model

Description

Jackknife (Leave-One-Out) method for parameter estimation and confidence interval of a linear model, according to Quenouille (1956).

Usage

jackLM(model, alpha = 0.05) 

Arguments

model

an lm model.

alpha

the \alpha-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}\beta + \varepsilon. Pseudovalues from obtained and original coefficients are then created, P_{-i} = (N \cdot \beta) - ((N - 1) * \beta_{-i}), from which the average \overline{P_{-i}} and standard error \frac{\sigma}{\sqrt N} is calculated to obtain the classical confidence interval \overline{X}_n \pm t_{\alpha,\nu}\frac{S_n}{\sqrt{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 with single influencer (#18) 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)

reverseR documentation built on Sept. 12, 2024, 7:32 a.m.