Learn R Programming

expirest (version 0.1.6)

get_model_list: Linear model fitting

Description

The function get_model_list() fits four types of linear regression models that are often used for the assessment of stability data, e.g. for the estimation of the shelf life or retest period.

Usage

get_model_list(data, response_vbl, time_vbl, batch_vbl)

Value

A list of three elements is returned, containing the following elements:

Models

A list of four elements named cics, dics, dids.pmse and dids. The first three elements contain the ‘lm’ objects of the “common intercept / common slope” (cics), “different intercept / common slope” (dics) and “different intercept / different slope” (dids) models. The fourth element is 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 cics, dics and dids.pmse elements are NA if data of only a single batch is available.

AIC

A numeric named vector of the Akaike Information Criterion (AIC) values of the cics, dics and dids.pmse models.

BIC

A numeric named vector of the Bayesian Information Criterion (BIC) values of each of the cics, dics and dids.pmse models.

Arguments

data

A data frame with the columns specified by response_vbl, time_vbl and batch_vbl.

response_vbl

A character string that specifies the response variable name that must be a column of data.

time_vbl

A character string that specifies the time variable name that must be a column of data.

batch_vbl

A character string that specifies the column in data with the grouping information (i.e. a factorial variable) for the differentiation of the observations of the various batches.

Details

The function get_model_list() expects a data frame with a response variable, a time variable and a categorical variable which usually has factor levels of multiple batches of a drug product that was assessed over a certain period of time with respect to the time-dependent behaviour of characteristic parameters. Using these results, the function fits

  • a common intercept / common slope model (cics),

  • a different intercept / common slope model (dics) or

  • a different intercept / different slope model with pooled mean square error (dids.pmse) and

  • a different intercept / different slope model (dids) in which individual models are fitted to each level of the categorical variable.

If the categorical variable has only a single factor level, then the first three models are NA and only a single regression model is fitted.

See Also

expirest_osle, expirest_wisle, lm, AIC, BIC.