gamfit confidence intervals
7 views (last 30 days)
Show older comments
Hi,
when using the gamfit function, the confidence intervals of the parameters of the gamma distribution are not symmetric around the fitted values. This can be seen for the second (scale) variable in the example given in the R2011b documentation, and seems to apply also to the first (shape) parameter in my R2008b version.
The confidence interval is usually computed using the Fisher Information Matrix, and should be symmetric, as it is given as "fitted value +- c*std" where std is the standard deviation and c a numerical constant giving the desired confidence level under the assumption of normal distribution.
So why isn't the fitted value in the middle of the confidence interval? Are the fitted parameters different from those given and a non-linear transformation is then used for conversion?
0 Comments
Accepted Answer
Peter Perkins
on 13 Sep 2011
GAMFIT fits the parameters on the log scale, on which the asymptotic normal approximation tends to need fewer observations to be reasonable. Then the symmetric CIs for logged parameters get exponentiated. If you edit GAMFIT, you can see exactly what the code does, e.g., lines 279-284 in the current release.
4 Comments
Peter Perkins
on 4 Oct 2011
To clarify, when I said, "by generating lots (1000, say) of gamma dist'd data from the same distribution", I meant generate (say) M=1000 vectors of data from (say) gamrnd, each of length (say) n=25. Then use gamfit to get 100 pairs of MLEs. Then try it with n=100 and n=1000.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!