**From: Erik Olofsen +31 71 5263344 / 5152719
**

Dear Alison,

I'm writing a PRED routine to do a pharmacodynamic analysis, based on maximum likelihood. To do this with NONMEM IV, nonmem has to be linked with the routines contr.f and ccontr.f. Do they need to be modified if the model, besides ETA's, also contains EPS's?

Best regards,

Erik Olofsen

Department of Anesthesiology

Leiden University Medical Center

The Netherlands

******
**

**From: alison@c255.ucsf.EDU (ABoeckmann)
**

A recent question was sent to nmusers by Erik Olofsen:

From E.Olofsen@anesthesiology.medfac.leidenuniv.nl

I'm writing a PRED routine to do a pharmacodynamic analysis, based on maximum likelihood. To do this with NONMEM IV, nonmem has to be linked with the routines contr.f and ccontr.f. Do they need to be modified if the model, besides ETA's, also contains EPS's?

Eric added in email to me:

My PRED computes the probability of the occurrence of an event. In this case, the likelihood to be maximized is the product of the probabilities, which is different from the "standard" likelihood function that nonmem uses. The subroutines I referred to compute the right likelihood, and the derivatives with respect to the ETA's. I have the feeling that this should also be possible for the EPS's. Is it impossible?

I'm replying to the whole list because this is a question that may be of interest to others.

First, please be aware that with NONMEM V, it is not necessary or possible to use the contr and ccontr routines that Eric speaks of, but instead, there is a new option LIKELIHOOD on the $ESTIMATION record that tells NONMEM that the user is computing a likelihood. NONMEM will take care of the rest. (NONMEM V is due to be released *very* shortly, please do not ask me for an exact date.)

The answer to Eric's question:

With categorical (discontinuous) data, there can be no EPS.

-- Alison Boeckmann

The following is an explanation of this situation, from Lewis Sheiner.

===========

His job is to compute pr(Y|ETA) -- the probability of data Y assuming ETA is known. Practically speaking, the expressions for pr(Y) can involve ETA. Normally, we assume pr(Y|ETA) = Normal(E(Y|ETA),g(Y|eta)*sigma**2), where sigma**2 is the variance of what we call EPS. NONMEM knows how to turn "F" (E(Y|ETA)) and g(Y|ETA) (which we often call W**2) into a probability. When the user takes over this function, there is no EPS. Given the above, EPS usually can be regarded simply as a signal to NONMEM that it should use the Normal density for pr(Y|ETA) ...

The sole purpose of EPS is to signal what probability model the user wants for the data - that is, Y is always a random variable; when EPS is used, the user is saying that it has a normal distribution, while when we use a proportional odds model (as we do for ordered categorical data), Y is still a random variable, but now has a discrete distribution given by the proportional odds model.

In the case of the Normal, NONMEM supplies itself the correct pr(Y) when the user 'signals,' using EPS, that pr(Y) is the normal distribution, and the user also provides (although he may not know it) the 2 parameters required to fukly derfine that Normal distribution, its mean (namely F, or more exactly Y evaluated at EPS=0), and it's variance (SIGMA and whatever the user defines implicitly as W).

When the distribution is discrete, for example, the user must provide the actual probabilty, as NONMEM can no longer figure it out for itself.