drmh <douglasrmhol...@googlemail.com> wrote
>
>Hello again,
>In my situation, I have three variables: pretest, posttest, and cohesion. 
>
>I want to work out the correlation between postest and cohesion. 
>

cor(cohesion, posttest) gives you this.

>I looked at multiple sets of data and created ANOVA tables of them. However,
>as pretest and postest are sometimes correlated (with a statistical
>significance < 0.05), it is necessary to discount the effect of pretest to
>work out the real correlation of posttest and coherence.. I need a system
>for working out the strength of the correlation between posttest and
>coherence, when does actually occur. 

Whether pretest and posttest are correlated, and whether that correlation is 
statistically significant, is irrelevant to your question as posed.  Correlation
is defined between two variables, not among three.  

You might want some sort of regression such as 

lm(cohesion~pretest+posttest)

but you might not

>
>According to my understanding level refers the amount or magnitude of
>experimental units.


What is level?  You mention pretest, posttest and cohesion - now you mention 
level.
What are these experimental units?

 Pretest, posttest are scores - range from any value from
>0 to 1. Cohesion can be any value.
>
>What exactly would
>cor(y[pre == 1], x[pre == 1])
>cor(y[pre == 2], x[pre == 2])
>give me?
>

well, you said above that pretest and posttest can range from 0 to 1; if this 
is the case, pre would rarely be 1 and never be 2, so the first line above 
wouldn't give you much, and the second wouldn't give you anything.  Also, you 
are now using y and x instead of (presumably) cohesion and posttest, and pre 
instead of, presumably, pretest.


Peter

Peter L. Flom, PhD
Statistical Consultant
www DOT peterflomconsulting DOT 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.

Reply via email to