predict.uRegress: Prediction Intervals for 'uRegress' objects

View source: R/regress_utils.R

predict.uRegressR Documentation

Prediction Intervals for uRegress objects

Description

Produces prediction intervals for objects of class uRegress.

Usage

## S3 method for class 'uRegress'
predict(object, interval = "prediction", level = 0.95, ...)

Arguments

object

an object of class uRegress.

interval

Type of interval calculation

level

Tolerance/confidence level

...

other arguments to pass to the appropriate predict function for the class of object$fit. See predict.lm, or predict.glm for more details.

Value

Returns a matrix with the fitted value and prediction interval for the entered X.

See Also

regress

Examples


# Loading required libraries
library(survival)
library(sandwich)

# Reading in a dataset
data(mri)

# Linear regression of LDL on age (with robust SE by default)
testReg <- regress ("mean", ldl~age, data = mri)

# 95% Prediction Interval for age 50
predict(testReg)


rigr documentation built on Sept. 7, 2022, 1:05 a.m.