Displaying 1 result from an estimated 1 matches for "rlgamma".
Did you mean:
lgamma
2008 Jun 14
1
SLLN for loggamma fails for 2 order moments
...lso, I checked it with the function mlgamma from the package actuar, which
calculates moments based on loggamma parameters.
Se below - I get big deviations. Numerical integration suggests that mlgamma
gets it right. What fails
in my attempt to use SLLN to estimate the 2. order moments?
Code:
sum(rlgamma(10^6,25,2.6)^2)/10^6 #Estimation by SLLN
[1] 1.964011e+13
> mlgamma(2,25,2.6) #2.order moment by mlgamma
[1] 8.328225e+15
The difference is more than a factor 100!
I have tried to run the code several times but I never manage to exceed the
value of mlgamma - that is, by SLL...