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
Calculate number of "common friends" in the past five yearsDear fellow Statalisters, For a large panel data set on alliances, I want to calculate the number o…
Panel Regression with a Moderator Variable*Please forgive my lack of Stata/Statistics knowledge or basic questions, I'm fairly new to Stata an…
Problem - Use 2 datasets in one do file (single run)Hi all ! I need help on stata I am trying to create one do file in Stata (mandatory) using 2 diff…
Filtering quality variablesI am having s panel data on macro variables for 72 countries (I. e. ;gdp, inflation etc) and a conti…
running parmest on STATA 15Hi I was wondering if anyone could help me out a bit on the parmest command. I am using STATA 15 an…
Subscribe to:
Post Comments (Atom)
0 Response to Global macro for a directory using project file
Post a Comment