Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add estimates of uncertainty to metab.mle and metab.kalman #71

Open
jzwart opened this issue Nov 18, 2014 · 4 comments
Open

Add estimates of uncertainty to metab.mle and metab.kalman #71

jzwart opened this issue Nov 18, 2014 · 4 comments

Comments

@jzwart
Copy link
Member

jzwart commented Nov 18, 2014

Can we create uncertainty estimates using Hessian matrix? or another way from the optimization algorithm?

A slower approach is to add a bootstrapping function.

@lawinslow
Copy link
Member

I think this could be done. One challenge is adding that while keeping output consistent across models that cannot estimate uncertainty (Bookkeeping). Just something to think about.

@rBatt
Copy link
Contributor

rBatt commented Nov 19, 2014

Bookkeeping can't get it

For least squares, we can get it from the parameter s.e.'s. On this line [
https://github.com/GLEON/LakeMetabolizer/blob/master/R/metab.ols.R#L101],
you can see we almost added the lm model as an attribute. That's a lot of
info b/c it's per-day. However, we just add the s.e.'s

For mle and kalman we get it from the Hessian

For Bayesian we get it from the posterior. As a matter of fact, for
metab.bayesian(), the uncertainty estimates are already supplied.

We can add the s.e.'s as an attribute.

PROBLEM: Pending Jake's other question, I think part of the solution might
prohibit blanket provision of s.e.'s via Hessian. This is b/c my solution
to Jake's other question ultimately relies on giving the user the option to
have more control over the optimization (supply own function, set
parameters to optim() or other function). Not all other methods can yield a
Hessian the way, say, Nelder Mead can.

On Tue, Nov 18, 2014 at 7:35 PM, Luke Winslow [email protected]
wrote:

I think this could be done. One challenge is adding that while keeping
output consistent across models that cannot estimate uncertainty
(Bookkeeping). Just something to think about.


Reply to this email directly or view it on GitHub
#71 (comment)
.

@jzwart
Copy link
Member Author

jzwart commented Nov 19, 2014

Hmmm.... could there just be thorough documentation on what is required to get a Hessian (i.e. if the user wanted to mess around with the optim method)?

@jzwart
Copy link
Member Author

jzwart commented Nov 19, 2014

Also I thought I read somewhere that it's not good to use Hessian matrix if residuals are autocorrelated, which may be the case for some metab days, but @rBatt you probably know better than me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants