Statalist The Stata Listserver

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

st: R: RE: InverseGamma with beta<0

From   "Carlo Lazzaro" <>
To   <>
Subject   st: R: RE: InverseGamma with beta<0
Date   Mon, 18 Jun 2007 09:17:03 +0200

Dear Nick, 

thanks a lot for Your Kind and promnpt reply and especialy for Your
observation about the unclearness of my thread.

According to Briggs A, Schuplper M, Claxton K. "Decision modelling for
health economic evaluation". Oxford: Oxford University Press, 2006: 91-92, I
have tried to address the uncertainty surrounding cost parameters as
described below.

1) I have fitted a Gamma distibution (which, as You remarked, constrained
between 0 and + infinitive; sorry for the previous mistake) with the
original difference (always<0 for healthcare programme A) in cost data as

gen alfa=(mean/SE)^2; gen beta=SE^2/mean.

Then, I drew random samples using: 

gen InvGamma=beta*invgammap(alfa, uniform()).

2) As You suggested, the results was always negative, and added nothing to
my previous knowledge.

3) Hence, using the same Stata code, I have decided to fit two different
Gamma distributions with the original cost data for each one of the compared
health care programmes, draw random samples with two InvGamma distributions
and eventually calculate the difference between the two Inv Gamma
distributions. The results seemed to confirmed the base case findings.

Thanks a lot again for Your Kindness, hints and time.

Kind Regards,

-----Messaggio originale-----
[] Per conto di Nick Cox
Inviato: domenica 17 giugno 2007 19.00
Oggetto: st: RE: InverseGamma with beta<0

This is unclear in several senses. 

1. You do not say which commands you used. 

2. Telling us your notation tells us little as there 
is no standardisation on notation or even parameterisation 
for the two-parameter gamma distribution across or within 
disciplines. In one common but not universal scheme the 
density is given, for variable x >= 0, shape parameter 
a > 0 and scale parameter b > 0, by

[1 / (b^a gamma(a))] x^(a - 1) exp(-x / b), 

but last time I looked I encountered two other parameterisations 
in the literature. This one is what is used by -gammafit- from 

3. It seems that this cannot be what you used as you 
report that your beta was negative. 

4. beta * invgammap(alpha, probability) will yield
negative results for negative beta and positive alpha. 

5. I don't see that gamma random numbers using your 
fitted parameters will tell you anything that your 
data cannot, for example in terms of the difference
associated with a covariate, health programme. 

6. It sounds as if your variable may be negative. 
If I had a variable that looked like a gamma, 
apart from being all negative, I would fit 
a gamma to absolute values and then re-apply 

7. I don't understand what you mean by
"being Gamma constrained on 0 to 1 interval". 


Carlo Lazzaro
> I have fitted a Gamma distribution with Stata 9/SE from a 
> dataset containing
> savings (ie: cost difference all < 0) accrued to patients who 
> underwent
> healthcare Programme A (50,000 patients) instead of 
> healthcare Programme B
> (50,000 patients) 
> Parameter alfa was>0 but beta was less <0.
> Then I have drawn 50,000 random samples via InvGamma: 
> gen InvGamma=beta*invgammap(alfa, uniform())
> InvGamma results confirmed that healthcare Programme A was always less
> costly than Healthcare programme B.
> However, being Gamma constrained on 0 to 1 interval, I really 
> do not know
> whether the results of InvGamma are or not reliable.

*   For searches and help try:

*   For searches and help try:

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