# Tagged Questions

35 views

### Posterior Density in R

I'm new to the site, and to Bayesian statistics and was hoping to get some help. I'm currently working through some study exercises and am required to compute the mean and variance of the posterior ...
28 views

### Calculating posterior of difference given posterior of two means

I am using R and MCMCpack to do a Bayesian analysis of some data that I have. I have generated posterior distributions (...
40 views

### Parametrization of Gamma and Negative Binomial in R

I have some Poisson data {${y_1,...,y_n}$} and a Gamma prior, and I wish to construct a predictive posterior distribution. As I understand, if my Gamma hyperparameters are $\alpha$ (the prior number ...
22 views

### Method of Composition to sample from a t density

I got stuck with this, I will appreciate a lot any help. I need to make an R program in order to run this algorithm (in the photo below), with simulated data. The question is to use the method of ...
200 views

### Bayesian analysis of contingency tables: How to describe effect size

I'm working through the examples in Kruschke's Doing Bayesian Data Analysis, specifically the Poisson exponential ANOVA in ch. 22, which he presents as an alternative to frequentist chi-square tests ...
33 views

### Are there R packages to develop spatiotemporal CAR models?

I would like to develop a spatio-temporal model with the North Carolina SIDS data set. I would use a hierachical-bayesian model as in http://www.sciencedirect.com/science/article/pii/S1572312711000098 ...
51 views

### Is this multivariate normal? 2 time series linked by a common process

Summary: Consider a scenario where you observe the inputs ($X$) to and outputs ($Y$) from a process ($B$). If I have a model describing how $X$ evolves over time, and a similar model for $Y$, how do I ...
84 views

### “Bayesian and Frequentist Regression Methods” by Jon Wakefield, a good introductory Bayesian textbook for frequentist economics graduates?

Here's a link to a good question regarding Textbooks on Bayesian statistics from some time ago. People suggested John Kruschke's "Doing Bayesian Data Analysis: A Tutorial Introduction with R and ...
84 views

### How to conditionally run element of JAGS script based on user supplied variable?

Background: I often find that when working with JAGS that I end up with a lot of JAGS scripts as I explore different models. After a while I might settle on a set of models that I'm going to report, ...
66 views

### How to interpret the output of choicemodelr (rhierMnlRwMixture) in R

Can someone help me with this one? My Problem I just started using the R library choicemodelr and succeded in getting some beta values as a solution. But I wonder ...
41 views

### Regarding three R packages for Bayesian analysis [duplicate]

There are several R packages for Bayesian analysis, i.e., RBugs, JAGS,MCMCPack. Are there ...
480 views

### What would a robust Bayesian model for estimating the scale of a roughly normal distribution be?

There exists a number of robust estimators of scale. A notable example is the median absolute deviation which relates to the standard deviation as $\sigma = \mathrm{MAD}\cdot1.4826$. In a Bayesian ...
67 views

### How to draw samples from a Bayesian nonparamatric density estimation? [DPpackage]

I am trying to compute a Kernel Density from high dimensional data ($n > 2$). The underlying (generative) model is assumed unknown. The goal is to draw samples from this estimate, in a sense ...
39 views

### Filled in observations for missing data and weights based on Bayesian technique

when dealing with missing data, filled in observations can be created for missing data and weights can be assigned to these filled in data based on Bayes theorem. I am wondering how to implement this ...
87 views

### Bayesian method to compare correlations

I have read up on Bayesian methods enough now to feel that I would rather use Bayesian analysis over Frequentist, the trouble now is finding the correct tools... I have data from an experiment with ...
104 views

### Ridge Regression in R where coefficients are penalized toward numbers other than zero

Is it possible to penalize coefficients toward a number other than zero in a ridge regression in R? For example, let's say I have dependent variable Y and independent variables X1,X2,X3, and X4. ...
86 views

### Bayesian model averaging for variable selection in R

I am trying to use Bayesian model averaging for variable selection with a large number of variables. In R, the BMS package allows to apply the method, with the option of using MCMC sampler (Metropolis ...
193 views

### How to specify/restrict the sign of coefficients in a GLM or similar model in R

The situation: I'm struggling with a predictive analysis of food sales prices using a generalized linear model. My dataset contains different kinds of food (cheeses, vegetables, meats, spices etc.) ...
151 views

### Using JAGS for bayesian parameter estimation

I am using JAGS in R to construct a probabilistic graph model and estimate the corresponding parameters. The models is described as follows: ...
333 views

### Specify a Zero-inflated (Hurdle) Gamma Model in JAGS/BUGS

I'm trying to use a zero-inflated gamma model (or a gamma 'hurdle' model). The model is a mixture of logistic regression and generalized linear modeling. I can do this analysis in two steps: 1) do a ...
280 views

### How does the beta prior affect the posterior under a binomial likelihood

I have two questions, Question 1: How can I show that the posterior distribution is a beta distribution if the likelihood is binomial and the prior is a beta Question 2: How does choices the prior ...
42 views

### Classification with Bayes Network (deal)

I am working with multiple binary vectors e.g., A,B,C,D,E,F,G,H. I want to find the classification between them. I have tried the following: ...
138 views

### Computing Bayes Factor using “Bayesfactor” package

For the purpose of model selection, I am using the Bayes' factor to compare different combinations of predictors in a linear regression model. I have used the function ...
79 views

### General Statistics Problem: Identifying trends in data

I apologize in advance if this question is overly general. I have a practical solution, which isn't very elegant, and having only a little bit of experience with statistics, am hoping for general ...
87 views

### Problems in scale Bayesian network mode using R

The problem that we have is as follows. We have close to 60 discrete random variables each of which shall take on an average of 5 categorical values. We have developed a Bayesian network ...
88 views

### The effective sample size from WinBUGS results

I am running a Bayesian regression model by WinGUBS via R2WinBUGS package in R. Everything looks fine except for one parameter: ...
56 views

### The X quantile of the difference between two RV's

To first provide some context, I have two boxplots (displaying median, 25th, and 75th percentiles), and I'm wondering what a boxplot of the difference between these two boxplots would look like. The ...
124 views

### Specifying Dirichlet prior in rjags

I am running the below mixing model using the rjags package in R, but I keep getting the error message ...
70 views

### How can one perform a multilevel ANOVA in R?

I want to apply a multilevel analysis of variance, using Bayesian framework (as was proposed by Gelman, 2005). I wish to identify the main factors to be used together in a GAM model. In this case, ...
32 views

### Type 1 error for fixed Bayesian trial

this is my R code for determining the number of successful patients needed for a clinical trial. I am trying to determine the type 1 error for the trial, can somebody give any advice or help. ...
44 views

### Adaptive Bayesian design for power calculation (type 1 error)

Can anybody give me some advice on how to incorporate power calculations into my code. I'm trying show that the operating characteristics of this adaptive Bayesian design for assumed probabilities ...
135 views

### Bayesian Vs MLE regression - getting different results

I've set up a Bayesian regression model in WinBUGS to determine values for the unknown parameters (b1, b2, b3, b4) and intercept value (b0) in a linear regression model. The code is as follows: ...
54 views

### How do I create utility scores from an unequal number of inputs

In my data I have an outcome - "daily satisfaction" - measured on a 1 to 5 scale with 5 representing the respondent was very satisfied with her day and 1 representing the respondent was very ...
544 views

### Expectation maximization on Bayesian networks with latent variables

I am trying to determine parameters in a bayesian network with two latent variables (in blue). Every variable is discrete with 2-4 categories. The latent variables have 3 categories each. I am ...
47 views

### Bayesian belief network for finding combinatory effects of multiple environmental variables on allele frequency

I'm a beginner to Bayesian belief network (BBN). I read a few articles on introduction to BBN. So I know a general idea of BBN. But I'm struggling to construct a graphical network and conditional ...
300 views

### Logistic regression model manipulation

I would like to understand what the following code is doing. The person who wrote the code no longer works here and it is almost completely undocumented. I was asked to investigate it by someone who ...
254 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 ...
43 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 ...
240 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 ...
187 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 ...
402 views