Hello. I’m getting this weird mass at 0 in my cumulative ppc check.
I’m not sure what that is. Has anyone had this before? My model is below.
data {
int<lower=1> n; // number of observations
vector<lower=0>[n] loss_ratio; //target
vector<lower=0>[n] cancellation; //monthly cancel rate
int<lower=1> p;
vector[p] cancellation_ppc;
}
parameters {
real alpha; // intercept
real beta; // slope
real<lower=0> sigma; // scatter
}
transformed parameters {
// Any variable declared here is part of the output produced for draws.
vector[n] mu;
mu = alpha + beta * cancellation;
}
model {
// priors
alpha ~ normal(0,5); // prior for intercept
beta ~ normal(0, 5); // prior for scale
sigma ~ normal(0, 50); // prior for scatter
// likelihood
loss_ratio ~ normal(mu, sigma);
}
generated quantities {
vector<lower=0>[p] loss_ratio_ppc;
for (i in 1:p) {loss_ratio_ppc[i] = normal_rng(mu[i], sigma);}
}
****
To include mathematical notation in your post put LaTeX syntax between two `$` symbols, e.g.,
$p(\theta | y) \propto p(\theta) p(y | \theta)$.
Don't forget to add relevant tags to your topic (top right of this form) for application area and/or class of models you work with.