Skip to contents

Compute a pseudo-observation for every subject (survival at time, the restricted mean to time, or, for a competing-risks outcome, the cumulative incidence of a cause at time or the time lost to it), regress the pseudo-observations on arm and covariates with an identity link, and report the arm contrast with a sandwich (HC0) standard error.

Usage

sest_pseudo(
  formula,
  data,
  arm,
  type = c("rmst", "survival", "cif", "time_lost"),
  time,
  cause = NULL,
  reference = NULL,
  conf_level = 0.95
)

Arguments

formula

survival::Surv(time, status) ~ arm + covariates (or a multi-state Surv(time, event) for "cif" and "time_lost").

data

A data frame.

arm

Name of the arm column; it must be on the right-hand side.

type

"rmst", "survival", "cif" or "time_lost".

time

The landmark time (survival, cumulative incidence) or the horizon (RMST, time lost).

cause

For "cif" and "time_lost", the level of the event.

reference

Reference arm level (default: the first level).

conf_level

Confidence level.

Value

A sest_contrast list (see sest_contrast()) with interval = "sandwich", plus coefficients (data frame of term, estimate, se), pseudo (the pseudo-observations, one per row used), type and cause.

Details

Pseudo-observations come from survival::pseudo() on the pooled Kaplan-Meier (or Aalen-Johansen) fit, which uses the infinitesimal jackknife: for subject \(i\), \(\hat\theta_i = n\hat\theta - (n - 1)\hat\theta_{(-i)}\) to first order. The regression is ordinary least squares, \(\hat\beta = (X^\top X)^{-1} X^\top \hat\theta\), with variance \((X^\top X)^{-1} X^\top \mathrm{diag}(e_i^2) X (X^\top X)^{-1}\) (HC0). The variance does not account for the pseudo-observations being estimated; Andersen, Hansen and Klein (2004) report it adequate in practice.

Each arm's standardised mean is \(\bar x(a)^\top\hat\beta\), where \(\bar x(a)\) is the average design row with everyone assigned \(a\); the contrast is the difference of these means, with its sandwich error. With the arm as a main effect only, the contrast is the arm coefficient. Under randomisation it estimates the marginal difference in the chosen quantity even if the covariate part of the linear model is wrong, provided censoring depends neither on the covariates nor on the arm: the pseudo-observations come from one Kaplan-Meier (or Aalen-Johansen) fit of the pooled sample.

References

Andersen PK, Hansen MG, Klein JP. Regression analysis of restricted mean survival time based on pseudo-observations. Lifetime Data Analysis 2004; 10(4): 335-350. doi:10.1007/s10985-004-4771-0

Examples

v <- survival::veteran
sest_pseudo(survival::Surv(time, status) ~ trt + karno, v, arm = "trt",
               type = "rmst", time = 365)
#> <sest_contrast> pseudo, pseudo-observation regression; interval: sandwich
#>   by arm:
#>  estimand time arm estimate    se conf_low conf_high
#>      rmst  365   1    117.2 12.53    92.68     141.8
#>      rmst  365   2    114.1 12.45    89.65     138.5
#> 
#>   contrasts against the reference arm:
#>  estimand time arm reference estimate    se conf_low conf_high
#>      rmst  365   2         1   -3.192 17.74   -37.97     31.59