Getting a error fitting the lotka-volterra model

LotkaVolterra = @model begin

@param begin
    tvα ∈ RealDomain(lower=0, init=0.5)
    tvβ ∈ RealDomain(lower=0, init=0.03)
    tvγ ∈ RealDomain(lower=0, init=0.8)
    tvδ ∈ RealDomain(lower=0, init=0.02)
    tvR0 ∈ RealDomain(lower=0, init=40.0)
    tvL0 ∈ RealDomain(lower=0, init=4.0)
    
    σ1 ∈ RealDomain(lower=0,init=0.1)
    σ2 ∈ RealDomain(lower=0,init=0.1)
end


@pre begin
    α = tvα
    β = tvβ
    γ = tvγ
    δ = tvδ
    R0 = tvR0
    L0 = tvL0
end

@init begin
    L = L0 
    R = R0
end

@dynamics begin
    R' =  α*R - β*R*L
    L' = -γ*L + δ*R*L
end



@derived begin
    y₁ := @. R
    Hare ~ @. Normal(y₁,σ1)
    
    y₂ := @. L
    Lynx ~ @. Normal(y₂,σ2)  
end

end

cannot assign a value to variable StatsBase.fit from module Main

Stacktrace:
[1] top-level scope at In[17]:1
[2] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1091
[3] execute_code(::String, ::String) at C:\Users\johnson.rd.1.julia\packages\IJulia\a1SNk\src\execute_request.jl:27
[4] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\johnson.rd.1.julia\packages\IJulia\a1SNk\src\execute_request.jl:86
[5] #invokelatest#1 at .\essentials.jl:710 [inlined]
[6] invokelatest at .\essentials.jl:709 [inlined]
[7] eventloop(::ZMQ.Socket) at C:\Users\johnson.rd.1.julia\packages\IJulia\a1SNk\src\eventloop.jl:8
[8] (::IJulia.var"#15#18")() at .\task.jl:356

Did you load Pumas? You could try to qualify using Pumas.fit() instead of just fit

Yes I loaded it.

using Pumas
using DataFrames
using CSV
using Random
using PumasPlots
using Plots
using StatsPlots
using Pipe
using StatsBase
using PrettyTables
using Random
using LinearAlgebra

fit = Pumas.fit(LotkaVolterra,Pop_Dat,init_param(LotkaVolterra),Pumas.NaivePooled())


     Estimate

tvα 0.48207
tvβ 0.024786
tvγ 0.9146
tvδ 0.027208
tvR0 24.414
tvL0 4.4193
σ1 4.4814
σ2 2.9737

now it works. i wish every solution in life was this easy

can you use simobs(modelfit, samples = 100) in version 1.10.

can you use simobs(modelfit, samples = 100) in version 1.10.

No you will have to wait a few more days for 2.0 to be able to do that.

You can meanwhile do [simobs(modelfit.model, modelfit.data, coef(modelfit)) for i in 1:100]