Description Usage Arguments Details Value Author(s) See Also Examples
Generates a function of time for specified covariate values from a "pssm" object created by pssm that fits a joint proportional hazards and survival model using a piecewise exponential underlying hazard function
1  | pssm.survivalcurv(x, cov1, cov2, timeToProgression = FALSE, covariance = TRUE)
 | 
x | 
 A pssm object created by pssm  | 
cov1 | 
 a a*b matrix of values of the b covariates affecting the time to progession  | 
cov2 | 
 a matrix of values of the covariates affecting survival after progression with the same number of rows as cov1  | 
timeToProgression | 
 if FALSE estimates the survival curve, if TRUE estimates two probabilities, the probability of being disease free before t and the probability of progressing before t but surviving after t  | 
covariance | 
 if TRUE the covariance matrix is returned as an attribute of the function value  | 
pssm.survivalcurv returns a function the argument of which is the vector of times for which survival probabilities are desired.
A function is returned, the input to the function is a vector of times, and an optional parameter indicating the prior precision on the estimate of the -log hazard ratio of the effect of survival after progression on the last covariate in the survival model (presumed to be treatment) and the output is a data frame with columns described below:
Note that to conduct the bayesian analysis the Covariance needs to be set to T.
rep | 
 indicates what is estimated (see below), values are "s1" or "s2"  | 
time | 
 Time, t  | 
covariates | 
 Columns indicating covariates for survival and progression  | 
estimate | 
 Estimate, If timeToProgession is TRUE and the estimation was done with both survival and time to progession the "s1" value is the probability that a patient will progress before time t but survive longer than t. In that case the value at "s2" is the probability a patient will be disease free before t. Otherwise rep will only equal "s1" and it will be the probability that survival or progression occurs latter than t as the case may be.  | 
David A. Schoenfeld
pssm-class,
pssm-package,
pssm.generate.data,
pssm.object,
pssm,
pssm.simulate,
1 2 3 4 5 6 7 8 9 10 11 12 13 14  | #generate data for plot
u<-pssm.generate.data(theta1=.5,theta2=0,phaz.progression=rep(log(-log(.3)/4),5),	
    phaz.survival=rep(log(-log(.15)/4),15),accrual=2,followup=2.9,m=5,
    n=50,times=c(1,2,3),delta=0.5)
#estimate parameters
ps<-pssm(surv(tprog0,tprog1)~rx,surv(tdeath,cdeath)~rx,dat=u,intervals=3)
#calculate survival curves
vs<-pssm.survivalcurv(ps,cov1=matrix(c(0,1),2,1),cov2=matrix(c(0,1),2,1),covariance=TRUE)
t=c(0,2,4,4.99)
curves=vs(t)
#plot survival curves
plot(t,curves$estimate[curves$rx==0],type='l',lty=2,ylim=c(0,1),
     main='Survival Curve',xlab='Time',ylab='Probability of Survival')
points(t,curves$estimate[curves$rx==1],type='l',lty=1,xlim=c(0,5))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.