adw96 / DivNet

diversity estimation under ecological networks
83 stars 18 forks source link

Converting to Exponential Shannon #43

Closed ianartmor closed 4 years ago

ianartmor commented 4 years ago

Hi,

Apologies in advance for the mathematically-ignorant question.

To convert to exponential Shannon estimates, can I just do exp(estimate) and exp(error)? Or does exponential Shannon need to be estimated from the beginning to properly estimate error?

Thanks, Ian

adw96 commented 4 years ago

Great question -- and great intuition regarding propagating errors. You can do exp(estimate) to get a the maximum likelihood estimate of exponential Shannon (monotone transformations of MLEs are maximum likelihood estimates of the transformed variable).

The error in this transformed estimate is a little trickier. I would say that using the delta method is a reasonable choice. I just did the math for you, and you can get the standard error in exp(Shannon) as

standard error in exp(Shannon) = standard error in Shannon multiplied by exp(Shannon estimate).

So essentially instead of exp(error) you want "error x exp(estimate)".

Hope that helps!

adw96 commented 4 years ago

Post script for myself later -- we want Var(f(a)) where f(a) = exp(a) so df/da = exp(a). So Var in f(a-hat) \approx Var(a-hat) \times (df/da)^2, where the derivative is evaluated at a-hat so std error (f(a-hat)) = std error (a-hat) \times exp(a-hat).

ianartmor commented 4 years ago

That definitely helps; thank you so much!