Hello,
I have a nummeric variable which is represented in % and I need to recode this variable. To be specific, I need to have for each observation that has a value >0 a different natural number. The goal is to create a fixed effect dummy for a regression analysis. So, for instance:
Observation 1: value 5 --> obtains value 1
Observation 23: value 3 --> obtains value 2
Observation 58: value 9 --> obtains value 3
...etc
Is there a command that can do that automatically?
Thanks in advance!
Related Posts with Creating a dummy variable for each observation separately
How to use data in ARDL Bounds testThis is my first time to use Stata in fairly complicated research. Must the variables which are in l…
Help with SFA - sfpanel model BC95Dear Stata users, I am working on "the trade potential between China and Central and Eastern Europe…
Exporting Test Results to word from xttest0 and xttest3Dear all, may someone clarify, how I can export the results from xttest0 to word? If I write: xtre…
Controlled interrupted time series with count data using glm, panel data, and Newey-West standard errorsHi, I am trying to conduct an interrupted time series analysis with an intervention group and a con…
Problem with misspecificationHello All, Using a dataset of 600,000 observations and 60 variables I ran regress and then tested f…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a dummy variable for each observation separately
Post a Comment