Hi everyone,

I’m trying to pass an array of data through a model I’ve created using Turing.jl. The model looks like this:

@model howell1(height) = begin

mu ~ Normal(178, 20)

sigma ~ Uniform(0, 50)

[height[i] ~ Normal(mu, sigma) for i = 1:length(height)]

return mu, sigma

end

The data I’m trying to pass to it is in a data frame column. I first tried to pass just the column, but apparently Turing.jl only works with arrays, not data arrays. After converting, the model seems to run, but generates the following error:

[Turing.WARNING]: Numerical error has been found in gradients.

verifygrad(::Array{Float64,1}) at ad.jl:87

which usually repeats during a run. This happens when using HMC(1000, 0.1, 5), Gibbs(1000, PG(10, 2, :mu), HMC(2, 0.1, 5, :sigma)), HMCDA(1000, 0.15, 0.65), and NUTS(1000, 0.65). The argument values I got from the Turing.jl simple Gaussian demo.

Would anyone happen to know what I am doing wrong here?

Thanks.