Learn R Programming

expirest (version 0.1.6)

get_wisle_poi_list: Compile information on worst case batches for what-if shelf life estimation

Description

The function get_wisle_poi_list() prepares a list of points of intersection (POI) for multiple regression models and release limits using the find_poi() function.

Usage

get_wisle_poi_list(
  icpt_list,
  model_list,
  rl,
  sl,
  srch_range,
  alpha = 0.05,
  xform = c("no", "no"),
  shift = c(0, 0),
  ivl = "confidence",
  ivl_type = "one.sided",
  ivl_side = "lower",
  ...
)

Value

A list with the following elements is returned:

all.wcsl

A list of the worst case scenario (wcs) limits with a list of four elements for each linear model named cics, dics, dids.pmse and dids. Each of these elements contains a list element for each batch (intercept) containing itself a list element for each release limit. The wcs 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.

all.poi

A list of the POI values, i.e. a list with a list of four elements for each linear model named cics, dics, dids.pmse and dids. Each of these elements contains a matrix with columns for each intercept and rows for each release limit.

all.prl

A list of the confidence or prediction interval limits that are associated with a POI value, i.e. a list with a list of four elements for each linear model named cics, dics, dids.pmse and dids. Each of these elements contains an array with a level for each batch, containing matrices with columns for each batch and rows for each release limit, where the matrices contain the estimated interval limits at each POI value per batch.

which.min.dist

A list of four elements for each linear model named cics, dics, dids.pmse and dids. Each of these list elements contains a matrix of the indices of the batches with the minimal intercept in the all.prl list. The matrices have a column for each batch and a row for each release limit.

which.min.poi

A list of four elements for each linear model named cics, dics, dids.pmse and dids. Each of these list elements contains a numeric vector with the minimal POI value of associated with each release limit.

which.wc.batch

A list of four elements for each linear model named cics, dics, dids.pmse and dids. Each of these list elements contains a numeric vector with the indices of the worst case batches associated with each release limit.

Arguments

icpt_list

A list of four elements named cics, dics, dids.pmse and dids with the intercepts of each linear regression model and batch. The cics, dics and dids.pmse elements are NA if data of only a single batch is available.

model_list

A list of regression models of different type. Usually, it is a list of four elements named cics, dics, dids.pmse and dids, where the first three elements contain ‘lm’ objects of the “common intercept / common slope” (cics), “different intercept / common slope” (dics) and “different intercept / different slope” (dids.pmse) type. The fourth element with the label dids is usually a list of the ‘lm’ objects that is obtained from fitting a regression model to the data of each level of the categorical variable separately. The dids.pmse model differs from the dids model in that it is a model with the categorical variable as a fixed main effect and with an interaction term of the categorical variable with the time variable, i.e. a model where the mean square error is pooled across batches (thus the “pmse” suffix meaning “pooled mean square error”). The cics, dics and dids.pmse elements are NA if data of only a single batch is available.

rl

A numeric value or a numeric vector that specifies the release specification limit(s) for which the corresponding expiry should be estimated.

sl

A numeric value or a numeric vector of length 2 that specifies the specification limit or limits. If a vector is provided it must be of the form c(lower limit, upper limit).

srch_range

A vector of length 2 that specifies the end-points of the (time) range that is supposed to contain the shelf life or retest period.

alpha

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.

xform

A vector of two character strings that specifies the transformation of the response and the time variable. The default is “no” transformation, i.e. c("no", "no"), where the first element specifies the transformation of the \(x\) variable and the second element the transformation of the \(y\) variable. Valid alternatives for \(x\) and/or \(y\) variable transformation are "log" (natural logarithm), "sqrt" (square root) and "sq" (square).

shift

A vector of two values which will be added to the variables \(x\) and/or \(y\) before they are transformed as specified by the xform parameter, where the first element will be added to the \(x\) variable and the second element to the \(y\) variable. The purpose is to prevent an undefined state which could arise when variables with values of \(\leq 0\) are log or square root transformed. The default is c(0, 0).

ivl

A character string of either "confidence" or "prediction" that specifies the type of interval of interest. The default is "confidence".

ivl_type

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".

ivl_side

A character string that specifies if the “upper” or the “lower” limit is the relevant limit, i.e. either "upper" or "lower", respectively. The default is "lower". Since this parameter additionally specifies the relationship of rl with sl, i.e. which of the two sides of sl the rl is compared to, only either either "upper" or "lower" is possible. In this respect, the usage of ivl_side differs from its usage in the expirest_osle() function where ivl_side in addition can be "both".

...

Additional named or unnamed arguments passed on to uniroot().

Details

The function get_wisle_poi_list() applies the find_poi() function (find the “point of intersection”) on all the models and for each release limit (rl) provided. With respect to the latter it differs from the get_poi_list() function.

See Also

get_icpt_list, get_model_list, get_wcs_limit, find_poi, get_intvl_limit, expirest_osle, expirest_wisle.