I am running 2 stage analysis on my PK data.
I have the individual parameter estimates and am now estimating BSV and covariate effects.
Since my CL/F and Vc/F individual parameter estimates show a log normal distribution I am feeding in log transformed individual parameters and am estimating the mean (log form) and variance (proportional to the mean). The other two parameters are not distributed nicely, so I am feeding those in as raw values and then estimating the normal distribution. The issue is that the estimated covariate effects do not make sense.
Here is my model:
model_2stage_wt_cl = @model begin
@param begin
tv_dur ∈ RealDomain(lower=0.0000001, upper=24)
tv_ka ∈ RealDomain(lower=0.0000001, upper =50)
tv_vc_F ∈ RealDomain(lower=0.1)
tv_cl_F ∈ RealDomain(lower=0.1)
# BSV
Ω²_dur ∈ RealDomain(lower = 0.0001)
Ω²_ka ∈ RealDomain(lower = 0.0001)
Ω²_vc_F ∈ RealDomain(lower = 0.0001)
Ω²_cl_F ∈ RealDomain(lower = 0.0001)
# Covariates Effects
Eff_PM_cl ∈ RealDomain()
Eff_IM_cl ∈ RealDomain()
Eff_UM_cl ∈ RealDomain()
# RUV
tv_σ²_add ∈ RealDomain(lower = 0.0001)
tv_σ²_prop ∈ RealDomain(lower = 0.0001)
end
@covariates STUDY DOSE VISIT VISIT_NUM WEIGHT AGE_AT_VISIT OBESE SEX RACE CYP2D6_PHENOTYPE CYP2C19_PHENOTYPE
@pre begin
dur_expec = tv_dur
ka_expec = tv_ka
Eff_2D6_cl = CYP2D6_PHENOTYPE == "PM" ? Eff_PM_cl :
CYP2D6_PHENOTYPE == "IM" ? Eff_IM_cl :
CYP2D6_PHENOTYPE == "UM" ? Eff_UM_cl : 0
vcF_expec = log(tv_vc_F * ((WEIGHT/70)^1.0))
clF_expec = log(tv_cl_F * ((WEIGHT/70)^0.75) * (1+Eff_2D6_cl))
σ²_prop_expec = log(tv_σ²_prop)
end
@derived begin
i_dur ~ @. Normal(dur_expec, sqrt(dur_expec^2 * Ω²_dur))
i_ka ~ @. Normal(ka_expec, sqrt(ka_expec^2 * Ω²_ka))
log_i_vc_F ~ @. Normal(vcF_expec, sqrt(vcF_expec^2 * Ω²_vc_F))
log_i_cl_F ~ @. Normal(clF_expec, sqrt(clF_expec^2 * Ω²_cl_F))
end
end
When I remove the vcF_expec^2 and clF_expec^2 terms from the variance for the log transformed parameters, the covariate estimates make more sense, but if I remove the dur_expec^2 or ka_expec^2 terms for the other parameters, the omegas skyrocket. Is this to do with me already taking the log transform of the mean value? My end goal is to get the individual subject etas from the individual etas and typical values. Is there a better way I am supposed to estimate the covariates in 2 stage?