marginal_gof_plots_scr: Marginal survival function goodness of fit

View source: R/goodness_of_fit_SurvSurv.R

marginal_gof_plots_scrR Documentation

Marginal survival function goodness of fit

Description

The marginal_gof_plots_scr() function plots the estimated marginal survival functions for the fitted model. This results in four plots of survival functions, one for each of S_0, S_1, T_0, T_1.

Usage

marginal_gof_plots_scr(fitted_model, grid)

Arguments

fitted_model

Returned value from fit_model_SurvSurv(). This object essentially contains the estimated identifiable part of the joint distribution for the potential outcomes.

grid

grid of time-points for which to compute the estimated survival functions.

Examples

data("Ovarian")
#For simplicity, data is not recoded to semi-competing risks format, but is
#left in the composite event format.
data = data.frame(
  Ovarian$Pfs,
  Ovarian$Surv,
  Ovarian$Treat,
  Ovarian$PfsInd,
  Ovarian$SurvInd
)
ovarian_fitted =
  fit_model_SurvSurv(data = data,
                     copula_family = "clayton",
                     n_knots = 1)
grid = seq(from = 0, to = 2, length.out = 50)
Surrogate:::marginal_gof_plots_scr(ovarian_fitted, grid)


Surrogate documentation built on June 22, 2024, 9:16 a.m.