The function get_distance()
calculates the distance between two
lines at a given value of \(x\).
get_distance(
x_new,
model,
sl,
mode = "minimal",
alpha = 0.05,
ivl = "confidence",
ivl_type = "one.sided",
ivl_side = "lower"
)
A numeric value representing the distance of the respective lines is returned.
A numeric value of \(x\) for which the distance between two lines is sought, e.g. the distance of upper or lower confidence/prediction interval limits from the upper or lower specification or expiry limits, respectively.
A linear model object of type ‘lm
’.
A numeric variable that specifies the “specification limit”
(SL) or, for determinations according to ARGPM guidance “Stability
testing for prescription medicines”, the “expiry limit” (EL). The
EL is defined as the intercept \(\pm\) the difference between the
specification limit and the release limit (RL). If it is the upper limit
which is the relevant limit, it is added (+
) to the intercept,
otherwise it is subtracted (-
) from the intercept.
A character string of either "minimal"
or "all"
,
that specifies if only the minimal distance of a factor regression model
is returned or if the distances of all lines belonging to the different
factor levels is returned. The default is "minimal"
.
A numeric value between 0 and 1 that specifies the significance
level for the calculation of confidence or prediction intervals. The
default is 0.05
.
A character string of either "confidence"
or
"prediction"
that specifies the type of interval of interest.
The default is "confidence"
.
A character string that specifies if a “one sided”
or a “two sided” interval should be calculated, i.e. either
"one.sided"
or "two.sided"
, respectively. The default is
"one.sided"
.
A character string that specifies if the specification
limit, given that the limit has only one side, is an “upper” or a
“lower” bound, i.e. it is specified as either "upper"
or
"lower"
, respectively. The default is "lower"
. If the
specification has two boundaries, then this parameter specifies the
preferred side. If no side is preferred over the other, "both"
can
be used.
ICH Q1E recommends that “For an attribute known to decrease with
time, the lower one-sided 95 percent confidence limit should be compared
to the acceptance criterion. For an attribute known to increase with time,
the upper one-sided 95 percent confidence limit should be compared to the
acceptance criterion. For an attribute that can either increase or decrease,
or whose direction of change is not known, two-sided 95 percent confidence
limits should be calculated and compared to the upper and lower acceptance
criteria.” Since attributes often either decrease or increase, the default
for ivl_type
is one.sided
.
According to the ARGPM guidance “Stability testing for prescription medicines”, the shelf life or expiry limit is estimated as the point where the upper or lower limit of the 95% confidence interval of the linear model fitted to the data intersects the worst case scenario limit. The worst case scenario limit is obtained by adding/subtracting the absolute difference of specification limit and release limit to/from the common intercept of the test batches or the intercept of the worst performing batch.
The function find_get_distance()
estimates the distance
between the upper or lower confidence or prediction interval and the upper
or lower acceptance criterion (i.e. the specification or the expiry limit)
at a certain value of x_new
. The confidence or prediction interval
is calculated for the linear regression model provided by model
.
Recommendations on how to estimate shelf life or expiry can be found in the
corresponding section below.
Therapeutic Goods Administration (TGA) of the Department of Health of the Australian Government, Australian Regulatory Guidelines for Prescription Medicines (ARGPM), Stability testing for prescription medicines, Version 1.1, March 2017
International Council for Harmonisation of Technical Requirements for Registration of Pharmaceuticals for Human (ICH), Harmonised Tripartite Guideline, Evaluation of Stability Data Q1E, step 4, February 2003 (CPMP/ICH/420/02).
get_intvl_limit
, find_poi
,
expirest_osle
, expirest_wisle
,
lm
.