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
generating tenure variableHi, I would like to create a variable that would track a tenure of executives (number of years with …
Graph with mean coefficients plut 95% credible intervals under - bayes - commandDear Forum Members, I'm doing some Bayesian analysis under a hierarchical model. I wish to get a gr…
Matching male and female patients with same/similar lab valuesHi! I'm looking into a sex-related sub question of my bachelor's thesis about heart failure and onco…
ipdforest command errorsHi, I am trying to make forest plots using the ipdforest command in a dataset with and one without m…
line plots -- average, minimum & maximum sales for each quarterI want to plot three line plots in one graph. On the x-axis I want to have the quarters i.e. Q1, Q2,…
Subscribe to:
Post Comments (Atom)
0 Response to Assigning labels as variable values
Post a Comment