I am trying to model the relationship between a continuous response variable (sample-corrected species-diversity estimates) and a continuous predictor variable (geographic spread). I have log-transformed both variables to make the relationship linear.

I am investigating the use of Generalized Linear Models because my response variable is strongly heteroscedastic: enter image description here,

However, discussions about how to address heteroscedasticity in GLMs all seem to concern cases where variance in the response increases as the predictor variable increases. My problem is the reverse — high variance in species diversity at low values of geographic spread, decreasing as geographic spread increases.

Is there a GLM link function that can cope with this type of heteroscedasticity?

  • $\begingroup$ Can you explain how this "sample-correction" was done? $\endgroup$
    – Glen_b
    Mar 15, 2016 at 0:11
  • $\begingroup$ It's quite complicated (bio.mq.edu.au/%7Ejalroy/SQS.html), but the upshot is that counts are turned into continuous values. $\endgroup$
    – Roger
    Mar 15, 2016 at 7:47
  • $\begingroup$ You can't transform discrete counts into continuous values. Maybe continuous values are being generated in some way based on discrete variables. Unfortunately the link is less not at all clear about what is being done mathematically (let alone why). Is the procedure actually explained somewhere? (documenting inputs and outputs to R functions is of little value) ... $\endgroup$
    – Glen_b
    Mar 15, 2016 at 8:36
  • $\begingroup$ what concerns me is that counts generally have variance that increases with mean. If I can understand what was done to these counts I (or someone else) might be able to suggest a suitable way to analyze them. $\endgroup$
    – Glen_b
    Mar 15, 2016 at 8:45
  • $\begingroup$ It's not a transformation — it's a method that ensures even coverage of underlying species-abundance distributions. The values are continuous because it's the geometric mean of a large number of subsampling trials. The variance decreases with larger geographic areas because I'm subsampling area from a continental region, and there's more opportunity for wide variation in species composition with smaller geographic subsamples. $\endgroup$
    – Roger
    Mar 15, 2016 at 8:50

1 Answer 1


After failing to find an error distribution that could account for decreasing variance with increasing mean in a GLM, I opted to use Weighted Least Squares with weights inversely proportional to the relative variance.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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