Hi , I am trying to fit a hierarchical prior distribution for regression coefficients as follows:
My response variable is a binary response variable. I tried several different parameterizations. But I am getting the divergent transitions warning message.
There were 38 divergent transitions after warmup
parameterization 1
parameters {
real alpha1;
vector[K1] beta1_tilde;
vector<lower=0>[K1] tau_tilde;
real<lower=0> lambda ;
}
transformed parameters {
vector[K1] tau = tau_tilde /lambda;
vector[K1] beta1= beta1_tilde .* tau;
}
model {
beta1_tilde ~ normal(0, 1);
lambda ~ cauchy(0, 1);
tau_tilde ~ inv_gamma (0.5 , 0.5 );
alpha1 ~ normal(0, 100);
y1 ~ bernoulli_logit_glm(x1, alpha1, beta1);
}
parameterization 2
parameters {
real alpha1;
real<lower=0> lambda ;
vector<lower=0> [K1] tau_tilde;
vector[K1] beta1_tilde;
}
transformed parameters {
vector[K1] beta1= beta1_tilde .* tau_tilde/lambda;
}
model {
beta1_tilde ~ normal(0, 1);
lambda ~ cauchy(0, 1);
tau_tilde ~ inv_gamma (0.5 , 0.5 );
alpha1 ~ normal(0, 100);
y1 ~ bernoulli_logit_glm(x1, alpha1, beta1);
}
parameterization 3
parameters {
real alpha1;
real<lower=0> lambda ;
vector<lower=0> [K1] tau_tilde;
vector<multiplier=1/lambda>[K1] beta1_tilde;
}
transformed parameters {
vector[K1] beta1= beta1_tilde .* tau_tilde;
}
model {
beta1_tilde ~ normal(0, 1/lambda);
lambda ~ cauchy(0, 1);
tau_tilde ~ inv_gamma (0.5 , 0.5 );
alpha1 ~ normal(0, 100);
y1 ~ bernoulli_logit_glm(x1, alpha1, beta1);
}
I tried above mentioned 3 parametrizations. But still I am getting the same warning message.
In addition to this I have used following statement when running the models too.
control = list(adapt_delta = 0.99,max_treedepth=15)
Can anyone give any advice about to get rid of this warning message ?
Any help would be highly appreciated.
Thank you