Dear all,
I am trying to run a target trial emulation comparing drug A to drug B using the clone censor weight approach. each individual is cloned twice and assigned to either drug A or drug B. they are censored if they deviate from their assigned strategy. grace period to start either drug is 6 months from date of diagnosis (time 0). individuals are followed up for up to 2 years after date of diagnosis. the dataset is structured so that each row represents one month.
i am stuck on the inverse probability of censoring weight step. I am finding the two groups are not balanced at month=12 (exposure_final=0 -> drug B, exposure_final=1 -> drug A) with SMD >0.1. Could someone advise if there is an error in my SAS coding?
*denominator model;
proc genmod data=example descending;
by exposure_final;
class month (ref=”6”);
model censor = covariate1 covariate2 covariate3 covariate4 covariate5 / dist=binomial link=logit;
output out=censor_den p=den;
run;
*numerator model;
proc genmod data=censor_den descending;
by exposure_final;
class month (ref=”6”);
model censor = month / dist=binomial link=logit;
output out=censor_num p=num;
run;
proc sort data=censor_num; by id;
run;
data example_final;
set censor_num;
retain n d;
by id;
if first.id then do;
n=1;
d=1;
end;
n=num*n;
d=den*d;
wt=n/d;
run;
I'm not sure it's reasonable to expect that the model is going to balance the cohorts across all time points, especially at later points where the data (presumably) become noisier (and remember there's nothing magic about the 0.1 SMD threshold). You could try adding interaction terms to your denominator model (in SAS, you can, for example, request all 2-way interactions between a set of variables like this (in your MODEL statement):
model censor = cov1 | cov2 | cov3 | cov4 | cov5 @2 / dist=binomial link=logit;
Also, have you tried trimming / stabilizing the weights? I know when I've done this for longitudinal data, where each weight is affected by all prior weights for a person, you can get very extreme values for later timepoints.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.