0

I would like a suggestion on the best way on how to calculate a weighted median in R.

I have this kind of dataframe:

id         2       5        10
1       5408.55    0.00     0.00
10      1158.51    0.00     1006.37
100     18263.69   4205.64  0.00
20      27483.89   7601.01  833.90
  • id is the sample unit
  • 2, 5, 10 are categories, but also the value from which I want to compute the median (equal for each sample unit).

At the coloumn-row intersections there are the weighs I want to use for the weighted median.

Any suggestion on which is the best package/functions doing this operation?

Thank you

user36756
  • 31
  • 5

0 Answers0