plotMixture: Plot Survival/Event Curve(s) from the Fitted Regression Model

Description Usage Arguments See Also Examples

View source: R/plotMixture.R

Description

A function to plot estimated overall and conditional survival/event curve(s) from the fitted regression models.

Usage

1
2
plotMixture(fit, dist = "overall", curve = "survival",
xlab = NULL, ylab = NULL, main = NULL, col = NULL, lty = NULL, lwd = 1, axes = T)

Arguments

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 .

See Also

MixtureLogitAFT, plotNPMLEsurv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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)

MixtureRegLTIC documentation built on May 1, 2019, 9:21 p.m.