ipcw.aftreg: Inverse probability censoring weights (IPCW) for...

Description Usage Arguments

View source: R/pec-eha-aftreg.R

Description

This function uses eha::aftreg to estimate IPCW for left-truncated data based on an AFT Weibull model. Initially designed to be used in conjunction with pec::pec, however, pec does not support eha::aftreg as a method for calculation of IPCWs. The function is loosely based on pec:::ipcw.cox and only supports calculating IPCWs at specified times (what = "IPCW.times"; see what argument in ?pec::ipcw).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'aftreg'
ipcw(
  formula,
  data,
  method = "aftreg",
  args,
  times,
  subjectTimes,
  subjectTimesLag,
  what = "IPCW.times"
)

Arguments

formula

A survival formula like, Surv(time,status)~1, where as usual status=0 means censored. The status variable is internally reversed for estimation of censoring rather than survival probabilities. Some of the available models (see argument model) will use predictors on the right hand side of the formula.

data

The data used for fitting the censoring model

method

Censoring model used for estimation of the (conditional) censoring distribution.

args

A list of arguments which is passed to method

times

For what="IPCW.times" a vector of times at which to compute the probabilities of not being censored.

subjectTimes

For what="IPCW.subjectTimes" a vector of individual times at which the probabilities of not being censored are computed.

subjectTimesLag

If equal to 1 then obtain G(T_i-|X_i), if equal to 0 estimate the conditional censoring distribution at the subjectTimes, i.e. (G(T_i|X_i)).

what

Decide about what to do: If equal to "IPCW.times" then weights are estimated at given times. If equal to "IPCW.subjectTimes" then weights are estimated at individual subjectTimes. If missing then produce both.


adibender/ldatools documentation built on March 7, 2020, 5:30 a.m.