Package wnl. April 2, 2018

Similar documents
Package nmw. October 20, 2017

Package BNN. February 2, 2018

Package BayesNI. February 19, 2015

Package flexcwm. R topics documented: July 2, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.1.

Package jmcm. November 25, 2017

Package gma. September 19, 2017

Package flexcwm. R topics documented: July 11, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.0.

Package EMVS. April 24, 2018

Package ShrinkCovMat

Package ARCensReg. September 11, 2016

Package invgamma. May 7, 2017

Package OUwie. August 29, 2013

Package darts. February 19, 2015

Package ForecastCombinations

Package SEMModComp. R topics documented: February 19, Type Package Title Model Comparisons for SEM Version 1.0 Date Author Roy Levy

Package JointModel. R topics documented: June 9, Title Semiparametric Joint Models for Longitudinal and Counting Processes Version 1.

Package MultisiteMediation

Package TimeSeries.OBeu

Package alabama. March 6, 2015

Package semgof. February 20, 2015

Package scio. February 20, 2015

Package ltsbase. R topics documented: February 20, 2015

Package msir. R topics documented: April 7, Type Package Version Date Title Model-Based Sliced Inverse Regression

Package gtheory. October 30, 2016

Subject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study

Package Blendstat. February 21, 2018

Package SpatialVS. R topics documented: November 10, Title Spatial Variable Selection Version 1.1

Package Delaporte. August 13, 2017

Package IUPS. February 19, 2015

Package EnergyOnlineCPM

Package penmsm. R topics documented: February 20, Type Package

Package bivariate. December 10, 2018

Package esreg. August 22, 2017

Package CoxRidge. February 27, 2015

Package skellam. R topics documented: December 15, Version Date

Package basad. November 20, 2017

Package threg. August 10, 2015

Package FinCovRegularization

Package sbgcop. May 29, 2018

Package ICGOR. January 13, 2017

Package SimSCRPiecewise

Package pssm. March 1, 2017

Package comparec. R topics documented: February 19, Type Package

Package LCAextend. August 29, 2013

Package sodavis. May 13, 2018

Package monmlp. R topics documented: December 5, Type Package

Package rgabriel. February 20, 2015

Package REGARMA. R topics documented: October 1, Type Package. Title Regularized estimation of Lasso, adaptive lasso, elastic net and REGARMA

Package ChIPtest. July 20, 2016

Package DiscreteLaplace

Package RZigZag. April 30, 2018

Package metafuse. October 17, 2016

Statistics 203: Introduction to Regression and Analysis of Variance Course review

Package elhmc. R topics documented: July 4, Type Package

Package face. January 19, 2018

Package CompQuadForm

The nltm Package. July 24, 2006

Package RcppSMC. March 18, 2018

Package unbalhaar. February 20, 2015

Package noncompliance

Final Review. Yang Feng. Yang Feng (Columbia University) Final Review 1 / 58

Package NonpModelCheck

Package CopulaRegression

Package thief. R topics documented: January 24, Version 0.3 Title Temporal Hierarchical Forecasting

Package factorqr. R topics documented: February 19, 2015

Package survidinri. February 20, 2015

Description of UseCase models in MDL

Package mlmmm. February 20, 2015

Package covsep. May 6, 2018

Package LIStest. February 19, 2015

Package CPE. R topics documented: February 19, 2015

Package locfdr. July 15, Index 5

Package gsarima. February 20, 2015

Package leiv. R topics documented: February 20, Version Type Package

Package idmtpreg. February 27, 2018

Package reinforcedpred

Package TSPred. April 5, 2017

Package tspi. August 7, 2017

Package TSF. July 15, 2017

Package spcov. R topics documented: February 20, 2015

Package robustrao. August 14, 2017

Package emg. R topics documented: May 17, 2018

Package sindyr. September 10, 2018

Package R1magic. August 29, 2016

Package clogitboost. R topics documented: December 21, 2015

Package ICBayes. September 24, 2017

Package gk. R topics documented: February 4, Type Package Title g-and-k and g-and-h Distribution Functions Version 0.5.

Package mar. R topics documented: February 20, Title Multivariate AutoRegressive analysis Version Author S. M. Barbosa

Package SCEPtERbinary

Estimating terminal half life by non-compartmental methods with some data below the limit of quantification

Package GORCure. January 13, 2017

Package nardl. R topics documented: May 7, Type Package

Package xdcclarge. R topics documented: July 12, Type Package

Package supernova. February 23, 2018

Package sym.arma. September 30, 2018

Package CovSel. September 25, 2013

Package mixture. R topics documented: February 13, 2018

