I am using STATA 15. I have a large data set with multiple columns and rows. I am interested in two variables , var1 and var2, each of which have multiple entries. I would like to rename var1 with the same name as var2. However, when I use the code rename var1 var2, I receive the error message variable var2 already defined. When I use the code rename (var1 var2) (var3 var3), I get the following error message: 1 new name specified repeatedly in newname. You requested the name var3 be assigned to 2 existing variables: var1 and var2.
How can I make the two columns of data with the two different variable names both have the same name?
Thank you.
Related Posts with Renaming Variables
Impact of policyHello, I am new to Stata and I want to determine the impact of a policy on 8 countries using a 9 yea…
Generating Descriptive GraphHi all, I have individual-year data where my variable of interest is a transition into employment (…
Oaxaca analysisHi, I am trying to use oaxaca command to run a nonlinar decomposition analysis I am using this code:…
Can lpoly/lowess/npregress be used in a survival analysis context?Hi experts, I know that in STATA we can use the logit command to fit a discrete-time logistic hazar…
How to modify value labels based on certain words already present in value labelsHello everyone, I have a set of categorical variables which have certain value labels attached to th…
Subscribe to:
Post Comments (Atom)
0 Response to Renaming Variables
Post a Comment