probabilitiesFromContinuous_Kernel: Helper function to calculate probability from continuous data...

View source: R/tidyContinuousProbability.R

probabilitiesFromContinuous_KernelR Documentation

Helper function to calculate probability from continuous data in a tidy friendly manner

Description

The purpose of this is to calculate the probabilities of events from continuous data. This function is useful when you have a set of observations from a continuous distribution. Kernel methods resample the data and produce an evenly spaced output function so needs some sort of support range defined for each group (minVar and maxVar)

Usage

probabilitiesFromContinuous_Kernel(
  df,
  continuousVar,
  minVar = NULL,
  maxVar = NULL,
  collect = FALSE,
  ...
)

Arguments

df

a dataframe containing a column of a continuous variable X and one row per observation, df may also be grouped and in which case the grouping is preserved in the result.

minVar

- the name of the column containing the minimum value for the observation / support range

maxVar

- the name of the column containing the maximum value for the observation / support range

continousVar

- the datatable column(s) containing the observation.

Value

A mutated datatable with observations of X, the total number of observations of X (N), the probability density (p_x), and self information (I_x) associated with the value of X


terminological/tidy-info-stats documentation built on Nov. 19, 2022, 11:23 p.m.