In lme4, in models with 3 levels of the fixed factor, each of these gets a t value comparing it to a reference level. How is this done? It is my understanding that the t value can only be used to compare 2 means.
comparing 3 levels of fixed factor in lme4
11 messages · John Maindonald, Obermeier Andrew, Luca Borger +2 more
On Jul 30, 2012, at 08:04 , Obermeier Andrew wrote:
In lme4, in models with 3 levels of the fixed factor, each of these gets a t value comparing it to a reference level. How is this done? It is my understanding that the t value can only be used to compare 2 means.
Then your understanding is wrong, and you need to read a text on basic linear modelling theory. Nothing specifically mixed-model or even R relevant about that.
Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
Perhaps Andrew has vaguely at the back of his mind the notion that for comparing >2 means, one should be using a multiple range test or an anova test, at all events if the aim is to achieve an experiment-wise 5% level. Tests based on the individual t-statistics are not independent. This is of course a somewhat controversial area. John Maindonald email: john.maindonald at anu.edu.au phone : +61 2 (6125)3473 fax : +61 2(6125)5549 Centre for Mathematics & Its Applications, Room 1194, John Dedman Mathematical Sciences Building (Building 27) Australian National University, Canberra ACT 0200. http://www.maths.anu.edu.au/~johnm
On 30/07/2012, at 8:38 PM, peter dalgaard wrote:
On Jul 30, 2012, at 08:04 , Obermeier Andrew wrote:
In lme4, in models with 3 levels of the fixed factor, each of these gets a t value comparing it to a reference level. How is this done? It is my understanding that the t value can only be used to compare 2 means.
Then your understanding is wrong, and you need to read a text on basic linear modelling theory. Nothing specifically mixed-model or even R relevant about that. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Thank you John Maindonald. For more than 2 levels of the experimental condition, I learned that usually we find an F to test mean differences across the levels of the condition. In lme4, the model summary reports a t value, and I am replicating a study that uses lme4 to compare 3 levels of a fixed factor. My advising professor has told me that the t value can only be used to compare 2 means. Andrew Obermeier
On Jul 30, 2012, at 8:00 PM, John Maindonald <john.maindonald at anu.edu.au> wrote:
Perhaps Andrew has vaguely at the back of his mind the notion that for comparing >2 means, one should be using a multiple range test or an anova test, at all events if the aim is to achieve an experiment-wise 5% level. Tests based on the individual t-statistics are not independent. This is of course a somewhat controversial area. John Maindonald email: john.maindonald at anu.edu.au phone : +61 2 (6125)3473 fax : +61 2(6125)5549 Centre for Mathematics & Its Applications, Room 1194, John Dedman Mathematical Sciences Building (Building 27) Australian National University, Canberra ACT 0200. http://www.maths.anu.edu.au/~johnm On 30/07/2012, at 8:38 PM, peter dalgaard wrote:
On Jul 30, 2012, at 08:04 , Obermeier Andrew wrote:
In lme4, in models with 3 levels of the fixed factor, each of these gets a t value comparing it to a reference level. How is this done? It is my understanding that the t value can only be used to compare 2 means.
Then your understanding is wrong, and you need to read a text on basic linear modelling theory. Nothing specifically mixed-model or even R relevant about that. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Then your understanding is wrong, and you need to read a text on basic linear modelling theory. Nothing specifically mixed-model or even R relevant about that. Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
If you have a specific book to suggest I would appreciate it. I have Pinhiero and Bates (2000), Mixed Effects Models in S and S-Plus, but have not found specific mentioned of how the t value is derived there yet. I admit my ignorance in this area, and apologize if my questions are dumb, but nevertheless would appreciate some civility. Andrew Obermeier
Well, you can use the t-statistics for comparison-wise tests! the issue is whether one ought to do this, or whether one should do some kind of overall test. As I see it, all depends on the purpose that is in mind. As Professor Dalgaard says, the issue is much the same as for lm models. You can for example do:
library(DAAG) a1 <- lme(ShootDryMass ~ fert+variety, random=~1|Block, data=rice) anova(a1)
numDF denDF F-value p-value (Intercept) 1 67 72.39 <.0001 fert 2 67 3.94 0.0241 variety 1 67 25.48 <.0001 As the design is balanced, the order of terms does not affect the anova F-test. But as the design is balanced, you be better to do:
rice.aov <- aov(ShootDryMass ~ fert+variety+Error(Block), data=rice) summary(rice.aov)
Error: Block
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 1 3528 3528
Error: Within
Df Sum Sq Mean Sq F value Pr(>F)
fert 2 7019 3509 3.94 0.024
variety 1 22685 22685 25.48 3.7e-06
Residuals 67 59657 890
John Maindonald email: john.maindonald at anu.edu.au
phone : +61 2 (6125)3473 fax : +61 2(6125)5549
Centre for Mathematics & Its Applications, Room 1194,
John Dedman Mathematical Sciences Building (Building 27)
Australian National University, Canberra ACT 0200.
http://www.maths.anu.edu.au/~johnm
On 30/07/2012, at 9:38 PM, Obermeier Andrew wrote:
Thank you John Maindonald. For more than 2 levels of the experimental condition, I learned that usually we find an F to test mean differences across the levels of the condition. In lme4, the model summary reports a t value, and I am replicating a study that uses lme4 to compare 3 levels of a fixed factor. My advising professor has told me that the t value can only be used to compare 2 means. Andrew Obermeier On Jul 30, 2012, at 8:00 PM, John Maindonald <john.maindonald at anu.edu.au> wrote:
Perhaps Andrew has vaguely at the back of his mind the notion that for comparing >2 means, one should be using a multiple range test or an anova test, at all events if the aim is to achieve an experiment-wise 5% level. Tests based on the individual t-statistics are not independent. This is of course a somewhat controversial area. John Maindonald email: john.maindonald at anu.edu.au phone : +61 2 (6125)3473 fax : +61 2(6125)5549 Centre for Mathematics & Its Applications, Room 1194, John Dedman Mathematical Sciences Building (Building 27) Australian National University, Canberra ACT 0200. http://www.maths.anu.edu.au/~johnm On 30/07/2012, at 8:38 PM, peter dalgaard wrote:
On Jul 30, 2012, at 08:04 , Obermeier Andrew wrote:
In lme4, in models with 3 levels of the fixed factor, each of these gets a t value comparing it to a reference level. How is this done? It is my understanding that the t value can only be used to compare 2 means.
Then your understanding is wrong, and you need to read a text on basic linear modelling theory. Nothing specifically mixed-model or even R relevant about that. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Hello, >I have Pinhiero and Bates (2000), Mixed Effects Models in S and S-Plus, but have not found specific mentioned of how the t value is derived there yet. Did you check ch. 2.4 "Hypothesis tests and confidence intervals"? HTH Cheers, Luca ------------------------------------------------------------ Luca Borger Postdoctoral Research Fellow Centre d'Etudes Biologiques de Chiz? CNRS (UPR1934); INRA (USC1339) 79360 Villiers-en-Bois, France Tel: +33 (0)549 09 96 13 Fax: +33 (0)549 09 65 26 email: lborger at cebc.cnrs.fr Skype: luca.borger at skype.com Web: http://www.cebc.cnrs.fr/Fidentite/borger/borger.htm http://cnrs.academia.edu/LucaBorger ------------------------------------------------------------ # Forthcoming book chapter # Dispersal Ecology and Evolution (ch. 17) # http://ukcatalogue.oup.com/product/9780199608904.do ### # New reprint! Animal Migration: A synthesis (ch. 8): # http://ukcatalogue.oup.com/product/9780199568994.do Le 30/07/2012 13:51, Obermeier Andrew a ?crit :
Then your understanding is wrong, and you need to read a text on basic linear modelling theory. Nothing specifically mixed-model or even R relevant about that. Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
If you have a specific book to suggest I would appreciate it. I have Pinhiero and Bates (2000), Mixed Effects Models in S and S-Plus, but have not found specific mentioned of how the t value is derived there yet. I admit my ignorance in this area, and apologize if my questions are dumb, but nevertheless would appreciate some civility. Andrew Obermeier
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
On 7/30/2012 1:51 PM, Obermeier Andrew wrote:
[...]
If you have a specific book to suggest I would appreciate it. I have Pinhiero and Bates (2000), Mixed Effects Models in S and S-Plus, but have not found specific mentioned of how the t value is derived there yet.
You may consider to read Pinheiro & Bates more carefully or consult an introductory text about model selection and likelihood ratio tests, e.g.: Johnson, J., G. & Omland, K. S. (2004) Model Selection in Ecology and Evolution. Trends in Ecology and Evolution, 19, 101-108.
I admit my ignorance in this area, and apologize if my questions are dumb, but nevertheless would appreciate some civility.
> > Andrew Obermeier ... so please add a little background (or an email signature) so that it is possible to find an appropriate scientific and/or technical level in our answers. Hope it helps Thomas
Dr. Thomas Petzoldt Technische Universitaet Dresden Faculty of Forest, Geo and Hydro Sciences Institute of Hydrobiology 01062 Dresden, Germany E-Mail: thomas.petzoldt at tu-dresden.de http://tu-dresden.de/Members/thomas.petzoldt
Thank you. I'll read Pinhiero and Bates more carefully. Andrew Obermeier Doctoral Candidate, Temple University, Japan.
On Jul 30, 2012, at 9:24 PM, Thomas Petzoldt <Thomas.Petzoldt at TU-Dresden.de> wrote:
On 7/30/2012 1:51 PM, Obermeier Andrew wrote: [...]
If you have a specific book to suggest I would appreciate it. I have Pinhiero and Bates (2000), Mixed Effects Models in S and S-Plus, but have not found specific mentioned of how the t value is derived there yet.
You may consider to read Pinheiro & Bates more carefully or consult an introductory text about model selection and likelihood ratio tests, e.g.: Johnson, J., G. & Omland, K. S. (2004) Model Selection in Ecology and Evolution. Trends in Ecology and Evolution, 19, 101-108.
I admit my ignorance in this area, and apologize if my questions are dumb, but nevertheless would appreciate some civility. Andrew Obermeier
... so please add a little background (or an email signature) so that it is possible to find an appropriate scientific and/or technical level in our answers. Hope it helps Thomas -- Dr. Thomas Petzoldt Technische Universitaet Dresden Faculty of Forest, Geo and Hydro Sciences Institute of Hydrobiology 01062 Dresden, Germany E-Mail: thomas.petzoldt at tu-dresden.de http://tu-dresden.de/Members/thomas.petzoldt
On Jul 30, 2012, at 13:51 , Obermeier Andrew wrote:
Then your understanding is wrong, and you need to read a text on basic linear modelling theory. Nothing specifically mixed-model or even R relevant about that. Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
If you have a specific book to suggest I would appreciate it. I have Pinhiero and Bates (2000), Mixed Effects Models in S and S-Plus, but have not found specific mentioned of how the t value is derived there yet. I admit my ignorance in this area, and apologize if my questions are dumb, but nevertheless would appreciate some civility. Andrew Obermeier
You probably need something from the level just below MEMSS. There's Maindonald & Braun, although I don't have a copy to hand just now. You might also take a look at the Faraway PDF (or buy his more recent book) at http://cran.at.r-project.org/other-docs.html Specifically, take a look chapter 15 and chapter 3.1--3. (And apologies if I came across a bit abrasive, but you did ask the same question about four times...)
Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
Thank you very much Professor Dalgaard. I'll get the books by Maindonald & Braun and also Faraway, and meanwhile read the pdf you suggested. Yes, MEMSS is a bit difficult for me. I'm very sorry for all the noise I have made. Sincerely, Andrew Obermeier Doctoral Candidate, Temple University Japan
You probably need something from the level just below MEMSS. There's Maindonald & Braun, although I don't have a copy to hand just now. You might also take a look at the Faraway PDF (or buy his more recent book) at http://cran.at.r-project.org/other-docs.html Specifically, take a look chapter 15 and chapter 3.1--3. (And apologies if I came across a bit abrasive, but you did ask the same question about four times...) -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com