Skip to content

Instantly share code, notes, and snippets.

View JasonPekos's full-sized avatar

Jason Pekos JasonPekos

View GitHub Profile
#=
Neal's funnel
https://mc-stan.org/docs/2_29/stan-users-guide/reparameterization.html#ref-papa-et-al:2007
=#
using Turing, StatsPlots, Distributions, DataFrames
gr() # set backend
@model function Neal()
using Turing, HiddenMarkovModels
using PosteriorDB
using Makie, CairoMakie
using LinearAlgebra, LogExpFunctions
using DataFrames
# Get the dataset and validated reference draws from PosteriorDB
pdb = PosteriorDB.database() # Data import
data = PosteriorDB.load(PosteriorDB.dataset(pdb, "hmm_example"))
ref_post = DataFrame(PosteriorDB.load(PosteriorDB.reference_posterior(pdb, "hmm_example-hmm_example")))
[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
HiddenMarkovModels = "84ca31d5-effc-45e0-bfda-5a68cd981f47"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"