cipi: Confidence Interval and Predictive Interval for Linear Models

Description Usage Arguments Details Value References Examples

Description

Calculates the predicted response value associated with the inputted hmat value. This function also calculates the predicted value's confidence interval and predictive interval along with their standard errors.

Usage

1
cipi(fit, hmat, alpha = 0.05)

Arguments

fit

A linear model

hmat

A vector used to store the value to be predicted for

alpha

Level of significance to calculate the confidence interval and predictive interval.

Details

A sample of this function's usage can be found in Example 9.6.1 from the book, Introduction to Mathematical Statistics (8th Edition)

Value

n x 1 numeric vector containing the random deviates.

References

Hogg, R., McKean, J., Craig, A. (2018) Introduction to Mathematical Statistics, 8th Ed. Boston: Pearson.

Examples

1
2
3
year <- men1500m$year
time <- men1500m$time
cipi(fit = lm(time ~ year), hmat = c(1, 2020), alpha = 0.05)

austinragotzy/mathstat documentation built on May 13, 2019, 11:30 a.m.