Tag Info

Accepted

How to summarize credible intervals for a medical audience

Quick thoughts: 1) The key issue is what applied question you are trying to answer for your audience, because that determines what information you want from your statistical analysis. In this case, ...
• 2,371
Accepted

Divergent transitions in Stan

A divergent transition in Stan tells you that the region of the posterior distribution around that divergent transition is geometrically difficult to explore. For example here is a quote from the ...
• 1,419

What is the purpose of "transformed variables" in Stan?

Objects declared in the transformed parameters block of a Stan program are: Unknown but are known given the values of the objects in the ...
• 2,008

Why are there recommendations against using Jeffreys or entropy based priors for MCMC samplers?

This is of course a diverse set of people with a range of opinions getting together and writing a wiki. I summarize I know/understand with some commentary: Choosing your prior based on computational ...
• 32.4k
Accepted

How is Simplex related to statistics at all?

If you have a disjoint set of possible events (say three of them) that exhaust all possiblites, the probabilities of each of these events must sum to one: $$p_1 + p_2 + p_3 = 1$$ Being probabilities,...
• 35.7k
Accepted

Low effective sample size but good R-hat is this a problem?

In BDA3 on page 285, they mention that $\hat{R}$ is an estimate of "the factor by which the scale of the current distribution for [a particular univariate parameter] might be reduced if the ...
• 20.7k

In Stan is there a way to use parameter posterior from old analysis as prior in new analysis?

As mentioned by previous answers, Stan, JAGS, and WinBUGS require that priors be specified as mathematical functions. If you've already got an MCMC-represented posterior from a previous analysis, ...
• 2,371
Accepted

• 646
Accepted

Is it appropriate to estimate a random slope without estimating the overall mean slope?

Fitting random slopes with the population-level slope fixed to zero is not out of the question - it's not mathematically or statistically ill-posed - but it's a rather weird model that would require ...
• 43.7k

How to propagate measurement uncertainty in predictors *and* responses for multidimensional, non-parametric regression (and software to do it)?

One of the more interesting choices in R is rstan, where you could code this up yourself in the Stan modeling language (which tends to be amazing in that it can ...
• 32.4k
Accepted

How to plot prior distributions in Stan?

As my previous answer was deleted, here is a more explicit one, with an example using a simple sampling from the prior: ...
• 357
Accepted

Bayesian lighthouse location estimation

This is a famous problem known as Gull's Lighthouse, from an example by Gull in 1988. It has deep implications when taken one additional step in both the social sciences and in physics. You actually ...
• 7,670

What is a good number of treedepth saturations for a fit stan model?

In No-U-Turn-Sampler a maximum tree depth of 10 is a sensible default, but occasionally you have to increase it. In my experience not usually by much. I might try 12 next and I have never had to go ...
• 32.4k

What is a good number of treedepth saturations for a fit stan model?

I'll leave this as an "answer" as I don't have enough reputation to "comment" on this post. This webpage might be of interest to you. The development team describses here, although quite shortly, ...
• 663
Accepted

Impute binary outcome variable for GLM using Stan in R

Each value of y_miss can either be 0 or 1, so you need to marginalize over them with a statement such as ...
• 2,008
Accepted

Understanding Prior in rstanarm

First stan_lm only accepts one type of prior: ...
• 21.2k
Accepted

What do blank cells mean in the output of prior_summary in the brms package?

Possibility 2 is the correct one. Prior specification in brms is hierarchical in the sense that if a global prior for a parameter class is specified, it will be used for all coefficients of that class ...

What is the PDF of a Normal convolved with a Laplace

Let's work it out from first principles, beginning with the hard work of computing a convolution. As an auxiliary calculation, consider the distribution of $W=X+Y$ where $Y$ has an Exponential ...
• 324k

In Stan is there a way to use parameter posterior from old analysis as prior in new analysis?

Most software such as Stan, WingBUGS, SAS etc. requires you to provide an analytic form for the prior instead of MCMC samples. Possible ways around it are to refit the model with all data or to ...
• 32.4k
Accepted

How and When to Use Marginalization in Stan

Stan only samples from continuous parameter spaces, so for something like a finite mixture model, it is necessary to do marginalization to use Stan. On the other hand, if you have a hierarchical model ...
• 1,481

• 7,923

"Unidentified" hierarchical model in brms/stan - where to go from here?

From your model summary I see that you have 4209 obervations in total and 3091 persons. That is, most persons only have 1 corresponding data point and therefore it will be difficult to estimate the ...
Accepted

How to use simulation to check the correctness of my Bayesian model?

It sounds as if you are looking for the procedure described in this paper, which is implemented in the BayesValidate R package and the pp_validate function in the ...
• 2,008