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

Description Usage Arguments Value

Description

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.

Usage

1
add_llr(loglikelihoods, null_name)

Arguments

loglikelihoods

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.

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.

Value

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



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

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.