Tagged Questions
3
votes
0answers
59 views
Bayesian analysis with histogram prior. Why draw simulations from the posterior?
This is a beginner’s question on an exercise in Jim Albert’s “Bayesian Computation with R”. Note that while this might be homework, in my case it is not, as I am learning Bayesian methods in R because ...
0
votes
0answers
21 views
How to calculate Hightest Posterior Density (HPD) of coeficients in a simple regression (lm) in R?
I am trying to calculate HPD for the coeficients of regression models fitted with lm or lmrob in R, pretty much in the same way that can be accomplished by the association of mcmcsamp and HPDinterval ...
1
vote
1answer
83 views
Simple cloud computing to run R + JAGS simulations
I want to simulate the frequentist properties of a Bayesian model. So, for example, I might want to fit a Bayesian model 1,000 times to 50 different configurations each of which takes about 10 seconds ...
2
votes
2answers
128 views
Where can i find a good book that teaches MCMC in R?
I am looking for a good book that will teach me MCMC in R , in particular Block Gibbs and Collapsed MCMC. Preferably with R pseudocode supplemented within the book as well.
Does anyone have any ...
0
votes
0answers
52 views
Plotting predictor effects with credible intervals for Bayesian regression
this is probably a pretty basic problem but got stuck with it.
When doing GLMM in R I’ve been using the nice package “effects” from John Fox when I had to display fixed effects of continuous ...
2
votes
1answer
154 views
Bayesian approach and least-squares approach to multivariate regression with structural design
Assume for example a trivariate Gaussian model:
$$
{\boldsymbol Y}_1, \ldots, {\boldsymbol Y}_n \sim_{\text{iid}} {\cal N}_3\left({\boldsymbol \mu}, \Sigma\right) \quad (*)
$$
with ${\boldsymbol \mu} ...
2
votes
1answer
190 views
Logistic Regression - Bayesian Approach - Assessing Classification Precision
I have recently begun to read about bayesian statistics and I am playing around with the R2WinBUGS package. I'm trying to fit a logistic regression to the spam data (that can be found on the webpage ...
1
vote
2answers
86 views
what distributions could help describe my uncertainty about a probabilistic forecast?
I'm dealing with binary events and I've got people guestimating the chance that they occur. I'd like to translate someone else's guestimate into a probability distribution representing my belief ...
5
votes
0answers
112 views
How to calculate the probability of absence for a certain category of artefacts from a sample, given prior knowledge about its abundance?
In archaeology, artefacts are commonly classified in categories according to certain criteria (those may include manufacturing technique, decoration, function, chronology, etc).
I am trying to ...
2
votes
2answers
159 views
Results Difference: Frequentist vs. Bayesian
I fit a lognormal model on some data points using both frequentist and Bayesian (using a non-informative prior) approaches. However, I got different results. Here are my codes and outputs:
...
1
vote
1answer
124 views
Free PDF for Bayes
Is there an good book/pdf similar to Elements of Statistical Learning that's available for free, online that deals with Bayesian statistics, ideally with code for ...
3
votes
2answers
456 views
How would you do Bayesian ANOVA and regression in R?
I have a fairly simple dataset consisting of one independent variable, one dependent variable, and a categorical variable.
I have plenty of experience running frequentist tests like ...
-1
votes
1answer
284 views
Bayesian analysis- Normal distribution with unknown mean and variance
Suppose we have some data points that we believe they follow $N(\mu, \sigma^2)$, and both parameters are unknown . I want to assign conjugate prior distributions on both $\mu$ and $\sigma^2$, and then ...
2
votes
0answers
113 views
Combining posterior distributions
I have 5 different posterior distributions (mcmc samples) which all estimate the same parameter beta. The 5 models are all obtained from 5 independent standardized datasets but estimate the same ...
5
votes
2answers
210 views
What level to use when making inferences on the group mean in a hierarchical Bayesian analysis?
(This question is a bit related to a previous question of mine, but that question was about between subject comparison while this question is specifically about making inferences the group mean.)
...
0
votes
0answers
81 views
Rjags Error: Adaptation incomplete
I am running bivariate probit model under the Bayesian approach. For your convenience I have attached my R codes. I have three random effects, Ur, ...
6
votes
1answer
191 views
Reference on examples with R codes for Bayesian simulation based methods of posterior approximation
I have been trying to learn the Bayesian simulation based methods of posterior approximation. Although the theories are now quite clear but I am seeking for some examples with R codes so that I can ...
0
votes
1answer
288 views
Code Problem in Lognormal Bayesian Model in JAGS/WinBUGS
I have a data set with 853 units. Below, a small sample of it:
y
...
2
votes
2answers
330 views
How to use the SD of a normal sampling distribution to specify the gamma prior for the corresponding precision?
The gamma distribution is a commonly used prior distribution for the precision ($1/sd^2$) of a normal distribution in Bayesian hierarchical modeling. I want to use an informed prior for the variance ...
1
vote
1answer
142 views
How to rank film production companies based on weighted ranks?
IMDB uses a Bayesian estimate to compute its top 250 films. Let's say I know all the variables needed to compute this Bayesian estimate for these films. I also have the production company associated ...
6
votes
3answers
295 views
Winbugs and other MCMC without information for prior distribution
What happens when you don't have an idea of the parameters distribution? What approach should we use?
Most of the time we aim to undersatnd if a certain variable has any influence over the ...
4
votes
2answers
198 views
Bayesian user survey with a credible interval
I work on a couple of library websites and we want to know who are users are so we can make decisions about how to design the site and focus efforts.
These are the classes of users we are interested ...
4
votes
1answer
110 views
Crazy divergence in mixed model - chains start well but go crazy later
I'm trying to compute a mixed model using jags (R2jags) and I got very strange divergence. The chains started so well, very well according to the results expected (also see ...
3
votes
2answers
201 views
How to model data in jags/bugs generated by taking the minimum of two random variables?
I have been thinking of modeling human timing data using jags where the data comes from an experiment where participants tap in time with a very slow metronome. The data is then a number of ...
0
votes
1answer
392 views
jags missing data error
I am estimating a probit in jags on a time series cross sectional data set (country years) with 5 covariates, 4 of which are lagged, so the first observation for each country will be missing on those ...
0
votes
0answers
71 views
Odd results from Bayesian network in R
Related to question here.
I've been trying to teach myself about Network Analysis, and developing DAG charts in R. Let's say that I have the following data.
...
2
votes
1answer
499 views
Prediction with Bayesian networks in R
I've been trying to teach myself about Network Analysis, and I've been able to develop DAG charts in R. However, I've looked through three or four R packages and have seen little in the way to a ...
3
votes
0answers
213 views
Bayesian model averaging in R
I have a logistic model that I've built with the nls function in R. I want to use Bayesian model averaging for variable selection, but I can't find a package for ...
5
votes
1answer
197 views
Confidence intervals when using Bayes' theorem
I'm computing some conditional probabilities, and associated 95% confidence intervals. For many of my cases, I have straightforward counts of x successes out of ...
2
votes
1answer
317 views
Can I get predictions from Winbugs/OpenBUGS?
I am new to WinBUGS and OpenBUGS.
I just fit a model to try an example. I was wondering whether I can get predictions generated by WinBUGS/OpenBUGS. If not, are there any convenient ways available ...
4
votes
1answer
81 views
Inferring multiple ratios and binomial proportions with missing data
I have a number of studies describing families tested for a genetic condition. For each study the following data are described:
$n_p$, number of probands (the proband is the first person in a family ...
3
votes
1answer
132 views
R/Bayes: Why is a wildly different prior not affecting the posterior in bayesglm{arm}?
I am trying to see how different priors affect the posterior estimates in bayesglm{arm}. But no matter what the prior is, why is the posterior hardly changing?
...
9
votes
2answers
396 views
Optimal software package for bayesian analysis
I was wondering which software statistical package do you guys recommend for performing Bayesian Inference.
For example, I know that you can run openBUGS or winBUGS as standalones or you can also ...
5
votes
2answers
1k views
What are R-structure G-structure in a glmm?
I've been using the MCMCglmm package recently. I am confused by what is referred to in the documentation as R-structure and G-structure. These seem to relate to the ...
9
votes
1answer
401 views
Help me understand $p$-values in Bayesian glm
I am trying to run a Bayesian logit on the data here. I am using bayesglm() in the arm package in R. The coding is ...
6
votes
1answer
279 views
Posterior simulations of the variances with the mcmcsamp function
I would like to get the posterior simulations of the variance components of a lmer() model with the mcmcsamp() function. How to do ?
For instance, below is the result of a lmer() fitting :
...
2
votes
1answer
272 views
Calculate R-squared with JAGS and R
I have the following model that I am running in JAGS from R:
...
6
votes
0answers
178 views
Residual diagnostics in MCMC -based regression models
I've recently embarked on fitting regression mixed models in the Bayesian framework, using a MCMC algorithm (function MCMCglmm in R actually).
I believe I have understood how to diagnose convergence ...
0
votes
1answer
372 views
How does the mice imputation function work?
I was wondering if anyone had experience using the mice function, as described in mice: Multivariate Imputation by Chained Equations in R (JSS 2011 45(3))? I have a dataset with a number of variables, ...
1
vote
1answer
121 views
How to specify the unit information prior
Continuing on from this question and this question re BIC and its approximation to the Bayes factor with a unit information prior (Kass & Wasserman, 1995), I'm trying to quantify this relationship ...
5
votes
1answer
538 views
Bayesian Analysis in R/WinBUGS and SAS (Proc MCMC)
I have a Bayesian model here in R/WinBUGS. This data "pumps" has two columns, time and fail. Each observation is a pump and fail[1] tells how many failures there were in time[1]. I want to know how I ...
1
vote
1answer
257 views
Constructing a Bayesian Classifier in R
Does anybody know the way to construct a Bayesian classifier in R for two bi-variate gaussian distributions of which the means and variances are known? The two classes are equi-probable and the ...
8
votes
2answers
2k views
Two R packages for topic modeling, LDA and topicmodels?
It seems that there have two R packages for running Latent Dirichlet Allocation. One is LDA, authored by Jonathan Chang; and another is authored by Bettina Grün and Kurt Hornik. What are the ...
7
votes
2answers
187 views
Comparing a sample distribution to an implied distribution
I have a task that is specific to inventory management that is currently driving me crazy. To summarize the problem: We regularly must monitor inventory settings to ensure that they represent true ...
-1
votes
1answer
771 views
WinBUGS error with zero values in binomial distribution: value of order of binomial <expr> must be greater than zero
It seems that WinBUGS has problems if it has only zero draws from one binomial distribution:
1. case - simple model
...
2
votes
1answer
127 views
Computing 2 independent models at once leads to wrong results in WinBUGS
I wanted to compare how two different (independent) models perform under winbugs, So I created code like:
...
1
vote
0answers
185 views
Bayesian variable selection in R
There are at least three R packages providing some functions to perform a Bayesian selection variable in linear Gaussian regression model: LearnBayes, mombf and BMA.
I would be glad to know some ...
1
vote
1answer
290 views
Bayesian logistic regression with mixed (two level) data
I have two datasets, the first on schools, and the second lists students in each school who have failed in standardized test (emphasis intentional). The first dataset has the structure below (I'm ...
4
votes
0answers
404 views
Document classification with Bayes
I want to build a document classifier in R, using the Naive Bayes approach.
Here are steps, that I've done so far:
I have corpus with about 30 documents from 2 authors (Classes are: "target author" ...
1
vote
0answers
57 views
How to find regions where points are localized in a non-random fashion?
Experiment
Let say I have a black box full of numbered balls and I draw them with replacement - so the propability of drawing one specific number in N draws is described by binomial distribution?
...