[R] Applying qqmath using gamma distribution...

Petar Milin
Fri, 04 Sep 2009 15:59:05 -0000

Thank you very much for the answer!
However, instead of x being some uniform values, I have real values.
Hence, if I have dat$V1 of my interest, formula should be like this:

qqmath(~ V1, data=dat, distribution=function(V1) qgamma(V1,
shape=gammafit(dat$V1)$shape, scale=gammafit(dat$V1)$scale))

Is that correct?
(gammafit() from mhsmm package calculates parameters of gamma function)

Thank you, again. Best,
PM

Duncan Murdoch wrote:
> On 9/4/2009 8:36 AM, Petar Milin wrote:
>> Hello ALL!
>> Can anyone tell me how to specify qqmath() function with distribution
>> qgamma?
>> In help it is bit vague how to pass shape and scale parameters for
gamma.
>
> Take a look at the first example, which passes in the df parameter for a
> t distribution.  You want something like
>
> x <- runif(1000)  # not a gamma, plot should look bad
> qqmath(~ x, distribution=function(x) qgamma(x, shape=2, scale=2))
>
> Duncan Murdoch
>