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
Problems with panel dataI am new to stata and I trying to run a regression to understand demographic roles in unemployment, …
Help with StrposHi there, In the code below my goal is to convert the local below into a neat list by converting "R…
Measuring duration between age 13 and 19Hi people, Supposed i want to measure marriage timing among pregnant and non pregnant adolescents (a…
merging two panel data sets - 1:m mergingHello, I need help with two merging panel data sets according to the following variables: h_id, year…
Compute Female proportion in each district in long format data in Stata. I have a long format dataset where it has 5 variables: did---district id sid---school id id--studen…
Subscribe to:
Post Comments (Atom)
0 Response to String variable in Do-file
Post a Comment