Learn R Programming

wnl (version 0.8.3)

Secondary: Get Secondary Parameter Estimates

Description

Get standard error and relative standard error (cv) of the secondary parameter estimate

Usage

Secondary(Formula, PE, COV)

Value

This returns point estimate, standard error, relative standard error of the secondary parameter estimate.

Arguments

Formula

Formula to calculate the secondary parameter estimate

PE

Point estimates of primary parameters with names

COV

Variance-covariance matrix of primary estimates

Author

Kyun-Seop Bae <k@acr.kr>

Details

Variables within Formula should exist in the names of PE vector.

Examples

Run this code
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))
  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)

Run the code above in your browser using DataLab