Hierarchical Bayesian models specify statistical priors on parameters and hyperpriors on the parameters of the prior distributions.
Questions tagged [hierarchical-bayesian]
109 questions
0
votes
0 answers
For Prior definition in bayesian regression with R package MCMCglmm, how to convey different strength of believe via parameter nu?
I understand the strength of the Prior is set via parameter nu however, I can not find information what nu expresses in statistical terms, e.g. how strong would a prior that is similar to the number of variables x be in this example?
#Inverse…

Tim M. Schendzielorz
- 301
- 3
- 11
0
votes
1 answer
Calculating WAIC for models with multiple likelihood functions with pymc3
I try to predict the outcome of soccer games based on the number of goals scored and I use the following model:
with pm.Model() as model:
# global model parameters
h = pm.Normal('h', mu = mu, tau = tau)
sd_a = pm.Gamma('sd_a', .1, .1)
…

milanDD
- 123
- 1
- 11
0
votes
1 answer
Hierarchical model using JAGS for R shows wrong number of means
I have 2 columns of data, y and grp and I am trying to create a JAGS model which is shown above. grp is group and I have 5 groups. The following code is from here. I am using this code because the description there under the heading Model and Data…

Mohan Radhakrishnan
- 3,002
- 5
- 28
- 42
0
votes
1 answer
Bayesian Hierarchical Clustering
Do you know if we can implement Bayesian Hierarchical clustering (python or R) on vectors with float values? I have searched through the web, and just found some random matrices with the values of 0,1,2. In the related paper nothing has mentioned. I…

Niloo
- 35
- 4
0
votes
0 answers
Setting up a hierarchical model using R2jags
I'm working on a project for an introductory Bayesian analysis course and I'm also fairly new to using R regularly. We are supposed to build a hierarchical model using a data set we found or put together. I put a data set together to analyze the…

whgonzalez
- 15
- 4
0
votes
1 answer
Hierachical Bayesian Linear Regression using PyMC3 is super slow
I am trying to write some code for implementing HBM in the case of logistic regression using the adults dataset from the UCI repository.
I have already written the code, but sampling is super slow, on the order of 107s per sample, for even 64…

Cupitor
- 11,007
- 19
- 65
- 91
0
votes
1 answer
Bayesian Logistic Regression Using Tensorflow Probability
I am having issues trying to run the Bayesian logistic regression example on tensorflow probability, as shown An introduction to probabilistic programming, now available in TensorFlow Probability.
If I just run the code on the site I get the…

Abeer Ali
- 11
- 3
0
votes
1 answer
Dirichlet parameters don't update in JAGS
I am trying to run a hierarchical Dirichlet model in JAGS but I have no update and must do something wrong. I try to approximate it with the gamma distribution:
#Creating some…

user3192383
- 63
- 3
0
votes
1 answer
Code for Basic Hierarchical Bayesian Analysis
I have this code written in winBUGS:
n <- 100
x1 <- rbinom(n,1,.7)
x2 <- rbinom(n,1,.5)
sum(x1)
sum(x2)
model{
x1 ~ dbin(p1, n) x2 ~ dbin(p2, n) p1 ~ dbeta(a1, b1) p2 ~ dbeta(a2,b2)
diff <- p1 - p2 p.value <- step(diff)
} list(n = 100, x1 =…
0
votes
0 answers
Hierarchical Linear Mixture Model
I have implemented a stan hierarchical model with level 1 within groups to be a linear model and level 2 within subjects Gaussian mixture model. It means the slope obtained from level 1 is used by level model GMM to cluster. When I run the model it…

ADITYA
- 1
- 1
0
votes
0 answers
How to deal with panel data using the brms package in r
I have a panel data set (several observations of different individuals over time) for which I want to construct a simple bayesian multilevel model. Therefore, I want to use the brms package. Does anyone know how to deal with the panel data structure…

Activation
- 93
- 6
0
votes
1 answer
Metropolis-specific TypeError: The broadcastable pattern of the input is incorrect for this op
I am trying to build a multilevel, multidimensional Bayesian model in PyMC3. For this question, I'll use a smaller toy model with the following graph structure:
where G represents genes, K cell types, and C_k cells of cell type k. Overall the…

merv
- 67,214
- 13
- 180
- 245
0
votes
1 answer
Bayesian Inference with PyMC3. Compilation error.
The following two codes do a simple bayesian inference in python using PyMC3. While the first code for exponential model compiles and run perfectly fine, the second one for a simple ode model, gives an error. I do not understand why one is working…

Arjun Devdas
- 59
- 5
0
votes
1 answer
Comparing hierarchical bayes with OLS
I have made two models. A Hierarchical Bayes model and a Least squares/OLS model and I would like to compare the two.
I know that for the OLS results I can simply print the summary:
model = sm.OLS(d_df.ix[:, -1], d_df.ix[:, :-1])
result =…

Casper Ritmeester
- 11
- 1
0
votes
1 answer
posterior prediction based on a grouping variable from `stan_glm()` in `rstanarm` package?
I was wondering how to obtain the posterior prediction based on a grouping variable from stan_glm() in rstanarm package?
For example, if I have a binary (0, 1) coded grouping variable called "vs" in my data (base R data: mtcars), how can I obtain…

rnorouzian
- 7,397
- 5
- 27
- 72