BookmarkSubscribeRSS Feed
mecramarathon
Calcite | Level 5

Hello all,

I am working with a dataset in long format, where each row represents a specific month for a patient (e.g., row 1 = month 1, row 2 = month 2, etc.). Patients become censored (censor=0 -> censor=1) at the month they deviate from their assigned treatment strategy (or by month=12 if they do not start their assigned treatment).

I am performing an inverse probability of censoring weighting (IPCW) analysis to estimate the probability of remaining uncensored. For the denominator model, I have included the variables month, baseline covariates (cov1, cov2) and time-varying covariates (cov3, cov4). 

However, I am unsure about the appropriate specification for the numerator model. Should it include only baseline covariates (cov1, cov2) (option 1) or should it just be the month variable (option 2)? 

 

numerator - option 1

proc genmod data=example descending;

class id month (ref='12');
model censor = month / dist=binomial link=logit;

repeated subject = id;

output out=censor_num p=num;

run;

numerator - option 2

proc genmod data=example descending;

class id cov1 cov2;
model censor = cov1 cov2 / dist=binomial link=logit;

repeated subject = id;

output out=censor_num p=num;

run;

denominator

proc genmod data=example descending;

by exposure_final;

class id month (ref='12') cov1 cov2;
model censor = month cov1 cov2 / dist=binomial link=logit;
repeated subject = id;

output out=censor_den p=den;

run;




sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

What is ANOVA?

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.

Discussion stats
  • 0 replies
  • 1242 views
  • 0 likes
  • 1 in conversation