getIndividualParameters: sample subject specific parameters to input in...

Description Usage Arguments Value Examples

View source: R/pkFunctions.R

Description

sample subject specific parameters to input in pharmacodynamic model paramaters are sample from a log-normal distribution

Usage

1
2
getIndividualParameters(meanParam, coeffVariation, nSubjects,
  corrMatrix = NULL)

Arguments

meanParam

numeric vector containing mean information of a set of parameters

coeffVariation

coefficient of variantion to inform the variance of the subject

nSubjects

the number of subjects which should be sampled

corrMatrix

optional correlation matrix when not specified parameters are assumed independent

Value

a matrix with rows subject and columns parameters

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
  parameters              <-  c( 1 , 0.1 , 10 , 3 )
  names( parameters )     <-  c( "Ka", "Ke" , "volume" , "dose" ) 
  coeffVariation          <-  c( 0.05 , 0.05 , 0.05, 0 )
  names(coeffVariation)   <-  names( parameters )
  nSubjects               <-  9

  # example correlation matrix 
  corrMatrix              <-  matrix(0.2 , nrow = 4 , ncol = 4) +
     diag( rep( 0.8 , 4 ) ) # correlation on the the log scale
  
  # assuming independence between parameters
  getIndividualParameters( parameters , coeffVariation ,  nSubjects = 9 )
  
  # assuming correlations between parameters 
  getIndividualParameters( parameters , coeffVariation ,  nSubjects = 9 , corrMatrix)
  getIndividualParameters( meanParam = parameters , coeffVariation ,  nSubjects = 3 , corrMatrix)

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