knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
{uncrtnty} provides functions and an "uncrtnty"-list class in order to work with uncertainty in NONMEM analyses.
You can install the development version of uncrtnty from github with:
install.packages("remotes") remotes::install_github("FelicienLL/uncrtnty")
In NONMEM analyses, the uncertainty about parameter estimation can be described as followed. The estimation of THETA follows a multivariate normal distribution, with a mean vector (th_est
) and a covariance matrix (th_unc
) that carries the information about uncertainty. The estimates of OMEGA/SIGMA are matrices (om_est/si_est
), and the uncertainty is informed by degrees of freedom (om_unc/si_unc
). In {uncrtnty}, these information are storred into a single "uncrtnty"-list object.
library(uncrtnty)
u_example
This "uncrtnty"-list object can be created:
u_from_xpdb()
.This "uncrtnty"-list object can be used to generate:
u_to_nwpri()
u_to_simpar()
u_to_nwpri(u_example)
u_to_simpar(u_example, nsim = 100)
lstfile <- readLines(system.file("nm", "run003a.lst", package = "uncrtnty")) m <- matrix(c(1, 0.12, 0.13, 0, 0, 0.12, 2, 0.23, 0, 0, 0.13, 0.23, 3, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0 ,0 ,5), nrow = 5)
parse_lst()
.cat(lstfile[84:110], sep = "\n") # zoom inside a NONMEM .lst file parse_lst(lst = lstfile)$om_blockform parse_lst(lst = lstfile)$si_blockform
infer_blockform()
.m
infer_blockform(m)
matrix_to_list()
.matrix_to_list(m)
Parse NONMEM estimate file (.ext), covariance matrix file (.cov) and individual estimates (.phi) into convenient output-list with parse_ext()
, parse_cov()
and parse_phi()
.
Compute degrees of freedom of the Inverse-Wishart distribution for OMEGA/SIGMA matrices with compute_df()
.
est_om <- matrix(c(0.2, 0.01, 0.01, 0.1), ncol = 2) se_om <- matrix(c(0.02, 0.005, 0.005, 0.03), ncol = 2) compute_df(est = est_om, se = se_om)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.