Learn R Programming

rld (version 1.0)

calcpk: Calculate Per-Challenge Probability of Infection

Description

This function estimates the per-challenge probability of infection.

Usage

calcpk(object, predlevel, CIlevel = 0.95)

Arguments

object
a fitted object of class inheriting from "rld".
predlevel
a value or a vector indicating covariate for prediction of per-challenge probability of infection.
CIlevel
confidence level. The default is 0.95.

Value

Details

Calculate the per-challenge risk of infection for the contrast group and reference group.

References

Kang, C., Huang, Y., and Miller, C. (2015). A discrete-time survival model with random effects for designing and analyzing repeated low-dose challenge experiments. Biostatistics, 16(2): 295-310.

See Also

calcVEk, calcVEt

Examples

Run this code
data(SampleData)
newdata <- transdata(data = SampleData, ndlevel = 3, nexposure = c(10, 10, 2))
fitout <- rld(formula = survival::Surv(time, delta)~factor(dose)+trt+I(I(dose==3)*trt),
              data = newdata, frailty = TRUE)

predictdata <- 1
names(predictdata) <- c("trt")

pkout <- calcpk(object = fitout, predlevel = predictdata, CIlevel = 0.95)
summary(pkout)

Run the code above in your browser using DataLab