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.
esttab exporting an extra "\" to .texHello! When assigning coefficient labels on esttab, I'm writing the following: (...) Code: coefla…
Should I use a Fractional outcome regression?I have panel data with an outcome variable that ranges from 0-0.6 and theoretically can get up to 1 …
string variable input for nss() or noccur()Hello! It seems that the command .egen newvar = nss(myvariable ) , find (string) does not seem to t…
Setting up time-to-first-event variablesHello, I am new to Stata and looking to efficiently set up time-to-event variables for the time to …
MultiLevel Modeling with Repeated ObservationsHello all, My question is about multilevel modeling. I have a data which observed household members…
Subscribe to:
Post Comments (Atom)
0 Response to Calculate the median and store it as an scalar.
Post a Comment