7
votes
Naive SE vs Time Series SE: which statistics should I report after Bayesian estimation?
These are measures of the computational MCMC error for the estimation of the posterior expected value of a parameter. One way of interpreting them is by comparing this MCMC error with the Standard ...
6
votes
Example where the posterior from Jags and Stan are really different and have real impacts on decisions using the model
Whenever I want to get started with understanding a new statistical topic, I start by reading articles about it. In this case, I'd start with Carpenter et al. "Stan: A Probabilistic Programming ...
5
votes
Combining posterior distributions
Unfortunately, you cannot combine posterior chains in that way. From your description, what you have are independent draws from MCMC chains for the following posterior distributions:
$$p(\beta|\...
5
votes
Is it make sense to set the vague prior when your data size is small?
The use of vague or informative prior depends on the amount of knowledge that you have for the parameters that you want to assign the prior.
I consider the following cases:
No experts information and ...
4
votes
How to implement credible 95% interval for median odds ratio using JAGS?
I don't know if this is a solution for you, but since the lme4 glmer function can provide random intercept posterior median estimates and their conditional variance - and under the assumption of ...
4
votes
Accepted
"Mixed effect" ANOVA in R with JAGS/BUGS
In order to include a random effect (and potentially other fixed effects) you need to format your data in long (rather than wide) format, and use nested indexing with separate vectors as indicator ...
4
votes
Accepted
Mixture of Normal and Exponential distributions with unkown weights and parameters using JAGS
Your posteriors look suspiciously like your priors, which usually indicates that your model is not being fit to data. My best guess is that you have not correctly included the vector "Ones" with your ...
4
votes
How do I specify a Bayesian Beta binomial model, with predictor variables, for R2jags?
It is not really a "how to code it in JAGS" problem, but it is about defining the appropriate model for your data. If you want to include predictor variables for your data, this means you need a ...
4
votes
Accepted
rjags mixture model for a combination of normal and gamma distributions
It is relatively easy to implement a mixture model where the different distributions have the same parametric family - the dnormmix distribution in JAGS does this using an inbuilt distribution for a ...
4
votes
R alternatives to JAGS/BUGS
Probably the most powerful Bayesian package presently available in R is the RStan package (which has a whole website here). ...
4
votes
Estimating positive and negative predictive value without knowing the prevalence
I don't use RJags so I can't confirm your code but I would say 'yes' your idea makes sense with three caveats:
First, (intuitively) your likelihood contains little-to-no information on the prevalence ...
4
votes
Example where the posterior from Jags and Stan are really different and have real impacts on decisions using the model
In a recent paper with Carlos Cinelli, "Causally sound priors for binary experiments," we demonstrate a simple 3-parameter model for which exact posterior sampling is possible and yet Stan ...
4
votes
Accepted
influence of bayesian priors: rjags and categorical variables
If you set as a prior for the ID coefficients a uniform distribution between -5 and 5, this means that these coefficients are assumed to be in the interval $[-5,5]$, other values are impossible. These ...
3
votes
Fitting regression spline
It somewhat depends on what sort of a spline you want, but there is a Stan case study on splines here. The essence of your Stan program would be something like:
...
3
votes
Bayesian approach systematically overestimates sigma (SD)
I haven't checked everything in your zip file, but the problem seemed to be simple enough based on the JAGS model you have posted. The discrepancy between sd and JAGS output is due to sensitivity to ...
3
votes
What is the distribution of the ratio of two normals?
What is the distribution of the ratio of two normals?
A related question is A/B testing ratio of sums The following is from a part of an answer to that question.
(You state that both variables are ...
3
votes
Appropriate GLM when response variable is proportion, but not binomial
Before venturing into the territory of GLMs it might be worth fitting a regression model on an appropriately transformed version of the response variable. If we let $0<Y_i<1$ be the area-...
3
votes
Accepted
Bayesian autoregressive model with second peak at 1 in posterior distirbution of AR parameter
The peak can be eliminated by using a different prior for $\mu$. The simplest way to implement the new prior is to change the parameterization. Currently, you have
\begin{equation}
y_{t+1} = (1-\rho)\,...
3
votes
Accepted
DIC, WAIC in JAGS
There is more than 1 definition of DIC and WAIC. Celeux et al. (2006) provide 8 variants of DIC; Gelman and Vehtari (2013) provide 2 definitions of WAIC. Other definitions exist too.
The first three ...
3
votes
Accepted
Bayesian p-value in wrong direction using step function in JAGS / BUGS
The so-called 'Bayesian p-value' does not have the same interpretation as a true p-value: remember that you do not have a formal hypothesis test so there is no real concept of a 'probability of the ...
3
votes
Accepted
3
votes
Is it correct to use the posterior distribution from a Bayesian model in other analysis?
You could, but keep in mind that the errors would propagate, so each new model you stack adds to the uncertainty of the end result. But why would you do that? Your description lacks details, but it ...
2
votes
Accepted
Jags Implementation of Multivariate Response Probit Model
Except if I'm mistaken the problem comes about by the fact that for JAGS Y_s has no initial values. By adding to your ...
2
votes
Bayesian variable selection -- does it really work?
If you used log returns, then you made a slightly biasing error but if you used future value divided by present value then your likelihood is wrong. Actually, your likelihood is wrong in either case. ...
2
votes
rjags does not seem to use initial values specified
rjags uses inital value. Your theta merely have fallen from 150 to about 5 for only one iteration (from 0 to 1). The main causes are the model and eta's inital value.
...
2
votes
Accepted
Winbugs beta distribution
Beta is a distribution bounded in $[0, 1]$, or $(0, 1)$, depending on it's definition. Notice however that since it is continuous, probability of seeing exact $0$ or $1$ is zero. Moreover, log-...
2
votes
Accepted
Calculating the minimum value of a higest density interval from a posterior paramter estimate
The short answer is that these would (usually) be calculating different things - see the following graph which shows highest posterior density interval (using coda for convenience) in blue and a ...
2
votes
Accepted
Parameters not in the credible interval interpretation in Bayesian model
The OP's question about splines can be generalized as a question about model selection, or re-instantiated in multiple regression where it's called the question of variable selection. In multiple ...
2
votes
How do I deal with imperfect detection of a covariate in Bayesian Binomial Regression?
My answer is intended to suggest a way to think about the problem. You may be able to adapt my formulation to your specific problem and your specific software.
Begin with a model with observed ...
2
votes
Accepted
Convergence issue dirichlet model JAGS, implemented in R
From Martyn Plummer, posted on the JAGS discussion board:
When you see this phenomenon - poor mixing but good predictions of observable quantities - it means your model is unidentifiable. This is a ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
jags × 295bayesian × 166
r × 102
bugs × 66
markov-chain-montecarlo × 53
hierarchical-bayesian × 39
stan × 25
prior × 18
regression × 15
multilevel-analysis × 15
mixed-model × 11
posterior × 10
distributions × 9
gibbs × 9
time-series × 7
logistic × 7
beta-distribution × 7
predictive-models × 6
modeling × 5
poisson-distribution × 5
multinomial-distribution × 5
zero-inflation × 5
state-space-models × 5
dirichlet-distribution × 5
pymc × 5