Hi,
I have a quick question about my output in regards to bounded parameters (I apologise for asking quite a few questions lately).
Background: I have a hierarchical choice model (see attached at the end) where individual-level parameters are a function of priors (means and sds). I have sampled with the model and it passes all computational tests, including accurately retrieving simulated data. However, I’ve noticed that the model hits the upper bound of my noise prior mean. This noise mean upper bound was informed by prior research and a simpler simulation using maximum likelihood.
Is a prior parameter’s mean hitting the upper bound a problem?
Keep in mind, my individual level parameters do not have an upper bound, just the priors as I’d like to impose some constraint on this.)
To visualise the problem I’ve attached a pairs plot for the priors.
As always, I appreciate your help.
Cheers,
Alex
***
Here is my model in case it’s useful
data {
int N; // number of trials total (across participants), integer
int nsubj; // number of subjects,
int choices[N]; // the binary choice vector
real <lower=0> x1a[N];
real <lower=0> x2a[N];
real <lower=0> x3a[N];
real <lower=0> x4a[N];
real <lower=0> x1b[N];
real <lower=0> x2b[N];
real <lower=0> x3b[N];
real <lower=0> x4b[N];
real <lower=0> p1a[N];
real <lower=0> p2a[N];
real <lower=0> p3a[N];
real <lower=0> p4a[N];
real <lower=0> p1b[N];
real <lower=0> p2b[N];
real <lower=0> p3b[N];
real <lower=0> p4b[N];
int sid[N];
}
parameters {
// Group-level:
real<lower=-2.30, upper=3.05> meannoise; // assuming mean is 0.1 to 21 - as in ca. noise estimates from Stata model with n=853
real<lower=0, upper=1.55> sdnoise; // according sds - calculated as sd = (b - a) / sqrt(12)
real<lower=-2.3, upper=2.3> meanalpha; // assuming mean is 0.1 to 10
real<lower=0, upper=1.33> sdalpha;
real<lower=-2.3, upper=3.76> meanM; // assuming mean is 0.1 to 43
real<lower=0, upper=1.75> sdM;
// Individual-level:
real<lower=0.1> noise[nsubj]; // Noise, constrained it to be above [0.1, INF]
real<lower=0.1> alpha[nsubj]; // alpha, constrained it to be above [0.1, INF]
real<lower=0.1> M[nsubj]; // Reward Expectation, constrained it to be [0.1, INF)
}
model {
real ua; // utility of the option a
real ub; // utility of the option b
// Group-level parameters:
meannoise ~ uniform(-2.30,3.05); // assuming mean is 0.1 to 21
sdnoise ~ uniform(0,1.55); // according sds
meanalpha ~ uniform(-2.3,2.3); // assuming mean is 0.1 to 10
sdalpha ~ uniform(0,1.33);
meanM ~ uniform(-2.3, 3.76); // assuming mean is 0.1 to 43
sdM ~ uniform(0,1.75);
// Individual-level parameters:
noise ~ lognormal(meannoise, sdnoise);
alpha ~ lognormal(meanalpha, sdalpha);
M ~ lognormal(meanM, sdM);
for (i in 1:N) {
int t = sid[i];
ua=0.0;
ua += p1a[i]*((x1a[i]^alpha[t])/((x1a[i]^alpha[t])+(M[t]^alpha[t])));
ua += p2a[i]*((x2a[i]^alpha[t])/((x2a[i]^alpha[t])+(M[t]^alpha[t])));
ua += p3a[i]*((x3a[i]^alpha[t])/((x3a[i]^alpha[t])+(M[t]^alpha[t])));
ua += p4a[i]*((x4a[i]^alpha[t])/((x4a[i]^alpha[t])+(M[t]^alpha[t])));
ub=0.0;
ub += p1b[i]*((x1b[i]^alpha[t])/((x1b[i]^alpha[t])+(M[t]^alpha[t])));
ub += p2b[i]*((x2b[i]^alpha[t])/((x2b[i]^alpha[t])+(M[t]^alpha[t])));
ub += p3b[i]*((x3b[i]^alpha[t])/((x3b[i]^alpha[t])+(M[t]^alpha[t])));
ub += p4b[i]*((x4b[i]^alpha[t])/((x4b[i]^alpha[t])+(M[t]^alpha[t])));
choices[i] ~ bernoulli_logit(((ua-ub)*noise[t]));
}
}
