Secondary: Get Secondary Parameter Estimates

Description Usage Arguments Details Value Author(s) Examples

View source: R/Secondary.R

Description

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

Usage

1
Secondary(Formula, PE, COV)

Arguments

Formula

Formula to calculate the secondary parameter estimate

PE

Point estimates of primary parameters with names

COV

Variance-covariance matrix of primary estimates

Details

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

Value

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

Author(s)

Kyun-Seop Bae <k@acr.kr>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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)

wnl documentation built on Aug. 28, 2020, 1:11 a.m.