1,764 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, ...
2
votes
0
answers
99
views
Using qKnowledgeGradient with SaasFullyBayesianSingleTaskGP gives shape mismatch error
I’m trying to use qKnowledgeGradient with a fully Bayesian SAAS (Sparse Axis Aligned Subspace) GP (Gaussian Process) (using SaasFullyBayesianSingleTaskGP) in BoTorch. I'm doing so by writing a new ...
0
votes
0
answers
41
views
Can't install PyCuba
I am unable to use PyCuba, a Python interface for the multidimensional-integration library Cuba, on macOS 15.5. PyMultiNest, which requires PyCuba, is common for Bayesian analysis in the scientific ...
0
votes
0
answers
41
views
Marketing Mix MCMC Model has zero acceptance probability
I am trying to build a Marketing Mix Model using the MCMC implementation from Jax and Black Jax. However when running the model, the sample acceptance probability stays zero, and so there are no ...
1
vote
0
answers
68
views
How can I fix model parametrization for truncated normal distribution in pymc?
I am trying to setup a Bayesian metanalysis of report rates of events. My target estimate is the probability that participants will report X in each study. Every participant provides ~20-40 response, ...
0
votes
1
answer
102
views
Generating the global bayesian fit and local fit for a BLI experiment
I am trying to get the global bayesian fit and local fit for the raw data curve of a Bio-Layer Interferometry (BLI) experiment.
In a BLI experiment, you are first coating the tip of a sensor with ...
1
vote
0
answers
37
views
JAGS model insensitive to data
I am new to JAGS and working on an assignment for a class. I have been trying to get my model to work for the past few hours and something just isn't clicking, and I hope someone here may be able to ...
6
votes
1
answer
284
views
Attaching labels estimating proportion of posterior density within an interval in the ggdist package
I am trying to create a graph plotting distributions of estimated difference between several groups using the ggdist() package in R. The help has been useful but it does not cover anywhere near the ...
2
votes
1
answer
118
views
Integrating a density to find the upper limit to give a certain probability
I have a posterior density function and I am trying to integrate its posterior cumulative distribution function (CDF) such that I want to find the upper bound of integration so that the probability is ...
0
votes
1
answer
55
views
Transition from frequentist logistic regression to Bayesian logistic regression
I have been trying to solve this issue with my code for a few weeks now. Ultimately, I need the ParameterEstimates and OddsRatios tables as output.
When I try to run a frequentist logistic regression ...
0
votes
0
answers
19
views
Scaling Data and Prior in Bayesian while using ADVI
Assume I have data X with normal likelihood and Prior Mean C as Laplace prior as inputs to the model.
For easier convergence, I multiply each observation of Data by C and then use Prior Mean 1. And I ...
0
votes
0
answers
134
views
RuntimeError: 'tuple' object has no attribute 'rank'—custom DenseVariational prior/posterior functions are returning a tuple instead of a tensor
I'm encountering a runtime error when building my Bayesian neural network using tfp.layers.DenseVariational layers on QuantConnect. The error occurs during model construction and states:
pgsql
Copy
...
1
vote
0
answers
101
views
How to estimate a reliable average using bootstrapping with weighted data and measurement uncertainties?
I have a small dataset where each data point (y_i) comes with its own measurement uncertainty (e_i). I want to estimate a reliable average value for (y) while properly considering the uncertainties (...
0
votes
0
answers
52
views
Posterior Predictive Check for Dirichlet-Multinomial Model
Hi Bayesian modellers,
I have this model written in JAGS and I would like to conduct a Posterior Predictive Check.
model{
#loop observations
for (i in 1:numObs){
choice[i]~dcat(theta[catid[i],...
0
votes
1
answer
135
views
Prior distribution for zero-inflated Poisson MCMCglmm?
I'm quite new to Bayesian statistics and not sure how to determine the dimensions of my priors. I am using code from Ben Bolker to run quite a big MCMCglmm with 52 response variables, 7 fixed effects, ...
0
votes
0
answers
64
views
Log linear Bayesian hierarchical model specification in r using JAGS
Am familiar with model specification in this provided example with a Poisson distribution on N.lamb, N.ewe, and normal distribution on y.lamb, and y.ewe. I am interested in exploring this under a log-...
0
votes
0
answers
74
views
How to resolved the import error with scipy when using keras_tuner?
I have download the tensorflow nightly version 2.19.0.dev20241219 (cpu version) and download the version keras_tuner 1.4.7 and keras 3.7.0. I also check my system has the scipy version 1.15.0. ...
0
votes
1
answer
121
views
Using Bayesian priors to penalize curve fitting
I am writing a data reduction program for residual gas analysis mass spectrometry. Specifically, I am trying to model gas consumption via ionization as an exponential decay function:
y = a * exp(-p*t) ...
0
votes
0
answers
29
views
In R2JAGS, how can I code an interaction between two variables within a survival model?
My model has three independent variables: snow (a categorical variable of whether or not snow was present, which is arranged as a matrix by time and individual), sex (also categorical), and HFL (a ...
0
votes
0
answers
63
views
How to reduce the run time of STAN code by vectorizing it and removing redundant loops?
I have this below STAN code for marketing mix modelling application with thousands records and hundreds of media/control variables. Using** pystan version 2.19.1.1**
I am new to stan.
This current ...
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, ...
0
votes
1
answer
45
views
Replicating Bayesian Regression between Stata and R
I have run the following Bayesian logistic regression in Stata. There are two dichotomous variables: exposure and outcome.
bayes, nchains(5) ///
prior({excellent:tx}, normal(0,2)) ///
...
1
vote
0
answers
12
views
Pogit Model: Correlated or Orthogonal Covariates?
I’m working with the following Pogit model:
Y ~ Pois(lambdap)
log(lambda) = alpa_0 + alpha_1x_1 + alpha_2x_2
logit(p) = gamma_0+gamma_1t_1 + gamma_2*t_2
I’m conducting a simulation study with two ...
2
votes
1
answer
178
views
How to calculate correlation between two distribution in Bayesian statistics?
I am trying to calculate the correlation between two distributions (let's call them height and weight). I know how to calculate a simple Pearson correlation using a frequentist approach: calculate the ...
1
vote
1
answer
151
views
Use Bayesian PyMC linear model on out-of-sample data
I am trying to fit a linear model to data using Bayesian inference technique. For this, I thought of using PyMC. Naturally, after training a model, I want to test its performance on new data and that'...
0
votes
1
answer
68
views
How do i compute P(theta < 0.01 | y) in openbugs?
I need to use OpenBUGS to compute the posterior probability of the mean lifetime of a piece of equipment being greater than 100 hours.
Given that the data comes from an exponential distribution with ...
0
votes
1
answer
61
views
Predictions of coupled PyMC linear bayesian models for new inputs
I would like to model two observables, O_2 and O_3 using bayesian linear regression: O_2 ~ m_2 * O_1 + q_2 and O_3 ~ m_3 * O_2 + q_3. I would like to couple them via O_2. I am using the PyMC framework ...
3
votes
0
answers
111
views
Negative estimates with approximate Bayesian computation using the abc package in R
I am currently using Approximate Bayesian Computation to parameterize uncertain parameters of a model to reproduce observed patterns of disease outbreak presence and absence. To do this, I am using ...
0
votes
1
answer
211
views
Bayesian optimization in OpenMDAO?
I have a model built in OpenMDAO that I am interested in trying with Bayesian optimization. I have found some work in this area for older versions of OpenMDAO, but nothing for the current OpenMDAO ...
0
votes
0
answers
70
views
Why does my Bayesian linear regression with survival analysis perform worse than standard linear regression?
Experts in statistics wanted here.
I am working on a Bayesian linear regression function that considers asymmetric uncertainties and censored data (upper/lower limits) in both x and y. The function ...
0
votes
1
answer
91
views
emcee refuses to properly explore function
I have a 1D function that looks like this:
i.e. a pronounced drop towards a stable value around 0. The function is written as:
((1. / np.sqrt(1. + x ** 2)) - (1. / np.sqrt(1. + C ** 2))) ** 2
where ...
2
votes
0
answers
57
views
Inaccurate estimates with approximate Bayesian computation using the abc package in R
I am trying to use approximate Bayesian computation (ABC) to calibrate parameters in order to obtain a model output variable that is close to an observed value in the literature. To do this, I am ...
0
votes
1
answer
79
views
BRMS: on what scale are the estimated coefficients of a model with a log link function?
I am using the brms package to fit a model (brms). However, I am unsure on how to interpret the resulting coefficients/effects. Specifically, on what scale are the coefficients if the link function is ...
1
vote
1
answer
99
views
STAN code: indexing and variable declaration
I’m trying to move from JAGS to STAN but I don’t understand variable declaration and indexes for looping.
I have some data that I want to model in STAN with a beta distribution. The rationale of the ...
3
votes
0
answers
34
views
SMAC with MFFacade returns None
I'm using SMAC (Sequential Model-based Algorithm Configuration) to optimize hyperparameters for training a model (specifically, a PPO agent) using Stable Baselines3. During the training phase, the ...
0
votes
0
answers
47
views
Calculating Marginal Effects for 'endorse' models?
I am attempting to find the marginal effects for each covariate in the model:
endorseFULL <- endorse(Y = Y, data = data_slvk, identical.lambda = FALSE, covariates = TRUE, formula.indiv = formula( ~ ...
0
votes
1
answer
74
views
GPBoost and Bayesian optimization
I am trying to create a parameter grid for a gpboosted model. Currently, I am using the grid tune search method, but I have been reading on Bayesian Optimization in the package rBayesianOptimization. ...
0
votes
0
answers
33
views
How to Fix Issues in R Code for Metropolis-Hastings Algorithm Applied to Gumbel Type II Distribution?
I am trying to implement the Metropolis-Hastings (M-H) algorithm in R to sample from the posterior distribution of a Gumbel Type II distribution. However, I'm encountering issues with my ...
0
votes
1
answer
402
views
PyMC use JAX to compute sample_posterior_predictive with GPU
I'm able to use my GPU to speed up my PyMC model sampling with m.sampling_jax.sample_numpyro_nuts, and it works well in my Linux environment. However, when sampling the posterior_predictive to extend ...
0
votes
1
answer
155
views
How to convert WINBUGS code into JAGS/R code
I am trying to rerun the WinBugs code used in the paper 'A Bayesian Hierarchical Model for Risk Assessment of Methymercury'. I would like to be able to implement the same code but into JAGS (through ...
0
votes
1
answer
38
views
How do I fit a distribution to more than one site at a time in rstan?
There is probably a really easy solution to this, but I’m coming up short. I have code in rstan where I fit a Pareto distribution to data, and I’m looking to find out what the alpha parameter is for ...
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 ...
1
vote
0
answers
109
views
How to present findings from the mcmc_areas() and conditional_effects using r brms and bayesplot packages?
I am fairly new to bayesian statistics but have really fallen in love with what it can do and how it presents findings compared to frequentist statistics especially for categorical or ordinal datasets....
0
votes
0
answers
54
views
Why is my JAGS output starting from 1000 not 0?
I am currently trying to use JAGS to do Bayesian analysis on the LakeHuron dataset on R. I cant seem to understand why when I plot the traceplots my iterations start from 1000 and run to 2000 even ...
1
vote
1
answer
29
views
Simulation: Use of Integrate() in conjunction with custom functions
In attempting to create a simple simulation for psycholinguistics, I have encountered the following error:
> expected_success_rate(170)
> Error in if (height \>= threshold) { : the condition ...
-2
votes
1
answer
115
views
How can be the `$ operator is invalid for atomic vectors` error solved?
I'm trying to perform a CAPM regression analysis with a Bayesian GLM. I have developed the R code below but when I try to fit the model for the posterior predictive checks posterior_intercept <- ...
1
vote
1
answer
716
views
YOLOv8: Optimising for map with confidence and iou in prediction
I'm trying to figure out what the best conf and iou is for the model.pred.
from ultralytics import YOLO
import pandas as pd
import numpy as np
df= pd.DataFrame()
# Load a model
for i in range(1,105):
...
1
vote
1
answer
66
views
Translating WINBUGS model to JAGS model: possible directed cycle
I am practicing Bayesian and trying to translate WINBUGS models into JAGS in R. I have looked the JAGS manual and still haven't been able to work out this one, which gives error - Possible directed ...
0
votes
0
answers
119
views
How to do a Bayesian Repeated Measures ANOVA analysis with missing cells in R?
Suppose I am trying to measure people's Happiness depending on Time of Day (Morning/Afternoon/Evening) and Ice Cream Flavor (Chocolate/Strawberry/Vanilla) through a 1-7 scale. Participants are divided ...
0
votes
0
answers
73
views
How to fit sigmoidal curves and extract x at a specified value of y using Bayesian statistics?
I have a dataset of multiple trees with measurement values between 0 and 1 taken over a multiple days. It is known that when plotted as day (x) and value (y), each tree's measurements form a sigmoidal ...