Preface Introduction to Statistics and Data Analysis Overview: Statistical Inference, Samples, Populations, and Experimental Design The Role of

Package Tcomp. June 6, 2018

Package epr. November 16, 2017

Transcription:

Version 0.4.0 Package wnl April 2, 2018 Title Minimization Tool for Pharmacokinetic-Pharmacodynamic Data Analysis This is a set of minimization tools (maximum likelihood estimation and least square fitting) to solve examples in the Johan Gabrielsson and Dan Weiner's book ``Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications'' 5th ed. (ISBN:9198299107). Examples include linear and nonlinear compartmental model, turn-over model, single or multiple dosing bolus/infusion/oral models, allometry, toxicokinetics, reversible metabolism, in-vitro/in-vivo extrapolation, enterohepatic circulation, metabolite modeling, Emax model, inhibitory model, tolerance model, oscillating response model, enantiomer interaction model, effect compartment model, drug-drug interaction model, receptor occupancy model, and rebound phenomena model. Depends R (>= 3.0.0), numderiv Author Kyun-Seop Bae [aut] Maintainer Copyright 2017-, Kyun-Seop Bae License GPL-3 NeedsCompilation no LazyLoad yes Repository CRAN URL https://cran.r-project.org/package=wnl Date/Publication 2018-04-02 21:54:54 UTC R topics documented: wnl-package......................................... 2 cmpchi........................................... 3 dx.............................................. 3 nlr.............................................. 4 Secondary.......................................... 6 wnl5............................................. 7 Index 9 1

2 wnl-package wnl-package Minimization Tool for Pharmacokinetic-Pharmacodynamic Data Analysis This is a minimization tool to solve the examples in the book Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications 5th ed. 2016. (ISBN:9198299107). This is a set of minimization tools to solve all the examples in the book Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications 5th ed. 2016.. References Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications. 5th ed. 2016. Examples tdata = Theoph colnames(tdata) = c("id", "BWT", "DOSE", "TIME", "DV") fpk = function(theta) { DOSE = 320000 TIME = e$data[,"time"] # Prediction function # in microgram # use data in e$data K Ka V = THETA[1] = THETA[2] = THETA[3] Cp = DOSE/V*Ka/(Ka - K)*(exp(-K*TIME) - exp(-ka*time)) return(cp) IDs = unique(tdata[,"id"]) nid = length(ids) for (i in 1:nID) { Data = tdata[tdata$id == IDs[i],] Res = nlr(fpk, Data, pnames=c("k", "ka", "V"), IE=c(0.1, 3, 500), SecNames=c("CL", "Thalf", "MRT"), SecForms=c(~V*k, ~log(2)/k, ~1/k)) print(paste("## ID =", i, "##"))

cmpchi 3 print(res) cmpchi Compare model with Chi-square test It performs chi-square test for two models comparison. cmpchi(r1, r2) r1 r2 A result from nlr Another result from nlr One model should include the other model. Returns a p-value from pchisq dx Simplest diagnostic plot for minimization result It performs simplest diagnostic plot from the result of nlr. dx(r) r a result from nlr or wnl5

4 nlr This plots Observation vs. Prediction and Normalized Redisual vs. Prediction only. Normalized residual are meant to be distributed as standard normal distribution, N(0, 1). This just draws plot. nlr Nonlinear Regression in R It performs nonlinear regression usually for pharmacokinetic and pharmacodynamic models. nlr(fx, Data, pnames, IE, LB, UB, Error="A", ObjFx=ObjDef, SecNames, SecForms, Method="L-BFGS-B") Fx Data pnames IE Function for structural model. It should return a vector of same length to observations. Data table which will be used in Fx. Fx should access this with e$data. Parameter names in the order of Fx arguments Initial estimates of parameters LB Lower bound for optim function. Default value is 0. UB Error ObjFx SecNames SecForms Method Upper bound for optim function. Default value is 1e+06. Error model. One of "A" for additive error, "POIS" for poisson error, "P" for proportional error, and "C" for combined error model. Objective function to be minimized. Default is maximum likelihood estimation function(-2 log likelihood). Names of secondary parameter estimates Formula to calculate the secondary parameter estimates "L-BFGS-B" is default. See optim for more detail. This uses scaled transformed parameters and environment e internally.

nlr 5 Est Cov run$m run$n run$run Point estimate(pe) with standard error(se) and relative standard error(rse) Variance-covariance matrix of objective function at the value of point estimates Count of positive residuals Count of negative residuals Count of runs of residuals run$p.value P value of run test with excluding zero points Objective Function Minimum value of objective function -2LL AIC AICc BIC Convergence Message Prediction Residuals Elapsed Time -2 times log likelihood Akaike Information Criterion Corrected Akaike Information Criterion Schwarz Bayesian Information Criterion Convergence code from optim Message from optim. Fitted(predicted) values Residuals Examples Consumed time by minimization tdata = Theoph colnames(tdata) = c("id", "BWT", "DOSE", "TIME", "DV") fpk = function(theta) # Prediction function { DOSE = 320000 # in microgram TIME = e$data[,"time"] # use data in e$data K Ka V = THETA[1] = THETA[2] = THETA[3] P = DOSE/V*Ka/(Ka - K) * (exp(-k*time) - exp(-ka*time)) return(p) IDs = unique(tdata[,"id"]) nid = length(ids) for (i in 1:nID) { Data = tdata[tdata$id == IDs[i],] Res = nlr(fpk, Data, pnames=c("k", "ka", "V"), IE=c(0.1, 3, 500),

6 Secondary SecNames=c("CL", "Thalf", "MRT"), SecForms=c(~V*k, ~log(2)/k, ~1/k)) print(paste("## ID =", i, "##")) print(res) Secondary Get Secondary Parameter Estimates Get standard error and relative standard error (cv) of secondary paramter estimate Secondary(Formula, PE, COV) Formula PE COV Formula to calculate the secondary parameter estimate Point estimates of primary estimates with names Variance-covariance matrix of primary estimates Variables within Formula should exist in the names of PE vector. This returns point estimate, standard error, relative standard error of the secondary parameter estimate. Examples tdata = Theoph colnames(tdata) = c("id", "BWT", "DOSE", "TIME", "DV") # Table requires DV column fpk = function(theta) # Prediction function { AMT = 320000 # in microgram TIME = e$data[,"time"] V = THETA[1] K = THETA[2] Ka = THETA[3] Cp = AMT/V*Ka/(Ka - K)*(exp(-K*TIME) - exp(-ka*time))

