BookmarkSubscribeRSS Feed
zaldarsa
Obsidian | Level 7

Hello!

I created an propensity score and subsequently inverse probability weights for the variable "Autopsy", which indicates whether study participants underwent an autopsy or not. My primary predictor is cataracts (yes/no), and my outcome is amyloid resistant (yes/no). 

I was wondering if I needed to include the variable Autopsy in my model when I anaylzed catarcts in relation to amyloid resistance, or if I just needed to include the weights. Thank you very much in advance!

*Create dataset with probability score;
proc logistic data=aut_path;
class gender edu drink;
model autopsy (event='1')= agevisit1 gender edu drink;
output out=outps(drop =_level_) prob=ps xbeta=xbeta;
run;

data lw_ps;
set outps;
if autopsy=1 then treated_ps=ps; else treated_ps=.;
if autopsy=0 then untreated_ps=ps; else untreated_ps=.;
run;

*Calculate mean propensity score;
proc means data=outps N MIN Q1 MEDIAN MEAN Q3 MAX STD;
class autopsy;
var ps;
output out=ps_mean mean=marg_prob;
run;

data _null_;
set ps_mean;
call symput ('marg_prob',marg_prob);
run;

*Create inverse probability weight and stabalized weight;
data res_analysis;
set outps;
if autopsy=1 then iptw=1/ps; else if autopsy=0 then iptw=1/(1-ps);

if autopsy=1 then siptw=&marg_prob/ps;
else if autopsy=0 then siptw=(1-&marg_prob)/(1-ps);

label ps='Propensity Score'
	  iptw = "Inverse Probability of Treatment Weight"
 	  siptw = "Stabilized Inverse Probability of Treatment Weight";
run;

*Include people with autopsy only;
data aut;
set res_analysis;
if autopsy=1;
run;

proc logistic data=aut;
id id;
weight iptw;
class cataract (ref='0')  ;
model amyloid (event='1')= cataract ;
oddsratio cataract;
run;
1 REPLY 1
djmangen
Obsidian | Level 7

With the model that you have outlined that standard approach would be to apply the propensity weight as a WEIGHT variable in SAS.  May would also argue that you could use either (1) the predicted probability from the initial Logistic model, or (2) the predictors in the initial Logistic 

agevisit1 gender edu drink

as additional predictors in the final logistic to make it "doubly robust."   On the simple face of it -- without really knowing enough about your work -- this would be my recommendation.

 

David

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Health and Life Sciences Learning

 

Need courses to help you with SAS Life Sciences Analytics Framework, SAS Health Cohort Builder, or other topics? Check out the Health and Life Sciences learning path for all of the offerings.

LEARN MORE

Discussion stats
  • 1 reply
  • 969 views
  • 0 likes
  • 2 in conversation