Oops yeah meant to point to this particular issue
Also what kind of survival models are you working on? Weāve been wanting to
get survival models (essentially a stan_survreg function similar
to Rās survreg) into rstanarm for a while but havenāt had the time.
Jonah
So far I have multi-level weibull and weibull-uniform mixture models. Itās a setting where a whole range of quantiles needs to be accurately represented by the model and you need to avoid noisy estimates for small units without much data so multi-level models are really a good match. The multi-level part works well but I need something more flexible than the Weibull-uniform mixture for dealing with the tail.
Writing or generating all-doubles wrappers makes the most sense if Iām going to avoid expose_stan_functions
. I did look at the code generator and the changes needed in the code are pretty minimal but I havenāt looked at how a flag for all-doubles would need to be plumbed through the code generator.
You shouldnāt have to use expose_stan_functions
. Just write your C++ functions in the src/ directory, export them to R in the NAMESPACE, and then in the Stan programs declare those functions in the functions
block without defining them. It works now if you install a StanHeaders that is based on the develop versions of math and stan.
Let me know if you need help. It needs to drop the
tempate type declarations and replace all their uses
with ādoubleā. Itāll leave residual constant reference
arguments, but that shouldnāt be a problem in this context.
- Bob
Iāll start a separate thread about this, if you donāt like what I propose there it would be good to do a call/skype to resolve it.
Quick question: there arenāt any tests currently for the generate_function* functions so I have no examples to go on. My first thought about how to create tests for the generate_doubles_function tests is to write the out
stream to a stringstream and count matches to expected substrings. Is that what you would do?
Ok Iām going to post these guidelines on stan-users soon. Should I put them elsewhere as well? On mc-stan.org somewhere maybe?
A wiki? I feel like the github.com/stan-dev/stan wiki is way out of control and I wish there was a separate wiki.
If we actually wanted to solve these problems, we could do one of a number of things:
- just keep on with how weāre managing it
- create a new repo (cause there are no organization level wikis) that holds a wiki
- create a new github.io repo that we point wiki.mc-stan.org to. Itāll be .md files for editing and it wonāt be just a normal wiki. Itāll be a website.
Thoughts?
I agree that the stan-dev/stan wiki is wrong for something thatās basically targeting technical users. I like the github.io option, but thatās mostly because I find the github wikis hard to navigate.
I donāt think the wiki is necessarily the wrong place. I just think we need to organize a little better. Bobās already taken a first pass. We need to take subsequent passes to get it in shape.
@jonah, Iād suggest doing whatever is easy to implement.
Iām also planning on putting the guidelines in a CRAN vignette so another
option is to post on stan-users for now and then when the vignette is up on
CRAN we could just put a link to the CRAN vignette somewhere instead of
hosting our own version. That way all changes would also only need to be
made in one place.