Questions tagged [stan]
Stan is software for Bayesian estimation using the No-U-Turn sampling (NUTS) algorithm instead of the simpler Gibbs sampling (BUGS).
275 questions
0 votes
0 answers
52 views
Partially observed multinomial distribution?
I am trying to infer the distribution of plausible group counts ($K$) in a population stratified by $E$ exposures and 1 outcome (all binary); so, we have $N_e = 2^E$ total exposure groups and $N_k = 2 ...
0 votes
0 answers
41 views
Wide intervals and oddly-shaped posterior densities of mixture‐model weights and means in Stan—should I be concerned?
I’m fitting a mixture model in Stan to strictly positive data. Each component distribution has a mean that can be expressed by some summation of a and b. (a and b are two “factor” parameters shared ...
0 votes
0 answers
51 views
Why it is rare to see paper using hierarchical prior in covariance?
In the hierarchical prior papers, there are many papers using hierarchical prior structure, and they usually focus on the location parameter, such as: $\beta_i \sim MVN(\beta, 1)$ $\beta \sim MVN(0, ...
1 vote
1 answer
113 views
Specifying fixed effect in non linear model using Brms
I try to add a fixed effect in a nonlinear binomial model with brms but I obtain weird result. The model is a kind of logistic model. The fit works fine when the effect is added as random effect but ...
4 votes
1 answer
321 views
What to do when the denominator in a proportion also has uncertainty?
This is related to my previous questions Help using the delta method and Help using the delta method. However this time, the denominator used in the rates has uncertainty. I have two years of data (...
2 votes
0 answers
83 views
Calibration of prediction model
I would be grateful for advice, hints, or reference on a question about predicting population level rates of in-hospital complications in older people. I have routine hospital data and a high-quality ...
3 votes
1 answer
110 views
Calculate marginal effects for random effects model with two crossed random effects
I am trying to get effects marginal of two crossed random effects (using STAN or brms). I understand how to do it for a single random effect following McElreath's book and Kurtz's brms version of the ...
1 vote
0 answers
95 views
Opposite results using Bayesian (STAN) vs Multilevel model (nlme). How is this possible?
My datasets contains the median wages and the cumulative installed wind-capacity for 4000 counties over a period of 20 years. The wages tend to rise over the period and the capacity tends to highly ...
1 vote
0 answers
69 views
Bi-modal MCMC joint posterior when modeling Normal distribution
I am working on a simple model of price as a way to better understand Bayesian statistics and MCMC. Eventually, I will want to add predictor variables to a linear model, but for now I’m just trying to ...
1 vote
0 answers
52 views
What is the difference between hierarchical modeling and setting a (fixed) prior on a parameter?
I was reading through Chapter 11 of Data Analysis using Regression & Multilevel Models, and was confused by a slight variation of a simple hierarchical model posed in the text. Lets say I have a ...
2 votes
0 answers
138 views
Can an outcome variable be used twice in the same model?
When is it appropriate to use the same outcome variable in two likelihoods in the same model framework? Here is a specific example: ...
1 vote
0 answers
60 views
Inconsistent posterior from hierarchical survival model
I asked about this question on Stan forum but no one replied so dual posting here. I'd really appreciate some insight, as I'm completely stuck. I’m trying to do hierarchical survival modeling using ...
1 vote
0 answers
110 views
How could I fit a model of a non-homogeneous Poisson process in STAN? [closed]
I have some data $t_1, t_2, ..., t_n$ where $0 < t_i < T$ for all $t_i$. I assume that this has been generated by an inhomogeneous Poisson process with parameter $\lambda(t)$ defined again for $...
2 votes
1 answer
262 views
Can you specify correlated coefficients in Stan models?
Closest question I could find to mine was this one, which doesn't cover it. Is it possible to specify a correlation between two parameters in a Stan model? Consider a linear regression specified by: $$...
3 votes
1 answer
561 views
Choosing Bayesian Priors [duplicate]
I am fairly new to Bayesian Modeling, however I am experimenting with such framework in order to produce several estimates. The part I am struggling the most with is the selection of prior ...