Hi,
I’ve run a propensity score analysis with inverse probability of treatment weights (IPW) using SAS PROC CAUSALTRT.
I want to plot the logit of the propensity score after IPW, but can’t figure out how to weight the propensity scores in the code I’m using to generate the plot. Example code from SAS included below:
proc template;
define statgraph densityplot;
begingraph;
entrytitle "Highway Mileage Distribution by Origin";
layout overlay /
xaxisopts=(griddisplay=on
gridattrs=(color=lightgray pattern=dot))
yaxisopts=(griddisplay=on
gridattrs=(color=lightgray pattern=dot));
densityplot mpg_highway / name="densityplot" group=origin;
discretelegend "densityplot" / title="Origin:";
endlayout;
endgraph;
end;
run;
proc sgrender template=densityplot data=sashelp.cars;
run;
I have seen papers which use IPW and report the propensity score graphically before and after IPW. I assume these researchers have weighted the propensity score in the after plot, but I don't understand how to achieve this, or if this is the correct approach to generate the propensity score plot after IPW?
In my output, I have a propensity score variable and the IPW variable.
Any help/advice would be greatly appreciated,
Thank you