View source: R/est_params_expdist.R
est_params_expdist | R Documentation |
Given a data frame and the name of a continuous variable from the data frame, suppose the CCDF of the variable on a log-y scale is linear, then its distribution can be modeled by the exponential distribution, of which the rate can be estimated by this function.
est_params_expdist(df, varname, digits = 3)
df |
A data frame. |
varname. |
String, name of a continuous variable with an empirical distribution approximately exponential. |
digits. |
Integer, the number of digits after decimal point to keep for the estimated parameter values. |
An estimate of the rate of a theoretical exponential distribution.
library(ezplot) est_params_expdist(births, 'diffs') est_params_expdist(births, 'diffs', digits = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.