data_null_processed <- prep_data(data = data_null, grace_period_length = 2,
baseline_vars = 'L')
res <- ipw(data = data_null_processed,
time_smoothed = TRUE,
outcome_times = c(6, 12, 18, 24),
A_model = A ~ L + Z,
R_model_numerator = R ~ L_baseline + Z,
R_model_denominator = R ~ L + A + Z,
Y_model = Y ~ L_baseline * (time + Z))
print(res)
Run the code above in your browser using DataLab