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
Garch(1,1) model does not converge:*flat log likelihood encountered, cannot find uphill directionHello, I am using 5 minute Bitcoin/USD logreturns since 2017 (n=256,705) and am trying to estimate …
testhere is my code: Code: regress y x1 x2 estimates store my_regress some question text HTML Cod…
jm suite for joint analysis of longitudinal and survival dataDear Statalist, I want to do a Cox regression taking repeated measurements into account. I want to …
Full example of using SEM estimates as regression coefficients (CFA)Hello, I am trying to construct indices for well being, stress and environmental concern. I am usin…
Tobit model with binary endogenous regressorsDear All, Ivtobit is for Tobit model with continuous endogenous regressors. My endogenous regressor …
Subscribe to:
Post Comments (Atom)
0 Response to Creating a dummy variable for each observation separately
Post a Comment