Starting Point Data in MS_estimation

I’ve been working with the MS_SBVAR parts of Dynare recently and I was hoping someone could give me a better explination of an error I’ve been getting.

I’ve taken the DH10.mod example file and begun by altering it to use my own data, and then beginning to alter the specification. I am often getting the following error:

Unable to create the starting point data file est_csminwel_simple.out in csminwel.c!
Error in MS-SBVAR MEX file.

Error using mexErrCheck (line 41)
Error encountered in: ms_estimation.
Error in ms_estimation (line 77)
mexErrCheck('ms_estimation', err);
Error in simple (line 66)
[options_, oo_] = ms_estimation(M_, options_, oo_);
Error in dynare (line 120)
evalin('base',fname) ; 

Can someone explain to me (or point me to an explanation) of what’s going on when this error occurs? It will sometimes occur in the first few iterations of the estimation command, while other times it seems to make it farther along. Thanks.
simple.mod (724 Bytes)

What OS are you using?

Which version of Matlab or Octave?

Please post your data file so I can try to replicate your problem.

I’m using Windows 7, Matlab 2013b, Dynare 4.3.3.

My apologies for not posting the data file along with the mod file. The forum isn’t letting me post a .mat file so I’ve uploaded an xls instead (first column ADSBCI, second column NFCI, same order as the mod file). Thanks.
factors3_200.xls (36 KB)

Also Houtan, is there any documentation for this type of error that I could look at? I am very appreciative of any comments you have on what I’m working on, but I also just want to make sure that I’m not missing anything that’s already been written. I’ve looked around on the wiki page and through the reference manual but haven’t really been able to find anything on errors within the MEX files.

Hi,

This works fine on my computer (OS X 10.8.5, Matlab 2013b, both Dynare 4.3.3 and unstable) and the Windows VM I have access to (Windows 8, Matlab 2013b).

The error message gives you pertinent information: the program is unable to create a file on your computer. This is often a permissions issue: the process that’s running does not have permission to create new files in the directory where you’re running mod files. You should open this directory and give full access to all users/programs.

There is a documented problem deleting files on Windows 7, github.com/DynareTeam/dynare/issues/438 . I hope to deal with this before the release of Dynare 4.4 in the next few weeks, once I find a Windows 7 machine. I’ll look into your problem again too when I do this and see if I can reproduce it there.

Are you using 64 or 32 bit Windows. The files run without problems under Win7 64 bit, Matlab2013b with the unstable snapshot.

I’m using 64-bit Windows 7. I’ve double checked the permissions and I don’t believe that to be causing any problems.

As for the potential problem of file deletion, I can confirm that I’m experiencing some of the deletion issues you referenced. I can run the DH10 example from an otherwise empty directory without problem. Running it a second time gives the above error.

However, I can’t successfully run the file I’ve uploaded here even from an otherwise empty directory.

If you have any further suggestions, please let me know. Thanks.

To check whether or not it’s a permissions issue, you can drop the DH10 files into the directory that contains your modified version and try to run it. If it causes problems here, then it’s an issue with permissions. If it runs correctly, then there is some other bug.

I can confirm that it’s not an issue with permissions using method Houtan suggested.

Furthermore, there have been 2 confusing developments:

  1. I have been able to run the code I’ve posted here without getting the error. I am not aware what I have done to accomplish this. However, I am not able to replicate running it successfully under what appear to me to be identical conditions.
  2. I have also occasionally been getting the error above when I run the DH10 example from an otherwise empty folder. I have run it in what appears to me to be identical situations but have had both successful and unsuccessful results.

Do these developments make you think of anything else that could be going on? I realize that I’m not providing much to go on, so if you have other testing procedures you’d like me to try, I’d love to hear those as well.

Also, is there any chance that the error message has something to do with an error in computing the starting point values and not creating the file itself? The error message just seems vague enough to me that I’m curious how you’re so sure it’s in the file creation command and not another part of the process.

No, the error only has to do with file creation.

Sorry to say that the only thing I can think of is something particular to your setup. Otherwise, running from a folder with only the mod file and the data file should work (as the other issue of file deletion remains).

Thanks Houtan. You’ve been very helpful.

That’s what I’ve been afraid of. I’ll keep looking into it and I’ll post something here if I find anything.

It turns out I had a real time backup application running that was accessing the files so that Matlab couldn’t. Thanks for looking into this with me.