plot_tic: Takeuchi information criterion over the transformation...

View source: R/plot_tic.R

plot_ticR Documentation

Takeuchi information criterion over the transformation parameter

Description

Fits the Box-Cox and logarithmic transformation models over grids of the transformation parameter and plots TIC and AIC on the log-likelihood scale, relative to their optimum: -\Delta\mathrm{TIC}/2 (solid, filled circles) and -\Delta\mathrm{AIC}/2 (dashed, open circles), as in Figure 2 of Bellach and Kosorok (2026); see TIC. The maximum of the solid curve is the model with the smallest TIC. r \to 0 and \rho = 1 give the Ghosh-Lin model (the Fine-Gray model for type = "cmprsk"), and \rho \to 0 and r = 1 the proportional odds model. Further arguments such as type = "cmprsk" are passed to wnpmle_fit via ....

Usage

plot_tic(
  formula,
  data,
  id = "id",
  rho_grid = seq(0.05, 1.2, by = 0.05),
  r_grid = seq(0.05, 1.2, by = 0.05),
  tau = NULL,
  mark_points = TRUE,
  show_loglik = TRUE,
  layout = NULL,
  legend = TRUE,
  file = NULL,
  width = NULL,
  height = NULL,
  verbose = TRUE,
  ...
)

Arguments

formula

A formula as passed to wnpmle_fit.

data

A data frame.

id

Name of the subject identifier column.

rho_grid

Box-Cox parameter values (default seq(0.05, 1.2, by = 0.05)).

r_grid

Logarithmic parameter values (default seq(0.05, 1.2, by = 0.05)).

tau

Optional truncation time. If NULL (default), uses the maximum observed time in the data.

mark_points

Logical; if TRUE (default), marks reference points at rho=1 (open circle; Ghosh-Lin model, or Fine-Gray model for type = "cmprsk") and r=1 (filled circle, proportional odds model).

show_loglik

Logical; if TRUE (default), AIC (the ordinary log-likelihood, as in plot_loglik) is added in grey.

layout

"joint" (default: one panel, logarithmic left and Box-Cox right of a dotted line at zero, where the families meet) or "panels" (two panels side by side with a common y-axis).

legend

Logical; add a legend (default TRUE). The curves are shown relative to their optimum (0 = best; -\Delta\mathrm{AIC}/2), with a dotted line at -1, i.e. a difference of 2 in AIC; all transformations have the same number of parameters, so the largest log-likelihood is the smallest AIC. The layout "joint" is that of Figure 2 in Bellach and Kosorok (2026).

file

Optional path to save the plot as a PDF (e.g. "loglik_profile.pdf"). If NULL (default), plots to the current device.

width, height

Size of the PDF in inches; default 3.6 x 2.8 (pointsize 9, as Figure 2 of Bellach and Kosorok, 2026) for layout = "joint", 7 x 4.5 for "panels"; only used when file is given.

verbose

Logical; print progress (default TRUE).

...

Additional arguments passed to wnpmle_fit.

Details

Every grid point needs a fit with the censoring-corrected sandwich and a fit with the inverse Fisher information, so this is much slower than plot_loglik; the default grids are therefore coarser.

Value

A data frame of class "wnpmle_profile" with columns model, param, loglik, penalty, p, AIC and TIC, invisibly. Save it (res <- plot_tic(...)) to redraw the figure with plot.wnpmle_profile without refitting.

See Also

TIC, plot_loglik

Examples


  dat <- bladder_prep()
  res <- plot_tic(Surv(time, status) ~ treat + num + size, data = dat,
                  id = "id", rho_grid = c(0.5, 1), r_grid = c(0.5, 1))
  res



wnpmle documentation built on Dec. 1, 2026, 9:06 a.m.