[R-sig-ME] dotplot question

Sebastián Daza sebastian.daza at gmail.com
Sun Mar 27 18:59:50 CEST 2011


This is what I get:

R version 2.12.2 (2011-02-25)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

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

other attached packages:
  [1] gregmisc_2.1.1     gplots_2.8.0       caTools_1.11 
bitops_1.0-4.1
  [5] gtools_2.6.2       gmodels_2.15.1     gdata_2.8.1 
foreign_0.8-42
  [9] Hmisc_3.8-3        survival_2.36-5    lme4_0.999375-39 
Matrix_0.999375-48
[13] lattice_0.19-17    rj_0.5.2-1

loaded via a namespace (and not attached):
[1] cluster_1.13.3 MASS_7.3-11    nlme_3.1-98    rJava_0.8-8 
stats4_2.12.2
[6] tools_2.12.2

Thank you!

On 3/27/2011 11:39 AM, Douglas Bates wrote:
> 2011/3/26 Sebastián Daza<sebastian.daza at gmail.com>:
>> Dear Douglas,
>> I ran again the Dyestuff example, and I got a messy dotplot (see
>> attachment).
>>
>> fm1<- lmer( Yield ~ 1 + (1| Batch ), Dyestuff )
>> dotplot(ranef(fm1, postVar = TRUE), strip =FALSE,
>> scales=list(y=list(col="white")))
>>
>>> ranef(fm1)
>> $Batch
>>   (Intercept)
>> A -17.6080025
>> B   0.3912889
>> C  28.5640930
>> D -23.0860478
>> E  56.7368971
>> F -44.9982287
>
> Could you send us the output of
>
> sessionInfo()
>
> from your R session?
>
>> Thank you.
>> Sebastian.
>>
>> On 3/21/2011 11:49 AM, Douglas Bates wrote:
>>>
>>> 2011/3/14 Sebastián Daza<sebastian.daza at gmail.com>:
>>>>
>>>> Dear list,
>>>
>>>> I have a couple of questions related to dotplots and ranef:
>>>
>>>> 1) Does anyone know how to order the distribution of a residuals in a
>>>> dotplot:
>>>
>>>> dotplot(dotplot(ranef(model, postVar = TRUE)...
>>>
>>>> sometimes residuals are ordered but other times they are not.
>>>
>>> Can you provide a reproducible example?
>>>
>>>> 2) Is it possible to organize these plots in a matrix (as par function
>>>> does)? I have more than a random term... so would be useful to order
>>>> theses
>>>> plots in a matrix...
>>>
>>> We have good news and bad news.  The good news is that you get more
>>> flexibility with lattice graphics than with traditional R graphics
>>> (which is what the par function controls).  The bad news is that it
>>> requires a bit more effort to control the lattice graphics display in
>>> that you need to read the manual page for print.trellis carefully.  An
>>> example of the dotplot for more than one grouping factor is provided
>>> on slide 31 of
>>> http://lme4.R-forge.R-project.org/slides/2011-03-16-Amsterdam/1Simple.pdf
>>>   The code that generates that figure is
>>>
>>> qrr2<- dotplot(ranef(fm2, postVar = TRUE), strip = FALSE)
>>> print(qrr2[[1]], pos = c(0,0,1,0.75), more = TRUE)
>>> print(qrr2[[2]], pos = c(0,0.65,1,1))
>>>
>>>> 3) Is it possible to change the strip name of these plots?
>>>
>>> Yes.  See the description of the strip.default function in the lattice
>>> package.  In particular, the strip can be suppressed by setting
>>> strip=FALSE, as above.
>>>
>>>> Any clue about these questions will be appreciate.
>>>> Thank you in  advance!
>>>> --
>>>> Sebastián Daza
>>>> sebastian.daza at gmail.com
>>>>
>>>> _______________________________________________
>>>> R-sig-mixed-models at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>>>
>>>
>>
>> --
>> Sebastián Daza
>> sebastian.daza at gmail.com
>>
>>
>

-- 
Sebastián Daza
sebastian.daza at gmail.com




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