rjags is a R interface to the JAGS MCMC library for Bayesian graphical models.

learn more… | top users | synonyms

1
vote
0answers
68 views

JAGS prior-based prediction

I'm trying to use rjags to predict what the curve-maximums will be for different groups of incomplete data (one metric x and one metric y). Here is an example of the indata: ...
1
vote
0answers
140 views

Specifying a Normal-Log-Normal Mixture (Skew Normal) in WINBUGS/JAGS

I am an actuary working on a Bayesian loss reserve model using incremental average severity data. Exploratory analysis of the response seems to suggest a skew normal distribution of some sort would be ...
0
votes
1answer
130 views

JAGS array indexing

I have a relatively simple multivariate response problem that seems to causing me problems with array indexing. I've scraped/rewworked the model program down to the bare essentials and hopefully ...
2
votes
0answers
266 views

Help with JAGS model using matrix multiplication and Dirichlet prior

I want to set up a simple JAGS model using matrix multiplication, but I am not sure how to set up the matrices. My overall equation is $c=yx$ where $c$ is a 2x1 matrix defined in R of observed data ...
0
votes
0answers
112 views

Ordered logistic regression in JAGS

I am estimating a simple ordered logistic regression -- in fact, I am expanding this to a multilevel model, but I cannot get the simple ordinal model to converge. The data are three wave panel data, ...
3
votes
2answers
164 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, ...
1
vote
1answer
108 views

JAGS burn-in phase takes ZERO time? [duplicate]

My breath was taken away by this. I tried to run my JAGS model with different number burn-in samples but it still takes the same amout of time!! ...
2
votes
2answers
158 views

How to analyze this data using rjags, or any other way?

There are three groups that received different treatments and then learn a task which they are scored on over the course of 60 sessions. 1) How to choose a function to fit? -The best choice in this ...
3
votes
1answer
440 views

Define Priors for Dirichlet Distribution parameters in JAGS

I'm defining a Multinomial-Dirichlet model in JAGS and want to assign some hyperpriors to the parameters of the Dirichlet distribution. In the WinBugs manual I read that "the parameters of Dirichlet ...
2
votes
1answer
100 views

Autoregressive prior distributions

I have a set of 50 (P) time series' and each one is on a slightly different but should be influenced by the same effects of time. To get the time effects I have ...
3
votes
1answer
642 views

How to specify the Wishart distribution scale matrix

I'm running the below Bayesian mixing model in R using the rjags package, but I am having difficultly in specifying the scale matrix for the Wishart distribution. Essentially, I want Sigma.inv to be a ...
0
votes
0answers
208 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 ...
4
votes
2answers
261 views

Should coin flips be modeled as Bernoulli or binomial draws in RJags?

What is the best way to model coin flips as a hierarchical model? Do you say coin draws are a series of draws from Bernoulli trials or as one draw from a binomial distribution? That is something like ...
0
votes
1answer
63 views

Simulated single value based on multiple chains in RJAGS

I am using RJAGS to simulate the posterior distribution of event that a certain candidate will win the presidential election. I need to find the actual percentage that one of the candidates will have. ...
6
votes
6answers
413 views

R2jags does not remove the burn in part sometimes?

I found out that the function jags() in the R2jags package sometimes does not remove the burn in part even with the option ...
1
vote
0answers
145 views

How to define CDF of bivariate normal distribution in rjags?

I am trying to define my own likelihood in rjags. I want to define the CDF of bivariate normal distribution under rjags. Does anyone know how to define the CDf of bivariate normal in rjags?
2
votes
0answers
716 views

JAGS - problem with taking submatrices

I'm trying to use JAGS for clustering mixtures of multivariate normal distributions. In order to model different covariance structures in each cluster I wanted to use one big (C*D)xD matrix (C - ...
1
vote
2answers
591 views

Compilation error in JAGS

With this data: ...
0
votes
1answer
1k 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
323 views

Generating and analyzing predicted data in JAGS

I am trying to model a logistic regression on data predicted from the results of a previous logistic regression, and am having trouble figuring out how to do it, either in OpenBUGS (BRugs) or JAGS ...
2
votes
0answers
222 views

How to sample from the prior predictive distribution in jags?

Is there an example available of how I can sample from the prior predictive distribution (without data) in jags? I would like to get a better sense for the contribution of the prior in a multilevel ...
9
votes
1answer
800 views

How to generate predictions with rjags?

I've used rjags to run MCMC on a model, specified in the JAGS language. Is there a good way to extract that model and perform predictions with it (using the posterior distributions of my parameters)? ...
2
votes
1answer
2k views

JAGS: unobserved parents and intialization

I have a very simple multinomial logistic regression problem; it's a simplified version of the alligator lake/food/size BUGS example. In my case I have (effectively) lake/food and have just stripped ...
4
votes
1answer
845 views

Bayesian mixed model regression with a between subjects factor

I'm trying to specify a model in JAGS/rjags with one between subjects factor (a, with two levels - Y, N) interacting with one repeated measures continuous variable x plus subject varying slopes and ...
2
votes
1answer
711 views

How to combine step(x) and dbern(p) in JAGS/WinBUGS?

The problem involves trying to characterize the probability: P.f = Pd*Pr{t1 < t2} using jags or WinBUGS. The issue is the last term where both t1 and t2 are ...
1
vote
1answer
228 views

Data and model blocks in JAGS

I am trying to model a function of observed data in JAGS. For example x[i,t]/phi ~ dpois(mu) where x is observed and phi is a parameter in the model. I can't ...
3
votes
1answer
3k views

Ordered logit in JAGS

I am trying to code a simple model with JAGS: ...
2
votes
2answers
541 views

How to run JAGS as fast as possible on Mac?

I am running lots of simulations in JAGS 3.1.0 , which I have compiled from source. I am using a mid-2009 Macbook Pro 13 2.53GHz. Is there any step by step tutorial (from scratch) to compile ATLAS or ...
5
votes
1answer
493 views

How does dinterval() for interval censored data work in JAGS?

I am trying to understand how dinterval() works in JAGS for censored data. I am modeling coarse data where I only have upper and lower bounds for each data point (not the true value). Here is a ...
9
votes
1answer
353 views

MCMC converging to a single value?

I'm trying to fit a hierarchical model using jags, and the rjags package. My outcome variable is y, which is a sequence of bernoulli trials. I have 38 human subjects which are performing under two ...