Dear All,
ERROR: LoadError: DimensionMismatch: matrix is not square.
when trying to run the param block of model block, the above error is appearing. Any strategies to resolve the same?
checked multiple times for error in other related blocks and codes. Its clean.
Thanks.
Please include the model definition. Then we might be able to identify the issue.
PK1 = @model begin
@param begin
tvka ∈ RealDomain(; lower = 0.01)
tvcl ∈ RealDomain(; lower = 0.01)
tvvc ∈ RealDomain(; lower = 0.01)
tvlag ∈ RealDomain(; lower = 0.01)
Ω ∈ PDiagDomain(3)
σ_prop ∈ RealDomain(; lower = 0.01)
end
@random begin
η ~ MvNormal(Ω)
end
@covariates begin
Treatment
end
@pre begin
Ka = tvka * exp(η[1])
CL = tvcl * exp(η[2])
Vc = tvvc * exp(η[3])
end
@dosecontrol begin
lags = (Depot = tvlag)
end
@dynamics begin
Depots1Central1
end
@derived begin
cp = @. Central / Vc
Conc ~ @. Normal(cp, cp * σ_prop)
end
end
Thanks. Could you also share the complete error message including the stack trace?
Also,
Please make sure to include a semicolon or a comma when writing named tuples, i.e. either
lags = (; Depot = tvlag)
or
lags = (Depot = tvlag,)