Formula: E[theta | y = k] = (k + 1) f(k + 1) / f(k)
Details
For Poisson observations the posterior mean of the rate needs no parametric prior at all: it is recovered from the marginal counts alone. The gaussian branch is Tweedie's formula E[theta | y] = y + d/dy log f(y), estimated from a kernel-smoothed marginal.
References
Robbins (1956), Proc. 3rd Berkeley Symp. 1:157-163; Efron (2011), JASA 106(496):1602-1614.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Empbnp(V)
#> $estimate
#> [1] 4.375
#>
#> $theta_hat
#> [1] NaN 2 3 4 5 6 7 8 0
#>
#> $support
#> [1] 0 1 2 3 4 5 6 7 8
#>
#> $counts
#> [1] 0 1 1 1 1 1 1 1 1
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "Robbins nonparametric empirical Bayes (Poisson)"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
