get_distance {expirest} | R Documentation |
Determine distance of lines
Description
The function get_distance()
calculates the distance between two
lines at a given value of x
.
Usage
get_distance(
x_new,
model,
sl,
mode = "minimal",
alpha = 0.05,
ivl = "confidence",
ivl_type = "one.sided",
ivl_side = "lower"
)
Arguments
x_new |
A numeric value of |
model |
A linear model object of type ‘ |
sl |
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 |
mode |
A character string of either |
alpha |
A numeric value between 0 and 1 that specifies the significance
level for the calculation of confidence or prediction intervals. The
default is |
ivl |
A character string of either |
ivl_type |
A character string that specifies if a “one sided”
or a “two sided” interval should be calculated, i.e. either
|
ivl_side |
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 |
Details
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.
Value
A numeric value representing the distance of the respective lines is returned.
How to estimate shelf life or expiry
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.
References
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).
See Also
get_intvl_limit
, find_poi
,
expirest_osle
, expirest_wisle
,
lm
.