*
* %InvGammaParms(mean,sd)
* returns a 2-vector with the two parameters for an inverse Gamma
* distribution with the given mean and standard deviation. Note that the
* RATS functions %loggammadensity(x,a,b) and %rangamma(a) use a
* parameterization in terms of shape and scale, not degrees of freedom
* and mean. This returns the a and b appropriate for use with those
* functions.
*
* Revision Schedule:
*  07/2009 Written by Tom Doan, Estima.
*
function %InvGammaParms mean sd
type vect[real] %InvGammaParms
type real mean
type real sd
*
local real b
compute b=%if(%valid(sd),(mean/sd)^2+2,2.0)
compute %InvGammaParms=||1.0/(mean*(b-1)),b||
end

