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 ? Thank you Romain Barnard ------------------------------------------------------------------------------------------ Romain Barnard Universit? Paris-Sud XI Laboratoire Ecologie, Syst?matique et Evolution D?partement Ecologie des Populations et des Communaut?s UPRESA CNRS 8079 - B?timent 362 F-91405 ORSAY Cedex romain.barnard at ese.u-psud.fr T?l. 01 69 15 56 85 Fax 01 69 15 56 96 http://www.ese.u-psud.fr/ ------------------------------------------------------------------------------------------ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Romain Barnard <romain.barnard at ese.u-psud.fr> writes:> 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 ?CO2 needs to be a factor, if it is not, either make it one (see help(factor)) or use factor(CO2) in the model formula. If LEG is a numeric variable, it will enter as continuous. (With only two levels for CO2, it is not terribly important that it gets treated as discrete, though. With more than two levels, it is essential.) -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._