Dear Stata users
I created a list of variables using the following command:
local chemie mpi spi (create a local macro with the name chemie, containing the two variables mpi and spi)
I then do a regression analysis, using the following command:
regress pkd `chemie`
I'm working with a do-file, and it only works if I execute both commands at the very same time (mark both lines, execute once). As soon as I execute them one by one (execute the two lines after each other) the local macro stays empty.
Is there any way that Stata will remember my local macros in the case I'm not executing both commands at the very same time?
I'm acutually building some models, that's why I would like to create a local macro at the beginning of the script to create a few variable lists, and then later try different model approaches. Now it doesn't make any sense if I have to redefine the macros every time before I'm running my models, especially in the process of model building.
Is there maybe another useful approach?
I'm using Stata 12.0
Many thanks,
Isabel
I created a list of variables using the following command:
local chemie mpi spi (create a local macro with the name chemie, containing the two variables mpi and spi)
I then do a regression analysis, using the following command:
regress pkd `chemie`
I'm working with a do-file, and it only works if I execute both commands at the very same time (mark both lines, execute once). As soon as I execute them one by one (execute the two lines after each other) the local macro stays empty.
Is there any way that Stata will remember my local macros in the case I'm not executing both commands at the very same time?
I'm acutually building some models, that's why I would like to create a local macro at the beginning of the script to create a few variable lists, and then later try different model approaches. Now it doesn't make any sense if I have to redefine the macros every time before I'm running my models, especially in the process of model building.
Is there maybe another useful approach?
I'm using Stata 12.0
Many thanks,
Isabel
Comment