[R-sig-ME] help with plotting fitted values

Mark W Kimpel mwkimpel at gmail.com
Sat Mar 8 21:42:20 CET 2008


I would like to plot fitted values from a model vs. the original values. 
Is this possible?

My model is: mod <- lmer(gene1 ~  Treatment + Tissue + (1|Rat))

In Pinheiro and Bates, pg. 178, there is code to do this for nlme and on 
pg. 179 is the resulting graph.

When I do:
plot(mod, gene1 ~ fitted(.))

I get:
 > plot(mod, gene1 ~ fitted(.))
Error in xy.coords(x, y, xlabel, ylabel, log) :
   'x' and 'y' lengths differ

On a more general note, how does one get help for an overloaded function 
like plot? help("plot", package = "lme4") yields "no documentation", I 
could not find any info in the lme4 manual, and help(package = "lme4") 
did not list any plot methods.

Session info follows. Thanks,
Mark

 > sessionInfo()
R version 2.7.0 Under development (unstable) (2008-03-05 r44683)
x86_64-unknown-linux-gnu

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] tools     stats     graphics  grDevices datasets  utils     methods
[8] base

other attached packages:
[1] hints_1.0.1          lme4_0.99875-9       Matrix_0.999375-4
[4] lattice_0.17-6       affy_1.17.8          preprocessCore_1.1.5
[7] affyio_1.7.14        Biobase_1.99.1

loaded via a namespace (and not attached):
[1] grid_2.7.0
-- 

Mark W. Kimpel MD  ** Neuroinformatics ** Dept. of Psychiatry
Indiana University School of Medicine

15032 Hunter Court, Westfield, IN  46074

(317) 490-5129 Work, & Mobile & VoiceMail
(317) 204-4202 Home (no voice mail please)

mwkimpel<at>gmail<dot>com




More information about the R-sig-mixed-models mailing list