[R-sig-ME] Testing significance of deviation of sex ratio (prop of females) from a priori predicted proportion

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Mon Jan 20 09:23:36 CET 2014


Dear Tom,

I would add the null hypothesis as an offset. Then the intercept would be the deviation from that null hypothesis.

Fit <- glmer(cbind(females, males) ~ offset(qlogis(0.75)) + (1|colony), family = binomial, data = data)
library(multcomp)
confint(glht(Fit))

Addingspacesmakescodemuchmorereadable.

Best regards,

Thierry

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51
+ 32 54 43 61 85
Thierry.Onkelinx op inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

-----Oorspronkelijk bericht-----
Van: r-sig-mixed-models-bounces op r-project.org [mailto:r-sig-mixed-models-bounces op r-project.org] Namens Tom Wenseleers
Verzonden: maandag 20 januari 2014 0:54
Aan: r-sig-mixed-models op r-project.org
Onderwerp: [R-sig-ME] Testing significance of deviation of sex ratio (prop of females) from a priori predicted proportion

Dear all,
I have counts of males and females produced by different colonies of a species of social insects.
I fitted the model
Fit=glmer(cbind(females,names)~1+(1|colony),family=binomial,data=data)

However, how can I test within such a framework if the overall average sex ratio deviates from an a priori predicted value (e.g. half females, or ¾ females)?
I presume this would have to be done based on the fitted intercept. But how does one do this? Also, what would be the best way to get 95% conf lims on the estimate? Using likelihood profiling, or parametric bootstrap? Does anybody happen to have any example calculation?

Cheers,
Tom


_______________________________________________________________________________________

Prof. Tom Wenseleers
*      Lab. of Socioecology and Social Evolution
           Dept. of Biology
           Zoological Institute
           K.U.Leuven
           Naamsestraat 59, box 2466
           B-3000 Leuven
           Belgium
* +32 (0)16 32 39 64 / +32 (0)472 40 45 96
* tom.wenseleers op bio.kuleuven.be
http://bio.kuleuven.be/ento/wenseleers/twenseleers.htm



        [[alternative HTML version deleted]]

* * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is door een geldig ondertekend document.
The views expressed in this message and any annex are purely those of the writer and may not be regarded as stating an official position of INBO, as long as the message is not confirmed by a duly signed document.



More information about the R-sig-mixed-models mailing list