predict.uRegress: Prediction Intervals for 'uRegress' objects

Description Usage Arguments Value Author(s) See Also Examples

View source: R/predict.uRegress.R

Description

Produces prediction intervals for objects of class uRegress.

Usage

1
2
## 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.coxph, predict.lm, or predict.glm for more details. Predictions are not currently implemented for objects of type geeglm.

Value

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

Author(s)

Scott S. Emerson, M.D., Ph.D., Andrew J. Spieker, Brian D. Williamson

See Also

regress

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Loading required libraries
library(survival)
library(sandwich)

# Reading in a dataset
mri <- read.table("http://www.emersonstatistics.com/datasets/mri.txt",header=TRUE)
attach(mri)

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

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

uwIntroStats documentation built on May 2, 2019, 4:34 a.m.