Simulate population with varying parameters

I would like to simulate a population, by only changing the parameters of the model not a covariate like Wt, but every parameter-

When I do

pop = Population(map(i -> Subject(id=i,evs=regimen),1:10))
obs = simobs(model,pop,param)#,obstimes=0:0.1:120)

and I plot or look at the solution I get overlying plot for the 10 “patients”
I thought the random effects (η ) in the definition of my model


model = @model begin

    @param begin
      θ ∈ VectorDomain(14)
#       Ω ∈ PSDDomain(13)
#       σ_prop ∈ RealDomain(init=0.1)
    end

    @random begin
      η ~ MvNormal(Matrix{Float64}(I, 13, 13))
#       η ~ MvNormal(Ω)
    end

    @pre begin
        CL_adc        = θ[1]
        CLD_adc       = θ[2]*exp(η[1])
        V1_adc        = θ[3]*exp(η[2])
        V2_adc        = θ[4]*exp(η[3])
        Vmax          = θ[5]*exp(η[4])
        Km            = θ[6]*exp(η[5])
        TVmax         = θ[7]*exp(η[6])
        tau           = θ[8]*exp(η[7])
        Kgex          = θ[9]*exp(η[8])
        Kglin         = θ[10]*exp(η[9])
        psi           = θ[11]*exp(η[10])
        KKillmax      = θ[12]*exp(η[11])
        KC50          = θ[13]*exp(η[12])
        hill          = θ[14]*exp(η[13])
    end

will provide diversity for the parameters used for each subject in the population am I understanding this wrong?
All i get is the same solution 10 times.

Thanks

Ale

It looks like you’ve hit a bug that sneaked in in Pumas version 0.4. This morning, we released version 0.5 so please try to upgrade Pumas and rerun your script. Hopefully, it will resolve the issue.

Thanks for the heads up :slight_smile:
Ale

I tried to update Pumas using

]update Pumas #, it did not work-
# I then tried to do 
]add Pumas# , it did not work either
# When I do
]status

shows
[4f2c3c20] Pumas v0.4.0

Is there a beter way to get to v0.5.0?

Thanks,

Ale

One more thing I tried was

]add Pumas @0.5.0

This resulted on the following error
ERROR: Unsatisfiable requirements detected for package DiffEqBase [2b5f629d]:
DiffEqBase [2b5f629d] log:
├─possible versions are: [0.0.1-0.0.4, 0.1.0-0.1.3, 0.2.0, 0.3.0-0.3.2, 0.4.0-0.4.1, 0.5.0, 0.6.0, 0.7.0, 0.8.0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5.12.0, 5.13.0, 5.14.0-5.14.2, 5.15.0, 5.16.0-5.16.5, 5.17.0-5.17.1, 5.18.0, 5.19.0, 5.20.0-5.20.1, 6.0.0, 6.1.0, 6.2.0-6.2.4, 6.3.0-6.3.4] or uninstalled
├─restricted to versions 6.3.1 by an explicit requirement, leaving only versions 6.3.1
└─restricted by compatibility requirements with Pumas [4f2c3c20] to versions: 6.3.4 — no versions left
└─Pumas [4f2c3c20] log:
├─possible versions are: [0.0.7, 0.1.0, 0.2.0, 0.3.1, 0.4.0, 0.5.0] or uninstalled
└─restricted to versions 0.5.0 by an explicit requirement, leaving only versions 0.5.0

Solved by dping gloabal update ie

]update