Hierarchical Bayesian models specify statistical priors on parameters and hyperpriors on the parameters of the prior distributions.
Questions tagged [hierarchical-bayesian]
109 questions
2
votes
1 answer
Bayes Factor for linear mixed models in R
I am trying to compute the Bayes Factor (BF) for one of the fixed effect with the BayesFactor package in R.
The data has the following structure:
rating is the dependent variable
cond is the independent variable with 3 levels ("A", "B", "C")
C1…

mat
- 2,412
- 5
- 31
- 69
2
votes
1 answer
How to deal with "Non-conforming parameters with inprod function" in JAGS model
I am trying to model the variance in overall species richness with the habitat covariates of a camera trapping station using R2jags. However, I keep getting the error:
"Error in jags.model(model.file, data = data, inits = init.values, n.chains =…

M. Pretorius
- 33
- 1
- 5
2
votes
1 answer
How do we predict on new unseen groups in a hierarchical model in PyMC3?
If we have a hierarchical model with data from different sites as different groups in the model, how do we predict on new groups (new sites that we haven't seen before)?
e.g. using the following logistic regression model:
from pymc3 import Model,…

bdfy
- 35
- 5
2
votes
1 answer
Why am I getting a dimension mismatch in my PyMC3 hierarchical model?
This is essentially the "Multiple Coins from Multiple Mints / Baseball Players" example from Doing Bayesian Data Analysis, Second Edition (DBDA2). I believe I have PyMC3 code which is functionally equivalent, but one works and the other does not.…

agtsai
- 726
- 1
- 5
- 10
2
votes
0 answers
Hierarchical Mixture Model in Stan
I'm trying to implement a hierarchical mixture model in Stan that describes how performance on a task changes over time. In the model (see code below), there are three lower level parameters that are assumed to be drawn from a mixture of two normals…

Tim
- 69
- 6
2
votes
0 answers
Error in bayesm rhierNegbinRw function:
I am attempting to fit a hierarchical negative binomial model with bayesm. Though my data is proprietary, I was able to recreate the same error with the margarine dataset. The error I get is as follows:
> look <- rhierNegbinRw(Data = list(regdata…

mmmm
- 21
- 1
1
vote
1 answer
Error: All list elements must be lists themselves: Error in using spread_draws function in tidybayes
In playing around with the tidybayes package (I replicated the data from the code simulated in the vignette: http://mjskay.github.io/tidybayes/articles/tidybayes.html), I continue to stumble onto the error: Error: All list elements must be lists…

Mason Wirtz
- 21
- 2
1
vote
0 answers
RStan - Problem in stan_file model code - Variational Bayes
I am trying to do Variational inference, so that I can get the best approximating distribution with respect to the target distribution: a Normal-Inverse-Wishart.
Normal-Inverse-Wishart distribution
However when I compile the stan file with the model…

Nihaar
- 11
- 2
1
vote
0 answers
Number of stochastic nodes and identifiability in JAGS
How does JAGS count the number of stochastic nodes? I assume that the number of "observed stochastic nodes" are the data points and the "unobserved stochastic nodes" are the parameters, right? Does that mean, that, when the number of unobserved…

Phd Student
- 81
- 4
1
vote
1 answer
Create a 2-hierarchy estimate of (normal) mean and standard deviation
I have a normally distributed variable x (like product demand), an index id_1 (like product number) and a second index id_2 (like product group). My goal is to estimate the mean and the standard deviations for x hierarchically (all > product group >…

r.user.05apr
- 5,356
- 3
- 22
- 39
1
vote
1 answer
plot multiple scatterplots from hierarchical model with 2 predictors
I am brand new to python and pymc3. So forgive me if this question is rather silly. I have a dataset called…

clueless
- 11
- 2
1
vote
0 answers
"this initial value does not correspond to a stochastic node" in WinBugs
I gave initial values for all the stochastic nodes, but WinBUGS still gives me the message that
this initial value does not correspond to a stochastic nodes
What node I am missing here?
#Model
model
{
for( i in 1 :N) {
Y[i] ~ dnorm(mu[i], tau)…

Ankita Srivastava
- 11
- 1
1
vote
0 answers
what is the reason to draw the scatterplot matrix for the mcmc sample?
I found some bayesian paper try to draw the scatter plot matrix for the parameters.
I just wondering what is the goal to draw this scatter plot matrix?
what is the meaning if I see some linear or nonlinear relationships between samples.
Thanks

hard worker
- 181
- 8
1
vote
0 answers
Bayesian Network modelling using data driven approach for Information retrieval?
I am exploring the method and code to construct the Bayesian network for information retrieval using a data-driven approach. I do find very old papers where the dataset or code are not available. I am new and exploring this field.
Please, if anyone…

Rohit129
- 31
- 2
1
vote
0 answers
How do I fit a pymc3 model when each person has multiple data points?
I'm trying to practice using pymc3 on the kinds of data I come across in my research, but I'm having trouble thinking through how to fit the model when each person gives me multiple data points, and each person comes from a different group (so…

user14615427
- 11
- 2