Hi,
I am trying to rename every three variable in my dataset such that the first three variable X1 X2 X3 read HH-W-X1 HH-B-X2 HH-H-X3. Also, I would like to rename the three subsequent variable as follows: X4 X5 X6 —> UH-X4 UX-x5 UX-x6. My data includes 42 variables as X1 X2 ... X42 and I would like to loop this over 42 variables. Thanks for your help.
Best,
NM
Related Posts with Renaming every 3 variable
How to Run Random Forest for Time-Series DataHi, I am writing this post to ask whether there is any Stata command (or doing manually) to apply t…
Finding and plotting the trend of the weighted average of variable Code: * Example generated by -dataex-. To install: ssc install dataex clear input double total_asse…
xtivreg2 export first and second stage resultsAs the description of xtivreg2 says, it is the wrapper of ivreg2. But the "savefirst“ option of ivre…
Merge mulitple .csv filesI am using Stata 16.1 MP to merge six .csv files on neonatal, infant, and child mortality. I would l…
Remove part of a Text in observationHi guys, Below is a sample of my data. I would like to remove the "-TOT RETURN IND" in all the obser…
Subscribe to:
Post Comments (Atom)
0 Response to Renaming every 3 variable
Post a Comment