Given any mean dissolution profile dp, this function will simulate a mean
dissolution profile such that when the newly simulated profile is compared
to dp, the calculated \(f_2\) will be equal to the predefined target
\(f_2\) value.
sim.dp.byf2(tp, dp, target.f2, seed = NULL, min.points = 3L,
regulation = c("EMA", "FDA", "WHO", "Canada", "ANVISA"),
model = c("Weibull", "first-order"), digits = 2L,
max.disso = 100, message = FALSE, both.TR.85 = FALSE,
time.unit = c("min", "h"), plot = TRUE, sim.dp.out,
sim.target = c("ref.pop", "ref.median", "ref.mean"),
model.par.cv = 50, fix.fmax.cv = 0, random.factor = 3)Numeric vector of time points tp and the mean dissolution
profiles dp.
Numeric value of target \(f_2\). It can be a single value, or a vector of two values that represent the lower and upper limit of target \(f_2\) value. See Details.
Integer seed value for reproducibility. If missing, a random seed will be generated for reproducibility purpose.
An integer indicating the minimum time points to be used
to calculate \(f_2\). The default value 3 should be used for
conventional \(f_2\) calculation. See Details. @seealso calcf2().
Character strings indicating regulatory guidelines.
@seealso calcf2() for the discussion of those guidelines.
Character strings of model names. Currently only "Weibull"
and "first-order" models are supported. @seealso sim.dp() for the
description of models.
An integer indicating the decimal points for the output.
Numeric value for the maximum possible dissolution. In theory, the maximum dissolution is 100%, but in practice, it is not uncommon to see higher values, such as 105%, or much lower values, especially for products with low solubility.
Logical. If TRUE, basic information of the simulation
will be printed on screen.
Logical. If TRUE, and if regulation = "FDA", all
measurements up to the time points at which both test and reference
products dissolve more than 85% will be used to calculate \(f_2\).
This is the conventional, but incorrect, interpretation of the US FDA rule.
Therefore, the argument should only be set to TRUE for validation purpose
such as comparing the results from old literature that use the wrong
interpretation to calculate \(f_2\). @seealso calcf2() for detailed
discussion.
Character strings indicating the unit of time. It should
be either "min" for minute or "h" for hour. It is mainly used for
checking CV rules and making plot. See Regulation in Details.
@seealso calcf2().
Logical. If TRUE, a a dissolution versus time plot will be
included in the output.
Output of function sim.dp(). If this argument is
supplied by the user, then tp/dp, regulation, model, max.disso,
and time.unit will be ignored, if they are provided by the user, since
all those arguments are included in sim.dp.out.
Character strings indicating to which target profile
should the newly simulated profile be compared for the calculation of
\(f_2\). This argument is only applicable when sim.dp.out is
provided. See Details.
Numeric values expressed as percentages
used for random generation of model parameters and fmax when optimization
algorithm is not used, i.e., when target.f2 is a vector of two numbers.
See Details.
Numeric value used for random generation of model
parameters when optimization algorithm is used, i.e., when target.f2
is a single number. See Details.
A list of 2 components: a data frame of model parameters and a
data frame of mean dissolution profile generated using the said model
parameters. The output can be passed to function sim.dp() to further
simulate multiple individual profiles.
The main principle of the function is as follows:
For any given mean dissolution profile dp, fit a suitable mathematical
model and obtain model parameters.
No precise fitting is required since those parameters will be served as initial value for further model fitting.
If sim.dp.out, the output of the function sim.dp(), is available,
no initial fitting is necessary as model parameters can be read directly
from the output, unless multivariate normal distribution approach was
used in sim.dp(). In such case, initial model fitting will be done.
Find a suitable model parameters and simulate a new dissolution profile,
comparing the new profile to the provided reference profile dp by
calculating \(f_2\). If the the obtained \(f_2\) is
equal to, or within the lower and upper limit of, the target.f2,
then the function will output the obtained model parameters and the new
profile.
There are two approaches used to find the suitable model parameters:
If target.f2 is a single value, optimization algorithm will be used and
the newly simulated dissolution profile will have \(f_2\) equal to
target.f2 when compared to dp (within numeric precision defined by the
tolerance).
If target.f2 is a vector of two numbers representing the lower and upper
limit of target \(f_2\) value, such as target.f2 = c(lower, upper),
then dissolution will be obtained by random searching and the calculated
\(f_2\) will be within the range of lower and upper.
For example, you can set target.f2 = c(54.95, 55.04) to have target
\(f_2\) of 55. Since \(f_2\) should be normally reported without
decimal, in practice, this precision is enough. You might be able to do with
c(54.99, 55.01) if you really need more precision. However, the narrower
the range, the longer it takes the function to run. With narrow range such as
c(54.999, 55.001), it is likely the program will fail. In such case,
provide single value to use optimization algorithm.
Arguments model.par.cv, fix.fmax.cv, and random.factor are certain
numeric values used to better control the random generation of model
parameters. The default values should work in most scenarios. Those values
should be changed only when the function failed to return any value. Read
vignette of the function (vignette("sim.dp.byf2", package = "bootf2"))
for more details.
The data frame sim.summary in sim.dp.out, the output of function
sim.dp(), contains dp, the population profile, and sim.mean and
sim.median, the mean and median profiles calculated with n.units of
simulated individual profiles. All these three profiles could be used as the
target profile that the newly simulated profile will be compare to. Argument
sim.target defines which of the three will be used: ref.pop, ref.mean,
and ref.median correspond to dp, sim.mean and sim.median,
respectively.
# NOT RUN {
tp <- c(5, 10, 15, 20, 30, 45, 60)
mod.par.r <- list(fmax = 100, fmax.cv = 2, tlag = 0, tlag.cv = 0,
mdt = 25, mdt.cv = 4, beta = 2.1, beta.cv = 3)
d.r <- sim.dp(tp, model.par = mod.par.r, seed = 100, n.units = 120L,
plot = FALSE)
model.par1 <- sim.dp.byf2(sim.dp.out = d.r, target.f2 = 60, seed = 123)
model.par2 <- sim.dp.byf2(sim.dp.out = d.r, target.f2 = c(59.95, 60.04),
seed = 123)
# }
Run the code above in your browser using DataLab