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.
Foreach Loop to Rename VariableDear all, I was trying to use foreach loop to rename variables, I wanted to names of the variables …
Studentized / Standardized ResidualsIs it possible to obtain predicted studentized (jackknifed) or standardized residuals with robust/cl…
Local and global macro are not capturing variables' names but the values in the first rowDear all, I have a problem when using the local and global macro. When I set up a local macro base…
How to calculate ten-year moving average of variable x by the dummy variable europe in a dataset as the following? Many thanks! Code: * Example generated by -dataex-. To install: ssc install dataex clear input float id_number i…
Nested Variables in glmI am trying to use nested variables in glm because I have a non-normal dependent variable potentiall…
Subscribe to:
Post Comments (Atom)
0 Response to Calculate the median and store it as an scalar.
Post a Comment