James-Thorson-NOAA / FishLife

Estimate fish traits for all marine fish species globally
https://james-thorson-noaa.github.io/FishLife/
GNU General Public License v3.0
45 stars 12 forks source link

Standard deviation of steepess (h) #17

Closed mmitsuyo closed 3 years ago

mmitsuyo commented 3 years ago

Hi, I’m a bit confused with getting the plausible range (sd) of estimated steepness (h) from FishLife. I originally thought that by the command below, I can get the sd of h. sqrt(Predict[[1]]$Cov_pred[13,13]) So, if I want to obtain a plausible range (let’s say median plus minus one sd of h), I just plus minus the sd from the median.
Is this correct? Or should I need to care about something else as well?

James-Thorson-NOAA commented 3 years ago

Thanks for your interest! And for asking via the issue tracker, where responses are permanent and searchable.

Yes, that is one way to do what you envision. However, steepness is of course bounded (0.2,1.0) so a normal approximation is a poor approximation to its distribution. The sqrt(Predict[[1]]$Cov_pred[14,14]) gives logit-bounded SD. You could then sample from a normal distribution given the logit-bounded mean and SD, and then for each sample calculate 0.2 + 0.8*plogis(SAMPLE) where SAMPLE is the draw from this normal distribution, and replicating that would give a better approximation to the estimated distribution for steepness. Or you could take quantiles (0.16 and 0.84 for +1/-1 one SD) from this logit-transformed normal approximation, and back-transform those. I'm guessing the latter is most appropriate for your exact query.