Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

R: st: invgammap


From   "Carlo Lazzaro" <carlo.lazzaro@tin.it>
To   <statalist@hsphsun2.harvard.edu>
Subject   R: st: invgammap
Date   Tue, 8 May 2007 18:08:37 +0200

Dear Yulia,

thanks a lot for Your Kind hints and for Your time.

Kind Regards,
Carlo

-----Messaggio originale-----
Da: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di Yulia Marchenko,
StataCorp
Inviato: marted́ 8 maggio 2007 16.46
A: statalist@hsphsun2.harvard.edu
Oggetto: Re: st: invgammap

Carlo Lazzaro <carlo.lazzaro@tin.it> asks about the scale parameter of the
inverse Gamma distribution:

> performing an invgammap with random probabilities
>
> generate alfa=invgammap(a,uniform())
>
> I have noticed the absence of the beta parameter of the gamma
distributions.
> May this absence affect the results of the probabilistic invgammap
function?

Although probability functions -gammap()- and -invgammap()- do not allow
specifying the scale parameter, Carlos can obtain the probabilities of the
Gamma distribution with shape parameter a and scale parameter beta as
follows.

 . generate gamma = gammap(a, x/beta)

To obtain the inverse of the Gamma distribution with shape parameter a and
scale parameter beta, Carlos can use

 . generate x = beta*invgammap(a, gamma)

or, using his example,

 . generate alfa = beta*invgammap(a,uniform())


-- Yulia
ymarchenko@stata.com
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index