Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
33 views

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, ...
user2450223's user avatar
0 votes
0 answers
45 views

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 ...
user2450223's user avatar
0 votes
0 answers
34 views

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....
Damien Beecroft's user avatar
0 votes
0 answers
20 views

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 ...
Ray92's user avatar
  • 463
0 votes
0 answers
29 views

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, ...
jmaval's user avatar
  • 313
1 vote
1 answer
64 views

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 ...
tnt's user avatar
  • 1,527
0 votes
1 answer
522 views

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 ...
StatisticsFanBoy's user avatar
0 votes
1 answer
271 views

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 ...
tnt's user avatar
  • 1,527
0 votes
1 answer
554 views

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 ...
foutou_10's user avatar
0 votes
0 answers
104 views

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 ...
ArKa's user avatar
  • 25
1 vote
1 answer
56 views

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 ...
Juan's user avatar
  • 25
0 votes
2 answers
252 views

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 ...
ArKa's user avatar
  • 25
0 votes
1 answer
77 views

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: ...
Constanza Avalos's user avatar
1 vote
1 answer
85 views

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 ...
deemel's user avatar
  • 1,036
2 votes
1 answer
342 views

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 ...
vbrei's user avatar
  • 21
0 votes
1 answer
871 views

Can you give me example to write half-normal prior using Nimble package in R? For example, if I want my precision variable "tau.b" to follow a Half-Normal(0, 2.5), will it be correct if I ...
user21510073's user avatar
0 votes
1 answer
410 views

From my layman understanding of frequentist hierarchical models, there is some penalty mechanism built into the likelihood function, that prevents the random effects from overfitting to the data and ...
Will T-E's user avatar
  • 637
0 votes
1 answer
261 views

I'd like to set up half-Cauchy prior for rjags parallel fit. The prior is set in the model as: model <- function(){ ... # rho.b ~ dunif(-0.99, 0.99) tau_h ~ dt(0, 1, 1)T(0,) tau_b ~ dt(0, 1, ...
Chinyako's user avatar
0 votes
1 answer
108 views

I am recently encountering a challenge with BTYD, specifically with Pareto-NBD model. See, from the papers that I read from Faders, there are few assumptions using this model, and the first and ...
Paul Kang's user avatar
0 votes
1 answer
949 views

For a project I'm doing a need to create a LGM from points on a [0, 1]^2 grid. I'd really appreciate any help you all can give me > set.seed(2000) > # Define number of points and locations > ...
user21343597's user avatar
0 votes
0 answers
58 views

I'm trying to run a bird occupancy model using rjags and I'm getting an error saying: Error in node ytb[1,2,9,1:5,1] Node inconsistent with parents. The vector that the error references is a vector of ...
dankdweb's user avatar
0 votes
0 answers
252 views

I have created a model to investigate the effects of covariates on occupancy of different bird species at different points across different properties. However, when I try to run the model using rjags,...
dankdweb's user avatar
0 votes
1 answer
131 views

This is the classic eight school example in Bayesian data analysis by Andrew Gelman. Please see the stan file and R code below. I use a cauchy prior with paratmer A for the hyperparamter tau in the ...
Statisfun's user avatar
  • 143
0 votes
0 answers
237 views

I am creating a Bayesian linear regression model to predict points scored by players in a game using R and JAGS. I have 5 predictors, and the basic linear regression model is of the form: points = ...
JimJam's user avatar
  • 1
-1 votes
1 answer
146 views

I have a dataset with four columns: date, category, product, rate(%). I would like to be able to forecast the rate for every product in my data. The major issue I'm having is that because products ...
import_numpy's user avatar
8 votes
1 answer
4k views

I was trying to run a Bayesian multilevel cumulative model on ordinal data and was reading the documentation of brms online. My model looks something like model <- brm(bf(y ~ Condition + (Condition|...
Hanacl_'s user avatar
  • 83
4 votes
1 answer
3k views

I want to optimize my HPO of my lightgbm model. I used a Bayesian Optimization process to do so. Sadly my algorithm fails to converge. MRE import warnings import pandas as pd import time import numpy ...
mugdi's user avatar
  • 435
0 votes
1 answer
152 views

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 ...
VIX's user avatar
  • 15
1 vote
1 answer
523 views

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 ...
Mason Wirtz's user avatar
0 votes
0 answers
59 views

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 ...
SushiChef's user avatar
  • 653
1 vote
0 answers
671 views

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 ...
Nihaar's user avatar
  • 11
1 vote
0 answers
152 views

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 ...
Phd Student's user avatar
0 votes
1 answer
289 views

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 ...
sean00002's user avatar
0 votes
0 answers
197 views

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 ...
abell78989's user avatar
1 vote
1 answer
177 views

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 ...
r.user.05apr's user avatar
  • 5,478
2 votes
0 answers
365 views

with pm.Model() as model: w = pm.Uniform('w', 0, 1) c = pm.Uniform('c', 0, 5) b = 0.5 s = pm.Deterministic('s', pm.math.exp(-c * (w * d1 + (1-w) * d2))) s_A = np.zeros((8)) s_A = pm....
Harshit Jain's user avatar
0 votes
0 answers
144 views

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 ...
Federico Bindi's user avatar
0 votes
1 answer
466 views

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 ...
Natrix's user avatar
  • 1
0 votes
1 answer
262 views

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" (...
Andrea Ni's user avatar
0 votes
1 answer
467 views

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 ...
JAB's user avatar
  • 3
0 votes
0 answers
215 views

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 ...
Amin Shn's user avatar
  • 618
1 vote
1 answer
233 views

I am brand new to python and pymc3. So forgive me if this question is rather silly. I have a dataset called toy_data.csv: batch_no batch_id points pred1 pred2 12-150 1 1 70.26 10.766 12-150 1 2 65.72 ...
clueless's user avatar
1 vote
0 answers
306 views

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 ...
Ankita Srivastava's user avatar
2 votes
0 answers
116 views

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 ...
hard worker's user avatar
0 votes
1 answer
264 views

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 ...
Andrea Ni's user avatar
1 vote
0 answers
78 views

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 ...
Rohit129's user avatar
1 vote
0 answers
327 views

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 ...
user14615427's user avatar
0 votes
1 answer
67 views

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 ...
Alexis Dussault's user avatar
1 vote
1 answer
412 views

I need to fit a multi-level linear model using PyMC3 and I really like the glm api, because of the conciseness it provides. I would like to ask if and how this can be done. This blog post I found ...
Josef Ondrej's user avatar
2 votes
0 answers
217 views

I'm building up a mixture of models in tensorflow-probability. The joint distribution for one given model is: one_network_prior = tfd.JointDistributionNamed( model=dict( mu_g=tfb.Sigmoid( ...
Louis's user avatar
  • 161