IPWsubtype | R Documentation |
Fitting an inverse probability weighted Cox proportional hazard model for competing risks data with partially missing markers, in which marker variables define the subyptes of outcome.
IPWsubtype(formula, data, id, missing_model = c("condi", "multinom"),
missing_formula, missing_indep = FALSE, two_stage = FALSE,
tstage_name = NULL, marker_name, marker_rr = NULL,
first_cont_rr = TRUE, second_cont_bl = FALSE,
second_cont_rr = FALSE, constvar = NULL, init, control, x = FALSE,
y = TRUE, model = FALSE)
formula |
a formula object with an obect of the type |
data |
a data.frame which has variables in formula and markers. |
id |
a charhacter string specifying subject IDs. |
missing_model |
a character string specifying the approach of the missingness model. |
missing_formula |
a list of the missingness model formula for each marker. A right side of formula object including a ~ operator. If |
missing_indep |
a logical value: if |
two_stage |
a logical value: if |
tstage_name |
a charhacter string specifying the first-stage missingness variable if |
marker_name |
a vector of charhacter strings specifying markers defining cause of failures. |
marker_rr |
a vector of logical value. Dafault is NULL, in which a model includes all markers named in |
first_cont_rr |
a logical value: if |
second_cont_bl |
a logical value: if |
second_cont_rr |
a logical value: if |
constvar |
a vector of character strings specifying constrained varaibles of which the effects on the outcome are to be the same across subtypes of outcome. The variables which are not specified in |
init |
a vector of initial values of the iteration. Default value is zero for all variables. |
control |
an object of class |
The Cox proportional hazard model with weights is used to model cause-specific hazard functions. To examine the association between exposures and the specific subtypes of disease, the log-linear is used for reparameterization. The weights for the complete cases are obtained by fitting logistic regression models glm
.
The data duplication method is used so that the returned value x
, y
, and weights
are duplicated the number of subtypes of outcome. Special terms including +strata()
and +offset()
can be used. +cluster()
should be avoided since we automatically include it in the formula. Breslow method is used for handling tied event times.
For marker variables, 0 indicates censored events or missing values.
An object of class IPWsubtype
representing the fit.
coefficients |
the estimated regressoin coefficients. |
naive.var |
the inverse of estimated Information matrix. |
var |
the robust sandwich variance estimate. |
linear.predictors |
a vector of linear predictors. This is not centered. |
loglik |
a vector of length 2 containing the log-likelihood with the initial values and with the estimated coefficients. |
score |
a value of the score test at the initial value of the coefficients. |
rscore |
a value of the robust log-rank statistic. |
score.residual |
the score residuals for each subject. For incomplece cases, the value is 0. |
iter |
a number of iterations used. |
weights |
a vector of weights used, which is the inverse of the probability of complete case given the event occurs. |
basehaz |
estimated baseline cause-specific hazard functions the reference disease subtype corresponding to marker variables equal to 1. |
Ithealp |
a matrix of the partial derivative of the score functions with respect to the parameters from the missingness models. |
model.missing |
a list of an object of class |
n |
the number of observations. |
nc |
the number of complete-case observations. |
nevent |
the number of events. |
ncevent |
the number of complete-case events. |
subtype |
a list of values related to subtypes including the number of subtypes, character strings of marker names, etc. |
The object will also contain the following: strata, formula, call, terms, y, offset, xlevels, optionally x, and model.
m1 <- IPWsubtype(Surv(start, time, status)~ X + W, data = data, id = "id", missing_formula = list(~time + X, ~time + X),
two_stage = FALSE, marker_name = c("y1", "y2"), second_cont_bl = FALSE, second_cont_rr = FALSE, constvar = "W")
# Two-stage missingness model
m2 <- IPWsubtype(Surv(start, time, status)~ X + W, data = data, id = "id", missing_formula = list(~time + X, ~time + X, ~time + X + W),
two_stage = TRUE, tstage_name = c("R0"), marker_name = c("y1", "y2"), second_cont_bl = FALSE, second_cont_rr = FALSE, constvar = "W")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.