Description Usage Arguments Value Examples
mle_poisson
1 |
df |
data.frame object, containing at least column named 'x' containing non-negative integer values. |
MLE of Poisson distribution parameter L, assuming df$x ~ poisson(L).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Generate example data:
set.seed(31)
L = 5
# Number of experiments, i.e. rows in df:
numexps = 10
# Filling df with pseudo data; note the requisite column 'x':
df = data.frame('x' = rpois(numexps, L))
# Generating maximum likelihood estimate (MLE) solution for L:
L_fit = mle_poisson(df = df)
# Compare fitted values to known values:
cbind(L, L_fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.