Hello,
I am currently trying to replicate a Stata code but I am having trouble at the very beginning. The beginning of the code goes:
(I already adapted the code by deleting all other states except New York; however, the error message was the same with all 50 US states, as it is in the original code.)
And this is where I run into trouble. I have adapted the file paths to replect my computer's file paths, as instructed. However, it cannot seem to find them, as this message pops up:
I do not understand how it cannot find this file, which does exist and works perfectly well when opened in another Stata window. Is the use of
incorrectly done?
I have also tried defining the working director as ""C:\Users\clero\OneDrive\Documenti\Master's thesis\STATA\test", but this makes no difference. I feel like the error is probably to to a simple syntax error, but I can't figure out what.
For further information, I use Stata/SE 17.0 and I am quite a new user.
Please let me know if you have an idea of what went wrong or if you need further information. Thank you for your help!
I am currently trying to replicate a Stata code but I am having trouble at the very beginning. The beginning of the code goes:
Code:
set more off clear all global MatchingDoFiles "C:\Users\clero\OneDrive\Documenti\Master's thesis\STATA\test\ABE_algorithm_code\codes" global datadirA "C:\Users\clero\OneDrive\Documenti\Master's thesis\STATA\test\1850_census" global datadirB "C:\Users\clero\OneDrive\Documenti\Master's thesis\STATA\test\1880_census" global outdir "C:\Users\clero\OneDrive\Documenti\Master's thesis\STATA\test\Cleaned_data" global matchdir "C:\Users\clero\OneDrive\Documenti\Master's thesis\STATA\test\Matched_data" foreach state in NewYork { use `"$datadirA\1850_NewYork.dta"', clear }
And this is where I run into trouble. I have adapted the file paths to replect my computer's file paths, as instructed. However, it cannot seem to find them, as this message pops up:
Code:
file C:\Users\clero\OneDrive\Documenti\Master's thesis\STATA\test\1850_census\1850_NewYork.dta not found r(601);
Code:
global
I have also tried defining the working director as ""C:\Users\clero\OneDrive\Documenti\Master's thesis\STATA\test", but this makes no difference. I feel like the error is probably to to a simple syntax error, but I can't figure out what.
For further information, I use Stata/SE 17.0 and I am quite a new user.
Please let me know if you have an idea of what went wrong or if you need further information. Thank you for your help!
Comment