get_model: Select the Best Fitting Model.

View source: R/utils.R

get_modelR Documentation

Select the Best Fitting Model.

Description

In case the user has not specified a specific model out of multiple fitted models the one with the lowes AIC value will be selected. If multiple models have the same AIC the one with the lowes complexity will be chosen.

Usage

get_model(object, model.no = NULL, cpx = NULL)

Arguments

object

(object) of class "VFP"

model.no

(integer) specifying a fitted model stored in 'object'

cpx

(integer) vector specifying the order of complexity used to select the less complex model when multiple, identical AIC values occur, taken from the fitted object or c(1, 2, 3, 9, 5, 4, 7, 6, 8) is used if not specified

Value

(integer) index of selected model in 'object$Models' or 'object$AIC'

Author(s)

Andre Schuetzenmeister andre.schuetzenmeister@roche.com

Examples


library(VCA)
data(VCAdata1)
lst <- anovaVCA(y~(device+lot)/day/run, VCAdata1, by="sample")
mat <- get_mat(lst)		# automatically selects "total"
res <- fit_vfp(model.no=1:9, Data=mat)
get_model(res)


VFP documentation built on April 13, 2025, 5:12 p.m.