Rstan instructions

22 views
Skip to first unread message

Andrew Gelman

unread,
Jun 26, 2014, 3:01:28 PM6/26/14
to stan...@googlegroups.com
P.S. I know that it’s Rstan 3 that will be having all the big improvement, but for now maybe we should remove the character-string version of the 8 schools model and just give the stan-program-in-a-file version. Stan is becoming increasingly popular and we don’t want new users to get the idea that including the model as a character string is a good idea?
A


Bob Carpenter

unread,
Jun 26, 2014, 5:14:46 PM6/26/14
to stan...@googlegroups.com
How do you suggest they run the simple getting started example?

We could add an option to read a model file from a URL, but that
requires net connectivity.

My understanding from Andrew is that simply editing a file is
hard work for someone not used to working from the command line
or with raw text editors.

- Bob


On Jun 26, 2014, at 9:01 PM, Andrew Gelman <gel...@stat.columbia.edu> wrote:

> P.S. I know that it's Rstan 3 that will be having all the big improvement, but for now maybe we should remove the character-string version of the 8 schools model and just give the stan-program-in-a-file version. Stan is becoming increasingly popular and we don't want new users to get the idea that including the model as a character string is a good idea?
> A
>
>
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

Ben Goodrich

unread,
Jun 26, 2014, 6:03:18 PM6/26/14
to stan...@googlegroups.com
On Thursday, June 26, 2014 5:14:46 PM UTC-4, Bob Carpenter wrote:
How do you suggest they run the simple getting started example?

We could add an option to read a model file from a URL, but that
requires net connectivity.

My understanding from Andrew is that simply editing a file is
hard work for someone not used to working from the command line
or with raw text editors.

It also requires that the model file be from http (e.g. mc-stan.org) rather than https (e.g. github or google).

I don't think the ability to specify the program as a string hurts anything. We can check R's memory for a previously compiled model with the same Stan program to prevent unnecessary recompiles within the same R session.

Ben


On Jun 26, 2014, at 9:01 PM, Andrew Gelman <gel...@stat.columbia.edu> wrote:

> P.S.  I know that it's Rstan 3 that will be having all the big improvement, but for now maybe we should remove the character-string version of the 8 schools model and just give the stan-program-in-a-file version.  Stan is becoming increasingly popular and we don't want new users to get the idea that including the model as a character string is a good idea?
> A
>
>
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+unsubscribe@googlegroups.com.

Andrew Gelman

unread,
Jun 26, 2014, 6:05:28 PM6/26/14
to stan...@googlegroups.com
I thought we wanted to discourage people from specifying the model as a string.  It’s generally bad practice as it involves people editing the R script to change their model, also it makes it harder for them to run without recompiling.

I was assuming that we’d supply the .stan file and tell people to save the .stan file in their R working directory and then run stan().
A

To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.

Ben Goodrich

unread,
Jun 26, 2014, 6:14:31 PM6/26/14
to stan...@googlegroups.com, gel...@stat.columbia.edu
It seems like there are a lot of people that like having everything in one file, and they just save() and load() the stanfit objects.

Ben

Andrew Gelman

unread,
Jun 26, 2014, 6:17:12 PM6/26/14
to stan...@googlegroups.com
Yes, I can see that we need to should allow it, I just didn’t like it to be the first (thus, default) option.  People follow templates.
But if it’s too much to change now, we could wait until Rstan 3, when we’re changing lots of other things too.

To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.

Jiqiang Guo

unread,
Jun 27, 2014, 11:20:21 AM6/27/14
to stan...@googlegroups.com, Andrew Gelman
Sometimes, I prefer using a file, but there are cases I want to used a string.  So I want to keeping both. 

What is more, one motivation for using a string is that I have seen people do the following when using BUGS/JAGS:

1. create a string for model in R
2. write the string to an external file by function cat
3. use the external file 

And rstan needs to read the external file into a string in R and then call stanc.  That seems to be ugly then. 

Jiqiang 


To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages