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.
Related Posts with Calculate the median and store it as an scalar.
how to append results using tempfile?Sorry for that I did't make myself clear in the last post. I want to append the coeffcient using tem…
command for recognizing the co-residing parents and sons/daughtersHow can I recognize co-residing parents and sons/daughters in the Employment & Unemployment Surv…
combine string values to one variableHow to combine these names to one variable by using ";" as a break …
Clear results saved in r()Dear All, I am trying to clear the r()-saved results left by the previous command before going to t…
gen mean with if statementsI am fairly new to STATA, and need to create a moving average for my data. (I cannot use tsset for t…
Subscribe to:
Post Comments (Atom)
0 Response to Calculate the median and store it as an scalar.
Post a Comment