106 questions
1
vote
1
answer
33
views
Bayesian ordinal logistic model using rstan
Is my syntax below for an ordinal logistic model correct? I get an error message which I don't understand.I got the code from a published paper illustrating a graded response model (ordinal logistic, ...
0
votes
0
answers
45
views
Bayesian model in SAS Proc MCMC - how to specify parameter constraints
I am trying to estimate a Bayesian logistic model (with a latent variable and two comparison groups, apart from model parameters), while specifying that two parameters should be equal. My SAS code ...
0
votes
0
answers
34
views
Hierarchical Time Series Modeling for Data with Different Lengths in Numpyro
Before we get started, this is what I am importing:
import numpy as np
import os
import pandas as pd
import matplotlib.pyplot as plt
idx = pd.IndexSlice
# import jax
from jax import random
import jax....
0
votes
0
answers
20
views
Hierarchical bayesian modelling - model structure in PYMC
Hi I am learning about HBM's, and want to confirm whether the following is a valid way to model gender and region influences (along with a few other factors that can be seen in the dataframe) on the ...
0
votes
0
answers
29
views
Alternative to forecast sequential regressions
Seeking advice on how I could forecast the below better. Ultimately I am looking to build a 5-year rent growth forecast, but as part of the forecasting process, I will need other variables.
Currently, ...
1
vote
1
answer
64
views
posterior draws without including hyperparameters from hierarchical model
I have a hierarchical Bayesian model that I fit with brms. Is it possible to draw samples from the posterior where I don't specify a specific grouping from the hierarchical term? Essentially, I'm ...
0
votes
1
answer
522
views
Specifying nested random effects in "brms"
I am new to using "brms" and am encountering an issue when specifying the model formula. The error occurs in the specification of the random intercept (three variables/terms denoting the ...
0
votes
1
answer
271
views
specifying group-level effects in brms
I'm trying to model the effects of one continuous variable (mass) and three categorical variables (site, sex, and method) on another continuous variable with brms. The explanatory variables are to ...
0
votes
1
answer
554
views
How to apply a Blackjax sampler on my PyMC V5 model that uses a custom loglikelihood
I'm using PyMC v5 to perform Hamiltonian Monte Carlo in a model. I can make run the code below but it is very slow, even with multiple cores. I have a function applyMCMC for this purpose:
# define a ...
0
votes
0
answers
104
views
How can I effectively propagate parameter uncertainties from one hierarchical level to the next in Bayesian hierarchical modeling?
I am using PyMC, the probabilistic programming library of Python to implement a hierarchical bayesian model.
Consider a two-level Bayesian hierarchical model. Level-1 has a parameter m1 and level-2 ...
1
vote
1
answer
56
views
How to implement Bayesian football model in RSTAN? I can do it in RJAGS but in RSTAN
The original can be found at https://discovery.ucl.ac.uk/id/eprint/16040/1/16040.pdf
We assume the number of goals follow the Poisson distribution
Where the log of goals is computed as
With the ...
0
votes
2
answers
252
views
Cannot load a previously saved trace for future inferences using Pymc 3.11.4
I am trying to implement a simple hierarchical bayesian inference. I am inferring a parameter 'm' of a simple linear model y = mx using Pymc. I want to save the trace so that I can load it later. The ...
0
votes
1
answer
77
views
Error in `choicemodelr()`: ! argument "directory" is missing, with no default
I hope your are well. I am estimating a hierarchical bayes choice model with ChoiceModelR. This is a long code that works perfectly except this chunck. Every time I run this chunck I get the error: ...
1
vote
1
answer
85
views
Hierarchical varying effects model with MVN prior
What I'm trying to do
I've already dealt with multivariate priors in pymc (I'm using 4.0.1), but I can't get their usage in a hierarchical model working. In my example I'm modeling a regression ...
2
votes
1
answer
342
views
ValueError: Incompatible Elemsise input shapes in a Hierarchical Bayesian Time Series Model
I am trying to build a Bayesian hierarchical time series model to understand sales data of four stores using PyMC 5.4 in Python. All the stores have a seasonal component, that I am trying to model ...