This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data { | |
int<lower=0> num_obs; // number of observations | |
real y[num_obs]; // Observed value | |
int time[num_obs]; // time | |
} | |
parameters { | |
//weakly uninformative priors, K on log base 10 scale | |
vector[100] log_K; | |
real<lower=0,upper=100> p0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# full code at | |
# https://github.com/stablemarkets/BayesianTutorials/blob/master/MH_with_caching/ | |
# Author: Arman Oganisian | |
library(microbenchmark) | |
library(LaplacesDemon) | |
library(MASS) | |
source("HelperFunctions.R") # contains mh_vanilla and mh_cache | |
set.seed(10) |