Hi Chris--
Odd and I are working on this. Essentially, I wanted to take the shape and rate parameter to generate a posterior distribution of plausible home range sizes to use as our outcome in analyses fit with Stan so we could accurately propagate uncertainty about home ranges, especially since the right tail of gamma distributions, when a posterior, could generate predictions of biological import.
What I found is that what you call rate above is actually the scale, and the inverse is the rate-- it matters dependeing on how you call
dgamma() or
rgamma() or parameterize gamma distributions in stan.
scale = POINT.EST/DOF
rate = DOF/POINT.EST
shape = DOF
Putting this into my data frame I can plot to validate, and I show one of these plots below:
for(i in 100:120){
plot(density(rgamma(10000,shape=d_akde$shape[[i]], rate=d_akde$rate[[i]] ) , xlim=c(0,10)) , main="blah" )
lines(density(rgamma(10000,shape=d_akde$shape[[i]], scale=d_akde$scale[[i]] ) ) , lty=2 )
points( d_akde$area[i] , 0.1 ) # this is point.est
segments( x0=d_akde$low[i], y0=0.1 , x1=d_akde$high[i] ,y1= 0.1 , col="blue")
}
Package is great and I am learning a lot. We will post when a preprint or publication is out with stan models.
--Brendan