Hi, I was wondering if Pumas and NONMEM calculate OFV in different ways? A model I converted from NONMEM to pumas is identical in every way besides the OFV
hi Pawan -
Welcome to the community!
Pumas reports the loglikelihood
whereas NONMEM reports the -2 x loglikelihood
.
In Pumas you can do metrics_table(model_fit)
where you get a table of metrics which should contain the -2LL
that you can compare with NONMEM.
Hope this helps
Vijay
NONMEM also leaves out the normalization constant of the Gaussian likelihood in their OFV so the exact relationship between the two is
NONMEM_OFV = -2*loglikelihood(_fitted_model) - Pumas.nobs(_fitted_model)*log(2π)
Notice that this only holds true for purely Gaussian models and not, e.g. truncated (M2) or censored (M3) models.
2 Likes
Thank you, @andreasnoack and @vijay. Using the above relationship, I am able to get the same NONMEM OFV .