data.preproc.surv {precmed} | R Documentation |
Data preprocessing
Apply at the beginning of catefitcount()
, catecvcount()
, catefitsurv()
, and catecvsurv()
, after arg.checks()
Description
Data preprocessing
Apply at the beginning of catefitcount()
, catecvcount()
, catefitsurv()
, and catecvsurv()
, after arg.checks()
Usage
data.preproc.surv(
fun,
cate.model,
ps.model,
ipcw.model = NULL,
tau0 = NULL,
data,
prop.cutoff = NULL,
prop.multi = NULL,
ps.method,
initial.predictor.method = NULL,
response = "count"
)
Arguments
fun |
A function for which argument check is needed; "catefit" for |
cate.model |
A formula describing the outcome model to be fitted. The outcome must appear on the left-hand side. |
ps.model |
A formula describing the propensity score model to be fitted.
The treatment must appear on the left-hand side. The treatment must be a numeric vector
coded as 0/1. If data are from a RCT, specify |
ipcw.model |
A formula describing inverse probability of censoring weighting(IPCW) model to be fitted.
If covariates are the same as outcome model, set |
tau0 |
The truncation time for defining restricted mean time lost. Default is |
data |
A data frame containing the variables in the outcome, propensity score, and IPCW models;
a data frame with |
prop.cutoff |
A vector of numerical values (in (0, 1]) specifying percentiles of the
estimated log CATE scores to define nested subgroups. Each element represents the cutoff to
separate observations in nested subgroups (below vs above cutoff).
The length of |
prop.multi |
A vector of numerical values (in [0, 1]) specifying percentiles of the
estimated log CATE scores to define mutually exclusive subgroups.
It should start with 0, end with 1, and be of |
ps.method |
A character value for the method to estimate the propensity score.
Allowed values include one of:
|
initial.predictor.method |
A character vector for the method used to get initial
outcome predictions conditional on the covariates. Only applies when |
response |
The type of response variables; |
Value
A list of elements:
- y: outcome; vector of length n
(observations)
- d : the event indicator; vector of length n
; only if respone = "survival"
- trt: binary treatment; vector of length n
- x.ps: matrix of p.ps
baseline covariates specified in the propensity score model (plus intercept); dimension n
by p.ps + 1
- x.cate: matrix of p.cate
baseline covariates specified in the outcome model; dimension n
by p.cate
- x.ipcw: matrix of p.ipw
baseline covarites specified in inverse probability of censoring weighting model; dimension n
by p.ipw
- time: offset; vector of length n
; only if response = "count"
- if fun = "catefit"
:
- prop: formatted prop.cutoff
- prop.no1: formatted prop.cutoff
with 1 removed if applicable; otherwise prop.no1 is the same as prop
- if fun = "crossv"
- prop.onlyhigh: formatted prop.cutoff
with 0 removed if applicable
- prop.bi; formatted prop.cutoff
with 0 and 1 removed if applicable
- prop.multi: formatted prop.multi
, starting with 0 and ending with 1