Re: [R-sig-eco] Predict with 2 factors in an additive model

2011-10-15 Thread Gavin Simpson
On Fri, 2011-10-14 at 17:09 -0600, Manuel Spínola wrote: Dear list members, I have an additive linear model (see below fro a reproducible example) and I want to use the function predict to have the value of the response variable for each level of factor f1 and each level of factor f2 in the

[R-sig-eco] Predict with 2 factors in an additive model

2011-10-14 Thread Manuel Spínola
Dear list members, I have an additive linear model (see below fro a reproducible example) and I want to use the function predict to have the value of the response variable for each level of factor f1 and each level of factor f2 in the additive model (not interaction). When I did predict I only

Re: [R-sig-eco] Predict with 2 factors in an additive model

2011-10-14 Thread cpar...@pdx.edu
Try this newData = data.frame(f1 = factor(c(a,a,b,b)), f2 = factor(c(b, a,b,a))) And use that newData in your predict statement On Oct 14, 2011, at 4:09 PM, Manuel Spínola mspinol...@gmail.com wrote: newData = data.frame(f1 = factor(c(a, b)), f2 = factor(c(b, a))) [[alternative