Questions tagged [stan]

Stan is software for Bayesian estimation using the No-U-Turn sampling (NUTS) algorithm instead of the simpler Gibbs sampling (BUGS).

270 questions
Filter by
Sorted by
Tagged with
1 vote
20 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 ...
• 11
67 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
29 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 ...
• 81
1 vote
51 views

• 34.2k
106 views

Probability that $\beta_A$ > $\beta_B$ using the posterior distributions directly

Suppose a regression coefficient was estimated in sample A (from country A) through a Bayesian linear regression model. The resulting posterior distribution, comprising 10,000 simulations, was ...
• 540
109 views

In Bayesian linear regression Advantages of predictive posterior compared to posterior of model coefficients

In Bayesian linear regression, if we want to get confidence intervals for predictions of a new observation. I was thinking of the following two options. Use the quantiles from samples sampled from ...
• 359
75 views

Generalized Difference in Differences model: time*group interaction contradicts lift

I've constructed a Bayesian Generalized Difference in Differences model. I model an intercept as well as three coefficients; one for treatment_group assignment, one for post-start period, and one for ...
• 3,386
16 views

• 3,605
1 vote
127 views

Posterior distributions --- what's the correct way to see it?

When running models from a bayesian perspective — a regression for example — we get posterior distribution for every parameter/statistic we want, right? I’m wondering whether I should see this this ...
• 561
106 views

Bayesian GLM where the response variable is count classes

Description of data I have to analyze some data where the response variable is the counts of number of insects observed feeding on a bait at many time points. The treatments are three different types ...
• 295
859 views

Marginalizing out discrete response variables in Stan

There's been quite a bit of discussion and confusion about how to marginalize out discrete response variables in Stan (e.g. binary or ordinal data). See, for instance: Impute binary outcome variable ...
• 185
1 vote
126 views

How to write proportionality in a Stan model?

I am having difficulties in writing the following equation into a Stan model.  y_i = \mu(x_i) + \epsilon_i \\ \epsilon_i \sim N(\theta,\sigma^2) \\ \mu(x_i) = a + b x_i \\ p(a) = p(b) \propto 1 \\ \...
• 11
396 views

Does thinning in JAGS/Stan reduce computational time for simulating a chain of a given length?

Question Let's say we have a complicated model whose posterior distribution we want to draw from using MCMC. To do this, we simulate a chain of total length $N=10,000$. For the sake of this question, ...
• 497
25 views

Analysing repeated movement trajectories - is a GP the right approach?

I have some data where I have multiple conditions per subject (humans, in this case), who made repeated movements under these conditions. I'm interested in the variability of these movements. The data ...
• 101
1 vote