rstan reuploaded

13 views
Skip to first unread message

Jiqiang Guo

unread,
Aug 13, 2012, 11:34:57 AM8/13/12
to stan...@googlegroups.com
I have repackaged and reloaded rstan to the google code wiki repository.  See http://code.google.com/p/stan/wiki/RStanGettingStarted#How_to_Install_RStan again for how to get it installed. 
In the new rstan, I have added 
1. SE.Mean (standard error of the mean) in the printout 
2. specify objects names as input for function stan as an alternative to list 
3. using previous fitted stanfit objectg as input for function stan 
4. check user interruption during updating the progress of sampling

and I have fixed some bugs.


Though some issues are fixed in the rstan binary version for Mac, it is still not working due to some linking issue.  So for now, I took off the link for installing binary version in the wiki page. 

I am still working on collect more information about the sampler to R. 

--
Jiqiang 

Bob Carpenter

unread,
Aug 13, 2012, 1:21:50 PM8/13/12
to stan...@googlegroups.com
:-) This is phenomenal progress!

I'm basically down to writing doc and organizing web pages.
Do you need any help?

- Bob

Andrew Gelman

unread,
Aug 13, 2012, 2:29:29 PM8/13/12
to stan...@googlegroups.com
J
I followed the instructions and have some quick comments:

1. In the "C++ compiler" section, the second gray block of code can be removed. It's enough to say something like, "If you run the above lines in R and you have C++, you'll get 'hello world' to appear in your R console."

2. Some people won't have C++ on their machines, right? So do we need a few lines telling people how to install C++ if they don't have it?

3. Do these instructions work on PC and Linux or just Mac? If it's only been tested on Mac, perhaps someone can test on PC and Linux and make sure the instructions work.

4. I reinstalled Rstan. When I did this, it all seemed to work, but at the beginning I got a warning message in the R console:

Installing package(s) into ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
cannot open: HTTP status was '404 Not Found'
trying URL 'http://wiki.stan.googlecode.com/git/R/src/contrib/rstan_1.0.tar.gz'
Content type 'application/x-gzip' length unknown

I think it will confuse people to get this warning message.

5. The following line did not work:
fit2 <- stan(fit = fit1, data = dat, n.iter = 10000, n.chains = 4)
I got the following error:
Error in get.model.code(file, model.code) :
Model file missing and empty model.code

6. You can remove the words "Note that" wherever they appear.

7. "could be found" should be "can be found"

8. In Refereces, please add refs to R, Bugs, Jags, and OpenBugs to be polite.

9. To keep the examples clean we should probably give the objects in the two examples unique names. So, for the schools, let's call the data schools.dat, and for the rats, let's call the data rats.dat. What happened was that I ran schools, then rats, then went back to schools and got an error because "dat" got overwritten.

10. print(fit1) still doesn't work. plot(fit1) works but there should be more info on the plot. At the top should be identifying information: model name, date/time the model was run, number of chains etc. At the bottom of the plot should be some generic text saying what the colors mean in identifying R.hat.

11. In Rstudio, when I type help(stan) or otherwise try to access the help file, I get the following error message in the Help window: "Error in fetch(key) : internal error -3 in R_decompress1" I was actually able to access the help file last week and had noticed some typos, but now I can't seem to get to it.

See you
A

Jiqiang Guo

unread,
Aug 13, 2012, 2:44:26 PM8/13/12
to stan...@googlegroups.com
I will work on the issue after our meeting.  And thanks for your comments.  Some quick comments inline.  No comment in the following means that no comment is need and I would work on that. 

Jiqiang 

P.S. 
Bob, thanks. I will ask for help when I need as always. 


On Mon, Aug 13, 2012 at 2:29 PM, Andrew Gelman <gel...@stat.columbia.edu> wrote:
J
I followed the instructions and have some quick comments:

1.  In the "C++ compiler" section, the second gray block of code can be removed.  It's enough to say something like, "If you run the above lines in R and you have C++, you'll get 'hello world' to appear in your R console."

2.  Some people won't have C++ on their machines, right?  So do we need a few lines telling people how to install C++ if they don't have it?

3.  Do these instructions work on PC and Linux or just Mac?  If it's only been tested on Mac, perhaps someone can test on PC and Linux and make sure the instructions work.

Since now it is only source, it should work on Windows/Linux/Mac. I have not tested on Windows much. But I tested mostly on Linux.   
 
4.  I reinstalled Rstan.  When I did this, it all seemed to work, but at the beginning I got a warning message in the R console:

Installing package(s) into ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
  cannot open: HTTP status was '404 Not Found'
trying URL 'http://wiki.stan.googlecode.com/git/R/src/contrib/rstan_1.0.tar.gz'
Content type 'application/x-gzip' length unknown

I think it will confuse people to get this warning message.

Sure.  I do not know why you have the 404 error.  For now, I could not reproduce that error.  I would try to figure our what is the problem.  

Bob Carpenter

unread,
Aug 13, 2012, 2:50:06 PM8/13/12
to stan...@googlegroups.com
A very quick perusal of the web indicates that this
kind of message is usually due to it trying to find
auxiliary files that it can't find, such as documentation.

- Bob

Jiqiang Guo

unread,
Aug 13, 2012, 5:29:57 PM8/13/12
to stan...@googlegroups.com
You are right.  I could not figure out what is the auxiliary file that is needed.  After looking into the source of install.packages in R, I added another auxiliary file.  This might solve the 404 problem, which does not happen always. 

--
Jiqiang 
Reply all
Reply to author
Forward
0 new messages