# Turing with multiple replicates of data

**URL:** <https://discourse.julialang.org/t/turing-with-multiple-replicates-of-data/96340>\
**Category:** New to Julia\
**Tags:** turing\
**Created:** [March 20, 2023, 2:10pm UTC](https://discourse.julialang.org/t/turing-with-multiple-replicates-of-data/96340 "2023-03-20T14:10:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sahil\_Khan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sahil_khan/32/47573_2.png) [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Post date:** [March 20, 2023, 2:10pm UTC](https://discourse.julialang.org/t/turing-with-multiple-replicates-of-data/96340/1 "2023-03-20T14:10:27Z")

</div>

I have a simple model for which I have single data to be used in inference. I’m new to julia. Right now I’m setting up inference using turing.jl .

My Turing model looks like this :

```julia
@model function fit_(data1, prob)
    # Prior distributions.
    α ~ Uniform(0,0.1)
    β ~ Uniform(0,0.1)
 
    

    p = [α, β]

    prob = remake(problem, p=p)

    predicted = solve(prob, Tsit5(), saveat=1)'
    

   
    for i in 1:6
    
      data1[:,i] .~ MvNormal(predicted[:,i], σ^2 * I)

    end  
    
  return nothing
end

model = fit_(z1 , problem)

Do you guys think its a correct approach ? because model is simple and I inferred same model in r but here i'm not getting correct fitting except for first state in my model.

Model: 

function new_model(du, u, p, t)
    x, s, a = u
    α, β = p
    du[1] = - (α * x * s)
    du[2] = β * x * s
    du[3] = 0
end

# true parameters these are random parameters for setting up problem
p = [0.5, 0.2]
# initial state values 
u0 = [20, 3, 2]
problem = ODEProblem(new_model, u0, (0.0,10.0), p) 

```
