plot.TML: Plot Method for "TML" objects

View source: R/plot.TML.R

plot.TMLR Documentation

Plot Method for "TML" objects

Description

Diagnostic plots for elements of class "TML". Three plots (selectable by which) are currently available: a residual Q-Q plot, a plot of response against fitted values and a plot of standardized residuals against fitted values.

Usage

## S3 method for class 'TML'
plot(x, which = 1:3, caption = c("Residual QQ-plot",
  "Response vs. Fitted Values", "Standardized Residuals vs. Fitted Values"),
  panel = points, sub.caption = deparse(x$call$formula), main = "",
  ask = prod(par("mfcol")) < length(which) && dev.interactive(), ...)

Arguments

x

An object of class "TML", usually, a result of a call to TML.noncensored or TML.censored.

which

If a subset of the plots is required, specify a subset of the numbers 1:3.

caption

Caption for the different plots.

panel

Panel.

sub.caption

Sub titles.

main

Main title.

ask

If ask=TRUE, plot.TML() operates in interactive mode.

...

Optional arguments for par.

Details

The residual Q-Q plot is build with respect to the errors argument of the object. This means that the expected order statistics are calculated either for a Gaussian or a log-Weibull distribution. The two horizontal dotted lines on the first and the third plots represent the upper and lower cut-off values for outlier rejection. Observations that were not retained for the estimation (outliers) are identified on the third plot.

See Also

TML.noncensored, TML.censored, plot.default

Examples

## Not run: 
     data(D243)
     Cost <- D243$Cost                             # Cost (Swiss francs)
     LOS  <- D243$LOS                              # Length of stay (days)
     Adm  <- D243$Typadm; Adm <- (Adm==" Urg")*1   # Type of admission 
                                                   # (0=on notification, 1=Emergency)

     # Truncated maximum likelihood regression with log-Weibull errors
     w  <- TML.noncensored(log(Cost)~log(LOS)+Adm, errors="logWeibull", 
           otp="adaptive", control=list(fastS=TRUE))
     
     plot(w)
     plot(w, which = 1)
     plot(w, which = 2)
     plot(w, which = 3)

## End(Not run)

RobustAFT documentation built on Aug. 21, 2023, 5:13 p.m.