[R] Metropolis-within Gibbs sampling

2014-07-12 Thread Baba Bukar
Dear R group, I am trying to update Negative Binomial distribution parameters using MCMC (Metropolis-within Gibbs sampling) method with Gamma prior. Can someone direct me to where i can get some R codes for this? Kind regards Zakir [[alternative HTML version deleted]] _

[R] HMM states simulation

2014-05-22 Thread Baba Bukar
Dear all, I have 100 observations sampled from poisson and negative binomial distributions and i want set a hidden states for the observations, class with zero and one {0,1}. Larger observations to be one and smaller observations to be zero using R. Can someone please help? Kind regards Zakir

[R] Calculating transition probabilties

2014-05-13 Thread Baba Bukar
Dear all, I am new to R and have some problem computing transition probabilities. My problem goes like this; data_set <- c(2,0,45,6,78,3,0,2,6,0,5,8,0,2,8,9,12,212,22,4,1,0,3,5,88,5,69,12,4,0,0,0,0,4,87,6,99,104,22,7) observations greater than, say 3, is considered as useful (denoted as 1) while