Learn R Programming

expirest (version 0.1.6)

check_ancova: Result of ANCOVA model check

Description

The function check_ancova() fits an ANalysis of COVAriance (ANCOVA) model to figure out which kind of linear regression model suits the (historical) data best.

Usage

check_ancova(data, response_vbl, time_vbl, batch_vbl, alpha = 0.05)

Value

A list of two elements is returned that specifies which model, based on the ANCOVA analysis, suits best. The first element (type.spec) is a numeric vector of length 2 that specifies the best model accepted at the significance level specified by alpha. It has the form

c(ci, cs), where ci specifies if a common intercept is appropriate (ci = 1) or not (ci = 0) and cs specifies if a common slope is appropriate (cs = 1) or not (cs = 0). The second element (type.acronym) is an acronym representing the first item. In case of a linear model including only a single batch, all elements are NA.

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.

alpha

A numeric value that specifies the significance level for the decision which model is appropriate, i.e. if the assumption of common slope or common intercept is appropriate or not. The default is 0.05.

Details

The function check_ancova() fits an ANCOVA (ANalyis of COVAriance) model to the data contained in the provided data frame. Based on alpha, it checks if the intercepts and/or slopes between the groups differ significantly or not.

See Also

expirest_osle, expirest_wisle, aov.