I have a dataset comprised of proportions that measure “activity level” of individual tadpoles, therefore making the values bound between 0 and 1. This data was collected by counting the number of times the individual moved within a certain time interval (1 for movement, 0 for no movement), and then averaged to create one value per individual. My main fixed effect would be “density level”.

The issue I am facing is that I have a factor variable, “pond” that I would like to include as a random effect – I do not care about differences between ponds, but would like to account for them statistically. One important point about the ponds is that I only have 3 of them, and I understand it is ideal to have more factor levels (5+) when dealing with random effects.

If it is possible to do, I would like some advice on how to implement a mixed model using

`betareg()`

or`betamix()`

in R. I have read the R help files, but I usually find them difficult to understand (what each argument parameter really means in the context of my own data AND what the output values mean in ecological terms) and so I tend to work better via examples.On a related note, I was wondering if I can instead use a

`glm()`

under a binomial family, and logit link, to accomplish accounting for random effects with this kind of data.

**Answer**

The current capabilities of `betareg`

do not include random/mixed effects. In `betareg()`

you can only include fixed effect, e.g., for your three-level pond variable. The `betamix()`

function implements a finite *mixture* beta regression, not a *mixed* effects beta regression.

In your case, I would first try to see what effect a fixed pond factor effect has. This “costs” you two degrees of freedom while a random effect would be slightly cheaper with only one additional degree of freedom. But I would be surprised if the two approaches lead to very different qualitative insights.

Finally, while `glm()`

does not support beta regression, but in the `mgcv`

package there is the `betar()`

family that can be used with the `gam()`

function.

**Attribution***Source : Link , Question Author : Kat Y , Answer Author : Achim Zeileis*