From: Mats Karlsson <*mats.karlsson*>

Date: Tue, 7 May 2013 20:07:04 +0200

Dear Paul,

I don't think you should expect the same ETA for CL under the two mixtures,

but estimate two separate ones as shown below.. Note also that the estimate

of ETA you get in the table file is the one from the most probable mixture

component (whereas the contribution from both mixture components for each

subject contributes to the likelihood). To know which the most probably

mixture is for each subject output EST after stating EST=MIXEST.

I would change the estimation model from

CL=(Z*(CL1 + CLr) + (1.0-Z)*(CL2 + CLr))* EXP(ETA(1))

V2 = THETA(4)*(WT/70)*EXP(ETA(2))

To

CL=Z*(CL1 + CLr)* EXP(ETA(1))

CL=(1.0-Z)*(CL2 + CLr)* EXP(ETA(2))

V2 = THETA(4)*(WT/70)*EXP(ETA(3))

(I'm not sure about your ETA variance structure as it is not entirely

provided, but if you use a covariance between CL and V use also separate

ETAs for V between mixtures)

Best regards,

Mats

Mats Karlsson, PhD

Professor of Pharmacometrics

Dept of Pharmaceutical Biosciences

Faculty of Pharmacy

Uppsala University

Box 591

75124 Uppsala

Phone: +46 18 4714105

Fax + 46 18 4714003

-----Original Message-----

From: owner-nmusers

Behalf Of Paul Hutson

Sent: 07 May 2013 17:32

To: nmusers

Subject: [NMusers] Mixture model simulation

Dear Users:

I note the Jan 26, 2013 response to Nick Holford's query about results from

the use of the $MIX mixture model for simulation. I have created a data set

of N=100 subjects using R to randomly distribute their covariates, both

continuous and categorical. I then ran the following sim with SUBPOP=1 to

generate their corresponding DV values using the following code:

; SIMULATION CTL

$PROBLEM SIM 2COMP

$INPUT ID TIME AMT DV WT HT BMI BSA GFR AGE SEX TOB EVID $DATA

MethodSim1.CSV IGNORE=# $SUBROUTINES ADVAN4 TRANS4 $SIMULATION (12345)

SUBPROBLEMS=1 ONLYSIMULATION

$MIX

NSPOP=2

P(1)=THETA(7)

P(2)=1.0-THETA(7)

$PK

KA=THETA(1)* EXP(ETA(1)); ETA removed in subsequent fitting of data

CL1=THETA(2)*((WT/70)**0.75) ; non-renal clearance of subpop1

CL2=THETA(3)*((WT/70)**0.75); non-renal clearance of subpop1

CLr=(GFR*60/1000)*0.5 ; renal clearance

Z=1

IF(MIXNUM.EQ.2) Z=0

CL=(Z*(CL1 + CLr) + (1.0-Z)*(CL2 + CLr))* EXP(ETA(2))

V2 = THETA(4)*(WT/70)*EXP(ETA(3))

Q = THETA(5)*(WT/70)**0.75

V3 =THETA(6)*(WT/70)

S2=V2

$ERROR

IPRE = F

W1=F

DEL = 0

IF(IPRE.LT.0.001) DEL = 1

IRES = DV-IPRE; NEGATIVE TREND IS OVERESTIMATING IPRED WRT DV

IWRE = IRES/(W1+DEL)

Y=F*(1+ERR(1))

$THETA (2); KAS

$THETA (0.1); CL1

$THETA (5); CL2

$THETA (5); VC

$THETA (12); Q

$THETA (40); VP

$THETA (0.4); FZ

$OMEGA 0 FIXED; IEKA

$OMEGA 0 FIXED; IECL

$OMEGA 0 FIXED; IEV2

$SIGMA 0.03;

$TABLE ID TIME AMT DV WT HT BMI BSA GFR AGE SEX TOB EVID NOPRINT

NOHEADER NOAPPEND FILE=SimData.txt

However, when I come back and attempt to model the simulated data set,

my ETA1 on CL (note difference from the simulation ctl above) still

shows a bimodal distribution. With the incorporation of the $MIXture

model , I would expect a unimodal distribution of ETA_CL entered on 0.

Can the community please advise?

;FITTED CTL

$MIX

NSPOP=2

P(1)=THETA(7)

P(2)=1.0-THETA(7)

$PK

KA=THETA(1)

CL1=THETA(2)*((WT/70)**0.75)

CL2=THETA(3)*((WT/70)**0.75)

RS=THETA(8)

CLr=(GFR*60/1000)*RS

Z=1

IF(MIXNUM.EQ.2) Z=0

CL=((Z*CL1 + CLr) + ((1.0-Z)*CL2 + CLr))*EXP(ETA(1))

