Learn R Programming

expirest (version 0.1.5)

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 numeric vector of the form c(ci, cs) is returned, specifying if a common intercept is appropriate (ci = 1) or not (ci = 0) and if a common slope is appropriate (cs = 1) or not (cs = 0).

Arguments

data

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

response_vbl

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

time_vbl

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

batch_vbl

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

alpha

A numeric value specifying 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