Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have ran this model in R:

glm(alert ~ water.height + ssp* + log(count) + ssp*days, 
    family=quasibinomial, data=ScanSampling_sub_alert)
  • Alert = proportion of a goose flock that were alert,
  • ssp = subspecific identity of flock,
  • = which part of site they were in,
  • log(count) = log of flock size, and
  • days = days from 27.9.13

This is a plot of the the predicted proportion of flock that is alert conditional on days and

enter image description here

Two things are strike me as slightly strange:

  1. The top two lines for predicted values are curved, even though the model doesn't include a polynomial term.
  2. The confidence interval for the top two lines in uneven and the predicted values are not always in the centre of the confidence interval.

Can anyone explain why I'm seeing a curved line for predictions and an uneven confidence interval? Is it something to do with using family=quasibinomial? Unfortunately I cannot recreate these patterns using any built-in R datasets.

share|improve this question
The function being fitted is not linear. The default link function is logisitic. That is $$P(Y=1) = \frac{\exp(\eta)}{1+\exp(\eta)}$$ where $\eta = X\beta$. You really shouldn't use this model, or any other GLM - or indeed any model - until you at least have a basic understanding of what it is you're fitting. There are some good basic introductions to GLMs around here and there. – Glen_b Mar 24 '14 at 22:02
up vote 3 down vote accepted

Your response data are binary. It doesn't matter whether you used family=binomial or family=quasibinomial. The fitted values are predicted probabilities that a given goose will be 'alert' on a given day. Those predicted probabilities will follow a sigmoid (elongated 's'-shape) curve unless the variable has absolutely no relationship with the response (in your sample), in which case the line would be flat and at the level of the proportion 'alert' in your sample. In addition, if the predicted probability is not exactly $.5$, the confidence interval must be asymmetrical with the longer tail pointing towards the far side of the $(0, 1)$ interval. This is simply because the confidence interval cannot go outside that interval. The CI will be more asymmetrical the further the predicted probability is from $.5$. In addition, the CI / standard error will tend to be wider the closer it is to $.5$. Most of these facts can be understood by learning about the binomial distribution, which is the most basic distribution for binary data.

share|improve this answer
So response variable is proportion of a flock that are alert. The response variable refers to a flock, not an individual goose. Values are not yes/no, they are any value between 0 and 1. Is this still binary? – luciano Mar 24 '14 at 19:43
Edit to last comment: each value of response variable refers to proportion of a flock. So some example values of response variables are 0.2344, 0.311, 04356. Am I still ok using quasibinomial? How come lower two lines are straight? – luciano Mar 24 '14 at 19:55
It's still bounded by (0,1), so all the above still applies. The quasibinomial is presumably fine. The lower lines aren't exactly straight, but almost. I imagine the variable days has little association w/ the proportion 'alert'. I also guess there are fewer observations at later days for the light-bellied geese. – gung Mar 24 '14 at 20:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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