weightsIMD: Estimation of observation-specific weights with intermittent...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/weightsIMD.R

Description

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.

Usage

1
weightsIMD(data, Y, X1, X2, subject, death, time, impute = 0, name = "weight")

Arguments

data

data frame containing the observations and all variables named in Y, X1, X2, subject, death and time arguments.

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

Details

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)

Value

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.

Author(s)

Viviane Philipps, Marion Medeville, Anais Rouanet, Helene Jacqmin-Gadda

See Also

weightsMMD

Examples

1
2
w_simdata <- weightsIMD(data=simdata,Y="Y",X1="X",X2=NULL,subject="id",
death="death",time="time",impute=20,name="w_imd")$data

weightQuant documentation built on Jan. 5, 2022, 5:08 p.m.