Hi. I have a dataset that I have generated weights (IPTW) for via propensity model. There are multiple treatment groups and I evaluated continuous variables via weighted Kruskal-Wallis. Now I would like to do post-hoc tests but I'm bumping into the issue of trying to run a weighted Dunn's test. I have been playing with this macro (http://support.sas.com/publishing/bbu/zip/60622.zip in Chapter 6) and using the weighted rank macro (https://support.sas.com/techsup/notes/v8/25/090.html) in place of proc rank.
My first question is if this is feasible and whether there is a better solution than the workaround I've been using.
My second is whether I should also be sorting by my weighting variable in the weighted rank macro (i.e., proc sort data=data; by descending variable iptw; run;); I think the answer is yes. If I sort solely by my variable of interest, my rankings are a bit dependent on however I last sorted the data prior to using the macro, and I'm getting different results after I run tests on all my continuous variables and then go back through to double-check my results.