add_llr: Calculate the log-likelihood ratios from given...

Description Usage Arguments Value

View source: R/utility_functions.R


From a data.table containing the log-likelihoods for all event types, and for the null hypothesis of no event, calculates the log-likelihood ratios by subtracting null log-likelihoods from the event log-likelihoods, for each location, stream, and event duration.


add_llr(loglikelihoods, null_name)



A data.table containing at least the columns event, location, stream, duration and loglikelihood. The first four columns must be key columns, in that order. The column event contains all event types (given e.g. as integers or strings) and also the null hypothesis, as specified by the argument null_name.


The identifier for the null hypothesis in the column event of the input argument loglikelihoods. E.g. 0L if event types are specified as integers, or "null" if event types are specified as strings.


A data.table with key columns location, event, stream, duration, and a column llr containing the log-likelihood ratios for each event type.

scanstatistics documentation built on May 30, 2017, 4:44 a.m.

Search within the scanstatistics package
Search all R packages, documentation and source code