Description
Assembling Data Sets for Non-Linear Mixed Effects Modeling.
Description
To Simplify the time consuming and error prone task of assembling complex data sets for non-linear mixed effects modeling. Users are able to select from different absorption processes such as zero and first order, or a combination of both. Furthermore, data sets containing data from several entities, responses, and covariates can be simultaneously assembled.
README.md
puzzle
The goal of puzzle is assembling pharmacometric ready data sets from tabulated files.
Installation
You can install the released version of puzzle from CRAN with:
install.packages("puzzle")
or download the development version from Github:
devtools::install_github("syneoshealth/puzzle")
Example
This is a basic example which shows you how to solve a common problem:
library(puzzle)
nm = list(pk = list(parent=as.data.frame(puzzle::df_pk_start)),
dose=as.data.frame(puzzle::df_dose_start),
cov=as.data.frame(puzzle::df_cov_start))
df = puzzle(directory=file.path(getwd()),
order=c(0),
pk=list(data=nm$pk),
dose=list(data=nm$dose),
cov=list(data=nm$cov),
username = "Mario Gonzalez Sales")
#> Automatic coercion to numeric for CMT
#> 1=parent
#> Automatic coercion to numeric for SEX
#> 0=F
#> 1=M
#> Assembling date and time: 2019-10-30 21:46:58
#> Time zone: Europe/Paris
#> Number of individuals: 2
#> Number of observations: 12
#> Dose levels: "100", "200"
#> This data set was assembled by Mario Gonzalez Sales
A portion of the pharmacometrics ready data set obtained with the code showed above is presented below:
C | ID | TIME | TAD | AMT | CMT | EVID | DV | LDV | MDV | AGE | SEX |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | 0.0 | 0.0 | 100 | 1 | 1 | NA | NA | 1 | 77 | 1 | |
1 | 0.0 | 0.0 | NA | 1 | 0 | 0.0 | NA | 0 | 77 | 1 | |
1 | 1.0 | 1.0 | NA | 1 | 0 | 10.8 | 2.3795461 | 0 | 77 | 1 | |
1 | 4.0 | 4.0 | NA | 1 | 0 | 7.6 | 2.0281482 | 0 | 77 | 1 | |
1 | 12.0 | 12.0 | NA | 1 | 0 | 2.3 | 0.8329091 | 0 | 77 | 1 | |
1 | 24.0 | 0.0 | 200 | 1 | 1 | NA | NA | 1 | 77 | 1 | |
1 | 24.0 | 0.0 | NA | 1 | 0 | 0.0 | NA | 0 | 77 | 1 | |
1 | 25.0 | 1.0 | NA | 1 | 0 | 24.2 | 3.1863526 | 0 | 77 | 1 | |
2 | 0.0 | 0.0 | 100 | 1 | 1 | NA | NA | 1 | 82 | 0 | |
2 | 0.0 | 0.0 | NA | 1 | 0 | 0.0 | NA | 0 | 82 | 0 | |
2 | 0.9 | 0.9 | NA | 1 | 0 | 7.3 | 1.9878743 | 0 | 82 | 0 | |
2 | 3.8 | 3.8 | NA | 1 | 0 | 4.0 | 1.3862944 | 0 | 82 | 0 | |
2 | 12.2 | 12.2 | NA | 1 | 0 | 1.1 | 0.0953102 | 0 | 82 | 0 | |
2 | 24.0 | 0.0 | 200 | 1 | 1 | NA | NA | 1 | 82 | 0 | |
2 | 24.0 | 0.0 | NA | 1 | 0 | 0.0 | NA | 0 | 82 | 0 | |
2 | 25.1 | 1.1 | NA | 1 | 0 | 14.1 | 2.6461748 | 0 | 82 | 0 |