View source: R/tidyDiscreteSelfInformation.R
calculateSelfInformation_Grassberger | R Documentation |
P. Grassberger, “Entropy Estimates from Insufficient Samplings,” arXiv [physics.data-an], 29-Jul-2003 [Online]. Available: http://arxiv.org/abs/physics/0307138
calculateSelfInformation_Grassberger(df, groupVars, countVar = NULL, ...)
df |
- may be grouped, in which case the grouping is interpreted as different types of discrete variable |
groupVars |
- the columns of the discrete value quoted by the vars() function (e.g. ggplot facet_wrap) |
countVar |
- (optional) if this datafram represents summary counts, the columns of the summary variable. |
but with a digamma based function (rather than harmonics) detailed in eqns 31 & 35. For our purposes we fix l=0 to give the form in eqn 27. The error in this method is supposedly better for undersampled cases (where number of bins similar to number of samples)
This is a bit of a cheat as works out the overall entropy and then scales that to get the self information but seems to produce the right answer
a dataframe containing the disctinct values of the groups of df, and for each group an entropy value (H). If df was not grouped this will be a single entry
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.