The following commands are fickle, not reliable, working sometimes and not at others. I use a project file, containing the specific do file with the script I am trying to run.
I work on a PC.
global macro project1_data "C:\Users\...\Datasets"
display "${project1_data}"
use "${project1_data}mysamplingdata", clear
However, the code does not seem to register, and I am told:
use "${project1_data}mysamplingdata", clear
file mysampling.dta not found
r(601);
Also, when I type in:
cd "${project1_data}"
This gives me the current directory. The project file is in a different directory.
Do I need to modify the global macro script above because of that?
Thanks,
Saul
Related Posts with Global macro for a directory using project file
Bootstrap in MontecarloI am running some issues on how to run a boostrap in a montecarlo. I need to generate 50 observation…
Dynamic GMM vs local projection vs Time-varying parameters (TVP) model selectionI am having a macro panel where I assume some sort of political ideology indicators (left -right) an…
using inlist with external dataHello, I am trying to identify how to use inlist with external data. Currently, I have two separate…
how to display distinct values of variables?I know use -distinct- command to know the number of distinct values of variables. How to list these …
inquire about preserve and restoreI need to drop tons of variables in my data set for panel A task. And I need to go back to the origi…
Subscribe to:
Post Comments (Atom)
0 Response to Global macro for a directory using project file
Post a Comment