V2 = THETA(4)*(WT/70)*EXP(ETA(2)

Q = THETA(5)*(WT/70)**0.75

V3 =THETA(6)*(WT/70)

Thanks

Paul

--

Paul R. Hutson, Pharm.D.

Associate Professor

UW School of Pharmacy

T: 608.263.2496

F: 608.265.5421

Received on Tue May 07 2013 - 14:07:04 EDT

Date: Tue, 7 May 2013 20:07:04 +0200

Dear Paul,

I don't think you should expect the same ETA for CL under the two mixtures,

but estimate two separate ones as shown below.. Note also that the estimate

of ETA you get in the table file is the one from the most probable mixture

component (whereas the contribution from both mixture components for each

subject contributes to the likelihood). To know which the most probably

mixture is for each subject output EST after stating EST=MIXEST.

I would change the estimation model from

CL=(Z*(CL1 + CLr) + (1.0-Z)*(CL2 + CLr))* EXP(ETA(1))

V2 = THETA(4)*(WT/70)*EXP(ETA(2))

To

CL=Z*(CL1 + CLr)* EXP(ETA(1))

CL=(1.0-Z)*(CL2 + CLr)* EXP(ETA(2))

V2 = THETA(4)*(WT/70)*EXP(ETA(3))

(I'm not sure about your ETA variance structure as it is not entirely

provided, but if you use a covariance between CL and V use also separate

ETAs for V between mixtures)

Best regards,

Mats

Mats Karlsson, PhD

Professor of Pharmacometrics

Dept of Pharmaceutical Biosciences

Faculty of Pharmacy

Uppsala University

Box 591

75124 Uppsala

Phone: +46 18 4714105

Fax + 46 18 4714003

-----Original Message-----

From: owner-nmusers

Behalf Of Paul Hutson

Sent: 07 May 2013 17:32

To: nmusers

Subject: [NMusers] Mixture model simulation

Dear Users:

I note the Jan 26, 2013 response to Nick Holford's query about results from

the use of the $MIX mixture model for simulation. I have created a data set

of N=100 subjects using R to randomly distribute their covariates, both

continuous and categorical. I then ran the following sim with SUBPOP=1 to

generate their corresponding DV values using the following code:

; SIMULATION CTL

$PROBLEM SIM 2COMP

$INPUT ID TIME AMT DV WT HT BMI BSA GFR AGE SEX TOB EVID $DATA

MethodSim1.CSV IGNORE=# $SUBROUTINES ADVAN4 TRANS4 $SIMULATION (12345)

SUBPROBLEMS=1 ONLYSIMULATION

$MIX

NSPOP=2

P(1)=THETA(7)

P(2)=1.0-THETA(7)

$PK

KA=THETA(1)* EXP(ETA(1)); ETA removed in subsequent fitting of data

CL1=THETA(2)*((WT/70)**0.75) ; non-renal clearance of subpop1

CL2=THETA(3)*((WT/70)**0.75); non-renal clearance of subpop1

CLr=(GFR*60/1000)*0.5 ; renal clearance

Z=1

IF(MIXNUM.EQ.2) Z=0

CL=(Z*(CL1 + CLr) + (1.0-Z)*(CL2 + CLr))* EXP(ETA(2))

V2 = THETA(4)*(WT/70)*EXP(ETA(3))

Q = THETA(5)*(WT/70)**0.75

V3 =THETA(6)*(WT/70)

S2=V2

$ERROR

IPRE = F

W1=F

DEL = 0

IF(IPRE.LT.0.001) DEL = 1

IRES = DV-IPRE; NEGATIVE TREND IS OVERESTIMATING IPRED WRT DV

IWRE = IRES/(W1+DEL)

Y=F*(1+ERR(1))

$THETA (2); KAS

$THETA (0.1); CL1

$THETA (5); CL2

$THETA (5); VC

$THETA (12); Q

$THETA (40); VP

$THETA (0.4); FZ

$OMEGA 0 FIXED; IEKA

$OMEGA 0 FIXED; IECL

$OMEGA 0 FIXED; IEV2

$SIGMA 0.03;

$TABLE ID TIME AMT DV WT HT BMI BSA GFR AGE SEX TOB EVID NOPRINT

NOHEADER NOAPPEND FILE=SimData.txt

However, when I come back and attempt to model the simulated data set,

my ETA1 on CL (note difference from the simulation ctl above) still

shows a bimodal distribution. With the incorporation of the $MIXture

model , I would expect a unimodal distribution of ETA_CL entered on 0.

Can the community please advise?

;FITTED CTL

$MIX

NSPOP=2

P(1)=THETA(7)

P(2)=1.0-THETA(7)

$PK

KA=THETA(1)

CL1=THETA(2)*((WT/70)**0.75)

CL2=THETA(3)*((WT/70)**0.75)

RS=THETA(8)

CLr=(GFR*60/1000)*RS

Z=1

IF(MIXNUM.EQ.2) Z=0

CL=((Z*CL1 + CLr) + ((1.0-Z)*CL2 + CLr))*EXP(ETA(1))

V2 = THETA(4)*(WT/70)*EXP(ETA(2)

Q = THETA(5)*(WT/70)**0.75

V3 =THETA(6)*(WT/70)

Thanks

Paul

--

Paul R. Hutson, Pharm.D.

Associate Professor

UW School of Pharmacy

T: 608.263.2496

F: 608.265.5421

Received on Tue May 07 2013 - 14:07:04 EDT