## Abstract

Generalized linear models (GLMs) are increasinglyused in modern statistical analyses of sex ratio variation because they are able to determine variable design effects on binary response data. However, in applying

GLMs, authors frequently neglect the hierarchical structure of sex ratio data, thereby increasing the likelihood of committing ‘type I’ error. Here, we argue that whenever clustered (e.g., brood) sex ratios represent the desired level of statistical inference, the clustered data

structure ought to be taken into account to avoid invalid conclusions. Neglecting the between-cluster variation and the finite number of clusters in determining test statistics, as implied by using likelihood ratio-based χ2-statistics in conventional GLM, results in biased (usually overestimated) test statistics and pseudoreplication of the sample. Random variation in the sex ratio between clusters

(broods) can often be accommodated by scaling residual binomial (error) variance for overdispersion, and using F-tests instead of χ2-tests. More complex situations, however, require the use of generalized linear mixed models (GLMMs). By introducing higher-level

random effects in addition to the residual error term, GLMMs allow an estimation of fixed effect and interaction parameters while accounting for random effects at different levels of the data. GLMMs are first required in sex ratio analyses whenever there are covariates at the offspring level of the data, but inferences are to be drawn

at the brood level. Second, when interactions of effects at different levels of the data are to be estimated, random fluctuation of parameters can be taken into account only

in GLMMs. Data structures requiring the use of GLMMs to avoid erroneous inferences are often encountered in ecological sex ratio studies.