Jump to content


Photo

Tlag estimation individually


  • Please log in to reply
4 replies to this topic

#1 Davidq8

Davidq8

    Advanced Member

  • Members
  • PipPipPip
  • 57 posts

Posted 25 May 2023 - 12:49 AM

Hi,

I'm working on a PopPk model with a dataset that includes plasma samples from two different trials with different study designs. Plasma sampling was taken extensively before cmax in one study, but only three times before cmax in the other. I discovered that including Tlag improved model fit, and that including the impact of study design as a categorical covariate on Tlag had a significant impact, and that including it in the final model reduced OFV. I'm wondering if it's possible to have the model estimate Tlag for each study individually as two parameters (Tlag s1, Tlag s2) rather than including the impact as a covariate.

Thanks!



#2 smouksassi1

smouksassi1

    Advanced Member

  • Members
  • PipPipPip
  • 231 posts
  • LocationMontreal

Posted 25 May 2023 - 10:21 AM

you can use study as a covaraite and then estimate a different Tlag 

e.g.  tlag = tvlag1 * study ==1 + tvlag2*study==2

this will effectively give you two lags one for each study

 

e.g tvlag1 = 2 h tvlag2 = 2.5 h

 

this will be eactly the same as

 

tlag= tvlag1 *(1+studyeffect*study==2)

wherre tvlag1 = 2 and study effect  = 1.25 i.e tvlag 2 for study 2 = 2 *1.25 = 2.5



#3 Davidq8

Davidq8

    Advanced Member

  • Members
  • PipPipPip
  • 57 posts

Posted 25 May 2023 - 01:59 PM

you can use study as a covaraite and then estimate a different Tlag 

e.g.  tlag = tvlag1 * study ==1 + tvlag2*study==2

this will effectively give you two lags one for each study

 

e.g tvlag1 = 2 h tvlag2 = 2.5 h

 

this will be eactly the same as

 

tlag= tvlag1 *(1+studyeffect*study==2)

wherre tvlag1 = 2 and study effect  = 1.25 i.e tvlag 2 for study 2 = 2 *1.25 = 2.5

Thanks, Sameer, for your answer.

I am trying to apply your suggestion to the PML but I think there is a mistake in my codes 

here is PML

test(){
cfMicro(A1, Cl / V, first = (Aa = Ka))
dosepoint(Aa, tlag = Tlag)
C = A1 / V
error(CEps = 1)
observe(CObs = C + CEps * sqrt(1 + C^2 * (CMultStdev/sigma())^2))
stparm(Ka = tvKa * exp(nKa))
stparm(V = tvV * exp(nV))
stparm(Cl = tvCl * exp(nCl))
stparm(tlag = tvlag1 * study==0 + tvlag2*study==1)
stparm(CMultStdev = tvCMultStdev)
fcovariate(study())
fixef(tvKa = c(, 1, ))
fixef(tvV = c(, 134414, ))
fixef(tvCl = c(, 8500, ))
fixef(tvTlag1 = c(, 0.5, ))
fixef(tvTlag2 = c(, 0.5, ))
fixef(tvCMultStdev = c(0, 1, ))
ranef(diag(nV, nCl, nKa, nTlag) = c(1, 1, 1, 1))
}
 
 
Can you please guide me how imply your suggestion correctly.
Thanks 
}

Edited by Davidq8, 25 May 2023 - 02:00 PM.


#4 Ana Henry

Ana Henry

    Advanced Member

  • Members
  • PipPipPip
  • 232 posts

Posted 25 May 2023 - 04:15 PM

 

Thanks, Sameer, for your answer.

I am trying to apply your suggestion to the PML but I think there is a mistake in my codes 

here is PML

test(){
cfMicro(A1, Cl / V, first = (Aa = Ka))
dosepoint(Aa, tlag = Tlag)
C = A1 / V
error(CEps = 1)
observe(CObs = C + CEps * sqrt(1 + C^2 * (CMultStdev/sigma())^2))
stparm(Ka = tvKa * exp(nKa))
stparm(V = tvV * exp(nV))
stparm(Cl = tvCl * exp(nCl))
stparm(tlag = tvlag1 * study==0 + tvlag2*study==1)
stparm(CMultStdev = tvCMultStdev)
fcovariate(study())
fixef(tvKa = c(, 1, ))
fixef(tvV = c(, 134414, ))
fixef(tvCl = c(, 8500, ))
fixef(tvTlag1 = c(, 0.5, ))
fixef(tvTlag2 = c(, 0.5, ))
fixef(tvCMultStdev = c(0, 1, ))
ranef(diag(nV, nCl, nKa, nTlag) = c(1, 1, 1, 1))
}
 
 
Can you please guide me how imply your suggestion correctly.
Thanks 
}

Hi David, 

I noticed that you have a discrepancy between upper and lower case for Tlag.  Please note that PML is case sensitive.



#5 Davidq8

Davidq8

    Advanced Member

  • Members
  • PipPipPip
  • 57 posts

Posted 29 May 2023 - 08:52 PM

 

 

Thanks, Sameer, for your answer.

I am trying to apply your suggestion to the PML but I think there is a mistake in my codes 

here is PML

test(){
cfMicro(A1, Cl / V, first = (Aa = Ka))
dosepoint(Aa, tlag = Tlag)
C = A1 / V
error(CEps = 1)
observe(CObs = C + CEps * sqrt(1 + C^2 * (CMultStdev/sigma())^2))
stparm(Ka = tvKa * exp(nKa))
stparm(V = tvV * exp(nV))
stparm(Cl = tvCl * exp(nCl))
stparm(tlag = tvlag1 * study==0 + tvlag2*study==1)
stparm(CMultStdev = tvCMultStdev)
fcovariate(study())
fixef(tvKa = c(, 1, ))
fixef(tvV = c(, 134414, ))
fixef(tvCl = c(, 8500, ))
fixef(tvTlag1 = c(, 0.5, ))
fixef(tvTlag2 = c(, 0.5, ))
fixef(tvCMultStdev = c(0, 1, ))
ranef(diag(nV, nCl, nKa, nTlag) = c(1, 1, 1, 1))
}
 
 
Can you please guide me how imply your suggestion correctly.
Thanks 
}

Hi David, 

I noticed that you have a discrepancy between upper and lower case for Tlag.  Please note that PML is case sensitive.

HI, Ana 

I was able to fix codes here is the corrected code

 

stparm(Tlag = tvTlag_1 * (Study==0) * exp(nTlag)+ tvTlag_2 * (Study==1)* exp(nTlag))






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users