I am using encode to convert a variable from string to numeric type so that I can use it in a regression. Since the variable only contains numeric values (though its type is a string) hene I want to assign the same labels as values. For example, my variable name is Mathematics and it has values 80,90,100. When I will encode, the stata will assign a different value to these numbers. I want to assign the same values to my variable 1.e the value for label 80,90 should be 80, 90 respectively and so on.
Can someone help how to do that?
Related Posts with Assigning labels as variable values
'No observations' errorDear all, I'm trying to conduct a unit root test to my variables using the following code: Code: …
Reshaping Datastream DataHello community. first of all I would like to thank you for the inclusion in this really instructive…
Comparison of predicted values after OLS regressionDear all, I am interested in predicted values after an OLS regression. Moreover, I am curious how t…
Complex survey settingsHi, I am trying to set-up a complex survey data set in Stata and Mplus so that they have the same s…
Superscript and subscriptDear Stata users, I have a variable with both superscript and subscript. When I wrote both superscr…
Subscribe to:
Post Comments (Atom)
0 Response to Assigning labels as variable values
Post a Comment