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
Bar graph, put bars in specific orderDear all, I produced a bar graph over income group, I'm trying to order the bars as lower-middle, u…
Bayes Factors for t-testHi Listers, A reviewer has suggested presenting Bayes Factors. I am wondering how to do this after…
create new variable from likert scaleHi I have many likert scale responses from my survey in 3-4 different categories of subjects (e.g. e…
Perplexing decimal issue with F testHi all, I've been running ANOVAs and bonferroni posthocs and sometimes my mean table has decimal pl…
While using rangerun, change the order of items in a local macro containing variable list (dummies) at each iterationThe code below records coefficient estimates at each iteration. There are always two dummy variables…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a dummy variable for each observation separately
Post a Comment