Skip to contents

z_j = beta_j / se(beta_j) (ESL eq 3.12) with two-sided normal and t (n - p df) p-values; a zero standard error gives an infinite z.

Usage

morie_esl_z_score(X, y, beta)

Arguments

X

Design matrix.

y

Response.

beta

Coefficients.

Value

Named list: estimate, z, se, p_normal, p_t, df, n, p.

References

Hastie, Tibshirani & Friedman (2009), sec. 3.2.

Examples

X <- cbind(1, c(1, -1, 1, -1))
y <- c(3.2, -0.8, 2.8, -1.2)
morie_esl_z_score(X, y, qr.coef(qr(X), y))$z
#> [1]  7.071068 14.142136