On Mar 6, 2013, at 9:23 AM, Kjetil Kjernsmo <kje...@ifi.uio.no> wrote:
> On 03/06/2013 04:18 PM, Peter Claussen wrote: >> I'll ignore the rest of your question, in the hope that this will answer >> them sufficiently. > > OK! > >> You probably want a simple linear model, specified in R using "+" instead of >> "*". >> >>> >leaf.lm <- lm(yavg ~ B + C + D + E + Q, data=leaf) >>> >leaf.lm >> Call: >> lm(formula = yavg ~ B + C + D + E + Q, data = leaf) >> >> Coefficients: >> (Intercept) B+ C+ D+ E+ Q+ >> 7.50084 0.22125 0.17625 0.02875 0.10375 -0.25960 >> >> Does this give you the numbers you expect? > > Well, it partly gives the numbers I expect, but I want the interactions as > well, so it is only a partial answer. But you don't have enough data points to estimate all of the possible interactions; that's why you have NA in your original results. You could add the just the first order interactions manually, i.e., + B:C + B:D … Peter > > Best, > > Kjetil > > ______________________________________________ > 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. ______________________________________________ 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.