[R] covariance analysis model
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Thu Jun 6 12:31:21 CEST 2002
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list