NONMEM Users Network Archive

Hosted by Cognigen

Re: [NMusers] $MIX variable from $PK

From: Alison Boeckmann <alisonboeckmann_at_fastmail.fm>
Date: Wed, 09 Sep 2015 10:20:42 -0700

Emmanuel and others,

$MIX may not use variables defined in $PK.

The help item for $MIX states:

The $MIX record is used to describe the mixture probabilities
of a mixture model. It is evaluated with individual records.

This means that $MIX is evaluated once per individual record,
*before* the $PK statements are evaluated.

The help item states that $MIX may use THETA's and also:

  Data items listed in DATA option of $CONTR record
     E.g., assume that the following records appear in the control
     stream prior to the $MIX block:
     $INPUT ... STDY ...
     $CONTR DATA=(STDY)
     Then STDY may be used on the right in $MIX. STDY and STDY(1) both
     refer to the value of STDY on the first observation record of the
     individual record. STDY(i) refers to the value of STDY on the i-
     th. observation record of the individual record. TEMPLT may be
     used.

Please note that ONLY observation records are in the DATA array.
Suppose the data file is structured like CONTROL5's THEOPP so that
covariate STDY is recorded only on the first (dose) record. STDY
is 0 with all observation event records and is always 0 in the
records made available to $MIX. There is no way to use STDY in
$MIX. It is necessary to modify the data file so that STDY is
recorded on every event record. This can be done during the NONMEM
run using the original data file and code like this:

$INFN
IF (ICALL.EQ.1) THEN
DOWHILE(DATA)
IF (STDY>0) STUDY=STDY
STDY=STUDY
ENDDO
ENDIF
...
$CONTR DATA=(STDY)

The value of STDY will be the one recorded on the first observation
event.


On Tue, Sep 1, 2015, at 02:29 PM, Emmanuel Chigutsa wrote:
> Dear NMusers,
>
> I am trying to get NONMEM to use a variable defined in $PK to be read
> in $MIX. Example partial code is shown below: $PK TVPROMIX=XX =
; XX
> is not only a paramter to estimate, but is an equation $MIX
>
PROMIX=TVPROMIX
>
NSPOP=2
>
P(1) = PROMIX
>
P(2) = 1 - PROMIX
>
> The error is as follows: AN ERROR WAS FOUND ON LINE 144 AT THE
> APPROXIMATE POSITION NOTED: PROMIX=TVPROMIX X THE CHARACTERS IN ERROR
> ARE: TVPROMIX 208 UNDEFINED VARIABLE.
>
> Whilst one would normally write everything of interest in $MIX, a
> problem arises when one wants to test covariates using PsN because the
> SCM only tests items defined in $PK/$PRED. Is there any way to have
> NONMEM read what is defined in $PK into $MIX?
>
> Much thanks,
>
> Mannie
--
  Alison Boeckmann
  alisonboeckmann_at_fastmail.fm

Received on Wed Sep 09 2015 - 13:20:42 EDT

The NONMEM Users Network is maintained by ICON plc. Requests to subscribe to the network should be sent to: nmusers-request@iconplc.com. Once subscribed, you may contribute to the discussion by emailing: nmusers@globomaxnm.com.