[R] mixed model hypothesis testing

2008-08-05 Thread Daniel Ezra Johnson
The following is a summary of what I have gathered about hypothesis
testing with mixed-effects models.
I would appreciate it if someone can clarify or correct this, or make
any further comments on the topic.

To test a single fixed effect:
1) Likelihood-ratio test (anova) using ML (not REML) is appropriate
but can be anti-conservative.
2) Monte Carlo methods (mcmcsamp) provide a better p-value estimate,
but this is not yet implemented for GLMM (e.g. binomial).

To test a single random effect:
1) Likelihood-ratio test (anova) is
a) appropriate without modification (Pinheiro & Bates 2000);
b) appropriate, but double the p-value (Spencer Bates, R-help);
c) appropriate, but halve the p-value (Agresti 2006, Lee Nelder & Pawitan 2006).
2) Monte Carlo methods, here too, can provide an accurate p-value estimate.

Thanks for your help,
Daniel

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] print data frames without row names (within a list)

2008-08-10 Thread Daniel Ezra Johnson
This should be an easy one, but I could not find the answer in the
obvious places.

one <- data.frame(a=c(1,2,3),b=c("x","y","z"))
two <- data.frame(a=c(4,5,6),b=c("q","r","s"))

> print(one)
 a b
1 1 x
2 2 y
3 3 z

> print(one,row.names=F)
 a b
 1 x
 2 y
 3 z

So far, so good, but how do I do this if the data frames are bound into a list?

> three <- list(one,two)
> print(three,row.names=F)  #same as print(three,row.names=T)

[[1]]
 a b
1 1 x
2 2 y
3 3 z

[[2]]
 a b
1 4 q
2 5 r
3 6 s

Is there any way to stop the row (or column) names from printing in a
case like this?
I just thought of one way - change the default in print.data.frame()
and reload that function.

Surprisingly, that does not work. I have successfully changed the
behavior of:

> print(one)
> one

These now print without row names, but

> print(three)

continues to print the row names, even though

> class(three[[1]])

is "data.frame", so I'm not clear why it doesn't take the print
defaults from print.data.frame!

Any advice would be appreciated. I can live with the row names, but
there are cases where I want to suppress them within a list.

Thanks,
Daniel

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.