I am a beginner in using Gauss. I want to run the original code from Stock and Watson (2005) "Implications of dynamic factor models for VAR analysis", which can be downloaded from Mark W. Watson's homepage (https://www.princeton.edu/~mwatson/wp.html). I changed all the directories inside the code so that they match my Gauss working directory, but unfortunately I always get the error "Error in xlsReadSA: Could not load file C:\Users\...\sims\ddisk\data\sims.xls", for example when I run the programm "favar_variance_decomp.gss". Did I set one directory wrong? As I said, I am very new to Gauss. Thank you very much for your help!
Welcome to the GAUSS user forum!
Most likely the problem is one of two possibilities:
- You are running this code on a Windows computer on which Excel is not installed.
If this is the case, and you are running GAUSS version 13.1 or newer, you can follow the instructions from this post to resolve your problem.
- The Excel file is in a different directory than you are telling GAUSS.
Based on your explanation I think you are saying that you set your GAUSS working directory to be the directory in which
sims.xlsis located and that you have a statement to load the data in your code that looks something like this:
x = spreadSheetReadM("sims.xls", "A1", 1);
We can use the GAUSS command
filesato return to us a list of files in the GAUSS current working directory which have a file extension of
.xls, like this:
//Print out the names of all files which //end with either .xls, .xlsx, .xls.... filesa("*.xls*);
Run that command from the GAUSS command prompt. If
sims.xlsas one of the found files, AND your code to read the Excel file looks like the one above, then this is not your problem.