Fourth corner analysis with fuzzy coded data #204
-
Hello. I love the package, thanks for developing and maintaining it. Can you please suggest an approach to include fuzzy coded trait data? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 4 replies
-
Thanks for posting! I do not see why fuzzy coding would cause any issues here. I'm happy to be proven wrong, but I see no reason why it should be related. The error you receive can occur in any type of model fitted in the gllvm package, and is often related to the exact model implemented, its convergence, and perhaps the amount of information in your data. Could you provide some more information on the module you have fitted, and the amount of data that you have available? |
Beta Was this translation helpful? Give feedback.
-
Hi Bert, thanks for replying.
Specdat is data on 40 species (all occuring >10 times in a samples), with 632 samples.
specdat is strongly zero inflated, so I applied a ZINB |
Beta Was this translation helpful? Give feedback.
-
Thanks for the help so far, I am already happy to read that the fuzzy coding in itself is probably not the cause of my issue.
|
Beta Was this translation helpful? Give feedback.
-
Hi Alain, changing the distribution indeed works, great! Now the model runs as it should, also with when I include all the modalities. |
Beta Was this translation helpful? Give feedback.
-
Now simulate data from your model and assess whether the NB gllvm can cope with the % of zeros that you have in the observed data. The model that you originally used may have had various components to model the zeros. For example, if one level of your random effects has only zeros, then a relative large negative random effect can model those zeros. But so can the pi of the ZINB. And so can the theta of the variance term. Hence...plenty of parameters in your model that can all go for the same zeros.....and therefore you get numerical estimation issues. That is not a gllvm-specific problem; you will also get that with glmmTMB or INLA. Alain |
Beta Was this translation helpful? Give feedback.
-
try and figure out which species is causing it?
Alain
…On 18 Dec 2024 at 12:49 +0000, joopcoolen ***@***.***>, wrote:
I did that using testZeroInflation() from DHARMa, and all species in the data are now zero inflated, while with ZINB (without the traits in the model) this was not the case.
So ZINB is nog working and negative binomial causes zero inflation. Any suggestions on what to do now?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Joop, I tracked your issue down to a bug in the calculation of the standard errors. I have now fixed this, so that if you reinstall the package from the development branch, it should fit without error. Apologies for the inconvenience, and thanks for getting in touch about this. |
Beta Was this translation helpful? Give feedback.
Joop...I'm not into fourth corner models....but what happens if you use an ordinary negative binomial distribution instead of a ZINB? I find that a (numerically) very challenging distribution in other packages. Plenty of zeros doesn't mean that you have to do a ZINB.
Alain