tdmore-dev / tdmore

In silico evaluation of precision dosing
https://tdmore-dev.github.io/tdmore/dev
GNU Affero General Public License v3.0
3 stars 1 forks source link

Ensure we cover the full range of standard S3 functions #63

Closed rfaelens closed 6 years ago

rfaelens commented 6 years ago

See https://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf

We are missing summary and print.summary.

rfaelens commented 6 years ago

Example output:

print(tdmoreModel)
## Structural Model: RxODE
## Parameters: ECL, EV1
## Covariates: XXX, YY, ZZ
## Output: CONC

summary(tdmoreModel)
## Structural model:
## summary(model)
## Parameters: 
## name  sd       CV%
## ECL   0.281   28%
## EV1   0.132   13%
## Covariates: XXX, YY, ZZZ
## Residual error model:
## name    additionalError   proportionalError
## CONC    0.188                 0.283

ipred <- estimate(...)

print(ipred)
## Call:
##   estimate(...)
## Coef:
## ECL   EV1
## 0.18  -0.3

mySummary <- summary(ipred)
print(mySummary)
## Call:
##   estimate(...)
## OFV: 8829 (pop=882, pred=8201
## 
## Observations:
## TIME  CONC
## 0      382
## Regimen:
## TIME   AMT
## 81     20
## Covariates:
## WT
## 76
## Coefficients:
## name    value (95%CI)       se
## ECL     -0.2 (-0.5, 0.1)    0.382
## EV1     0.28 (0.2, 0.4)     0.03