BookmarkSubscribeRSS Feed
Epi_Stats
Obsidian | Level 7

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

 

 

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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