Open huolin1990 opened 4 years ago
Thanks for reporting. I've heard of this before in Windows and never quite managed to track it down but I think the stan.ado needs more checks and captures about the temporary files. I will look into it on 3 Feb when I have other changes to make too.
This might be fixed now by version 1.2.4. Sometimes, what appeared to be an error was just a system message. However, there are also problems with file management, as seen in issues 23-25, and not all of them can be blamed on Windows. We have to offer more flexibility in deleting and storing files, and one option might be to store every file generated (Rdump, .cpp, .exe, output, outputcheck, etc etc etc) in one folder that gets destroyed. But I need to be careful about backward compatibility. I'll be going through these problems soon to try and get StataStan as stable and fixed as possible as it enters a fairly frozen state post Stata 16.
I downloaded all the materials for stan runing, my stata version is 14.2, following are the code I run based on the stata help page. // Bernoulli example:
// make your data clear set obs 10 gen y=0 replace y=1 in 2 replace y=1 in 10 count global N=r(N)
// replace with your cmdstan folder's path global cmdstandir "C:/application/cmdstan/cmdstan-2.21.0"
//############################################## // Version 1: write a separate model file / call Stan, providing the modelfile option - no need to do anything else but you must keep the .do and .stan files together for posterity / stan y, modelfile("bernoulli.stan") cmd("$cmdstandir") globals("N") load mode //###########################################
the stata help page code is // Bernoulli example:
// make your data clear set obs 10 gen y=0 replace y=1 in 2 replace y=1 in 10 count global N=r(N)
// replace with your cmdstan folder's path global cmdstandir "/root/cmdstan/cmdstan-2.6.2"
// here we present four different ways of combining the Stan model with your do-file
//############################################## // Version 1: write a separate model file
/ call Stan, providing the modelfile option - no need to do anything else but you must keep the .do and .stan files together for posterity / stan y, modelfile("bernoulli.stan") cmd("$cmdstandir") globals("N")
//###########################################
the error message is file C:\application\cmdstan\cmdstan-2.21.0\output.csv not found r(601); I keep the Bernoulli.stan and my do file is at the same document.