# set the number of threads
nth <- threadsTP(2)
# Create survTP object
data(heartTP)
heartTP_obj <- with(heartTP, survTP(time1, event1, Stime, event))
# Compute transition probabilities
transPAJ(object=heartTP_obj, s=33, t=412)
# Compute transition probabilities with confidence band
transPAJ(object=heartTP_obj, s=33, t=412, conf=TRUE, conf.level=0.9,
method.boot="percentile")
# restore the number of threads
threadsTP(nth)
Run the code above in your browser using DataLab