calc_slr: Calculate score-based likelihood ratios for pairs of event...

Description Usage Arguments Value

View source: R/score_funcs.R

Description

Calculate score-based likelihood ratios for pairs of event series.

Usage

1
2
3
calc_slr(same_src, diff_src, bds.iet.mn = c(0, 1), bds.iet.md = c(0, 1),
  bds.s = c(-1, 1), bds.m = c(0, 0.6), bw.type = "nrd",
  loo_xval = FALSE)

Arguments

same_src, diff_src

Data.frame of score functions for same- and different-source pairs of event series, respectively, computed via assocr::calc_score_funcs; i.e., <iet.mn, iet.md, s, m>

bw.type

Bandwidth estimation method to use in density estimation, one of c("nrd", "nrd0", "ucv", "bcv", "SJ")

loo_xval

Boolean indicating whether or not to use leave-pairs-out cross-validation for computing the SLR and CMP (default FALSE). If TRUE, must have id.A and id.B columns in both same_src and diff_src dataframes

bds.iet, bds.s, bds.m

Vector of bounds c(low, high) for density estimation of mean/median inter-event times, segregation and mingling, respectively.

Value

Data.frame of SLRs and CMPs for each score function where indep == 1 if the pair was independent; i.e., <iet.mn, iet.md, s, m, indep, slr.iet.mn, slr.iet.md, slr.s, slr.m, cmp.iet.mn, cmp.iet.md, cmp.s, cmp.m>


UCIDataLab/assocr documentation built on Oct. 15, 2021, 8:54 p.m.