Hi list,
The pdf of the reflected beta is defined
f(x | lambda, theta) = (1 - lambda) / theta * (1 - x/theta)^(-lambda) if lambda <= 0, 0 <= x <= 1 and
f(x | lambda, theta) = (1 + lambda) / theta * (x / theta)^(lambda) if lambda > 0, 0 <= x <= 1
where x are individual occurrence times, lambda describes the "tilt" of the distribution and theta is maximum age of an occurrence. The function I've written for the reflected beta pdf is as follows:
/**
* return probability of observation y given lambda and theta
*
* @param y value between 0 and theta of occurrence time
* @param lambda shape of the sampling profile
* @param theta duration of taxon
* @return probability of occurrence time
*/
real reflected_beta(real y, real lambda, real theta) {
real p;
if(lambda > 0) {
p <- ((1 + lambda) / theta) * pow((y / theta), lambda);
} else if(lambda <= 0) {
p <- ((1 - lambda) / theta) * pow((1 - y / theta), (lambda * -1));
}
return p;
}
In my simulation, all samples are generated with the same value of lambda but each "species" as a unique theta value generated from a shared Weibull distribution with constant shape and scale. My stan file reflects my attempts to estimate the key values (shape and scale) from the simulated data. When I try fitting the model the chains remain at their initial condition and don't move. I've tried changing step size and adapt_delta to no avail.
I've attached the stan file and associated simulation data.
Are there any recommendations for how to proceed this?
Cheers,
Peter