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
1 answer
stan to manipulate and fix syntax for data
max_lag is a fixed integer number for all media. I need to have a specific lag for each media.
So, how can I have a different lag for every media, and how data and parameters have to change into the syntax?
For Example: max_lag_channel_media1 = 10;…

VIX
- 5
- 3
0
votes
0 answers
How does one arrive at "fair" priors for spatial and non-spatial effects
In a basic BYM model may be written as
sometimes with covariates but that doesn't matter much here. Where s are the spatially structured effects and u the unstructured effects over units.
In Congdon (2020) they refer to the fair prior on these as…

SushiChef
- 588
- 3
- 12
0
votes
1 answer
Use two set of data for likelihood of log_prob in tensorflow probability
I am new to tensorflow and trying to translate a STAN model into TFP. Here is my TFP model using JointDistributionCoroutineAutoBatched.
def make_joint_distribution_coroutine(Depth,N_RNA):
def model():
## c1 prior
c1 = yield…

sean00002
- 3
- 2
0
votes
0 answers
Only positive coeffcients through lmer in R
I am performing mixed effect modeling using lme4. But as you would expect, I can get positive and negative fixed and random effects as coefficients. How do I put bounds on my final coefficients such that I get only positive coefficients?
I am also…

abell78989
- 1
- 1
0
votes
0 answers
R stan shows weird error message when running hierarchical Bayesian model
I'm trying to sample from the posterior of this model:
enter image description here
x is a 10x1 vector, mu is a 10x1 vector, sigma is a 10x10 matrix, psi_0 is a 10x10 matrix, 1 in bold is a 5x1 unity vector, and the rest are scalars. F and E are…

Federico Bindi
- 1
- 1
0
votes
1 answer
"empty slot not allowed in variable name" (OpenBUGS, R2OpenBUGS)
I'm a beginner with OpenBUGS which I use through the R2OpenBUGS R package. I try to set state space model for identifying a lognormal signal in very noisy data. After many trials and errors, I managed to get this code but I still get the following…

Natrix
- 1
0
votes
1 answer
Hierarchical Dirichlet regression (jags)... overfitting
Good Morning, please I need community help in order to understand some problems that occurred writing this model.
I aim at modeling causes of death proportion using as predictors "log_GDP" (Gross domestic product in log scale), and "log_h" …

Andrea Ni
- 11
- 2
0
votes
1 answer
Is there a way to obtain and store positions of matrix element in JAGS?
I am developing a bayesian hierarchical model in R with BUGS code in JAGS.
In my model, I have two matrices that contain relevant information about each another in the same exact matrix position. My information is structured by rows. I apply a…

JAB
- 3
- 3
0
votes
0 answers
How to avoid overdispersed Poisson regression overfitting?
I have a dataset including three variables including company id (there are 96 companies), expert id (there are 38 experts) and points given by experts to companies. Points are discrete values from 0 to 100. I tried fitting an overdispersed poisson…

Amin Shn
- 532
- 2
- 11
0
votes
1 answer
Random intercepts in hierarchical Dirichlet regression (jags)
I have the following data structure:
y: 3 columns that are observed proportions of deaths over the years.
x1: GDP - continuous variable related to each year
x2: Ages- related to deaths
Here the model specification:
Model
Here simulated…

Andrea Ni
- 11
- 2
0
votes
1 answer
Theano tensor length unknown for division but ok for addition in pymc3 hierarchical model
I am trying to run a hierarchical model with pymc3 in a Win10 environment using Spyder.
I have some global model parameters (theta, omega, sigma) and one specific parameter (Ci).
It takes a pd Dataframe as input that contains the relevant data.…

Alexis Dussault
- 31
- 2
0
votes
1 answer
Tensorflow probability: retrieving specific random variable from joint distribution
I'm new to tensorflow probability.
I am building a hierarchical model, for which I use the JointDistributionSequential API:
jds = tfp.distributions.JointDistributionSequential(
[
# mu_g ~ uniform on sphere
tfp.distributions.VonMisesFisher(
…

Louis
- 161
- 1
- 5
0
votes
0 answers
in R rethinking package, what is syntax for nested indices?
I'm running the following model using Richard McElreath's "rethinking" package in R. Each species (represented by species_dummy) has several trees associated with it (represented by the index [tree]). I would like to use nested indices or somehow…

Alison
- 11
- 3
0
votes
1 answer
Iterating over each Row of a large dataset R-Studio
Suppose I have a list of 1500000 states with given zip codes and I want to run my predictor Model (databas) on that list and get the predictions of Area, I did the same by the help of one gentleman and here is my code:
pred <- sapply(1:nrow(first),…

Uttasarga Singh
- 27
- 7
0
votes
1 answer
Bayesian Modelling in R
I am trying to implement a bayesian model in R using bas package with setting up these values for my Model:
databas <- bas.lm(at_areabuilding ~ ., data = dataCOMMA, method = "MCMC", prior = "ZS-null", modelprior = uniform())
I am trying to predict…

Uttasarga Singh
- 27
- 7