Skip to content

Help fitting a simple t distribution #304

Description

@cwoode
using MeasureTheory
using Soss
using SampleChainsDynamicHMC
using Random
import Distributions as Dist

model_test_t = @model T begin
    ν ~ Exponential(10.0)
    y ~ StudentT(ν) |> iid(T)
end;

y_test = rand(Dist.TDist(2.5),1000);

post_test = sample(model_test_t(T=length(y_test))|(y=y_test,), dynamichmc())

Gives the following:

4000-element MultiChain with 4 chains and schema (ν = Float64,)
(ν = 155.0±51.0,)

I can't seem to get this to work.
Also, any hint on getting advancedHMC to work with the current release? dynamichmc tends to abort on any sampling errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions