Jump to content


Photo

Interoccasion Variability


  • Please log in to reply
21 replies to this topic

#1 Lance Wollenberg

Lance Wollenberg

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 05 June 2013 - 10:20 PM

I am curious if any members of the extranet community have successfully implemented modeling interoccasion variability of a parameter using PHX NLME. If so could you share a code snippet?

 

Thanks!

Lance



#2 serge guzy

serge guzy

    Advanced Member

  • Members
  • PipPipPip
  • 485 posts

Posted 06 June 2013 - 03:50 AM

Dear Lance

Suppose you have in your data set a column called occ where the different occasions are specified. For the meantime, let us use the real times at which the occasions occurred (no time reset).

A simple model where ke changed from occasion to occasion is shown below

 

look at stparm(Ke...you will see the use of oc==I which equal 1 if occ=I and 0 otherwise. This will generate around the between subject random effect a sample from a normal distribution with mean 0 and variance defined for the inter-occasion (see later on in this explanation).

 

The next step is to insure the variance interoccasion are the same at each occasion.

 

This is through the code below

 

ranef(diag(nKeocc_1) = c(0.2), same(nKeocc_2), same(nKeocc_3), same(nKeocc_4), same(nKeocc_5), same(nKeocc_6), same(nKeocc_7))

 

it means the random effects for ke have no correlation (diag), initial variance is 0.2 for the first occasion and the same for all others. This will give you one variance at the end.

 

Now all this can be done using the current interface.

 

You just define occ as a covariate and then click on covar type and select occasional. you then define all the occasion names(arbitrary) and the values (from the data set). Then in parameter/structural you define what parameter is to be defined having interoccasion. In paramters/random you define the variance for the interoccasion random effect(s) (default is 1).

I am attaching an example ith both the text code and the interface used to built that code. Let me know if you need more help.

Best

Serge

 

test(){

    deriv(A1 = - vm * A1/(A1+Ke))

    dosepoint(A1)

    C = A1

    error(CEps = 1)

    observe(CObs = C + CEps)

        stparm(vm = tvvm * exp(nvm))

 

    stparm(Ke = tvKe * exp(nKe + nKeocc_1*(OCC==1) + nKeocc_2*(OCC==2) + nKeocc_3*(OCC==3) + nKeocc_4*(OCC==4) + nKeocc_5*(OCC==5) + nKeocc_6*(OCC==6) + nKeocc_7*(OCC==7)))

    covariate(OCC)

        fixef(tvvm = c(, 5.8, ))

 

    fixef(tvKe = c(, 1.3, ))

    ranef(diag(nvm, nKe) = c(0.2, 0.9))

    ranef(diag(nKeocc_1) = c(0.2), same(nKeocc_2), same(nKeocc_3), same(nKeocc_4), same(nKeocc_5), same(nKeocc_6), same(nKeocc_7))

} [file name=io_example_official.phxproj size=1327624]http://www.pharsight.com/extranet/media/kunena/attachments/legacy/files/io_example_official.phxproj[/file]

Attached Files



#3 Lance Wollenberg

Lance Wollenberg

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 06 June 2013 - 03:00 PM

Thanks Serge!!!



#4 Teodora

Teodora

    Member

  • Members
  • PipPip
  • 13 posts

Posted 17 August 2013 - 01:31 AM

Hello Sergeguzy,,

I understand the code below, however, I am not sure what is the interpretation of nKe. Could you comment on it?

Why can't you code it like: stparm(Ke = tvKe * exp(nKeocc_1*(OCC==1) + nKeocc_2*(OCC==2) + nKeocc_3*(OCC==3) + nKeocc_4*(OCC==4) + nKeocc_5*(OCC==5) + nKeocc_6*(OCC==6) + nKeocc_7*(OCC==7)))?


Thanks,
Dora

Sergeguzy wrote:

Dear Lance
Suppose you have in your data set a column called occ where the different occasions are specified. For the meantime, let us use the real times at which the occasions occurred (no time reset).
A simple model where ke changed from occasion to occasion is shown below

look at stparm(Ke...you will see the use of oc==I which equal 1 if occ=I and 0 otherwise. This will generate around the between subject random effect a sample from a normal distribution with mean 0 and variance defined for the inter-occasion (see later on in this explanation).

The next step is to insure the variance interoccasion are the same at each occasion.

This is through the code below

ranef(diag(nKeocc_1) = c(0.2), same(nKeocc_2), same(nKeocc_3), same(nKeocc_4), same(nKeocc_5), same(nKeocc_6), same(nKeocc_7))

it means the random effects for ke have no correlation (diag), initial variance is 0.2 for the first occasion and the same for all others. This will give you one variance at the end.

Now all this can be done using the current interface.

You just define occ as a covariate and then click on covar type and select occasional. you then define all the occasion names(arbitrary) and the values (from the data set). Then in parameter/structural you define what parameter is to be defined having interoccasion. In paramters/random you define the variance for the interoccasion random effect(s) (default is 1).
I am attaching an example ith both the text code and the interface used to built that code. Let me know if you need more help.
Best
Serge

test(){
deriv(A1 = - vm * A1/(A1+Ke))
dosepoint(A1)
C = A1
error(CEps = 1)
observe(CObs = C + CEps)
stparm(vm = tvvm * exp(nvm))

stparm(Ke = tvKe * exp(nKe + nKeocc_1*(OCC==1) + nKeocc_2*(OCC==2) + nKeocc_3*(OCC==3) + nKeocc_4*(OCC==4) + nKeocc_5*(OCC==5) + nKeocc_6*(OCC==6) + nKeocc_7*(OCC==7)))
covariate(OCC)
fixef(tvvm = c(, 5.8, ))

fixef(tvKe = c(, 1.3, ))
ranef(diag(nvm, nKe) = c(0.2, 0.9))
ranef(diag(nKeocc_1) = c(0.2), same(nKeocc_2), same(nKeocc_3), same(nKeocc_4), same(nKeocc_5), same(nKeocc_6), same(nKeocc_7))
} [file name=io_example_official.phxproj size=1327624]http://www.pharsight.com/extranet/media/kunena/attachments/legacy/files/io_example_official.phxproj[/file]



#5 Teodora

Teodora

    Member

  • Members
  • PipPip
  • 13 posts

Posted 17 August 2013 - 01:34 AM

Hello Sergeguzy,,

I understand the code below, however, I am not sure what is the interpretation of nKe. Could you comment on it?

Why can't you code it like: stparm(Ke = tvKe * exp(nKeocc_1*(OCC==1) + nKeocc_2*(OCC==2) + nKeocc_3*(OCC==3) + nKeocc_4*(OCC==4) + nKeocc_5*(OCC==5) + nKeocc_6*(OCC==6) + nKeocc_7*(OCC==7)))?


Thanks,
Dora

Sergeguzy wrote:

Dear Lance
Suppose you have in your data set a column called occ where the different occasions are specified. For the meantime, let us use the real times at which the occasions occurred (no time reset).
A simple model where ke changed from occasion to occasion is shown below

look at stparm(Ke...you will see the use of oc==I which equal 1 if occ=I and 0 otherwise. This will generate around the between subject random effect a sample from a normal distribution with mean 0 and variance defined for the inter-occasion (see later on in this explanation).

The next step is to insure the variance interoccasion are the same at each occasion.

This is through the code below

ranef(diag(nKeocc_1) = c(0.2), same(nKeocc_2), same(nKeocc_3), same(nKeocc_4), same(nKeocc_5), same(nKeocc_6), same(nKeocc_7))

it means the random effects for ke have no correlation (diag), initial variance is 0.2 for the first occasion and the same for all others. This will give you one variance at the end.

Now all this can be done using the current interface.

You just define occ as a covariate and then click on covar type and select occasional. you then define all the occasion names(arbitrary) and the values (from the data set). Then in parameter/structural you define what parameter is to be defined having interoccasion. In paramters/random you define the variance for the interoccasion random effect(s) (default is 1).
I am attaching an example ith both the text code and the interface used to built that code. Let me know if you need more help.
Best
Serge

test(){
deriv(A1 = - vm * A1/(A1+Ke))
dosepoint(A1)
C = A1
error(CEps = 1)
observe(CObs = C + CEps)
stparm(vm = tvvm * exp(nvm))

stparm(Ke = tvKe * exp(nKe + nKeocc_1*(OCC==1) + nKeocc_2*(OCC==2) + nKeocc_3*(OCC==3) + nKeocc_4*(OCC==4) + nKeocc_5*(OCC==5) + nKeocc_6*(OCC==6) + nKeocc_7*(OCC==7)))
covariate(OCC)
fixef(tvvm = c(, 5.8, ))

fixef(tvKe = c(, 1.3, ))
ranef(diag(nvm, nKe) = c(0.2, 0.9))
ranef(diag(nKeocc_1) = c(0.2), same(nKeocc_2), same(nKeocc_3), same(nKeocc_4), same(nKeocc_5), same(nKeocc_6), same(nKeocc_7))
} [file name=io_example_official.phxproj size=1327624]http://www.pharsight.com/extranet/media/kunena/attachments/legacy/files/io_example_official.phxproj[/file]



#6 serge guzy

serge guzy

    Advanced Member

  • Members
  • PipPipPip
  • 485 posts

Posted 17 August 2013 - 01:57 AM

Dear user

In the plane sorry for thpos. Nke referrs to the between subject random effect around it you have interoccasion random effect. It means that ke expnke referrs to an estimate of the average ke for a specific patient and you have then random variability at each occasion around it (the other terms)

BEST

SERGE



#7 Teodora

Teodora

    Member

  • Members
  • PipPip
  • 13 posts

Posted 17 August 2013 - 03:30 AM

Got it, Thanks!

Dora



#8 Elliot Offman

Elliot Offman

    Advanced Member

  • Members
  • PipPipPip
  • 101 posts

Posted 25 February 2014 - 05:45 PM

is it possible (or logical) that you can have a an interoccassion variability on just the parameter estimate without a random effecT?

so in the above example you had

ke=tvke *exp(nke+ nkeocc....

is it logical (that if a random effect cannot be justifed on the ke but an IOV can?

so

ke=tvke *exp(nkeocc....) within the nke?

 

 

thanks

elliot



#9 serge guzy

serge guzy

    Advanced Member

  • Members
  • PipPipPip
  • 485 posts

Posted 25 February 2014 - 07:52 PM

Dear Elliot

I do not see any reason why not. It would be the case of a very homogeneous population with individual random fluctuations for some of the model parameters.

did you try?

Best

serge



#10 serge guzy

serge guzy

    Advanced Member

  • Members
  • PipPipPip
  • 485 posts

Posted 25 February 2014 - 08:47 PM

Dear Elliott Here is an example attached that shows that feature. Only io variability while no BSV. NLME can handle that easily. Let me know if it is what you referred to. best Serge [file name=io_no_bsv_official_release.phxproj size=1245150]http://www.pharsight.com/extranet/media/kunena/attachments/legacy/files/io_no_bsv_official_release.phxproj[/file]

Attached Files


Edited by Simon Davis, 16 August 2021 - 10:06 AM.


#11 Elliot Offman

Elliot Offman

    Advanced Member

  • Members
  • PipPipPip
  • 101 posts

Posted 26 February 2014 - 03:17 AM

yes Serge, this was what I was asking about.

I have 3 (perhaps naive) questions

 

(1) how does one interpret the variance estimates for say nVx1, nVx2 etc... in terms of the values reported in the omega matrix. there isn't simply one estimate for inter-occassion variability on the PK parameter, so I'm not sure how to interpret this...although the values all seem to be the same for x1, x2 and x3...I'm assuming because ther was a ranef statement that stated they should be the same as x1

    ranef(diag(nVx1,nClx1) = c(1,1), same(nVx2,nClx2), same(nVx3,nClx3))

so for reporting purposes can we stated then that the IOV on say V is equal to the variance stated in the omega matrix?

 

(2) if in your example you wanted to compare variability in the first occassion to the subsequent occassions is that possible?

 

(3) lastly, in your example, did you use a reset column because you had the same subject received the same dose on different occassions with the same post-dose timepoints?

what would have occurred if you only included occassion without the reset?

 

thanks

Elliot



#12 serge guzy

serge guzy

    Advanced Member

  • Members
  • PipPipPip
  • 485 posts

Posted 26 February 2014 - 05:42 AM

Dear Elliot (1) how does one interpret the variance estimates for say nVx1, nVx2 etc... in terms of the values reported in the omega matrix. there isn't simply one estimate for inter-occassion variability on the PK parameter, so I'm not sure how to interpret this...although the values all seem to be the same for x1, x2 and x3...I'm assuming because ther was a ranef statement that stated they should be the same as x1 ranef(diag(nVx1,nClx1) = c(1,1), same(nVx2,nClx2), same(nVx3,nClx3)) so for reporting purposes can we stated then that the IOV on say V is equal to the variance stated in the omega matrix? By default the interface assumes all variances across the different occasions the same for the same model parameter. Then for reporting purpose, the io variance for V is the one showing up in the omega matrix as nVx1 and is the same for nVx2 and nVx3. (2) if in your example you wanted to compare variability in the first occassion to the subsequent occassions is that possible? it is possible but you then need to model differently. Just do not sue the omega same statement. I am attaching an example that show with and without the omega statement what you get as output. Usually, we use omega same because there is not enough information to estimate all separate io variances. (3) lastly, in your example, did you use a reset column because you had the same subject received the same dose on different occassions with the same post-dose timepoints? what would have occurred if you only included occassion without the reset? Ok, here there is a lot to remember. In real trials, the different occasions are linked to patients coming n times (n occasions) where each time they got the drug and blood samples are collected. Therefore occasion 1 can be on week 1 and occasion 2 can be one month later while they are observed for may be 1 day. Under these circumstances we assume full washout when starting a new occasion and we reset also the time to 0 at each occasion. Full washout is obtained by defining a reset column but this can be done only if you uncheck the sort input option. When you do so, the data are read the way you defined it when importing the data. The order is not changed. When you do that, then you can reset the time to 0 at the beginning of each occasion. Now, if you want to use the real time without reset, then it is assumed that there is the time used relative to the first recording time (0) is real and if for example there is no full washout at the end the first occasion, then at the second occasion if there is a new dose, then the amount at that time is equal to what you had at the end of the first occasion + the additional dose. Then suddenly the model assumes that the PK model parameter changes randomly (io effect). This most likely does not make sense and most likely that io variability is reflected by looking at the same patient at different occasions with large time elapsed between occasions. What you can do is adding an arbitrary large time between occasion to emulate full washout and then you do not need to reset anything. Best Serge [file name=IO_WITH_SAME_AND_NOT_SAME_VARIANCES.phxproj size=4342096]http://www.pharsight.com/extranet/media/kunena/attachments/legacy/files/IO_WITH_SAME_AND_NOT_SAME_VARIANCES.phxproj[/file]

Attached Files


Edited by Simon Davis, 11 December 2015 - 02:23 PM.


#13 Elliot Offman

Elliot Offman

    Advanced Member

  • Members
  • PipPipPip
  • 101 posts

Posted 26 February 2014 - 02:57 PM

ok that does make sense.
can you let me know what your thoughts are on whether I am incorporatnig the IOV into this model appropriately.

I have 3 groups of 3 monkeys each.
group 1 = single IV dose...the CL and V were first modeled only with group 1 and fixed for groups 2 and 3
group 2 = repeat dosing with same dose...7 sequential daily doses
group 3= single SC dose, same dose as in group 2

The best absorption model was a dual/parallel first-order process which represents lymphatic and vascular uptake (AIC was used to discrimiate with single Ka, mixed absorption both with and without lag time)

I am assuming that there should not be a reset column here because group 2 had sequential doses and there was no washout, but please confirm here.

then I added on a IOV to F, because when I ran the VPC without the IOC my single-SC was underpredicting and my repeat SC was overpredicting so I thought maybe that there was a change in F over time...

but when I run the VPC for groups 2 and 3 I get some very odd lower percentiles which aren't there when I do the VPC without the IOC...

which leads me to think I'm not using the IOC function properly in NLME. [file name=cynoIVSC_with_repeat_dosing.phxproj size=3434696]http://www.pharsight.com/extranet/media/kunena/attachments/legacy/files/cynoIVSC_with_repeat_dosing.phxproj[/file]

Attached Files


Edited by Simon Davis, 13 August 2021 - 05:21 PM.


#14 serge guzy

serge guzy

    Advanced Member

  • Members
  • PipPipPip
  • 485 posts

Posted 26 February 2014 - 10:46 PM

Difficult to say.

I think your model is way too much overparametrized. You should try to simplify it.

In addition, with so small number of animals, it is not uncommon to see VPC like that as not enough observed samples to be a nice realization of your random effects 9both between and within).

I was also worry about how you defined bioavailability and need some explanation.

Is F1 the fraction of the dose that goes toward first absorption process? Is Frel the bioavailability, assuming that not all the drug enters the system.

 

Then if so, I thought that F1*Frel for overall fraction (incuding fraction of drug and bioavailability) and (1-F1)*Frel fir the second site was more logical. However it leads to a less good fit than yours.

 

My logic was that suppose that all the drug goes to the system, what I am left is the fraction that enters through the first absorption site and the second, this would be F1 and 1-F1 and then if Frel is not 1, you x both terms by Frel.

The fit was not as good but I wonder what is your logic.

In your model the sum of both bioavailabilities is 1. Then it is not clear to me.

Best

Serge



#15 Elliot Offman

Elliot Offman

    Advanced Member

  • Members
  • PipPipPip
  • 101 posts

Posted 27 February 2014 - 12:29 AM

Serge,

in fact you are correct...I had the bioavailability terms as you desribed in my original project but when I put into a separate project file, I entered the terms incorrectly...so thanks you for pointing that out. and yes, thankfully I had it as such in my main project.

 

on the VPC, I was talking to a colleague and he thought that maybe the fact that i had BLQs in the original dataset could be influencing the VPC and the timepoints which corresponded to BLQ concentrations be excluded for the VPC step.

 

is this something that makes sense to you?

 

of course, normally I would have replaced the BLQs with some value but this was intended to be a quick and dirty analysis which I decided might be good to learn some more about the NLME.

 

 

I hear what you are saying about overparameterizsation but there is a logical structural basis for this model and the fit is best out of several different absorption models.

 

I just want to confirm that the IOC was set up correctly and that a reset would not be appropriate here given there is no washout between doses.

Thanks

Elliot



#16 serge guzy

serge guzy

    Advanced Member

  • Members
  • PipPipPip
  • 485 posts

Posted 27 February 2014 - 12:40 AM

Dear Elliott

Other than the issue you just raised, everything is fine. My point is that when you have small number of animals and large number of parameters and occasions, it is normal that the observed data will not lie within the 90% confidence intervals in a nice fashion. The sample size is too small. In addition, you must look if really from occasion to occasion you see the parameters randomly bouncing around the individual parameter (product of fixed and between subject random effect). You can assess that by looking at the io etas value at each occasion and plot it for each individual. If you see that the eta io are bouncing around 0 randomly then the io assumption is correct. If you see a trend in one direction, for example from occasion to occasion (1 to 7) then eta decreases all the time, then you may have a fixed effect rather than a random effect. This is not an easy task with so many fixed and random effects and few animals.

About the setting except the error you made, all is fine.

best

Serge



#17 Elliot Offman

Elliot Offman

    Advanced Member

  • Members
  • PipPipPip
  • 101 posts

Posted 27 February 2014 - 01:20 AM

Last question...I promise...at least for today

but this is important for me knowing and understanding I'm using the correct worksheets in the model.

 

So, after "repairing" the bioavailability term I wanted to check the VPC of the inclusion of IOC.

 

I want to verify that this approach for producing a VPC is correct:

(1) I added group as a categorical covaritate so that I had a strat identifier in the output

(2) I used the sim/pred check

(3) added a table with variables of C, CObs, Group

 

 

there is a worksheet that is output referred to as PredCheck_SimQ....it says in the Phoenix documentation that this isthe predicted data but the observations only correspond to the times which are in the observed data....

is this the predicted quantiles/percentiles of the simulated data based on the model but only presented for the timepoints corresponding to the observed data?

 

if not what is the point of this worksheet?

 

I know I can produce a simtable but the percentiles seem much wider than the values in the PredCheck_SimQ worksheet.

Thanks again

 

Elliot



#18 Samer Mouksassi

Samer Mouksassi

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 27 February 2014 - 01:29 AM

Hi Elliot,

Tagging team with Serge ! :)

 

With regards to VPC it conducts simulation with the same desing as your original data:

Dose, time points , covariates are all kept as is while the random effects are being sampled from the estimated distributions.

 

The VPC purpose is to compare the observed data to the simulated one.

Usually we compute the quantile from the observed and compare with the quantile of the simulated.

This sheet give you the quantiles observed and simulated so you can plot the results and see if your model is doing fine.

 

What are you trying to do ? you can simulate at new time points but there will be no obseration at these timepoints to compare with.

 

The computation from your simtable or PredCheck_SimQ should match how are you doing the quantiles calculations ? Did you ask for the CI of the predicition intervals ?

 

 

for your previous question about VPC and BLQ. The consensus is that you need to censor the simulated data the same way observed data is censored so if your simulate below the LOQ acknoledge it was below the loq. We typically don't do replacements in POP PK rather we jointly model the observation and the likelihood of BLQ when there is high BLQ numbers.

 

A useful statistic when we have BLQ and we want to do VPC is to compare the percent of BQL observed to the one Simulated.

 

 

Samer



#19 Elliot Offman

Elliot Offman

    Advanced Member

  • Members
  • PipPipPip
  • 101 posts

Posted 27 February 2014 - 01:41 AM

I just want the 5, 50 and 95 percentiles of the simulated data based on the model.....not the observed data quantiles.

 

I want to confirm with 100% certainty that the worksheet in the output Predcheck_SimQ is for the predicted/simulated concentrations at the same timepoints of the observed/binned times.

 

and then can you confirm at the same time what the other worksheet which states PRedcheck_ObsQ_SimQI?

 

I did not check off confidence intervals...I just wanted the simualted quantiles and not the confidence intervales of the quantiles.

 

please confirm.thanks

Elliot



#20 Samer Mouksassi

Samer Mouksassi

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 27 February 2014 - 02:01 AM

Hi Elliot,
I confirm with 100% certainty that the worksheet in the output Predcheck_SimQ is for the simulated concentrations at the same timepoints of the observed/binned times.

For graphical purposes : Predcheck_ObsQ_SimQCI merge observed percentiles and simulated so a plot can be easily done when you ask for SIMQCI ( simulated quantiles confidence intervals)
DV0 should be the one observed (think of it DV O for observed)
DV contains the simulation based precentiles when SIMQCI is checked if not it will be empty

Samer




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users