BookmarkSubscribeRSS Feed
Epi_Stats
Obsidian | Level 7

Hi,

 

I’m wondering if the IPW weights which are output after running proc causaltrt (method=AIPW) are stabilized weights?

 

In the user guide, I can’t seem to find an option to request stabilized weights, and after running this proc, the mean for my IPW is slightly greater than 1 (as there are a few observations with quite extreme IPW values).

 

Thank you in advance,

 

3 REPLIES 3
MichaelL_SAS
SAS Employee

PROC CAUSALTRT does not output stabilized weights. You can request stabilized IPW-ATE weights from the PSMATCH procedure, or you can always use DATA Step to modify the weights produced by PROC CAUSALTRT and multiply by the proportion of treated/untreated subjects. 

 

Note that for a single treatment variable if you are estimating the ATE by using inverse probability of treatment weighting as your estimation method the use of inverse probability of treatment weights vs stabilized inverse probability of treatment weights are equivalent for the IPWR estimation method in PROC CAUSALTRT. Differences in the estimates only start to occur when examining treatment regimes with repeated treatment decisions, a type of analysis not covered by the CAUSALTRT procedure.

Epi_Stats
Obsidian | Level 7

Hi Michael,

 

Thank you for your reply, and for clarifying that stabilized weights are not output by PROC CAUSALTRT.

 

I’m currently using the AIPW doubly robust method; I see IPWR is similar to this method, but SE estimates will be slightly larger. I have tried to run my code using IPWR, but the weights don’t seem to change:

 

proc causaltrt data=have method=ipwr PALL;
class sex(ref=’1’) pastevent(ref=’0’) surgery(ref=’0’);
psmodel surgery(event=’1’)=age sex pastevent /plots=all;
model outcome(ref=’0’) /dist=bin;
output out=want ps=ps ipw=ipw;
ods output CausalEffects=ce;
run;

 

 

You mentioned using DATA Step to modify the weights produced by PROC CAUSALTRT, would you be able to please elaborate (with example code) on how I can do this?

 

Or is it possible to incorporate some other method to trim extreme weights when using PROC CAUSALTRT?

 

Thank you very much again for your help,

Epi_Stats
Obsidian | Level 7

EDIT: I'm including some example data below. If anyone knows how to include stabilized weights in my PROC CAUSALTRT step using IPWR (as @MichaelL_SAS  suggests above), I would be very grateful.

 

data have;
input ID sex age pastevent surgery outcome;
datalines;
28 1 71 0 1 0
29 1 64 1 1 0
30 1 64 0 1 1
31 2 83 0 0 1
32 2 83 1 0 0
33 1 55 0 0 1
34 1 66 1 0 1
35 2 66 0 1 0
36 1 71 1 0 1
37 2 55 1 1 0
38 1 67 0 0 0
39 2 67 0 0 0
40 1 54 0 0 0
41 2 23 0 1 0
42 2 55 1 1 1
43 2 92 1 1 0
44 2 24 1 1 0
45 2 23 1 1 1
46 2 81 1 1 0
47 2 80 0 1 1
;
run;

 

Code using AIPW:

proc causaltrt data=have method=AIPW covdiffps PALL ppsmodel;
class sex(ref='1') pastevent(ref='0') surgery(ref='0');
psmodel surgery(event='0')=age sex pastevent /plots=all;
model outcome(ref='0') /dist=bin;
output out=want ps=ps ipw=ipw;
ods output CausalEffects=ce;
run;

Code using IPWR:

proc causaltrt data=have method=IPWR covdiffps PALL ppsmodel;
class sex(ref='1') pastevent(ref='0') surgery(ref='0');
psmodel surgery(event='0')=age sex pastevent /plots=all;
model outcome(ref='0') /dist=bin;
output out=want ps=ps ipw=ipw;
ods output CausalEffects=ce;
run;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 519 views
  • 0 likes
  • 2 in conversation