tidylo: Weighted Tidy Log Odds Ratio (original) (raw)
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.
Version: | 0.2.0 |
---|---|
Imports: | dplyr, rlang |
Suggests: | covr, ggplot2, janeaustenr, knitr, rmarkdown, stringr, testthat (≥ 2.1.0), tidytext |
Published: | 2022-03-22 |
DOI: | 10.32614/CRAN.package.tidylo |
Author: | Tyler Schnoebelen [aut], Julia Silge [aut, cre, cph], Alex Hayes [aut] |
Maintainer: | Julia Silge <julia.silge at gmail.com> |
BugReports: | https://github.com/juliasilge/tidylo/issues |
License: | MIT + file |
URL: | https://juliasilge.github.io/tidylo/,https://github.com/juliasilge/tidylo |
NeedsCompilation: | no |
Materials: | README NEWS |
CRAN checks: | tidylo results |
Documentation:
Downloads:
Linking:
Please use the canonical formhttps://CRAN.R-project.org/package=tidyloto link to this page.