Description Usage Arguments Value References Examples
Confidence functions for the expected response of a linear model under Gaussian noise assumptions.
1 | lm.lincom.conf(mod, x, plot = TRUE, conf.level = 0.95)
|
mod |
an output from lm |
x |
a vector containing the predictor values for which the expected response is desired |
plot |
whether to plot the confidence density and curve |
conf.level |
the confidence level for the confidence interval indicated on the confidence curve |
A list containing the confidence functions pconf, dconf, cconf, and qconf for the expected response at x, as well as the P-curve and S-curve.
Tore Schweder and Nils Lid Hjort. Confidence, likelihood, probability. Vol. 41. Cambridge University Press, 2016.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Prediction of body fat percentage from other body measurements.
data(fat)
mod <- lm(body.fat ~ age + weight + height, data = fat)
# Confidence curve for the expected BFP of a 170lb, 6ft, 20-year old male
x <- c(1, # Intercept
20, # 20 years old
170, # 170 lbs
6*12) # 72 inches (6 feet)
m.conf <- lm.lincom.conf(mod, x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.