See inline.
> On Thu, Sep 1, 2016 at 3:36 PM, Bob Carpenter <
ca...@alias-i.com> wrote:
>
> > On Sep 1, 2016, at 9:15 PM, Cole Monnahan <
mon...@uw.edu> wrote:
> >
> > Hi Krzysztof,
> >
> > I'm talking about a program called AD Model Builder which is used mainly for maximum likelihood estimation of models in the fisheries community.
>
> Yup. Just went to your conference :-)
>
> Hah yes of course I remember you being there. Was just giving some background.
Me, too :-)
> What I think would be most difficult in writing ADMB programs
> is that the library of built-ins is relatively sparse compared
> to Stan. And it doesn't have all the efficiency bells and
> whistles for matrices and probability densities up to a proportion.
>
> Yeah I'm not trying to compete with Stan. I'm trying to get NUTS functional for some really important models built using entrenched and outdated software.
Understood. I'm just saying that might not be the best way
to spend the time to get these really important models functional
and may not lead to the most efficient resulting system. It
will keep everything in ADMB, though. And I understand that
many people don't want to change systems they use.
> There's also TMB, which is more like a combination of
> INLA and RStanArm.
>
> > It's designed with more direct access than Stan (although I admit I haven't used cmdstan),
>
> CmdStan is just an alternative high-level interface from
> the command line. The Stan programs are the same. You can
> take output from CmdStan and run it through RStan's or ShinyStan's
> diagnostics and visualizations.
>
> > so the user is basically writing C++ directly. This allows users to come up with very generic models (kind of like rstanarm).
>
> You can write C++ directly for Stan, but you have to do
> it with templates rather than the direct build-in of
> ADMB types as you guys do, because all of our programs assume
> generic templated model code and do the autodiff through
> functionals applied to derived functors.
>
> I don't think this is possible or worthwhile considering the state of the ADMB source code. It's way easier to get NUTS into it.
That's what I meant when I said you could use our code.
You can use our NUTS code directly rather than trying to code
it all. You'd just need to go down to the MCMC library level
rather than using higher-level interfaces. But even those aren't
really designed well for use with anything other than one of our
generic model classes.
> > Think of it as Stan written in the 80s by a single person to solve specific fisheries issues. For instance, this manual describes a common model that has probably thousands of combinations of used options and is 10K lines of C++. It is used widely for resource management around the world due to its flexibility. This is not the kind of model that anyone would be recreating in Stan anytime soon.
>
> I'd be very nervous about using 10K lines of C++ nobody
> understands. But it might translate to much less Stan code
> because our abstractions are higher level.
>
> Undoubtedly. We're probably at least a decade away from moving off ADMB just due to the inertia of the community. I'm trying to graduate in the next year, however, so I'm looking for a shorter path here.
You might be surprised how fast people can move if you find
something faster and more robust. And you don't need to get
everybody to move, just the important people. But obviously
up to you and you've decided already that it's impractical, so
I'll drop it.
...
> The issue I have with using coda's classes is that they don't have the NUTS diagnostics like step size, tree depth, and divergent. Is that not true? That's key when using ShinyStan.
I'm not sure what the story is with those. Maybe you could write
another more specific message to get the RStan' developers attention.
This stuff should all have generic input formats and not require
a stanfit object, which builds in all sorts of Stan specifics. Jonah's
been pretty swift to update ShinyStan and I think that's your best
path forward.
- Bob