Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
324 B
2
Indexable
Never
# compute 95% confidence interval for coefficients in 'linear_model' by hand
lm_sum <- summary(linear_model)

c("lower" = lm_sum$coef[2,1] - qt(0.975, df = lm_sum$df[2]) * lm_sum$coef[2, 2],
  "upper" = lm_sum$coef[2,1] + qt(0.975, df = lm_sum$df[2]) * lm_sum$coef[2, 2])
#>     lower     upper 
#> -3.222980 -1.336636
Leave a Comment