I want to rename the varlists in different files having different the numbers of varlists.
e.g
I want do the following commods in first file
ren A v1_1
ren B v2_1
ren C v3_1
ren D v4_1
ren E v5_1
ren F v6_1
ren G v7_1
ren H v8_1
ren I v9_1
ren J v1_2
ren K v2_2
ren L v3_2
ren M v4_2
ren N v5_2
ren O v6_2
ren P v7_2
Do the following commods the other file
ren A v1_1
ren B v2_1
ren C v3_1
ren D v4_1
ren E v5_1
ren F v6_1
ren G v7_1
and there are so many files,so I wonder is there some way to simpliy this process,such as set a dictionary if the name is A,rename it as v1_1,or count the number of the varlists,and execute the first few columns,but I don't know how to realize this idea.
Related Posts with How to execute some commands in .do according to conditions?
egen command is only generating missingsHello, i used the egen in previous data anlysis and it worked pretty well. The code looked somehti…
Heckprobit model with no outputHi everyone, I'm working on a project about internet lending which focuses on the relationship betw…
capture a change over time within idHi I have a panel data of N couples (id) over 6 time periods the variable h_child is equal to "1" if…
Plotting Quantile treatment effects with 95% confidence intervalDear statalist, I am using the following code to plot the QTE along with 95 % CI. capture postuti…
How to change the width of bars in a catplot graphHello everyone, I generated a bar graph using the catplot command for two categorical variables and…
Subscribe to:
Post Comments (Atom)
0 Response to How to execute some commands in .do according to conditions?
Post a Comment