extract_lm_quantities function

Extract critical quantities from a lm object (for confidence interval calculations)

Extract critical quantities from a lm object (for confidence interval calculations)

extract_lm_quantities(lm_X, alpha = 0.05)

Arguments

  • lm_X: a lm object
  • alpha: level of significance. Defaults to 0.05.

Returns

A list containing the lm model matrix (dmX), the inverse of t(dmX) x dmX (XtX_inv), the standard error (s_e), the estimated single column beta matrix (beta_hat), and the critical value of the relevant degrees of freedom t-dist (crit_val).