Thank you all for your help. Apologies for not giving an example. model.matrix was useful as comparing that table with the one from the spreadsheet showed the "mispell".
On 19/02/2008, Douglas Bates <[EMAIL PROTECTED]> wrote: > > On Feb 19, 2008 8:41 AM, <[EMAIL PROTECTED]> wrote > > > on a simple linear model the values produced from the fitted(model) > function > > are difference from manually calculating on calc. Will anyone have a > clue... > > or any insights on how fitted function calculates the values? Thank you. > > ______________________________________________ > > 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. > > As the posting guide (you did read the posting guide, didn't you?) > says, it helps if you can provide a reproducible example. Otherwise, > we can only guess at what you mean. > > Try taking a fitted model and examining > > model.matrix(model) > > and > > coef(model) > > It should be the case that > > model.matrix(model) %*% coef(model) > > is reasonably close to fitted(model). > > I just saw that Dimitris wrote almost the same thing but, since I have > written it, I'll mail it anyway. > -- -- Yianni [[alternative HTML version deleted]] ______________________________________________ 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.