calcf2: Calculate Similarity Factor f2

Description Usage Arguments Details Value Examples

View source: R/calcf2.R

Description

Main function to calculate f2 according to different regulatory guidelines.

Usage

1
2
3
4
5
6
7
calcf2(test, ref, path.in, file.in, path.out, file.out,
       regulation = c("EMA", "FDA", "WHO", "Canada", "ANVISA"),
       cv.rule = TRUE, message = FALSE, min.points = 3L,
       f2.type = c("est.f2", "exp.f2", "bc.f2", "vc.exp.f2",
                   "vc.bc.f2", "all"), both.TR.85 = FALSE,
       digits = 2L, time.unit = c("min", "h"),  plot = TRUE,
       plot.start.time = 0, plot.max.unit = 24L)

Arguments

test, ref

Data frames of dissolution profiles of test and reference product if path.in and file.in are not specified; otherwise, they should be character strings indicating the worksheet names of the Excel file where the dissolution data is saved. See Input/Output in Details.

path.in, file.in, path.out, file.out

Character strings of input and output directories and file names. See Input/Output in Details.

regulation

Character strings indicating regulatory guidelines. See Regulation in Details.

cv.rule

Logical. If TRUE, CV rule will be checked according to regulatory guidelines. See Regulation in Details.

message

Logical. If TRUE, the results and messages will be printed on screen. Users are recommended to set it to TRUE.

min.points

An integer indicating the minimum time points to be used to calculate f2. The default value 3 should be used for conventional f2 calculation. This parameter is mainly used for bootstrap f2 method. See Regulation in Details. @seealso bootf2().

f2.type

Character strings indicating which f2 estimators should be calculated. For conventional f2 calculation, the default "est.f2" should be used. Other estimators are mainly for the bootstrap method. @seealso bootf2().

both.TR.85

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 f2. 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 f2. See Regulation in Details.

digits

An integer indicating the decimal points for the output.

time.unit

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.

plot

Logical. If TRUE, a dissolution versus time plot will be printed.

plot.start.time

Numeric value indicating the starting time for the plot.

plot.max.unit

Integer. If the number of individual units is no more than this value, the mean and all individual profiles will be plotted; otherwise, individual profiles will be represented by boxplots at each time point. Therefore, to avoid overplotting, this value should not be too large. @seealso calcf2().

Details

Minimum required arguments that must be provided by the user

Arguments test and ref must be provided by the user. They should be R data frames, with time as the first column, and all individual profiles profiles as the rest columns, or mean profile as the second column if only mean profile is available. The actual names of the columns do not matter since they will be renamed internally.

Input/Output

The dissolution data of test and reference product can either be provided as data frames for test and ref, as explained above, or be read from an Excel file with data of test and reference stored in separate worksheets. In the latter case, the argument path.in, the directory where the Excel file is, and file.in, the name of the Excel file including the file extension .xls or .xlsx, must be provided. In such case, the argument test and ref must be the names of the worksheets in quotation marks. The first column of each Excel worksheet must be time, and the rest columns are individual dissolution profiles, or the second column must be mean profile if only mean data is available. The first row should be column names, such as time, unit01, unit02, ... The actual names of the columns do not matter as they will be renamed internally.

Arguments path.out and file.out are the names of the output directory and file. It is an overkill to output such simple calculations; therefore, unless these two arguments are specified by the user, results are printed on screen by default.

Regulation

To apply f2 method, different regulatory guidelines have slightly different requirements. Some requirements are almost universal, such as same time points for the test and reference product, minimum 3 time points (excluding time zero), and twelve individual profiles for each formulation. Other requirements are slightly different among different regulatory guidelines, or at least interpreted differently. Two main issues are the rules for the variability (CV Rule) and time points where dissolution is more than 85% (85% Rule).

CV rule

The phrase the first time point in EMA rule was later interpreted as all time points up to 10 min, according to an unofficial communication with an European regulator. This makes the EMA rule the same as WHO rule. For example, if there are 5 min and 10 min time points in the dissolution profiles, the CV for both 5 min and 10 min should not be greater than 20%.

The first time point in ANVISA rule corresponds to 40% of the total collected points. For example, for a dissolution profile with five collection times, the first two collection times are considered first points.

The phrase early time points in FDA rule is typically interpreted as those points up to 15 min, sometimes even up to 20 min according to an unofficial communication with FDA staff. In the function calcf2(), the cutting point for FDA rule is 15 min.

85% Rule

This rule is implemented as follows:

Notes on conventional FDA rule

The exact phrase in the guidance of US FDA regarding this rule is that "Only one measurement should be considered after 85% dissolution of both the products." Due to the ambiguous word "both" used in the sentence, the conventional interpretation was that all measurements up to the time point at which both test and reference dissolved more than 85% should be included in the calculation of f2. However, this is only true when both test and reference dissolve more than 85% at the same time points.

Consider the following example:

time test reference
5 7 10
10 15 20
15 50 55
20 69 86
30 82 90
45 84 95
60 86 97

According to conventional interpretation, all measurements up to 60 min should be included to calculate f2 because both test and reference dissolved more than 85% only at 60 min, not at any earlier time point. However, in such case, there would be 4 measurement of reference (20, 30, 45, and 60 min) included in the calculation, which would be a direct contradictory to the phrase "Only one measurement should be considered after 85% ..." in the same statement in the guidance!

In an unofficial communication using this example, an FDA staff confirmed that only the first 4 time points (up to 20 min) would be used. In other words, FDA rule in this regard is the same as EMA rule.

The statement in ANVISA guideline also uses the word "ambos" (means both), which could also lead to the similar confusion. Follow the same logic as demonstrated above, it should also be interpreted as the same rule in EMA guideline.

Read vignette Introduction to bootf2 for more details.

Value

A data frame of f2 type and f2 value, the number of time points used for the calculation (f2.tp), indication if both test and reference dissolve more than 85% at 15 min (d85at15), and other information used for the calculation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
tp <- c(5, 10, 15, 20, 30, 45, 60)

mod.par.t <- list(fmax = 100, fmax.cv = 2, tlag = 0, tlag.cv = 0,
                  mdt = 20, mdt.cv = 5, beta = 2.2, beta.cv = 5)

d.t <- sim.dp(tp, model.par = mod.par.t, seed = 100, n.units = 120L,
              plot = FALSE)$sim.disso

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)$sim.disso

# set `message = TRUE` to view the compliance of the regulatory guidelines.
calcf2(d.t, d.r, plot = FALSE)

bootf2 documentation built on Aug. 25, 2021, 5:07 p.m.