Noob question:
I need to use a string variable in the name of other variables. I thought of something like:
gen country="EU"
gen netexport_"country"=ex_"country" - im_"country"
It is just an example to illustrate my problem. A loop would be sub-optimal.
Related Posts with String variable in Do-file
Sublime Text and Stata 16I am trying to use Sublime Text with Stata 16, similar to what I previously did with earlier version…
From SPSS to StataDear All, I need some help in converting a couple of SPSS files to Stata 13. Thanks, Dapel …
Convert composite string variable delimited by commas into separate dummy variablesHi, I have observations of building tenants which has a string variable recording the floors they oc…
How to check correlation among 2000+ variables in a quick way?Hi, all, I had a data set of 2000+ variables (all binary or categorical), for example, 1000+ are …
Plotting a (curvilinear) mediated relationI am working with a mediated-moderated model like that in Fig. 1. All variables in the model are con…
Subscribe to:
Post Comments (Atom)
0 Response to String variable in Do-file
Post a Comment