Hello everyone, I’m new into pumas and have been following all the tutorials I can find. Lately I was trying to fit a very simple model to a dataset I have and I keep getting the same error no matter what:
TaskFailedException: type NamedTuple has not field Out
To give you some context, this is my code:
#Busulfan using CSV using Pumas f=CSV.File("/Users/julianotalvaro/Documents/busulfan.csv", missingstrings=["", "NA", "."]) pk_busulfan_df = DataFrame(f) pk_busulfan = read_pumas(pk_busulfan_df, id=:ID, time=:TIME, amt=:DOSE, observations=[:OUT], covariates=[:AGE, :IBW], evid=:EVID, cmt=:INPUT) pk_1cmp = @model begin @param begin tvke ∈ RealDomain(lower = 0, init = 3.2) tvv ∈ RealDomain(lower = 0, init = 16.4) Ω ∈ PDiagDomain(init = [0.04,0.04]) σ_p ∈ RealDomain(lower = 0.0001, init = 0.2) end @random begin η ~ MvNormal(Ω) end @covariates AGE IBW @pre begin Ke = tvke * exp(η) Vc = tvv * exp(η) end @dynamics begin Central' = -Ke*Central # ' end @derived begin cp := @. Central/Vc Cl := @. Ke*Vc CONC ~ @. Normal(cp, cp*σ_p) end end pkfit_np = fit(pk_1cmp, pk_busulfan, init_param(pk_1cmp),Pumas.NaivePooled(), omegas = (:Ω,)) pkfit_1cmp = fit(pk_1cmp, pk_busulfan, init_param(pk_1cmp), Pumas.FOCEI(), ensemblealg = EnsembleThreads())
Both fits fail with the same error.
Any clue would be very much appreciated, thank you very much.