README.md

MAIN IDEA

With one simple function call, get results from a nonmem run as basic R objects, ready to use.

library(nmlist)

project <- system.file("nonmem", package="nmlist")

x <- nmlist(1005, project)

What's in there?

names(x)
.  [1] "status"    "theta"     "omega"     "sigma"     "par"      
.  [6] "etashk"    "epsshk"    "etabar"    "etabarp"   "eigen"    
. [11] "condition" "cov"       "cor"

DEPENDENCIES

The package requires only xml2, not XML.

Basics

x$status
. $OFV
. [1] 2405.916
. 
. $COV
. numeric(0)
. 
. $TERM
. [1] 0
. 
. $TIME
. [1] "8.74/11.55"
. 
. $COR_FLAG
. [1] FALSE
. 
. $RECS
.                            name value
. 1          TOT. NO. OF OBS RECS   510
. 2       TOT. NO. OF INDIVIDUALS    40
. 3  NO. OF DATA RECS IN DATA SET   550
. 
. $DATE
. [1] "2014-02-04T16:23:19.488"

THETA

x$theta
. $THETA1
. [1] 9.507886
. 
. $THETA2
. [1] 22.79099
. 
. $THETA3
. [1] 0.07143366
. 
. $THETA4
. [1] 3.474506
. 
. $THETA5
. [1] 113.2767
. 
. $THETA6
. [1] 1.024354
. 
. $THETA7
. [1] 1.192118

OMEGA

x$omega
.             [,1]        [,2]        [,3]
. [1,]  0.21387884  0.12077020 -0.01162777
. [2,]  0.12077020  0.09451047 -0.03720637
. [3,] -0.01162777 -0.03720637  0.04656315

SHRINKAGE

x$etashk
.     ETA1     ETA2     ETA3 
. 1.232060 2.155745 6.054022

STANDARD ERROR

x$par
.          THETA           SE
. 1   9.50788555  0.927080258
. 2  22.79098949  2.177636219
. 3   0.07143366  0.005252829
. 4   3.47450589  0.535796866
. 5 113.27671224 23.745201006
. 6   1.02435433  0.114055515
. 7   1.19211818  0.336790360

COVARIANCE MATRIX

x$cov
.              [,1]         [,2]          [,3]         [,4]         [,5]
. [1,]  0.859477804  0.784826136  1.050732e-03  0.062969956  -1.64251134
. [2,]  0.784826136  4.742099504  6.679197e-03  0.896525822   5.31764295
. [3,]  0.001050732  0.006679197  2.759221e-05  0.002222693  -0.03043554
. [4,]  0.062969956  0.896525822  2.222693e-03  0.287078281   0.19581083
. [5,] -1.642511338  5.317642952 -3.043554e-02  0.195810828 563.83457083
. [6,] -0.041131789 -0.025213106 -1.048831e-04 -0.010657100   0.77017560
. [7,] -0.176199068  0.068704507 -1.356827e-04  0.015499960  -0.63369426
.               [,6]          [,7]
. [1,] -0.0411317890 -0.1761990678
. [2,] -0.0252131062  0.0687045069
. [3,] -0.0001048831 -0.0001356827
. [4,] -0.0106571004  0.0154999599
. [5,]  0.7701755976 -0.6336942619
. [6,]  0.0130086605  0.0005722090
. [7,]  0.0005722090  0.1134277467

CORRELATION MATRIX

x$cor
.             [,1]        [,2]         [,3]        [,4]        [,5]
. [1,]  0.92708026  0.38875035  0.215765232  0.12676982 -0.07461312
. [2,]  0.38875035  2.17763622  0.583909698  0.76838221  0.10283903
. [3,]  0.21576523  0.58390970  0.005252829  0.78974333 -0.24401238
. [4,]  0.12676982  0.76838221  0.789743328  0.53579687  0.01539078
. [5,] -0.07461312  0.10283903 -0.244012379  0.01539078 23.74520101
. [6,] -0.38899496 -0.10151372 -0.175063604 -0.17439041  0.28437906
. [7,] -0.56432153  0.09367857 -0.076695816  0.08589557 -0.07923996
.             [,6]        [,7]
. [1,] -0.38899496 -0.56432153
. [2,] -0.10151372  0.09367857
. [3,] -0.17506360 -0.07669582
. [4,] -0.17439041  0.08589557
. [5,]  0.28437906 -0.07923996
. [6,]  0.11405552  0.01489631
. [7,]  0.01489631  0.33679036

RUN LOG

nmlog(c(1005,1005,1005), project)
.    run      OFV TERM   THETA1   THETA2     THETA3   THETA4   THETA5
. 1 1005 2405.916    0 9.507886 22.79099 0.07143366 3.474506 113.2767
. 2 1005 2405.916    0 9.507886 22.79099 0.07143366 3.474506 113.2767
. 3 1005 2405.916    0 9.507886 22.79099 0.07143366 3.474506 113.2767
.     THETA6   THETA7        V1        V2          V3         V4          V5
. 1 1.024354 1.192118 0.2138788 0.1207702 -0.01162777 0.09451047 -0.03720637
. 2 1.024354 1.192118 0.2138788 0.1207702 -0.01162777 0.09451047 -0.03720637
. 3 1.024354 1.192118 0.2138788 0.1207702 -0.01162777 0.09451047 -0.03720637
.           V6        VV1 VV2       VV3
. 1 0.04656315 0.04917071   0 0.2017688
. 2 0.04656315 0.04917071   0 0.2017688
. 3 0.04656315 0.04917071   0 0.2017688


kylebaron/nmlist documentation built on Dec. 21, 2021, 8:45 a.m.