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?
Generate a new variable in a loop in different files and calculating the meanHi, I want to write a loop to generate a new variable called savings (income-expenditure) in two se…
Adding partner data to responding person data in a panel data fileI wish to extend my analysis of panel data to include information about the responding person's part…
Marginal effect after heckpoissonDear All, I am new to stata and I am using Heckpoisson, a poison regression model with endogenous s…
how to export Summary Statistics to wordDear Sir/Madam I am working on my thesis on impact of informal credit on household welfare. I try to…
Numbering occurrences of a flag within patients.In the example below I have created OVERLAP_FLAG, which is equal to 1 where two consecutive regimens…
Subscribe to:
Post Comments (Atom)
0 Response to how to make new variable based on existing variable?
Post a Comment