Closed damianooldoni closed 4 years ago
For the count data (obs & ncell) it's in the log scale. For the presence/absence data it's a logit transformation. I'll add backtransformation in the spGAMxxx functions.
Great, @ToonVanDaele! :+1: Thanks
I use the model$family$linkinv function. It's used in the function 'get_lcl' and 'predict_real_scale' (added today).
Thanks @ToonVanDaele! Nice.
I reopen this issue just to inform you of a possible bug while using function predict_real_scale
: https://github.com/ToonVanDaele/trias-test/blob/master/R/5c_method_GAM_short.R#L53
You pass df
to argument df_n
. You should pass df_n
. In general, please be careful while using existing variable names as function arguments! It is quite dangerous and prone to errors, as R search in upper environments to search for such variables if not found.
I would rename argument df_n
:
predict_real_scale <- function(df_to_convert, model) {
...
}
We need to backtransform the lowest confidence interval value of 1st derivative to real scale. This transformation doesn't affect ranking, but it is way better for communicating the real growth in observations/number of occupied cells.
Could you please let me know which formula should we use for the conversion? Thanks.