Error in runnung toolbox

#1

Dear Prof. Pfeifer,

I am trying to run a toolbox for estimating VAR models: the BEAR toolbox. Having read the manual, I am to run bear_4_2.m. Also, in the first window that comes up after running the file, I am to add the path of the excel file to be run, data.xlsx, under ‘Set path to data’. However, after these two steps, I am getting the following error messages:

Error using copyfile
cp: /Users/SEYI/Downloads/toolbox 4.2/files\results.xlsx: No such file or directory

Error in initexcel (line 7)
copyfile(sourcefile,destinationfile);

Error in bear_toolbox_main_code (line 109)
initexcel;

Error in run (line 96)
evalin(‘caller’, [script ‘;’]);

Error in bear_4_2 (line 33)
run files/bear_toolbox_main_code;

I tried adding the Matlab path and the path of the toolbox in bear_4_2.m, but this made no difference. The toolbox is too large to attach. Please download it via the following link:
https://www.ecb.europa.eu/pub/research/working-papers/html/bear-toolbox.en.html

I would be really grateful for your help. Many thanks.

#2

Is it true that you are using a Linux like operating system? The backslash near the end of

cp: /Users/SEYI/Downloads/toolbox 4.2/files\results.xlsx

seems to indicate a problem with Linux compatibility.
You should write to the authors of the BEAR toolbox.

#3

Dear Prof. Juillard,

Many thanks for your prompt reply. I am using a Mac OS X operating system. That suggests it may work on a Windows PC, so I’ll try that. Thanks.

#4

If you want to make the toolbox work on a Mac, it can be done. Just change the \ backslashes to / wherever they give an error.
For the Excel compatibility, you can use the Matlab user function ‘xlwrite’:

It circumvents the use of Excel by using the Apache POI java library. The only additional fix needed is changing all appearances of ‘xlswrite’ to ‘xlwrite’ in the code files of the Bear toolbox. You can do this systematically or just run the toolbox several times and trace the error to the file that produces it.

#5

Thanks a lot for the reply!

#6

Could you please tell me if have you used the toolbox on Mac? if yes, have you had other problems? Thanks a lot. I have the same your errors.

#7

Sorry, I haven’t. I hope someone can help with your problem.

#8

@DLT What exact error are you facing?