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
Squared and linear term are both insignificantHello fellow Stata users, I'm encoutering some problems with potential non-linearity in a random ef…
Max function doesn't return the exact resultHello, I have a problem with the max() function. I have a dataset with several variables and one of…
Creating Control Variable using IPUMS CPSHey guys, I am currently trying to do a regression with panel data from the IPUMS CPS. I have mostl…
Matched data for regressionI am new to STATA. I am working on DHS dataset. I have merged the men recode file with the individua…
Estimating propensity scores after multiple imputationHi there, I am estimating propensity scores using logistic regression on an imputed dataset (M=10).…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a dummy variable for each observation separately
Post a Comment