knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

gest

Travis build status

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.

Installation

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")

Example

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

Related Work

ebbr

Academic Work

deconvolveR



alexhallam/gest documentation built on March 24, 2020, 1:22 a.m.