Dear all,
I hope you can help me.
I would like to generate a new variables based on values of another variable. The variable I would like to use has 18 values and I would like to trichotomize it into 3 categories with the values 0, 1, 3.
I tried to use:
gen newvardemo if country_code= 1=1 and if country_code= 2=0
but it appears this is not valid syntax.
Can you help me?
Related Posts with Generate a new variable
Socioeconomic Inequalities do-fleHello everyone, I am trying to do a study on socioeconomic inequalities in child mortality using the…
doubleb for willingness-to-acceptHello, I am trying to use the doubleb command to estimate a respondent's willingness to accept a ce…
Tow stage Least Square (2SLS) estimation - dynamic panel modelsHi experts and researchers, I have four models ( dynamic panel models ) : 1- linear model GDP = β…
Invalid nameHello everyone, I would like to kindly ask the community for a help. I use STATA 16, Windows 10. Whe…
Problem with IRT 2PL ConvergenceDear Sir/Madam, I have gone through the previous two post on IRT 2PL methods and am facing the same …
Subscribe to:
Post Comments (Atom)
0 Response to Generate a new variable
Post a Comment