[Limdep Nlogit List] Generating a gamma distribution from the random effect ?alpha? estimate
Bjorn Lardner
lardnerb at usgs.gov
Fri Sep 24 11:34:37 EST 2010
Dear LIMDEP users,
We?ve estimated a panel Poisson model with a gamma distributed random
effect, and look for advice on how to visualize the random panel effect.
Our confusion stems from the fact that a gamma distribution has two
essential variables: a shape variable (a) and a scale variable (b), while
the LIMDEP output only gives one variable pertaining to that error
distribution; ?alpha?. The key to the issue appears to be (LIMDEP v. 9.0
manual, p. E26-3),
??ui is a random effect for the ith group such that exp(ui) has a gamma
distribution with parameters (?, ?). Thus, E[exp(ui)] has mean 1 and
variance 1/? = [alpha] .?
Despite these leads, we suspect that our attempts to produce a gamma
distribution may be flawed. We eventually want to illustrate the gamma
distribution around a predicted model count - a count produced by entering
certain character states and/or covariates into the model, using the
variable coefficients given in the LIMDEP output. Perhaps there is even
specific LIMDEP code that we can use to generate the random effect
estimates for each panel?
All our variables are either effect coded and balanced, or continuous
variables transformed so that each variable estimated has a mean of 0
(zero). Hence, if we make a prediction at the mean of the variable
states/values, all that really affects the model prediction is the
intercept, and the predicted count will be Exp[intercept]. How then do we
use the ?alpha? value given by LIMDEP to calculate/illustrate the gamma
distribution around that Exp[intercept] value?
If it may be of help in illustrating the solution to our problem, let us
ASSUME that LIMDEP produces a model intercept coefficient =0.1 and an
alpha = 0.4. Because E[exp(ui)] has a variance of 1/? = alpha, it should
come that ? = 1/alpha = 2.5. Also, because the coefficient of the
intercept is 0.1 the predicted count from the model at the variables means
(ignoring the random effect) is 1.105. However, we suspect that the
predicted count may not be part of this step but that we should first
visualize the distribution of the intercept?s coefficient; then transform
that to the model predicted count distribution ? right? If anybody could
show us the calculation steps necessary to arrive at the shape (a) and
scale (b) variables that are required to plot the gamma distribution (e.g.
by the Excel GAMMADIST function), we would be most grateful!
Sincerely,
Bjorn Lardner / ecologist
More information about the Limdep
mailing list