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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

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