I have two samples (Group 1 and Group 2), each containing 1) an income variable and 2) a weight variable indicating the weight for each observation.
I simply want to test whether the medians of income in the two samples (Group 1 and Group 2) are statistically different.
I know I can use Mood's median test if I don't consider the weights, but is there a way to perform the median test while accounting for the weights of each observation?
Thanks for your help in advance!
survey:svyranktest
will do this for you. It has an option test="median"
to compare medians.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With