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
Clustering with imputationI am using a dataset that uses a school-based sampling design, and thus I want to cluster with schoo…
spmap errorHi, I am learning how to create maps in Stata using spmap. Was trying out the examples using help s…
difficult to find the problem in MLE codingHello everyone, this is the code i am writing to estimate MLE estimates. while writing this program …
Logistic Regression Output with Factor Variable i.Year - Issues with InterpretationHi all! I’m having issues interpreting the coefficients in my regression output. My model has a dic…
Abnormal return for everday in a yearGood day everybody, I am new to Stata, and came up with an issue regarding the event study. I use t…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a dummy variable for each observation separately
Post a Comment