Skip to contents

This function requires two tibbles and a function, plus arbitrary arguments. One tibble contains observed site level metrics. The other tibble contains a posterior estimate of the distribution of the metric. Applying the function should determine (a) whether or not the QTL has been breached (and at what level - eg action or warning) and (b) which observations in the site level tibble contribute to the breach.

Usage

evaluateCustomQTL(data, posterior, f, statusCol = Status, ...)

Arguments

data

the tibble containing site-level observed metrics

posterior

the tibble containing the posterior distribution of the metric, usually obtained from a fit Bayes model function.

f

the function that evaluates the QTL. The first two parameters of f should be data and posterior as defined above.

statusCol

The name of the column in the augmented data tibble that defines the status of the corresponding row

...

Other arguments passed to f.

Value

a list containing at least two elements. One element is a character string named status that reports the status of the QTL rule. If the QTL has not been breached, the value of this element should be "OK". Other values will depend on the actions of f, but use of a consistent nomenclature is recommended. Functions provided by the rbqmR package itself will return values such as "WARNING" or "ACTION". The second elements is named data that contains a copy of the data tibble augmented with statusCol.

Other elements of the return value depend on the actions of f.

Details

This functions serves both as the common basis on which more specific QTL rules may be evaluated and also as an avenue for the evaluation of study- specific or other custom QTL rules may be evaluated.