# GLM or alternatve model for proportion data in R

I have data from experimental setup in which the number of two species of amphipod in five different substrates ($n =5$) was recorded at the end of the 24 hour period.

The experiments utilized natural mixed population proportions and so the abundances of each species is odd (70,30) as such rather then use count data I want to test the difference in substrate preference as proportion or percentage to account for these differences. I also have an additional variable of body size ($n=4$).

Can anybody help me in determining what would be the most suitable model structure to use that examines the factors substrate, species, and body size and the interactions between these?

I have tried to run a binomial glm but as the proportions are non-integer it will not work.

      model <- glm(prop ~ Substrate * Size * Species, family = binomial(link = logit), data = shrimp)


Any help would be much appreciated as I have just spent the last day looking into this!

• With non- integers you could try quasibinomial model Mar 26 '17 at 9:31

## 1 Answer

You must use the cbind(,) function to set your response variable as follows:

= cbind(Success,Failure) = cbind(Success, 1-Success)

Since you are using binomial regression the computer is looking for a response that is a pair of two numbers, # of successes and # of failures, rather than a simple proportion.