Closed mattfidler closed 11 months ago
The error_model
function is on the standard deviation scale. That is, g
in the excerpt of objective_function
:
# Objective function for the Empirical Bayes Estimates
# doi: 10.4196/kjpp.2012.16.2.97
objective_function <- function(y_obs=NULL,f=NULL,g=NULL,
eta=NULL,solve_omega=NULL){
---snip---
U_y <- sum(((y_obs - f)/g)^2 + log(g^2))
# the transpose of a diagonal matrix is itself
U_eta <- eta %*% solve_omega %*% eta
---snip---
OFV <- U_y + U_eta
return(OFV)
}
As for sigma
, nothing is really enforced yet. It may be one or the other; it depends on the way the error_model
function is written. It's probably not the most elegant (e.g. see return(sqrt(g))
in https://levenc.github.io/posologyr/articles/multiple_endpoints.html). I guess there would be some advantages to adopting a convention and sticking to it.
Thanks for the clarification
Is the
error_model
function on the standard deviation scale like monolix or the variance scale like NONMEM?Is
sigma
the variance or standard deviation?