Hello!
I have this categorical variable "education"
No education 0
High School 1
Collage 2
PhD 3
I want to make new variable based on existing education variable, like this:
No Education 0 1 (if you don't have education 0, if you have other education 1)
High school 0 1 (if you have high school education 0, if you have other education 1)
Collage 0 1
PhD 0 1
I know I have to use generate, but after that i'm blank.
Related Posts with how to make new variable based on existing variable?
How to take a random sample of panel data and keep all person-year-observations for a particular IDI try to take a random sample from a huge unbalanced panel dataset. For the MWE data, I would like t…
How to add scatter plot to xtline and modify its colours accordinglyHi, I'm trying to add orginial data to xtline. Sometimes a unit exhibits a constant variable over se…
Spatial Weight Matrix for NUTS 2 European regionsHello, I am trying to finds Moran's I coefficient in certain NUTS2 European regions and I need their…
Creating Pooled AveragesHello, I wanted to create pooled averages for a project i'm working on. I am not familiar with doin…
Combining the values of different categories into ONE with a repeated IDI have a variable (foodgr) which is divided into 4 categories (1,2,3,4). I have another variable, v…
Subscribe to:
Post Comments (Atom)
0 Response to how to make new variable based on existing variable?
Post a Comment