Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2020-04-04 tc1517_M4SD TLAG isn't computed correctly. #220

Closed
TomTensfeldt opened this issue Apr 4, 2020 · 1 comment
Closed

2020-04-04 tc1517_M4SD TLAG isn't computed correctly. #220

TomTensfeldt opened this issue Apr 4, 2020 · 1 comment

Comments

@TomTensfeldt
Copy link
Collaborator

TomTensfeldt commented Apr 4, 2020

TLAG does not match: consistently off as 2 hr (test) vs 0 hr (ref). Need to clarify definition of TLAG in the computation engine. Section 8.2.2 (for urine parameters) specifies using midpoint to determine TLAG, but refers to Section 8.2.1 (for plasma parameters) for the definition where it is stated that “if all concentrations have a value greater than 0 then TLAG is 0.” This has been applied for the reference value, but not for the test.

Refer to 2020-04-01_tc1517_M4SD.html

Similar to #199 #221

@jhhughes256
Copy link
Collaborator

As of commit cca452d this issue has been resolved. This issue can now be closed.

The following is an excerpt from tc1517_M4SD_cca452d.html

Add and compare TLAG parameter

Note, as per the Definitions of TLAG in Sections Section 8.2.1 and 8.2.2, “If all concentrations have a value greater than 0 then TLAG is 0.”

for(i in unique(refparams[,mct$SDEID])) {
  k <- refparams[,mct$SDEID]==i
  # this won't work if there are "trailing" zeros ######################################################################
  m <- (refparams[k,rateincrements]==0)
  maxnz <- max(refparams[k,paste0("MIDPT", 1:ntimepoints)][!m])
  print(maxnz)
  if(any(m)) {
    refparams$TLAG[k] <- max(refparams[k,paste0("MIDPT", 1:ntimepoints)][m])
  }
  else {
    refparams$TLAG[k] <- 0
  }
}
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36
## [1] 36

Compare TLAG parameter

clist <- compare_parameters("TLAG$", alist=assessedparameters, ref.params=refparams, tst.params=results, tol=tolerance)
## testing TLAG vs TLAG 
## Equal
if(length(clist$n.ref)>0 & length(clist$n.tst)>0) assessedparameters <- remove1(assessedparameters, clist$rname)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants