[R] covariance analysis model

Jonathan Baron baron at cattell.psych.upenn.edu
Thu Jun 6 13:06:24 CEST 2002


On 06/06/02 11:59, Romain Barnard wrote:
>Dear list users,
>
>I have trouble with covariance analysis.
>
>I measured nitrate concentrations in the soil (NO3) and the percentage of 
>legumes (LEG, continuous), affected by 2 different CO2 concentrations (CO2, 
>discrete). I suspect that CO2 has an effect on LEG and NO3, but also that 
>LEG has an effect on NO3, so this is the formula I wrote to test this:
>NO3 ~ CO2 + LEG + CO2:LEG
>
>Will LEG be considered continuous if I use aov(NO3 ~ CO2 + LEG + CO2:LEG) ? 
>If not, what model can I use to study simultaneously the effect of discrete 
>and continuous factors ?

Yes.  LEG will be continuous, assuming you code it as a numeric
vector (and probably you do).  You can probably use lm() instead
of aov().  It might be clearer.  Note that, in aov(), the order
of the terms matters. In aov(), the terms are "entered" in the
order in which you list them.  In lm(), all the terms are
entered, so the order doesn't matter.

But it seems that what you are really after here is mediation.
That is, LEG partly mediates the effect of CO2 on NO3.  The
CO2:LEG interaction may or may not be of interest in its own
right, but that does not help you test mediation.

A good web page about mediation is
http://quantrm2.psy.ohio-state.edu/kris/sobel/sobel.htm

-- 
Jonathan Baron, Professor of Psychology, University of Pennsylvania
Home page:            http://www.sas.upenn.edu/~baron
Questionnaires:       http://www.psych.upenn.edu/~baron/qs.html
Psychology webmaster: http://www.psych.upenn.edu/
R page:               http://finzi.psych.upenn.edu/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list