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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 586 views
  • 0 likes
  • 1 in conversation