Skip to content

Commit

Permalink
Added the rmdhunks and roxygen code to use them.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-harrold committed May 8, 2023
1 parent 5b0cfec commit 99eb4f4
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 43 deletions.
3 changes: 3 additions & 0 deletions R/nlmixr2.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ nlmixr2Version <- function() {
#' @param envir Environment where the nlmixr object/function is
#' evaluated before running the estimation routine.
#' @return Either a nlmixr2 model or a nlmixr2 fit object
#'
#' @includeRmd man/rmdhunks/nlmixr2Keywords.Rmd
#'
#' @author Matthew L. Fidler
#' @examples
#'
Expand Down
84 changes: 42 additions & 42 deletions data-raw/nlmixr2_object.csv
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
Field,Description,
conditionNumber,"Condition number, that is the highest divided by the lowest eigenvalue in the population covariance matrix",
cor,Correlation matrix,
phiR,correlation matrix of each individual's eta (if present),
objDF,"Data frame containing objective function information (AIC, BIC, etc.)",
time,"Duration of different parts of the analysis (e.g. setup, optimization, calculation of covariance, etc.)","(TIME is the time in the dataset, so be careful with the case one this one)"
theta,Estimates for eta for each individual,Are fixef and theta the same?
etaObf,"Estimates for eta for each individual, This also includes the objective function for each individual",
fixef,Estimates of fixed effects,
foceiControl,Estimation options if focei was used,This is also the translated foceiControl options for an other method; the output option is generated by the focei step
ui,Final estimates for the model,alias = finalUi
dataMergeFull,Full data merge with the fit output and the original dataset; Also includes nlmixrLlikObs which includes the individual observation contribution to the likelihood,
censInfo,Gives the censorng information abot the fit (the type of censoring that was seend and handled in the dataset),
dataLloq,Gives the lloq from the dataset (average) when cesoring has occured; Requires the fit to have a table step,
dataUloq,Gives the uloq from the dataset (average) when censoring has occured; requires the fit to have a table step,
eta,IIV values for each indiviudal ,
dataMergeInner,Inner data merge with the fit output and the original dataset; Also includes nlmixrLlikObs which includes the individual observation contribution to the likelihood,
rxControl,Integration options used to control rxode2,
dataMergeLeft,Left data merge with the fit output and the original dataset; Also includes nlmixrLlikObs which includes the individual observation contribution to the likelihood,
omega,Matrix containing the estimates of the multivarte normal covariance matrix for between subject varaibilities (omega),
covMethod,Method used to calculate covariance of the fixed effects,
modelName,Name of the R object containing the model,
origData,Original dataset ,
phiRSE,Relative standard error of each individuals eta,
dataMergeRight,Right data merge with the fit output and the original dataset; Also includes nlmixrLlikObs which includes the individual observation contribution to the likelihood,
ipredModel,rxode2 estimation model for fit (internal will likely be removed from visibility,
phiSE,Standard error of each individuals eta,
parFixed,Table of parameter estimates (rounded and pretty looking),
parFixedDF,Table of parameter estimates as a data frame,
omegaR,The correlation matirx of omega with standard deviations for the diagonal pieces,
iniUi,The initial model used to start the estimation,
finalUi,The model with the estimates replaced as values,(alias is $ui)
scaleInfo,"The scaling factors used for nlmixr2 estimation in focei; The can be changed by foceiControl(scaleC=...) if you think these are unreasonable. It also tells the Gill83 outcome of trying to find the best step size (High gradient error, bad gradient etc)",
table,"These are the table options that were used when generating the table output (were CWRES included, etc",
shrink,This is a table of shrinkages for all the individual ETAs as well as the variance shrinkage as well as summary statistics for the ETAs and Residual Error,
env,This is the environment where all the information for the fit is stored outside of the data-frame. It is an R environment hence $env,
seed,This is the initial seed used for saem,
simInfo,"This returns a list of all the fit information used for a traditional rxode2 simulation, which you can tweak yourself if you wish",
runInfo,This returns a list of all the warnings or fit information,Alais $warnings
parHistStacked,Value of objective function and parameters at each iteration (tall format),
parHist ,Value of objective function and parameters at each iteration (wide format),
cov,Variance-covariance matrix,
Field,Description
conditionNumber,"Condition number, that is the highest divided by the lowest eigenvalue in the population covariance matrix"
cor,Correlation matrix
phiR,correlation matrix of each individual's eta (if present)
objDF,"Data frame containing objective function information (AIC, BIC, etc.)"
time,"Duration of different parts of the analysis (e.g. setup, optimization, calculation of covariance, etc.)"
theta,Estimates for eta for each individual
etaObf,"Estimates for eta for each individual, This also includes the objective function for each individual"
fixef,Estimates of fixed effects
foceiControl,Estimation options if focei was used
ui,Final estimates for the model
dataMergeFull,Full data merge with the fit output and the original dataset; Also includes nlmixrLlikObs which includes the individual observation contribution to the likelihood
censInfo,Gives the censorng information abot the fit (the type of censoring that was seend and handled in the dataset)
dataLloq,Gives the lloq from the dataset (average) when cesoring has occured; Requires the fit to have a table step
dataUloq,Gives the uloq from the dataset (average) when censoring has occured; requires the fit to have a table step
eta,IIV values for each indiviudal
dataMergeInner,Inner data merge with the fit output and the original dataset; Also includes nlmixrLlikObs which includes the individual observation contribution to the likelihood
rxControl,Integration options used to control rxode2
dataMergeLeft,Left data merge with the fit output and the original dataset; Also includes nlmixrLlikObs which includes the individual observation contribution to the likelihood
omega,Matrix containing the estimates of the multivarte normal covariance matrix for between subject varaibilities (omega)
covMethod,Method used to calculate covariance of the fixed effects
modelName,Name of the R object containing the model
origData,Original dataset
phiRSE,Relative standard error of each individuals eta
dataMergeRight,Right data merge with the fit output and the original dataset; Also includes nlmixrLlikObs which includes the individual observation contribution to the likelihood
ipredModel,rxode2 estimation model for fit (internal will likely be removed from visibility
phiSE,Standard error of each individuals eta
parFixed,Table of parameter estimates (rounded and pretty looking)
parFixedDF,Table of parameter estimates as a data frame
omegaR,The correlation matirx of omega with standard deviations for the diagonal pieces
iniUi,The initial model used to start the estimation
finalUi,The model with the estimates replaced as values
scaleInfo,"The scaling factors used for nlmixr2 estimation in focei; The can be changed by foceiControl(scaleC=...) if you think these are unreasonable. It also tells the Gill83 outcome of trying to find the best step size (High gradient error, bad gradient etc)"
table,"These are the table options that were used when generating the table output (were CWRES included, etc"
shrink,This is a table of shrinkages for all the individual ETAs as well as the variance shrinkage as well as summary statistics for the ETAs and Residual Error
env,This is the environment where all the information for the fit is stored outside of the data-frame. It is an R environment hence $env
seed,This is the initial seed used for saem
simInfo,"This returns a list of all the fit information used for a traditional rxode2 simulation, which you can tweak yourself if you wish"
runInfo,This returns a list of all the warnings or fit information
parHistStacked,Value of objective function and parameters at each iteration (tall format)
parHist ,Value of objective function and parameters at each iteration (wide format)
cov,Variance-covariance matrix
2 changes: 1 addition & 1 deletion data-raw/nlmixr2_object_add.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
library(usethis)
nlmixr2Keywords <- read.csv("nlmixr2_object.csv");
usethis::use_data(nlmixr2Keywords)
usethis::use_data(nlmixr2Keywords, overwrite=TRUE)
Binary file modified data/nlmixr2Keywords.rda
Binary file not shown.
45 changes: 45 additions & 0 deletions man/nlmixr2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added man/rmdhunks/figure/unnamed-chunk-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions man/rmdhunks/nlmixr2Keywords.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The nlmixr object has the following fields:

```{r echo=FALSE}
knitr::kable(nlmixr2Keywords)
```

0 comments on commit 99eb4f4

Please sign in to comment.