You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In one of my previous projects I have used the BAM function (mgcv package) to fit a logistic model. I have used the “weights” parameter to weight the contribution of each data point to the likelihood.
I plan to test sdmTBM for my next project, still using a logistic model, and I wonder how the “weights” parameter compare to the BAM’s one.
In the BAM help it is defined as :
Prior weights on the contribution of the data to the log likelihood. Note that a weight of 2, for example, is equivalent to having made exactly the same observation twice. If you want to reweight the contributions of each datum without changing the overall magnitude of the log likelihood, then you should normalize the weights (e.g. weights <- weights/mean(weights)).
While in sdmTMB, it is:
A numeric vector representing optional likelihood weights for the conditional model. Implemented as in glmmTMB: weights do not have to sum to one and are not internally modified. Can also be used for trials with the binomial family; the weights argument needs to be a vector and not a name of the variable in the data frame. See the Details section below.
It seems there is a different interpretation of the “weights” using BAM vs sdmTMB when using the “binomial” family.
The text was updated successfully, but these errors were encountered:
Despite the different descriptions (we based the binomial weights section in sdmTMB on glm()), I believe these are all doing the same thing. Here's an example:
Arnaud Mosnier writes:
The text was updated successfully, but these errors were encountered: