Skip to content
Prev 5696 / 20628 Next

Current recommended method to test fixed-effects?

Thank you for the link (and suggestions).
Cheers,
Geoff

-----Original Message-----
From: Ben Bolker [mailto:bbolker at gmail.com]
Sent: March 24, 2011 13:33
To: Geoff Schultz
Cc: r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] Current recommended method to test fixed-effects?
On 03/24/2011 02:02 PM, Geoff Schultz wrote:
<http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-p_002dvalues-not-displayed-when-using-lmer_0028_0029_003f>

<http://glmm.wikidot.com/faq> [search within the page for "p values"]

I'm also under the impression that using a
Potentially yes, if the data set is "small" (measured in terms of (#
observations - parameters), or in terms of number of random effect levels)

  Hummm...
(1) You could go ahead and run this in lme (
lme(PAIN~TIME*GRAD,random=~1|SUBJECT,data) ) to get denominator degrees
of freedom (which should be reasonably well defined for this simple case)

  (2) you could figure out the denominator df yourself: it's something
like 52 (you have 1 df available within each subject for estimating the
among-subject variance, which seems to be the appropriate 'denominator'
for testing GRAD, which is unreplicated within subjects)

  (3) since your denominator df are at least 50, details about the df
are likely to be very unimportant

  (4) since you only have two treatments to contrast within each
subject, I think you could just calculate "pre-post"

library(plyr)
newdata <- ddply(data,"SUBJECT",function(x) {

with(x,data.frame(GRAD=GRAD,PAINdiff=PAIN[TIME=="Post"]-PAIN[TIME=="Pre"],
   PAINmean=mean(PAIN)) })

then a t-test of PAINdiff against a NH of PAINdiff==0 is your main
effect of TIME; a t-test of PAINdiff for GRAD=="Yes" vs GRAD=="No" is
your interaction between TIME and GRAD; and a t-test of PAINmean by GRAD
is your main effect of GRAD ...


This message and any attached documents are only for the use of the intended recipient(s), are confidential and may contain privileged information. Any unauthorized review, use, retransmission, or other disclosure is strictly prohibited. If you have received this message in error, please notify the sender immediately, and then delete the original message. Thank you.