Description Usage Arguments Details Value Author(s) See Also Examples
This function provides stabilized weights for incomplete longitudinal data selected by death. The procedure allows intermittent missing data and assumes a missing at random (MAR) mechanism. Weights are defined as the inverse of the probability of being observed. These are obtained by pooled logistic regressions.
1 | weightsIMD(data, Y, X1, X2, subject, death, time, impute = 0, name = "weight")
|
data |
data frame containing the observations and all variables named in
|
Y |
character indicating the name of the response outcome |
X1 |
character vector indicating the name of the covariates with interaction with the outcome Y in the logistic regressions |
X2 |
character vector indicating the name of the covariates without interaction with the outcome Y in the logistic regressions |
subject |
character indicating the name of the subject identifier |
death |
character indicating the time of death variable |
time |
character indicating the measurement time variable. Time should be 1 for the first (theoretical) visit, 2 for the second (theoretical) visit, etc. |
impute |
numeric indicating the value to impute if the outcome Y is missing |
name |
character indicating the name of the weight variable that will be added to the data |
Denoting T_i the death time, R_ij the observation indicator for subject i and occasion j, t the time, Y the outcome and X1 and X2 the covariates, we propose weights for intermittent missing data defined as :
w_ij = P(R_ij = 1 | T_i > t_ij, X1_ij, X2_ij) / P(R_ij = 1 | T_i > t_ij, X1_ij, X2_ij, Y_ij-1)
The numerator corresponds to the conditional probability of being observed in the population currently alive under the MCAR assumption.
The denominator is computed by recurrence :
P(R_ij = 1 | T_i > t_ij, X1_ij, X2_ij, Y_ij-1) =
P(R_ij = 1 | T_i > t_ij-1, X1_ij, X2_ij, Y_ij-1, R_ij-1 = 0) * P(R_ij-1 = 0 | T_i > t_ij, X1_ij, X2_ij, Y_ij-1) + P(R_ij = 1 | T_i > t_ij-1, X1_ij, X2_ij, Y_ij-1, R_ij-1 = 1) * P(R_ij-1 = 1 | T_i > t_ij, X1_ij, X2_ij, Y_ij-1)
Under the MAR assumption, the conditional probabilities lambda_ij = P(R_ij = 1 | T_i > t_ij, X1_ij, X2_ij, Y_ij-1, R_ij-1) are obtained from the logistic regression :
logit(lambda_ij) = b_0j + b_1 X1_ij + b_2 X2_ij + b_3 Y_i(j-1) + b_4 X1_ij Y_i(j-1) + b_5 (1-R_ij-1)
A list containing :
data |
the data frame with initial data and estimated weights as last column |
coef |
a list containing the estimates of the logistic regressions. The first element of coef contains the estimates under the MCAR assumption, the second contains the estimates under the MAR assumption. |
se |
a list containing the standard erros of the estimates contained in coef, in the same order. |
Viviane Philipps, Marion Medeville, Anais Rouanet, Helene Jacqmin-Gadda
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.