0
$\begingroup$

I want to do a correlation analysis of two variables ranging from zero to one (including those values), and including other possible environmental explanatory variables. I opted for a mixed model, because my data are hierarchical (by region where they were taken). The problem is that when I ran the model and analyzed my residuals I found that they were far from normal (very funnel shaped). I have been thinking about how to solve this but I am stuck: my data are decimals from 0 to 1, so poisson would not go very well, I understand that a binomial does not apply in this case either. I was convinced by the gamma distribution, but the problem is that I would have to sacrifice my 0-valued data, which is quite informative, what solution could there be?

By the way, my data, in case it helps, is an index that results from dividing a species count in a plot by the total species found in all the plots in the region, let's say a very simplified biodiversity index.

Thank you very much in advance for your help.

$\endgroup$
2
  • $\begingroup$ Hi @LidiaFernandez, welcome to CV. Actually, a binomial might be fine as a start. You can conceptualise this as N trials, where N is the total number of species, and each trial is "is the i-th species here". Now, technically this is (probably) breaking the rules of what a binomial is, because species i and species j being present a) may be correlated, and b) probably don't have the same probability of being present. However despite this, it may be OK as a start to get your models off the ground. $\endgroup$
    – Alex J
    Commented Nov 22 at 1:07
  • 2
    $\begingroup$ @AlexJ This is more an answer than a comment. $\endgroup$ Commented Nov 23 at 11:39

3 Answers 3

1
$\begingroup$

A binomial might be fine as a start. You can conceptualise this as $N$ trials, where $N$ is the total number of species, and each trial is "is the $i$-th species here". Now, technically this is (probably) breaking the rules of what a binomial is, because species $i$ and species $j$ being present a) may be correlated, and b) probably don't have the same probability of being present. However despite this, it may be OK as a start to get your models off the ground.

$\endgroup$
1
  • $\begingroup$ This approach (or quasi-binomial or beta-binomial to allow for dispersion) has the advantage that it handles zeros very naturally. $\endgroup$
    – Ben Bolker
    Commented Nov 25 at 22:29
0
$\begingroup$

This seems to be a case for a beta distribution, if your data varies continuously between 0 and 1. If it includes 0 and 1, you'd need to do a transformation, as the standard beta distribution doesn't allow those extremes. You can use it in a GLMM setting in several packages, such as glmmTMB, brms etc.

$\endgroup$
0
$\begingroup$

Agree with @DiogoBProvete that some form of Beta distribution would be appropriate. As they mention, Beta distributions don't include values of exactly zero or one (e.g. see here), so you have to do something special in this case, e.g.

  • 'shrink' the values slightly toward 0.5, e.g. via (y+eps)/(1+2*eps) where eps is a small value (see refs in the linked question)
  • zero-inflated Beta (if you have only exact 0 values, not exact 1 values); glmmTMB can handle this case
  • zero-one inflated Beta: brms, zoib packages
  • ordered beta regression: glmmTMB, ordbetareg packages

See "Zero-one inflated Beta regression" in the mixed models task view

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.