Deepayan, you're right. Now I realize anyone could write a densityplot function 
to apply on a different class of objects. I guess I should write to the author 
of lme4 which from what I could see does not describe a densityplot. By the 
way, it is used in Baayen, Davidson, and Bates (2006).

H.

>>> "Deepayan Sarkar" <[EMAIL PROTECTED]> 8/21/2007 11:17:39 AM >>>
On 8/21/07, Horace Tso <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> This is really minor but to someone not familiar with the various tentacles 
> of the lmer package it could be really annoying. I was trying to plot the 
> posterior density of the fixed effect parameters of a lmer model,
>
> > hr.mcmc = mcmcsamp(hr.lmer, n=50000)
> > densityplot(hr.mcmc, plot.points=F)
>
> There is this error,
>
> "Error in densityplot(hr.mcmc, plot.points = F) :
>         no applicable method for "densityplot" "
>
> It kind of smells like something I've come across before. So I checked the 
> mcmcsamp help page, and alas, the example suggests that the package coda is 
> needed.
>
> >From the help page of densityplot alone, there is no way one could figure 
> >out this dependency. It says, together with histogram, it is part of lattice.
>
> Could the function author *please* make clarification in future editions of 
> lattice.

There is nothing to clarify. densityplot() is a generic function, and
it is not possible for the author of the generic function to
anticipate and document all possible methods, especially those in
other packages. I would say that since you are using mcmcsamp(), it's
perfectly reasonable to expect you to look at its help page to figure
out what you can do with the results.

What gave you the idea that densityplot would work on the result of
mcmcsamp in the first place?

-Deepayan

______________________________________________
R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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.

Reply via email to