Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/simulateBealModelFixedEffects.R
function to generate data from a Beal model with fixed effects
1 2 3 4 5 6 7 | simulateBealModelFixedEffects(
numSubjects,
clearance,
volumeOfDistribution,
dose,
timePoints
)
|
numSubjects |
scalar, number of subject which should be generated |
clearance |
scalar, clearance |
volumeOfDistribution |
scalar, volume of distribution |
dose |
scalar, dose |
timePoints |
vector of time points |
The model used to generate data at time t is as follows
y(t)=C(t)\exp(e(t)),
where C(t), the PK-model, is defined as follows:
C(t) = \frac{\mathrm{dose}}{V_d} \exp{(CL.t)},
with V_d the volume of distribution and CL as clearance. The error model is consdiered as e(t) \sim N(0, h(t)), with:
h(t) = 0.03 + 0.165 \frac{C(t)^{-1}}{C(1.5)^{-1} + C(t)^{-1}}
generated sample with numSubjects as the number of rows and length of timePoints as the number of columns
Vahid Nassiri, Helen Yvette Barnett
Beal S. L., Ways to fit a PK model with some data below the quantification limit, Journal of Pharmacokinetics and Pharmacodynamics, 2001;28(5):481–504.
1 2 3 | set.seed(111)
simulateBealModelFixedEffects(10, 0.693,
+ 1, 1, seq(0.5,3,0.5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.