Getting eta values during post-hoc prediction

During post-hoc prediction, I used icoef(model, population, parameter) to get individual parameters but couldn’t get eta values for each individual. Is there way to get eta values for post-hoc prediction? Also, in the output of icoef, what does A column mean? It appears to change when CL or Vc value changes.
Thank you!

I do not know a direct function, but you can calculate eta values using the equation you defined in the @pre block. E.g. your equation for CL is CLi = TVCL * (WT/70)^0.75 * exp(ETACL) you can use the CLis obtained from icoef to reverse engineer the ETACL = ln(CLi) - ln(TVCL) - 0.75 x ln(WT/70)

Not sure about column A

Thank you so much, Rahul! Will try that :slight_smile: .

1 Like

Sorry to bother you, would you mind looking at my equations? I am getting zero for all CL_eta and Vc_eta. I changed @pre block only.

    CL = (tvcl * (weight_kg/70)^0.75 + 0.129 * (heparin_total/173)) * exp(η[1])
    Vc = tvvc * (weight_kg/70) * (baseline/60)^(-0.389) * exp(η[2])
    CL_eta = log(CL) - log(tvcl * (weight_kg/70)^0.75 + 0.129 * (heparin_total/173))
    Vc_eta = log(Vc) - log(tvvc * (weight_kg/70) * (baseline/60)^(-0.389))

I did not mean to tell you to put those equations in the model. Rather, use the CL_eta and Vc_eta equations to create new columns in your output DataFrame.


Is your line of code for icoef written something like this?

icoef_result = reduce(vcat, DataFrame.(icoef(model, pop, params)))

Do you know why you have time = 0.5?

I think the A column appears due to a bug in Pumas. I get it when I use the dosecontrol block.

Hi, Donald

Yes, I used the same code with you to get individual parameters. In my output, I have individual parameters for every time points as input data had and that’s why I have time = 0.5. Good to know it’s a bug although I don’t have dosecontrol block.

Hi Dawoon,
If you want to get etas you can use empirical_bayes(fpm)

help?> empirical_bayes()

  Return sampled random effects or empirical bayes estimates from a fit or model inspection. If the model was estimated with the Pumas.FO likelihood
  approximation methods the empirical bayes estimates will be obtained using the Pumas.LaplaceI approximation. If either Pumas.FOCE or Pumas.LaplaceI was
  used the final empirical bayes estimates will be returned. If Pumas.SAEM was used to fit the empirical bayes estimates are obtained using the
  Pumas.LaplaceI approximation.

Thank you, Ahmed.
It seems that empirical_bayes() can be used only when fitting was performed. But good to know the function for the future use!

So you are simulating and want to know what etas were sampled, is that correctly understood?

Yes, I used predict(model, pop, param) to get posthoc prediction without using simobs. I was able to get eta values by defining the equation in @pre block like the below. (after manipulating my data, it worked) But it would be great to know if there is a function to get eta directly. Thank you!

CL = (tvcl * (weight_kg/70)^0.75 + 0.129 * (heparin_total/173)) * exp(η[1])
Vc = tvvc * (weight_kg/70) * (baseline/60)^(-0.389) * exp(η[2])
CL_eta = log(CL) - log(tvcl * (weight_kg/70)^0.75 + 0.129 * (heparin_total/173))
Vc_eta = log(Vc) - log(tvvc * (weight_kg/70) * (baseline/60)^(-0.389))