Description Usage Arguments Value Author(s) References Examples
This function produces cumulative risk predictions given an object of class PIMix a vector of times, and a data set of covariates from which to make predictions. In place of a PIMix object, all elements of the fitted model can be specified instead.
1 2 3 4 |
x |
object of class PIMix. |
data |
data set of covariates from which to make predictions. |
time.points |
numeric vector of times points to produce cumulative risk estimates for. |
model |
Character string indicating the specific member of the Prevalence-Incidence Mixture Model family to be fitted. Options are:
|
prev.coef |
A vector containing coefficients for the prevalence model. |
incid.coef |
A vector containing coefficients for the incidence model. |
Lambda.data |
For semi-parametric or weakly-parametric models, this is a data frame containing the times and baseline cumulative hazard. |
knots |
For weakly-parametric models, this is a numeric vector of starting time points for each exponential spline. |
spline.para.est |
For weakly-parametric models, this is a numeric vector of coefficients for each exponential spline. |
cov.mat |
A matrix containing the covariance matrix for the parameters (not required for semi-parametric models). |
A data frame containing the following columns
prev.predictor The design matrix for the prevalence model.
incid.predictor The design matrix for the incidence model.
time Time.
CR Cumulative risk at the time specified.
CR.se Standard error for the cumulative risk.
LL95 Lower 95 percent confidence limit for the cumulative risk.
LL95 Upper 95 percent confidence limit for the cumulative risk.
Li C. Cheung, li.cheung@nih.gov, Noorie Hyun nhyun@mcw.edu Xiaoqin Xiong, Qing Pan, Hormuzd A. Katki
Cheung LC, Qing P, Hyun N, Schiffman M, Fetterman B, Castle P, Lorey T, Katki H. Mixture models for undiagnosed prevalent disease and interval-censored incident disease: Applications to a cohort assembled from electronic health records. Statistics in Medicine 2017; 36(22):3583-95.
Hyun N, Cheung LC, Pan Q, Katki H. Flexible risk prediction models for left or interval-censored data from electronic health records. Annals of Applied Statistics 11(2), 1063-1084.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #PIMixture includes "PIdata" RData file, and PIdata includes the two datasets, PIdata1 and PIdata2
data(PIdata)
model<-"C_CIN3PLUS+L_CIN3PLUS+R_CIN3PLUS~RES_HPV16"
fit1<-PIMixture(p.model=model,data=PIdata1, model="logistic-Weibull")
fit2<-PIMixture(p.model=model,data=PIdata1, model="weakly-parametric",n.knots=5,order=4)
fit3<-PIMixture(p.model=model,data=PIdata1, model="semi-parametric")
model2<-"C_CIN3PLUS+L_CIN3PLUS+R_CIN3PLUS~1"
fit4<-PIMixture(p.model=model2,data=PIdata1, model="non-parametric", conf.int=TRUE)
fit5<-PIMixture(p.model=model2,data=PIdata1, model="semi-parametric", conf.int=TRUE)
test.data<- data.frame(rbind(1,0))
names(test.data)<- "RES_HPV16"
time.points=c(0,12,36,60)
predict1<-PIMixture.predict(x=fit1, data=test.data, time.points=time.points)
predict2<-PIMixture.predict(x=fit2, data=test.data, time.points=time.points)
predict3<-PIMixture.predict(x=fit3, data=test.data, time.points=time.points)
predict4<-PIMixture.predict(x=fit4, data=test.data, time.points=time.points)
predict5<-PIMixture.predict(x=fit5, data=test.data, time.points=time.points)
predict1
predict2
predict3
predict4
predict5
#For stratified random samples
model3<-"C+L+R~X1+X2"
output1<-PIMixture(p.model=model3,data=PIdata2, model="semi-parametric",sample.design=1)
output2<-PIMixture(p.model=model3,data=PIdata2, model="weakly-parametric", n.knots=7,order=4,sample.design=1)
test.data<- data.frame(X1=1,X2=0.5)
time.points<-seq(0,10,by=2)
predict6<-PIMixture.predict(x=output1, data=test.data, time.points=time.points)
predict7<-PIMixture.predict(x=output2, data=test.data, time.points=time.points)
predict6
predict7
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.