Good morning,

I would like to calculate the median of a variable, let's call X and after store that median as a scalar. I need it because I want to create another variable which says if the X has a value greater than the median, give me a value of 1, 0 otherwise.

Anyone has an idea how to score the median in a scalar in order to use after?

Best,

Diego.