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?
ivreg2 warning that covariance matrix is not of full rank. But can't figure out whyI am running fixed-effect instrumental variable panel regression. The data is unbalanced panel. The …
Color SchemeHi I have been using a user written command VennDiagram to draw venn diagram in Stata 15. I wanted …
Stata code for Hsiao, Ching, and Wan (2012, Journal of Applied Econometrics)Dear All, Does anyone happen to have Stata code for the interesting model in "Hsiao, Cheng, H. Steve…
Interpreting fixed and random effects from a negative binomial mixed modelHi everyone. For a problem I am trying to tackle, I have created a negative binomial mixed model. T…
debt thresholdsHi everyone I have already done the following fixed effects regression: xtreg labor productivity; d…
Subscribe to:
Post Comments (Atom)
0 Response to How to execute some commands in .do according to conditions?
Post a Comment