Skip to content

Superpose two QQ-plots (gamma distribution) with, lattice function qqmath()

2 messages · Yvonnick Noel, Duncan Mackay

#
David, Duncan,
I don't think the problem is related to the rate argument, which can 
well be vectorized, as is the case for a number of arguments in distrib 
functions in R (note that you are redefining it as a vector above).
This works! Thank you very much (I had spent some time on that).

I now try to add a QQ-line but face a new problem. Only one line 
appears, away from the points:
qqmath(~ x,  data = dat,
         groups = gp,
         pch = 20,
         type = c("p","g"),
         distribution = function(x) qgamma(x,shape,rate),
         panel = function(x,groups,...) {
                   panel.qqmath(x,groups, ...)
                   panel.qqmathline(x,groups,...)
         })

Any hint?

Thanks a lot for your help,

Yvonnick
#
Hi

I think  the answer lies in the allocating the distribution argument 
but I do not know how. Possibly with a prepanel function

Duncan
At 21:06 22/06/2013, you wrote: