[R] Rsquared for anova

2011-04-18 Thread Dorien Herremans
Thanks Dieter, Even if I use lm(), I get the following output: summary(fit)              Df  Sum Sq Mean Sq F value    Pr(F) nh1            1   324.0  323.99  139.13 2.2e-16 *** nh2            1   723.1  723.12  310.53 2.2e-16 *** nh3            1  1794.2 1794.21  770.49 2.2e-16 ***

Re: [R] Rsquared for anova

2011-04-18 Thread Dieter Menne
Dorien Herremans wrote: Even if I use lm(), I get the following output: summary(fit) Df Sum Sq Mean Sq F valuePr(F) nh11 324.0 323.99 139.13 2.2e-16 *** nh21 723.1 723.12 310.53 2.2e-16 *** nh31 1794.2 1794.21 770.49

Re: [R] Rsquared for anova

2011-04-18 Thread Ben Bolker
Dorien Herremans dorien.herremans at ua.ac.be writes: Thanks Dieter, Even if I use lm(), I get the following output: summary(fit)              Df  Sum Sq Mean Sq F value    Pr(F) nh1            1   324.0  323.99  139.13 2.2e-16 *** nh2            1   723.1  723.12  310.53 2.2e-16

Re: [R] Rsquared for anova

2011-04-18 Thread Dorien Herremans
Omg Dieter, thanks so much... I just had to q() and R... that solved it :-) excellent! finally got the R2 :-) On 18 April 2011 15:12, Ben Bolker bbol...@gmail.com wrote: Dorien Herremans dorien.herremans at ua.ac.be writes: Thanks Dieter, Even if I use lm(), I get the following output:

Re: [R] Rsquared for anova

2011-04-17 Thread Mike Marchywka
-help@r-project.org Subject: Re: [R] Rsquared for anova Thanks for your remarks. I've been reading about R for the last two days, but I don't really get when I should use lm or aov. I have attached the dataset, feel free to take a look at it. So far, running it with alle the combinations did

Re: [R] Rsquared for anova

2011-04-17 Thread Peter Ehlers
On 2011-04-17 02:34, Dorien Herremans wrote: Thanks for your remarks. I've been reading about R for the last two days, but I don't really get when I should use lm or aov. I don't think that reading about R is the answer at this stage. It appears to me that you need to learn more about

Re: [R] Rsquared for anova

2011-04-17 Thread Dorien Herremans
Thanks everyone. Yes Peter, I already added nh1=factor(nh1) to the 'routine'. Mostly, my collegues are helping me work out the results and they know more about regression, it has been a while for me... They just asked if I could also provide an R2, to see how good the model fits... therefore the

Re: [R] Rsquared for anova

2011-04-16 Thread Peter Ehlers
On 2011-04-15 14:36, Dorien Herremans wrote: Hi, Thank you for your suggestion. I am stil quite new to the syntax of R. I tried in a few ways but all produced errors: You might find working through An Introduction to R enlightening. It's certain to be a more efficient method than a

Re: [R] Rsquared for anova

2011-04-16 Thread Dieter Menne
dorien wrote: fit - lm((tos~nh1*nh2*nh3*randsize*aweights*tt1*tt2*tt3*iters*length, data=expdata)) Error: unexpected ',' in fit - lm((tos~nh1*nh2*nh3*randsize*aweights*tt1*tt2*tt3*iters*length, Peter's point is the important one: too many interactions, and even with + instead of * you

[R] Rsquared for anova

2011-04-15 Thread Dorien Herremans
I calculate an anova test in the following way: expdata-read.table(/home/dorien/UA/meta-music/optimuse/optimuse1-build-desktop/results/results_processedCP, header=TRUE) names(expdata)-c('nh1','nh2','nh3','randsize','aweights','tt1','tt2','tt3','path','iters','type','length','tos','tws','time')

Re: [R] Rsquared for anova

2011-04-15 Thread Dieter Menne
dorien wrote: I calculate an anova test in the following way: ... aov example I want to check the fit of the model with Rsquared Try summary(lm(...)) instead. Dieter -- View this message in context: http://r.789695.n4.nabble.com/Rsquared-for-anova-tp3452399p3452434.html Sent

Re: [R] Rsquared for anova

2011-04-15 Thread Dorien Herremans
Hi, Thank you for your suggestion. I am stil quite new to the syntax of R. I tried in a few ways but all produced errors: fit - lm((tos~nh1*nh2*nh3*randsize*aweights*tt1*tt2*tt3*iters*length, data=expdata)) Error: unexpected ',' in fit -