calibrate_byminrss: Modelling of performances of assemblages

Description Usage Arguments Details Value See Also

View source: R/calibrating.R

Description

Take a vector fobs of assembly performances over several experiments and return a vector of performances predicted as the mean performances of assemblages that share the same assembly motif.

Assembly motifs are labelled in the vector assMotif. Experiments are labelled in the vector xpr. Modelling options are indicated in opt.mean and opt.model. Occurrence matrix mOccur is used if opt.model = "byelt".

Usage

1
2
calibrate_byminrss(fobs, assMotif, mOccur, xpr,
opt.mean = "amean", opt.model = "bymot"  )

Arguments

fobs

a numeric vector. The vector fobs contains the quantitative performances of assemblages.

assMotif

a vector of labels of length(fobs). The vector assMotif contains the assembly motifs of assemblages.

mOccur

a matrix of occurrence (occurrence of components). Its first dimension equals to length(fobs). Its second dimension equals to the number of components.

xpr

a vector of numerics of length(fobs). The vector xpr contains the weight of each experiment, and the labels (in names(xpr)) of different experiments. The weigth of each experiment is used in the computation of the Residual Sum of Squares in the function rss_clustering. All assemblages that belong to a given experiment should then have a same weigth. Each experiment is identified by its names (names(xpr)) and the RSS of each experiment is weighted by values of xpr. The vector xpr is generated by the function stats::setNames.

opt.mean

a character equals to "amean" or "gmean". Switchs to arithmetic formula if opt.mean = "amean". Switchs to geometric formula if opt.mean = "gmean".

opt.model

a character equals to "bymot" or "byelt". Switchs to simple mean by assembly motif if opt.model = "bymot". Switchs to linear model with assembly motif if opt.model = "byelt".

Details

Modelled performances are computed using arithmetic mean (opt.mean = "amean") or geometric mean (opt.mean = "gmean").

If opt.model = "bymot", modelled performances are means of performances of assemblages that share a same assembly motif by including all assemblages that belong to a same assembly motif.

If opt.model = "byelt", modelled performances are the average of mean performances of assemblages that share a same assembly motif and that contain the same components as the assemblage to calibrate. This procedure corresponds to a linear model within each assembly motif based on the component occurrence in each assemblage. If no assemblage contains component belonging to assemblage to calibrate, performance is the mean performance of all assemblages as in opt.model = "bymot".

Value

Return a vector of length(fobs). Its values are computed according to opt.mean and opt.model.

See Also

validate_using_cross_validation predicts performances of assemblages.


functClust documentation built on Dec. 2, 2020, 5:06 p.m.