Hi Douglas.
So you want to check for correlation or regression ?

how many levels does "pre" have ?
you could subset the variables you want to check correlation on, by the pre
levels.

for example:
Let's say pre has two levels: 1 and 2. then you can do:
cor(y[pre == 1], x[pre == 1])
cor(y[pre == 2], x[pre == 2])


Also, If you want to go for regression, you can go to something like:
summary(lm(y ~ x + pre))
But I suggest getting much more understanding of what linear regression is
before using it's methods...

Good luck,
Tal



On Sat, Apr 25, 2009 at 1:26 PM, drmh <douglasrmholmes@googlemail.com>wrote:

>
> Hi, thanks for your prompt reply
>
> In my situation, the dependent variable is "post-test" and the independent
> variables are "pre" and "coh".
> Howw would I find the correlation between coh and post with the effect of
> "pre" regressed using your commands?
>
>
>
> Tal Galili wrote:
> >
> > Hi Douglas
> > I would go for a different command then aov.
> > something like:
> > ?cor
> > or
> > ?cor.test
> > To also get the p value of the correlation.
> >
> > Cheers,
> > Tal
> >
> >
> >
> > On Sat, Apr 25, 2009 at 8:27 AM, drmh
> > <douglasrmholmes@googlemail.com>wrote:
> >
> >>
> >> (Have searched for this already)
> >>
> >> Hi,
> >>
> >> How do you find the strength of correlation between two variables using
> >> an
> >> ANOVA table?  "Pr(>F)" gives the statistical significance of the
> >> association, but not the strength of the correlation.
> >>
> >> See data (from R) below
> >>
> >> Readable:
> >>                      "Df"     "Sum Sq"        "Mean Sq"           "F
> >> value"
> >> "Pr(>F)"
> >> "pre"              1           0.00593          0.00593936
> >> 0.7450563       0.401636958677004
> >> "coh"             1           0.04311          0.04311302
> >>  5.4082639
> >> 0.0344751749542619
> >> "Residuals"    15         0.11957          0.00797169          NA
> >> NA
> >>
> >> Original:
> >> "Df" "Sum Sq" "Mean Sq" "F value" "Pr(>F)"
> >> "pre" 1 0.0059393604629317 0.0059393604629317 0.745056336657567
> >> 0.401636958677004
> >> "coh" 1 0.0431130207164516 0.0431130207164516 5.40826398359156
> >> 0.0344751749542619
> >> "Residuals" 15 0.119575396598395 0.00797169310655964 NA NA
> >>
> >> Any help would be greatly appreciated,
> >> Douglas Holmes
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/ANOVA-statistics-question-tp23231563p23231563.html
> >> Sent from the R help mailing list archive at Nabble.com.
> >>
> >> ______________________________________________
> >> 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.
> >>
> >
> >
> >
> > --
> > ----------------------------------------------
> >
> >
> > My contact information:
> > Tal Galili
> > Phone number: 972-50-3373767
> > FaceBook: Tal Galili
> > My Blogs:
> > http://www.r-statistics.com/
> > http://www.talgalili.com
> > http://www.biostatistics.co.il
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > 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.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/ANOVA-statistics-question-tp23231563p23234421.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>



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


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

	[[alternative HTML version deleted]]


