Learn R Programming

microsamplingDesign (version 1.0.8)

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

Description

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

Usage

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

Arguments

timePointInd

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

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

Run this code
# NOT RUN {
 # 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 ) 

# }

Run the code above in your browser using DataLab