plotResidual: Estimate and Plot Empirical Distributions of Residuals in the...

Description Usage Arguments References See Also Examples

View source: R/plotResidual.R

Description

A function to estimate and plot estimated empirical distribution functions of the residuals in the fitted regression model.

Usage

1
2
plotResidual(fit, 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.

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 .

References

Chen CH, Tsay YC, Wu YC and Horng CF. Logistic-AFT location-scale mixture regression models with nonsusceptibility for left-truncated and general interval-censored data. Statistics in Medicine, 2013; 32:4285<e2><80><93>4305.

See Also

MixtureLogitAFT

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(simLTICdataA)

##### fit the logistic-AFT location-scale model for LTIC data
fit=MixtureLogitAFT(formula=Surv(time1,time2,status)~1,
    eventprobreg=~X1,locationreg=~X1,scalereg=~X1,
    var.entry="entry",data=simLTICdataA)

##### plot the empirical distribution of residuals
plot.res=plotResidual(fit)
legend(-9.5,1,legend=plot.res$legend,col=plot.res$col,lty=plot.res$lty,
       title=" Strata (Case / Total)")

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