getTimeChoicePerformance: estimate the distance between population average an average...

Description Usage Arguments Value Examples

View source: R/rankTimePoints.R

Description

estimate the distance between population average an average over sample datasets with given time points (zero point included)

Usage

1
2
getTimeChoicePerformance(timePointInd, pkData, popAvCurve, timeGrid,
  printMCError = FALSE)

Arguments

timePointInd

a vector indicating time points indicator selection of time points from fullTimePoints

pkData

PkData-class

popAvCurve

an interpolated population average curve

timeGrid

the grid point at which to interpolate the curve

printMCError

logical indicater when true the MC error is printed to the terminal, defaults to FALSE

Value

numeric value of the timePoint choice performance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 # get example inputs
 fullPkData                 <-  getExampleTimeData() # PkData object
 fullTimePoints             <-  getTimePoints(fullPkData)
 examplePopAvCurve          <-  fullTimePoints^2 
 timePointIndicators        <-  c( 1 , 5, 21 ) # zero point included
 nGridPoints                <-  25
 timeGrid                   <-  seq( min( fullTimePoints ),
    max( fullTimePoints ) , length.out = nGridPoints ) 
 popCurveInterpolated       <-  microsamplingDesign:::interpolateVec( fullTimePoints ,
   examplePopAvCurve,  timeGrid )

 getTimeChoicePerformance( timePointInd = timePointIndicators, pkData = fullPkData ,
   popAvCurve = popCurveInterpolated, timeGrid ) 

 getTimeChoicePerformance( timePointInd = timePointIndicators, pkData = fullPkData ,
   popAvCurve = popCurveInterpolated, timeGrid, printMCError = TRUE ) 

microsamplingDesign documentation built on Oct. 13, 2021, 5:10 p.m.