Hi everyone,
I hope you are doing well in this context. I have the following code for fitting an extended Pareto distribution, which can be built as a mixture of a Gamma and a rate parameter Gamma distributed.
The resulting density is denoted as
where \theta is the shape of target Gamma and \alpha and \beta are the shape and rate of the mixing Gamma. Moreover,
A simple model,
data {
int<lower=0> N;
vector<lower=0>[N] y_i;
}
parameters {
real<lower=0> theta[N];
real<lower=0> alpha;
real<lower=0> gamma;
real<lower=0> mu;
}
model {
// target += normal_lpdf(alpha| 2,0.5);
// target += normal_lpdf(mu| 10,2);
// target += normal_lpdf(gamma| 100,50);
target += gamma_lpdf(theta| mu,gamma);
target += gamma_lpdf(y_i| alpha,theta);
}
generated quantities{
real yrep[N];
for (n in 1:N){
yrep[n] = gamma_rng( alpha, gamma_rng(mu,gamma));
}
}
I tested it with the following simulated data: rgamma(shape= 2 , rate = rgamma(n,shape= 10, rate = 100), n=10000)
How would you generally propose appropriate priors for this case?
With these priors
target += normal_lpdf(alpha| 2,0.5);
target += normal_lpdf(mu| 10,2);
target += normal_lpdf(gamma| 100,50);
But with these
target += normal_lpdf(alpha| 0,5);
target += normal_lpdf(mu| 0,25);
target += normal_lpdf(gamma| 0,250);