Hi,
I am asking this clarification after going through STATA doc and some of the web content. Although I could not get the "foreach" for "rename" completely (I am still learning that command to understand more), I felt that the examples given in the doc and web have not helped me. Hence, I am posting here my question is that I would like to run rename command for many variables in one go. For eg. the existing variables b13_q2, b13_q3, and b13_q4 have to berenamed as b13q2, b13q3, and b13q4. I do have to do this for many variables. How I was doing was in MS-excel. But I wanted to do that in STATA. I wanted to know whether "foreach" would work or is there any other command is to be called? Could someone help me outfrom this.
Related Posts with renaming multi-variables using foreach
Stata16: Measurement invariance testing - how to get Chi2 values?Hi there, I want to test for measurement invariance in Stata 16. I want to follow the approach of t…
STataSta …
Code to import value labelsHey im trying to import value labels to a set of observations in a variable. Var name: Parentesco …
how can I turn year of birth into age?Hello! I'm trying to recode a variable named V241 in the World Values Survey data set (which can be …
Is there a command for creating deciles by date?I understand the command xtile ... , nq(10) can create deciles based on the entire data-set being ag…
Subscribe to:
Post Comments (Atom)
0 Response to renaming multi-variables using foreach
Post a Comment