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
How to add value label to default missing values?Hi there, Sorry for a really beginner question. I am trying to add value labels to organise my data…
-meprobit- vs -probit- with clustered standard errorsHi all, So I have a multi-level data, with individuals from different countries, over the period of …
Using a cross sectional analysis to support the results of a panel analysisHi all, I have a 3 wave panel of children's height and weight and whether either of their parents e…
Using stir to analyse IRR for cancer recurrence in two groups, p significant but CI range below 1, any thoughts?Dear all, I have a set of data with approximately 100 patiens treated for cancer in two groups in r…
Creating a subsample with missing value restrictionsDear all From the entire sample list ,I would like to create a sub-sample based on certain condtions…
Subscribe to:
Post Comments (Atom)
0 Response to Dynamic variable names
Post a Comment