tidylo: Weighted Tidy Log Odds Ratio

How can we measure how the usage or frequency of some feature, such as words, differs across some group or set, such as documents? One option is to use the log odds ratio, but the log odds ratio alone does not account for sampling variability; we haven't counted every feature the same number of times so how do we know which differences are meaningful? Enter the weighted log odds, which 'tidylo' provides an implementation for, using tidy data principles. In particular, here we use the method outlined in Monroe, Colaresi, and Quinn (2008) <doi:10.1093/pan/mpn018> to weight the log odds ratio by a prior. By default, the prior is estimated from the data itself, an empirical Bayes approach, but an uninformative prior is also available.

Package details

AuthorTyler Schnoebelen [aut], Julia Silge [aut, cre, cph] (<https://orcid.org/0000-0002-3671-836X>), Alex Hayes [aut] (<https://orcid.org/0000-0002-4985-5160>)
MaintainerJulia Silge <julia.silge@gmail.com>
LicenseMIT + file LICENSE
Version0.2.0
URL https://juliasilge.github.io/tidylo/ https://github.com/juliasilge/tidylo
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("tidylo")

Try the tidylo package in your browser

Any scripts or data that you put into this service are public.

tidylo documentation built on March 22, 2022, 5:08 p.m.