wnl5 7 return(cp) Data = tdata[tdata$id == 1,] Res = nlr(fpk, Data, pnames=c("v", "K", "Ka"), IE=c(30000, 0.1, 2)) Secondary(~V*K, Res$Est["PE",1:e$nPara], Res$Cov) wnl5 Old type WinNonlin - Least Square not MLE It performs old type Winnonlin regression. wnl5(fx, Data, pnames, IE, LB, UB, Error="A", ObjFx=ObjLS) Fx Data pnames IE Function for structural model. It should return a vector of same length to observations. Data table which will be used in Fx. Fx should access this with e$data. Parameter names in the order of Fx arguments Initial estimates of parameters LB Lower bound for optim function. Default value is 0. UB Error ObjFx Upper bound for optim function. Default value is 1e+06. Error model. One of "POIS" for poisson error, "PROP" for proportional error, and others for additive error model. Objective function to be minimized. Default is least square function. This uses scaled transformed parameters and environment e internally. Here we do not provide standard error. If you want standard error, use nlr. PE WRSS run$m run$n run$run run$p.value Point estimates Weighted Residual Sum of Square Count of positive residuals Count of negative residuals Count of runs of residuals P value of run test with excluding zero points

8 wnl5 Objective Function Minimum value of objective function AIC Akaike Information Criterion SBC Schwarz Bayesian Information Criterion Condition Number Condition number Message Prediction Residuals Elapsed Time Message from optim. Fitted(predicted) values Residuals Examples Consumed time by minimization tdata = Theoph colnames(tdata) = c("id", "BWT", "DOSE", "TIME", "DV") fpk = function(theta) # Prediction function { DOSE = 320000 # in microgram TIME = e$data[,"time"] # use data in e$data K = THETA[1] Ka = THETA[2] V = THETA[3] Cp = DOSE/V*Ka/(Ka - K)*(exp(-K*TIME) - exp(-ka*time)) return(cp) IDs = unique(tdata[,"id"]) nid = length(ids) for (i in 1:nID) { Data = tdata[tdata$id == IDs[i],] Res = wnl5(fpk, Data, pnames=c("k", "ka", "V"), IE=c(0.1, 3, 500)) print(paste("## ID =", i, "##")) print(res)

Index Topic Diagnostic Plot dx, 3 Topic Least Square Estimation (Old WinNonlin) wnl5, 7 Topic Maximum Likelihood Estimation nlr, 4 Topic Model Comparison cmpchi, 3 Topic Packages wnl-package, 2 Topic Secondary Secondary, 6 cmpchi, 3 dx, 3 nlr, 4 Secondary, 6 wnl (wnl-package), 2 wnl-package, 2 wnl5, 7 9