Hi all, I am a new user to STATA. I want to rename 12 different variables: Instead of coding 12 different lines such as below--is there a better way to do it? Thanks.
---
rename d_201801 d1
rename d_201802 d2
rename d_201801 d3
rename d_201801 d4
rename d_201806 d5
rename d_201823 d6
rename d_201824 d7
rename d_201801 d8
rename d_201901 d9
rename d_201901 d10
rename d_201901 d11
rename d_201926 d12
Related Posts with Help with loop for rename function
Combining the values of different categories into ONE with a repeated IDI have a variable (foodgr) which is divided into 4 categories (1,2,3,4). I have another variable, v…
Generate variable capturing properties of other variablesDear all, I have a household survey dataset consisting of two rounds. The dataset provides informat…
How to take a random sample of panel data and keep all person-year-observations for a particular IDI try to take a random sample from a huge unbalanced panel dataset. For the MWE data, I would like t…
Creating Pooled AveragesHello, I wanted to create pooled averages for a project i'm working on. I am not familiar with doin…
Spatial Weight Matrix for NUTS 2 European regionsHello, I am trying to finds Moran's I coefficient in certain NUTS2 European regions and I need their…
Subscribe to:
Post Comments (Atom)
0 Response to Help with loop for rename function
Post a Comment