On 9/28/07, Anouk Simard <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to extract the fitted values from a model using LMER but > only for the fix portion of the model and not for the fix and random > portion (e.g it is the procedure outpm or outp in SAS). I am aware of > the procedure fitted() but I not sure it give the fitted values both for > the fixed and random or only the fixed. I looked in the r help and the r > list and I haven't not found much details about it excepted this > comments from Douglas Bates in January 2006 : > > "Would it help if there were an option in the fitted method to allow for > fixed-effects only versus fixed- and random-effects? As you say, because > lmer models do not need to be hierarchical it is not obvious what it > would mean to include some but not all of the random effects terms in > the "fitted values". However, it is easy and unambiguous to define > fitted values for the fixed-effects only. > > Up until a few days ago there was an option to do this but then I > changed the calculation of the fitted values in an attempt to clean up > the code. The calculation of the level = 0 fitted values in the new > representation of the fitted model is quite easy. It is > > [EMAIL PROTECTED] %*% fixef(fm1)" > > I tried the last formula, but I want to confirm that this is still the > proper and best way to get fitted values for the fix effects using lmer.
Yes. ______________________________________________ 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.