Learn R Programming

JointModel (version 1.0)

pred.jplm.nonlinear: Predict a smoothed nonlinear effect on the longitudinal response

Description

This function calculates a predicted nonlinear effect function evaluated at given points.

Usage

pred.jplm.nonlinear(object, nlm.par, at=NULL, CI=FALSE)

Arguments

object
a Joint Model fit object, i.e., the result of jplm.
nlm.par
a vector of nonlinear effect covariate, as specified in nlm.par= of jplm.
at
a vector of fixed points to be evaluated.
CI
logical value; if TRUE, a 95% pointwise confidence interval is returned.

Value

If CI=FALSE, it returns a numeric vector of predicted nonlinear effect at at= , the standard error estimate of the predicted value, and test result based on the asymptotic normality. If CI=TRUE, it returns a numeric vector of predicted nonlinear effect, the standard error estimate of the predicted value, and its lower and upper 95% pointwise confidence interval.

References

Kim, S., Zeng, D., Taylor, J.M.G. (2016) Joint partially linear model for longitudinal data with informative drop-outs. Under revision 0, 000-000.

See Also

jplm

Examples

Run this code

#	a simulated data set of longitudinal responses
attach(prostate)
#	a simulated data set of time-to-event (e.g., drop-out process)
attach(dropout)

#	joint fit of a partially linear model and a proportional odds model
#	with a subject-specific random intercept and random slope 
fit1 <- jplm(logPSA.postRT ~ logPSA.base + (1 + VisitTime|ID), 
                 nlm.par=prostate$VisitTime, data.y=prostate, 
                 Surv(DropTime, Status) ~ logPSA.base2, 
                 formula.frailty= ~ 1 + DropTime, 
                 id.vec=dropout$ID2, transf.par=1, data.surv=dropout)

# Evaluate at 20,...,80 percent of the maximum measurement time 	
pts <- c(0.2, 0.4, 0.6, 0.8)*max(prostate$VisitTime)         
pred.jplm.nonlinear(fit1, prostate$VisitTime, at=pts)
out <- pred.jplm.nonlinear(fit1, prostate$VisitTime, at=pts, CI=TRUE)
out$Value	

Run the code above in your browser using DataLab