plotMmixture {MixtureRegLTIC} | R Documentation |
A function to plot estimated overall and conditional survival/event curve(s) from the fitted regression models.
plotMixture(fit, dist = "overall", curve = "survival", xlab = NULL, ylab = NULL, main = NULL, col = NULL, lty = NULL, lwd = 1, axes = T)
fit |
the output object from the fitted mixture regression model. |
dist |
a character string specified with either "overall" or "cond". The default dist="overall" plots the overall distribution of the event time, and dist="cond" plots the conditional distribution for the logarithm of the event time for susceptible/non-cured subjects. |
curve |
a character string specifies the type of desired curves to be plotted. The default curve="survival" plots the survival curves, and curve="event" plots event curves. |
xlab |
the title for x axis. |
ylab |
the title for y axis. |
main |
the main title of the plot. |
col |
a vector of colors. |
lty |
a vector of line types. |
lwd |
a numeric value specifies the line width. |
axes |
a logical value specifies whether axes should be drawn. If axes=FALSE, both x and y axes are not shown . |
MixtureLogitAFT
, plotNPMLEsurv
data(simLTICdataE) ##### fit the logistic-AFT location-scale model for LTIC data fit=MixtureLogitAFT(formula=Surv(time1,time2,status)~1, eventprobreg=~X1,locationreg=~X1+X2,scalereg=~X1+X2, var.entry="entry",var.mixturetype="mtype",data=simLTICdataE) ##### print regression results of the fitted model printMixture(fit) ##### plot estimated event curves of the fitted model #win.graph(width=18,height=10) #par(mfrow=c(1,2)) plot.fit=plotMixture(fit,curve="event",col=c("red","blue","deeppink")) legend(55,0.95,legend=plot.fit$legend,col=plot.fit$col,lty=plot.fit$lty, title=" Strata (Case / Total)",cex=0.85) plotD.fit=plotMixture(fit,dist="cond",curve="event",col=c("red","blue","deeppink")) legend(3,0.95,legend=plotD.fit$legend,col=plotD.fit$col,lty=plotD.fit$lty, title=" Strata (Case / Total)",cex=0.85)