confband: Confidence Bands

confbandR Documentation

Confidence Bands

Description

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

Usage

## S3 method for class 'cotram'
confband(object, newdata,  level = 0.95, 
       type = c("trafo", "distribution", "survivor", "cumhazard"), 
       smooth = FALSE, q = NULL, K = 20, cheat = K, ...)

Arguments

object

an object of class cotram.

newdata

a data frame of observations.

level

the confidence level.

type

the function to compute the confidence band for.

smooth

logical; if TRUE a smoothed function of type is returned.

q

quantiles at which to evaluate the model.

K

number of grid points the function is evaluated at (in the absence of q and smooth = TRUE).

cheat

number of grid points the function is evaluated at when using the quantile obtained for K grid points (in the absence of q and smooth = TRUE).

...

additional arguments to confint.glht.

Details

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

Value

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

Examples


  op <- options(digits = 4)

  data("birds", package = "TH.data")
  
  ### fit count transformation model with cloglog link
  m_birds <- cotram(SG5 ~ AOT + AFS + GST + DBH + DWC + LOG, data = birds,
                    method = "cloglog")
  
  ### compute asymptotic confidence bands for the distribution function
  ### for the first oberservation
  confband(m_birds, newdata = birds[1, ], type = "distribution")

  options(op)


cotram documentation built on Sept. 18, 2024, 5:07 p.m.