Even Easier Than The Working Directory? Sunday Stata Tip

Поділитися
Вставка
  • Опубліковано 18 вер 2024
  • Sunday Stata Tip| Why You Should Ditch Working Directory:
    In this video I talk about why you should use Global Filepaths for your Stata paths and NOT the Working Directory.
    Paths are EASIER if you have multiple folders!
    Paths are EASIER for other people to change to run your code!

КОМЕНТАРІ • 2

  • @grantgibson8680
    @grantgibson8680 6 місяців тому +1

    If you have a lot of different folders you should still set your directory to the head and use relative filepaths: use "./data/name of file.dta" then the other person still just needs to change the one line in the cd at the top of the do file. All the relative file-paths will be preserved.

    • @InCaseofEconStruggles
      @InCaseofEconStruggles  6 місяців тому

      You absolutely could do that but I found it’s easiest to follow if you just use globals. I’ve seen people use both and I’ve seen it go wrong more often with relative file paths