[R] anova help

Joe King jp at joepking.com
Sun Feb 15 20:21:52 CET 2009


Ok well heres my data, with the second variable (B variable) being the
random variable and the other fixed. Although the F values are about half of
what SPSS puts out.

 

My code is anova(lm(dependentrandom~typemusic+typemusic*musicselection))

 

This is just dummy data for a class but I am trying to use the data I am
running in SPSS to learn R. I am also in an R class but we are not going to
learn ANOVA.

 

Joe King, M.A.
 <mailto:jp at joepking.com> jp at joepking.com

"Never give in, never give in, never; never; never; never - in nothing,
great or small, large or petty - never give in except to convictions of
honor and good sense" - Winston Churchill

 

"You have enemies? Good. That means you've stood up for something, sometime
in your life." - Winston Churchill

 

From: Tal Galili [mailto:tal.galili at gmail.com] 
Sent: Sunday, February 15, 2009 10:25 AM
To: Joe King
Cc: r-help at r-project.org
Subject: Re: [R] anova help

 

Hi Joe,

you might want to have a look at the nlme package with the lme command.

Another option is the more advanced lmer package.

 

Lastly, you could have a look at the ?aov command, and notice the option of
using the +Error() term (but that would only work for balanced design cases,
so I've heard, so be aware)

 

Tal

 

 

On Sat, Feb 14, 2009 at 8:46 PM, Joe King <jp at joepking.com> wrote:

Hi all, I am trying to run a two factor anova, but one of the factors is a
random factor, now I am also running in SPSS and it seems its dividing by
the wrong term to get the appropriate F term. here is my data. In SPSS the F
scores about double the ones in R, how can I specify one of my factors as a
random factor or change it to where it does the right model fitting? I am
using the lm command instead of glm. I am new to R so this might seem basic.



Joe King, M.A.
 <mailto:jp at joepking.com> jp at joepking.com

"Never give in, never give in, never; never; never; never - in nothing,
great or small, large or petty - never give in except to convictions of
honor and good sense" - Winston Churchill



"You have enemies? Good. That means you've stood up for something, sometime
in your life." - Winston Churchill




       [[alternative HTML version deleted]]

______________________________________________
R-help at 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.




-- 
----------------------------------------------


My contact information:
Tal Galili
Phone number: 972-50-3373767
FaceBook: Tal Galili
My Blogs:
www.talgalili.com
www.biostatistics.co.il





More information about the R-help mailing list