Skip to contents

Calculate loglikelihood association measures for vectors of counts.

Usage

ll(o11, f1, n = sum(f1 + f2), f2 = sum(o11), one_sided = TRUE)

Arguments

o11

numeric or integer with joint frequency

f1

numeric or integer with frequencies of tokens

n

numeric or integer with overall frequencies if not provided, sum of f1 is taken

f2

numeric or integer with frequencies of co-occurring tokens or construction if not provided, sum of joint frequencies (o11) is taken

one_sided

logical if TRUE, repulsion is indicated by a negative sign

Value

numeric

Examples

ll(c(this = 41, is = 32, corpus = 41, data = 12), c(12, 1, 0, 3))
#> Warning: NaNs produced
#>      this        is    corpus      data 
#> 233.87712 323.82412       Inf  68.65986