tag:blogger.com,1999:blog-1699790186532417278.post2675945962980686392..comments2023-06-17T07:40:37.867+02:00Comments on theBioBucket*: Multiple Comparisons for GLMMs using glmer() & glht()Unknownnoreply@blogger.comBlogger15125tag:blogger.com,1999:blog-1699790186532417278.post-61358811845519399822016-10-04T14:13:05.379+02:002016-10-04T14:13:05.379+02:00It's the models, not the data that is meant he...It's the models, not the data that is meant here! Of course all kind of GLMs are parametric models..Kayhttps://www.blogger.com/profile/09320307979146470105noreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-40483197709798649602016-10-02T13:18:20.005+02:002016-10-02T13:18:20.005+02:00Isn't glht() only for parametric models, which...Isn't glht() only for parametric models, which glmer is not?<br />The documentation is confusing, it says "General linear hypotheses and multiple comparisons for parametric models, including generalized linear models, linear mixed effects models [...]" but as far as I know, glms are not for parametric data. Also, lmer() is mentioned but not glmer(). Any thoughts, anyone?tubifexhttps://www.blogger.com/profile/04644230333331311423noreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-39955724563499380222014-11-11T08:49:43.618+01:002014-11-11T08:49:43.618+01:00Ok, this you can get just from the main model with...Ok, this you can get just from the main model with 'summary(gmod)', where the intercept, which is the factor-level combination stage=A and position=center, is compared to stage=B, position=center in the 2nd line of the model summary! See the edit of the original post for how to get the contrasts of this model!Kayhttps://www.blogger.com/profile/09320307979146470105noreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-22930799232662137952014-11-05T12:34:02.258+01:002014-11-05T12:34:02.258+01:00Kay,
I meant the code for the relation between th...Kay,<br /><br />I meant the code for the relation between the plots A vs. B within just the Central Effect.<br /><br />Because, in the line 5, I understand that: it is the diference of the A vs. B plots between Central vs. Peripheral effects? Did I misunderstood?<br /><br />Thanks so much!Anonymoushttps://www.blogger.com/profile/00360535838771860895noreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-70063057346833715882014-11-05T08:46:42.183+01:002014-11-05T08:46:42.183+01:00Sorry for the late answer: It is included in the c...Sorry for the late answer: It is included in the contrast matrix (line 5)!Kayhttps://www.blogger.com/profile/09320307979146470105noreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-10791862801362845892014-10-11T23:35:11.152+02:002014-10-11T23:35:11.152+02:00Guys I have a question:
In the example, how shou...Guys I have a question: <br /><br />In the example, how should be the code for "Center Effect: A vs. B"? Anonymoushttps://www.blogger.com/profile/00360535838771860895noreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-64834185868125739542012-08-23T08:13:42.698+02:002012-08-23T08:13:42.698+02:00Ok, I somehow expected this answer.....
But thank ...Ok, I somehow expected this answer.....<br />But thank you anyway.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-57619086850004419292012-08-22T21:43:55.348+02:002012-08-22T21:43:55.348+02:00Sry - maybe you should try and experiment with re-...Sry - maybe you should try and experiment with re-levelling your factors and playing with the contrast matrix (admittedly that's what I did, finding the solution by trial and error). BTW I'd discourage you to use 3-way interactions because it gets overly complicated to interpret the results..Kayhttps://www.blogger.com/profile/09320307979146470105noreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-79048209635415566112012-08-22T18:04:31.711+02:002012-08-22T18:04:31.711+02:00Thank you very much for this example it worked wel...Thank you very much for this example it worked well for me! <br />Do you have by any chance tried multiple comparisons for a triple interaction, i.e. time*treatment*group?<br />I tried to find a hint on this in the multcomp documentation and respective newsgroups but without success....<br /> Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-13461425788104317462012-04-05T14:31:01.755+02:002012-04-05T14:31:01.755+02:00I added the link to the post!
Best,
KayI added the link to the post!<br />Best,<br />KayKayhttps://www.blogger.com/profile/09320307979146470105noreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-40432112500824486042012-04-05T14:30:25.225+02:002012-04-05T14:30:25.225+02:00hi,
i can not reproduce your error - everything w...hi,<br /><br />i can not reproduce your error - everything works fine for me with the above code..<br /><br />> sessionInfo()<br />R version 2.13.0 (2011-04-13)<br />Platform: i386-pc-mingw32/i386 (32-bit)<br /><br />locale:<br />[1] LC_COLLATE=German_Austria.1252 LC_CTYPE=German_Austria.1252<br />[3] LC_MONETARY=German_Austria.1252 LC_NUMERIC=C<br />[5] LC_TIME=German_Austria.1252<br /><br />attached base packages:<br />[1] splines stats graphics grDevices utils datasets methods<br />[8] base<br /><br />other attached packages:<br />[1] multcomp_1.2-5 survival_2.36-5 mvtnorm_0.9-96 lme4_0.999375-39<br />[5] Matrix_0.999375-50 lattice_0.19-23<br /><br />loaded via a namespace (and not attached):<br />[1] grid_2.13.0 nlme_3.1-100 stats4_2.13.0<br /><br /><br />commenting your comparisons of stage-levels:<br /><br />here you may utilize built-in standard contrasts, see:<br />help(glht); help(mcp)<br /><br />the according code would be:<br />summary(glht(gmod, linfct = mcp(stage = "Tukey")))<br /><br />for logic & definition of contrasts please see<br />standard literature.<br /><br />hth,<br />kayKayhttps://www.blogger.com/profile/09320307979146470105noreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-47921648579760933432012-04-05T14:29:56.247+02:002012-04-05T14:29:56.247+02:00see this, i.e.: http://books.google.com/books?uid=...see this, i.e.: http://books.google.com/books?uid=102215719968838886223&as_coll=3&hl=en&output=html_text&source=gbs_lp_bookshelf_listKayhttps://www.blogger.com/profile/09320307979146470105noreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-21332359473604313972012-02-03T09:06:11.493+01:002012-02-03T09:06:11.493+01:00Really helpful example, but I can´t find the recom...Really helpful example, but I can´t find the recommended paper in order to check what to write in a paper later.<br />Best<br />JayAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-18242613765367609872012-01-16T22:17:09.799+01:002012-01-16T22:17:09.799+01:00What is the "standard literature" for lo...What is the "standard literature" for logic and contrast definitions?Colinhttps://www.blogger.com/profile/13072623581217312713noreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-71777782597874306742011-10-03T08:31:27.756+02:002011-10-03T08:31:27.756+02:00Great walkthrough, though I got an error with your...Great walkthrough, though I got an error with your glht call ("could not find function "test"). I adjusted the glht call to: <br /><br />summary(glht(modelEPT, linfct=c1))<br /><br />adding linfct=c1. I'm not sure this is correct, but the results are very reasonable.<br /><br />How do you do pairwise comparisons just between the "stages" (i.e. A vs B, A vs. C, A vs D, B vs C, B vs D, C vs D)? My attempt was:<br /><br /> "C vs. D" = c(1,0,0,0,0,0,0,0),<br /> "C vs. F" = c(0,1,0,0,0,0,0,0),<br /> "C vs. G" = c(0,0,1,0,0,0,0,0),<br /> "D vs. F" = c(-1,1,0,0,0,0,0,0),<br /> "D vs. G" = c(-1,0,1,0,0,0,0,1),<br /> "F vs. G" = c(0,-1,1,0,0,0,0,0), <br /><br />But I am not getting reasonable results using this matrix. I also certainly do not understand how the c1 matrix created with rbind is interpreted by glht, and so dont understand how to adapt the code to do what I want it to (as would others, i presume, trying to adapt code to their different designs).Colinhttps://www.blogger.com/profile/13072623581217312713noreply@blogger.com