1
vote
0answers
22 views

Estimating parameters and latent variables in a split Poisson distribution using R and JAGS

I am trying to estimate parameters and latent variables in a split Poisson model that describes observable and unobservable counts in time assuming the split probability is $\pi$. An observable event ...
1
vote
1answer
40 views

multivariate dirichlet for multiple imputation

I dealing with 3 covariates {x1, x2, x3} all three are discrete and contain missing data. ...
7
votes
1answer
152 views

Combining data from different sources

I want to combine data from different sources. Let's say I want to estimate a chemical property (e.g. a partitioning coefficient): I have some empirical data, varying due to measurement error around ...
0
votes
0answers
40 views

recursive feature elemination in R with caret

i work with R caret software package to select the most important features from some set of data. My response is a factor of multiple classes (e.g. nominal ...
0
votes
0answers
46 views

Penalized Bayesian quantile regression with LASSO and adaptive LASSO penalty

I have some questions about penalized Bayesian quantile regression with LASSO and adaptive LASSO penalty: Would you give me a detailed outline for the formula, especially as used in Bayesian ...
0
votes
0answers
93 views

How to interpret log fold change with negative values

I am trying to use the limma package to test some data. The data can have negative values as well as positive values and I'm trying to compare between condition 1 and condition 2. Example: ...
0
votes
0answers
33 views

Joint distribution calculation of 2 variables in R

I'm trying my hands on doing Bayesian analysis. So need some guidance. I have a dataset in the following form: Will each row have a joint distribution value. How do we calculate it in R, what ...
5
votes
2answers
96 views

Fitting a simple JAGS model with RSTAN

I'm trying to fit a simple exponential model for left censored data using RSTAN to replicate something I did in JAGS. The JAGS model is: ...
0
votes
0answers
43 views

How would you validate a random walk model?

I have used a random walk model and Gibbs sampling (more specifically RJAGS) in order to obtain posterior of the state given the observations. In this case the state is the true proportion of the ...
0
votes
0answers
57 views

Using MLE in R stats4

I have been trying to estimate the MLE for my joint posterior. I'm using R and the package stats4. I have 14 parameters and two of them are $\geq 0$, which I did not know how to implement (and I was ...
0
votes
1answer
36 views

Understanding an Implementation of normal conjugate in R

I am reading a code for a Bayesian clustering method. Both prior and the likelihood are normally distributed. If I understood correctly, such cases are called "conjugate priors" My question is about ...
0
votes
1answer
64 views

Computing a Gaussian posterior from a Gaussian prior and likelihood function in R

I'm new to both R and Bayesian statistics, and I have a problem where I have a normally distributed prior that elicits a mean and standard deviation. The introduced likelihood function is also ...
1
vote
0answers
70 views

How does the sim() function in the arm package determine non-informative priors?

The arm package includes the sim() function. On its R help page it states: ...
4
votes
2answers
181 views

simulate dirichlet process in R

I am reading the paper of "Dirichlet Process Mixtures of Generalized Linear Models" authored by L. A. Hannah. If I would like to simulate the following model $$\mathcal{P}\sim ...
1
vote
0answers
45 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 ...
3
votes
1answer
63 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 (...
1
vote
1answer
78 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 ...
0
votes
0answers
35 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 ...
7
votes
2answers
296 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 ...
0
votes
0answers
56 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 ...
1
vote
1answer
54 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 ...
2
votes
1answer
182 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 ...
3
votes
2answers
120 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, ...
0
votes
1answer
162 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 ...
0
votes
0answers
42 views

Regarding three R packages for Bayesian analysis [duplicate]

There are several R packages for Bayesian analysis, i.e., RBugs, JAGS,MCMCPack. Are there ...
18
votes
5answers
539 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 ...
1
vote
1answer
86 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 ...
0
votes
0answers
45 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 ...
2
votes
0answers
99 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 ...
0
votes
2answers
127 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. ...
0
votes
1answer
134 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 ...
2
votes
2answers
359 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.) ...
2
votes
0answers
241 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: ...
3
votes
1answer
637 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 ...
4
votes
1answer
502 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 ...
0
votes
0answers
51 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: ...
0
votes
1answer
232 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 ...
0
votes
0answers
109 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 ...
1
vote
1answer
129 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 ...
1
vote
0answers
111 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: ...
3
votes
1answer
65 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 ...
0
votes
0answers
163 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 ...
2
votes
3answers
148 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: ...
2
votes
1answer
57 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 ...
5
votes
2answers
685 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 ...
1
vote
0answers
58 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 ...
11
votes
1answer
348 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 ...
4
votes
0answers
322 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 ...
1
vote
1answer
279 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
205 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 ...