knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of gest is to create shrinkage estimates in a flexible and fast way.
This package is a convenient wrapper for the deconvolveR
package.
You can install the released version of gest from CRAN with:
install.packages("gest")
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("alexhallam/gest")
In the example below we use the add_binom_gest
to calculate the "g-estimates" which
are shrinkage estimators. Full posterior distributions are also calculated along with
confidence intervals.
library(tibble) library(gest) set.seed(2017) # simulate 200 random examples from a beta-binomial obs <- 200 dat <- tibble(prob = rbeta(obs, 10, 50), n = round(rlnorm(obs, 4, 2)) + 1, x = rbinom(obs, n, prob)) result <- add_binom_gest(dat, x, n) result
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.