I think this happens because degrees of freedom in lme are calculated using the "containment" method (see documentation to proc mixed in SAS if you don't know the method).

Formally this means that the t-tests are "wrong" for (most) unbalanced designs.

However, if the sample sizes are not too small this should not be to much of a problem because the t-distribution quickly comes to resemble the normal, and if sample sizes are small one may wonder whether it makes sense to make the t-tests anyway. (The validity of a t-test on, say, 4 dfs relies heavily on data being normal whereas a t-test on 14 dfs does not - because of central limit theorems).

As I've understood Douglas Bates (who made lme), he finds that those df-issues are not the most important issues in statistics, so lme might not change drastically in that respect...

It would, however, be nice to have methods in lme which could deal with this problem. One option would be that *somebody* implement Kenward/Rogers and/or Satterthwaites and/or related methods for estimating the degrees of freedom. Another possibility is to base the tests on Monte Carlo p-values...

Best regards

Søren

________________________________

Fra:

[hidden email] på vegne af S Nakagawa

Sendt: on 22-02-2006 23:37

Til:

[hidden email]
Emne: [R] Degree of freedom for contrast t-tests in lme

Dear all

Somebody may have asked this before but I could not find any answers in the web

so let me ask a question on lme.

When I have a fixed factor of, say, three levels (A, B, C), in which each level

has different size (i.e. no. of observations; e.g. A>B>C). When I run an lme

model, I get the same degree of freedom for all the contrast t-tests (e.g. AvsB

or BvsC). I have tried this to several data sets but the same thing happened.

Whatever sample size I have in different levels (in a fixed factor), I get the

same degree of freedom for t-tests.

Why is this? Is this how mixed-effects model work? Does this mean that if I have

unbalanced design, results from lme are likely to be wrong?

Thank you for your help

Shinichi

--

Shinichi Nakagawa

Department of Animal & Plant Sciences,

University of Sheffield,

Sheffield S10 2TN, UK

Tel: +44-114-222-0064

Fax: +44-114-222-0002

______________________________________________

[hidden email] mailing list

https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide!

http://www.R-project.org/posting-guide.html______________________________________________

[hidden email] mailing list

https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide!

http://www.R-project.org/posting-guide.html