Hi in the online example -> I see you are giving initial values to random effects using Ω. You have:
mymodel = @model begin
@param begin
tvcl ∈ RealDomain(lower=0, init = 1.0)
tvv ∈ RealDomain(lower=0, init = 20)
tvka ∈ RealDomain(lower = 0, init= 1)
Ω ∈ PDiagDomain(init=[0.09,0.09, 0.09])
σ_prop ∈ RealDomain(lower=0,init=0.04)
end
@random begin
η ~ MvNormal(Ω)
end
I am trying to do something similar:
SEABCMAWhy2 = @model begin
@param begin
θ ∈ VectorDomain(3,lower=zeros(3).+0.01,
init=[10, 3, 50], upper=[100, 5, 100])
# Ω ∈ PSDDomain(init=0.04I(3), lower=0.01I(3), upper=0.5I(3))
# Ω ∈ PDiagDomain(init=[0.09,0.09, 0.09], lower=[0.01, 0.01, 0.01], upper=[0.5, 0.5,0.5])
Ω ∈ PSDDomain(3)
σ_prop ∈ RealDomain(init=0.04, lower=0.01, upper=0.2)
end
@random begin
# η ~ MvNormal(Matrix{Float64}(0.04I, 3, 3))
η ~ MvNormal(Ω)
end
The way the code is written here my model run, however if I try to init or constrain Ω using PDiagDomain(init=…) or PSDDomain=(init=…) as in the code abovem whcih I assumed possible from your example. The model gives an error:
From the errors am I safe to assume that random effects are fixed? Or can they be optimized? If so how - clearly upper and lower are not accepted as arguments in PDiagDomain, and they are not accepted in PSDDomain (is init accepted there?)
Thanks,
A
PSDDomain:
MethodError: no method matching PSDDomain(; init=[0.04 0.0 0.0; 0.0 0.04 0.0; 0.0 0.0 0.04], lower=[0.01 0.0 0.0; 0.0 0.01 0.0; 0.0 0.0 0.01], upper=[0.5 0.0 0.0; 0.0 0.5 0.0; 0.0 0.0 0.5])
Closest candidates are:
PSDDomain(; init) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\models\params.jl:59 got unsupported keyword arguments “lower”, “upper”
PSDDomain(!Matched::Int64) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\models\params.jl:60 got unsupported keyword arguments “init”, “lower”, “upper”
PSDDomain(!Matched::T) where T at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\models\params.jl:57 got unsupported keyword arguments “init”, “lower”, “upper”
Stacktrace:
[1] kwerr(::NamedTuple{(:init, :lower, :upper),Tuple{Diagonal{Float64,Array{Float64,1}},Diagonal{Float64,Array{Float64,1}},Diagonal{Float64,Array{Float64,1}}}}, ::Type) at .\error.jl:125
[2] (::getfield(Core, Symbol("#kw#Type")))(::NamedTuple{(:init, :lower, :upper),Tuple{Diagonal{Float64,Array{Float64,1}},Diagonal{Float64,Array{Float64,1}},Diagonal{Float64,Array{Float64,1}}}}, ::Type{PSDDomain}) at .\none:0
[3] top-level scope at In[104]:1
PDiagDomain:
MethodError: no method matching PDiagDomain(; init=[0.09, 0.09, 0.09], lower=[0.01, 0.01, 0.01], upper=[0.5, 0.5, 0.5])
Closest candidates are:
PDiagDomain(; init) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\models\params.jl:74 got unsupported keyword arguments “lower”, “upper”
PDiagDomain(!Matched::Int64) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\models\params.jl:75 got unsupported keyword arguments “init”, “lower”, “upper”
PDiagDomain(!Matched::T) where T at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\models\params.jl:72 got unsupported keyword arguments “init”, “lower”, “upper”
Stacktrace:
[1] kwerr(::NamedTuple{(:init, :lower, :upper),Tuple{Array{Float64,1},Array{Float64,1},Array{Float64,1}}}, ::Type) at .\error.jl:125
[2] (::getfield(Core, Symbol("#kw#Type")))(::NamedTuple{(:init, :lower, :upper),Tuple{Array{Float64,1},Array{Float64,1},Array{Float64,1}}}, ::Type{PDiagDomain}) at .\none:0
[3] top-level scope at In[109]:1