Learn R Programming

mlt (version 1.6-0)

confband: Confidence Bands

Description

Confidence bands for transformation, distribution, survivor or cumulative hazard functions

Usage

confband(object, newdata, level = 0.95, ...)
# S3 method for mlt
confband(object, newdata, level = 0.95, 
       type = c("trafo", "distribution", "survivor", "cumhazard"), 
       K = 20, cheat = K, ...)

Value

For each row in newdata the function and corresponding confidence band evaluated at the K (or cheat) grid points is returned.

Arguments

object

an object of class mlt

newdata

a data frame of observations

level

the confidence level

type

the function to compute the confidence band for

K

number of grid points the function is evaluated at

cheat

number of grid points the function is evaluated at when using the quantile obtained for K grid points

...

additional arguments to confint.glht

Details

The function is evaluated at K grid points and simultaneous confidence intervals are then interpolated in order to construct the band.

A smoother band can be obtained by setting cheat to something larger than K: The quantile is obtained for K grid points but the number of evaluated grid points cheat can be much larger at no additional cost. Technically, the nominal level is not maintained in this case but the deviation will be small for reasonably large K.