mcmc Questions

3

Solved

I am trying to learn how to sample truncated distributions. To begin with I decided to try a simple example I found here example I didn't really understand the division by the CDF, therefore I dec...
Binetta asked 21/12, 2017 at 21:34

7

Solved

Is it possible to import a module with some parameter in python ? All I mean by parameter is that there exists a variable in the module which is not initialized in that module, still I am using tha...
Airtoair asked 5/6, 2014 at 7:23

1

Solved

Is there a way to construct a matrix with simplex columns in Stan? The model I want to construct is similar to the following, where I model counts as dirichlet-multinomial: data { int g; int c; ...
Zelazny asked 1/10, 2019 at 20:3

2

Solved

I have some code that samples a posterior distribution using MCMC, specifically Metropolis Hastings. I use scipy to generate random samples: import numpy as np from scipy import stats def get_sam...
Distance asked 19/2, 2019 at 10:12

3

In pymc3 how does one configure a truncated normal prior? In pymc2 it's pretty straightforward (below), but in pymc3 it seems there is no longer a truncated normal distribution available. Pymc2: ...
Poky asked 18/9, 2015 at 3:49

2

Solved

Literature says that the metropolis-hasting algorithm in MCMC is one of the most important algorithms developed last century and is revolutional. Literature also says that it is such development in...
Aromaticity asked 28/12, 2018 at 22:16

1

Solved

Is there a possibility to extract the stan code used for the MCMC sampling in rstanarm? I would like to compare my own parametrisation of a model and prior choices to the one used in rstanarm.
Carma asked 26/11, 2018 at 13:1

2

I am looking for a command similar to ranef() used in nlme, lme4, and brms that will allow me to extract the individual random effects in my MCMCglmm model. In my dataset, I have 40 providers and I...
Frodeen asked 1/12, 2017 at 17:4

2

Solved

I have used JAGS called via rjags to produce the mcmc.list object foldD_samples, which contains trace monitors for a large number of stochastic nodes (>800 nodes). I would now like to use R to com...
Sideward asked 15/11, 2015 at 15:54

2

Solved

I need to generate samples from a mixed distribution 40% samples come from Gaussian(mean=2,sd=8) 20% samples come from Cauchy(location=25,scale=2) 40% samples come from Gaussian(mean = 10, sd=6)...
Bushmaster asked 5/5, 2014 at 19:46

1

Solved

I’m wondering if it’s possible to subdivide 3 chains in JAGS on 5 or 6 cores, for example. Here is my code: library(parallel) # There is no progression bar using parallel jags.parallel(data = ...
Aldos asked 24/5, 2016 at 15:50

0

I am fitting some Bayesian linear mixed models using the MCMCglmm package in R. My data includes predictors that are measured with error. I'd therefore like to build a model that takes this into ac...
Carpogonium asked 24/12, 2015 at 2:46

1

Solved

I have a simple hierarchical model with lots of individuals for which I have small samples from a normal distribution. The means of these distributions also follow a normal distribution. import nu...
Yuriyuria asked 11/11, 2015 at 22:28

1

I have a model that is structured as in this diagram: I have a population of several people (indexed 1...5 in this picture). Population parameters (A and B, but there can be more) determine the ...
Coagulase asked 24/4, 2015 at 20:0

1

Solved

I'm running a Bayesian MCMC probit model, and I'm trying to implement it in parallel. I'm getting confusing results about the performance of my machine when comparing parallel to serial. I don't ha...
Iraqi asked 5/6, 2015 at 14:39

0

I have a list of n observations, each of which is the sum of two Weibull-distributed variables: x[i] = t1[i] + t2[i] t1[i] ~ Weibull(shape1, scale1) t2[i] ~ Weibull(shape2, scale2) My goal is: ...
Omniscient asked 23/4, 2015 at 20:17

1

Solved

I previously implemented the original Bayesian Probabilistic Matrix Factorization (BPMF) model in pymc3. See my previous question for reference, data source, and problem setup. Per the answer to th...
Assentation asked 20/4, 2015 at 22:48

1

Solved

I've implemented the Bayesian Probabilistic Matrix Factorization algorithm using pymc3 in Python. I also implemented it's precursor, Probabilistic Matrix Factorization (PMF). See my previous questi...
Hasid asked 18/4, 2015 at 22:14

1

Solved

I'm modifying an existing model using RJAGS. I'd like to run chains in parallel, and occasionally check the Gelman-Rubin convergence diagnostic to see if I need to keep running. The problem is, if ...
Superphosphate asked 6/4, 2015 at 20:18

1

Solved

I'm trying to create a model using the MCMCglmm package in R. The data are structured as follows, where dyad, focal, other are all random effects, predict1-2 are predictor variables, and response...
Mosley asked 7/10, 2014 at 1:54

1

I'm trying to infer models parameters with PyMC. In particular the observed data is modeled as a sum of two different random variables: a negative binomial and a poisson. In PyMC, an algebraic com...
Winola asked 16/10, 2014 at 6:43

0

I'm new to PyMC and trying to fit my non-homogeneous poisson-process with a piecewise-constant rate function using the maximum a posteriori estimate. My process describes some events during a day....
Franco asked 6/6, 2014 at 14:30

1

Solved

If pymc implements the Metropolis-Hastings algorithm to come up with samples from the posterior density over the parameters of interest, then in order to decide whether to move to the next state in...
Michal asked 23/5, 2013 at 20:20

1

Solved

I'm updating some calculations where I used pymc2 to pymc3 and I'm having some problems with samplers behavior when I have some discrete random variables on my model. As an example, consider the fo...
Sirotek asked 25/1, 2014 at 15:50

8

I am a die hard user of matlab, mostly because this is what I learned first and I have not encountered a problem with a significant enough difference to switch. I come from numerical optimiza...
Lovage asked 11/12, 2010 at 13:46

© 2022 - 2024 — McMap. All rights reserved.