# glmer() warning message with proportional data

My response variable is a proportion of time spent in an activity. My original dataset looks like this:

name      jdate    start    duration   touristeffort feeding   fp
1 ANUBIS    24    11.23333  20.00000     9.483333   16.683333   N
2 ANUBIS    26    15.53333  20.00000     2.466667    9.716667   N
3 ANUBIS    27    7.25000   12.16667      0.000000   2.616667   N
4 ANUBIS    30    9.70000   20.00000     48.000000   14.300000  N
5 ANUBIS    30   10.15000   20.00000     19.200000   6.600000   N
6 ANUBIS    30    12.64167  20.00000      2.500000   14.616667  N


The model code I thought would be appropriate was following the centring and scaling of the fixed effects (ie. touristeffortc, jdatec, startc, fpc) was:

cm1<-glmer(feeding/duration~touristeffortc+jdatec+startc+fpc+(1|name),
weights=duration, family=binomial, data=turtleF)


However, I can't seem to fix my model in any way to remove the warning message:

Warning message:
In eval(family\$initialize, rho) : non-integer #successes in a binomial
glm!


I've tried using the quasibinomial family or including

(cbind(feeding, feeding-duration))


as my response instead of including weights, but neither of these changes resolves the error message problem.

Is binomial the family to use or is this error message telling me to consider a different family type? If anyone can tell me how to fix my code or data to get around this issue it would be so appreciate!

Thanks for your help in advance.

## 1 Answer

The binomial family is not what you want here: it assumes count data, i.e. whole numbers only. You could try using a normal family instead. If you're concerned about the mismatch between the normal distribution (support unbounded on either side) and your proportion data (bounded between 0 and ... 1?), you could transform your responses first.

• Thanks for your response! To better explain my question while referencing stats.stackexchange.com/questions/87956/… I thought the binomial family would work given that I know the number of trials that led to the proportions. Is it incorrect that the trials would be accounted for as "weights=duration"? – Kaitlyn Zerr Dec 15 '17 at 22:11
• I see I should have asked more about your dataset before answering. What does it mean when feeding is 16.68 and duration is 20? – eric_kernfeld Dec 17 '17 at 13:39
• No problem! So in the above case: out of a total focal duration of 20 minutes, the animal was feeding for 16.68 minutes. So I'm testing which of the variables has an effect on the amount of time spent feeding while accounting for the duration of time spent watching the animal. – Kaitlyn Zerr Dec 17 '17 at 16:33
• Oh so that's why everything ends in repeated sixes and threes! In that case, I stand by my answer. To use a binomial model, your trials should have a binary outcome: success or failure, nothing in between. In this sense, each minute is not well modeled as a single trial. – eric_kernfeld Dec 17 '17 at 17:59