Estimate.PK: Estimate.PK

Description Usage Arguments Value Examples

View source: R/PK.R

Description

Fit Pharmacokinetic (PK) data and estimate PK parameters. The use of other software like NONMEM or MONOLIX is encoraged for estimation of parameters from different individuals.

Usage

1
2
Estimate.PK(PK_data, x.name = "time", y.name = "CONC", model,
  initial_estimates, log.yaxis = FALSE, weighted = FALSE)

Arguments

PK_data

Data to fit (drug concentrations over time)

x.name

Column name of the independent variable (time) in the x axis. "time" by default.

y.name

Column name of the dependent variable (drug concentrations) in the y axis. "CONC" by default.

model

Structural PK model definition (mrgsolve model specification).

initial_estimates

list with the initial estimates for the PK parameters.

log.yaxis

logical to indicate if the values for the dependent variable should be log transformed. FALSE by default.

weighted

logical. If TRUE a weighted NLS method is applied.

Value

This function returns the final estimates for the PK paramters and the plot of the observation values and the prediction of the model

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
data(PK_example)
head(PK.example.data)
#Read code from model repository: 1 compartment model with extravascular administration
cmt1_oral<- mread("PK_models/1cmt_oral")%>% Req(CP) 
#See parameter names in the model:
param(cmt1_oral)
#Estimate parameters:


## End(Not run)

Michorlab/ACESO documentation built on June 4, 2021, 4:57 p.m.