Hi, I have a dataset which includes information on a person-level for individuals living in different countries. The 'country' variable takes on values such as NL and BE for Netherlands and Belgium, respectively. I need to run the analysis per country, so I limit my regressions to, for instance, the Netherlands.
I would like if the output of my post regressions results incorporate the country for which I did the analysis. For instance, currently (part of my) code is:
margins, at(married=(0 1 ) educ=(0 1 2) hours=(0 1 2)) saving(margins_effort, replace)
Ideally, I would set a parameter at the start of the code, which automatically saves the results in margins_effort_NL instead of margins_effort. I would appreciate any advice on this.
Edit: the goal of course is that when I rerun the analysis for a different country, setting the parameter at the beginning to for instance BE, the file output becomes then margins_effort_BE etc.
Related Posts with Dynamic variable names
Data Envelopment Analysis to generate TFP with macro level panel dataHi, I'm relatively new to stata and struggling with the dea (data envelopment analysis) command. My …
why i am not getting Hansen statistics?. xtabond2 fg_ta l.fg_ta size age ia_w debt_ratio_w TobinQ fac roa cashratio i.sector_1, gmm(fg_ta) …
Using cmp command for simultaneous equation model with an ordered endogenous variableHello everyone, I’m running a simultaneous equation model with 2 equations as following : Y1 = f(Y…
asclogit or clogit with treatment and control?Dear all, I have conducted a labelled choice experiment with labels=engine type (gasoline, EV, HEV)…
Pre post analysis with ANOVAGood morning, I was asked to perform a pre-post analysis with ANOVA in order to see the effect of th…
Subscribe to:
Post Comments (Atom)
0 Response to Dynamic variable names
Post a Comment