DS.micro.inf: MicroInference for DS Prior Objects

Description Usage Arguments Details Value Author(s) References Examples

View source: R/DS.micro.inf.R

Description

Provides DS nonparametric adaptive Bayes and parametric estimate for a specific observation y_0.

Usage

1
DS.micro.inf(DS.GF.obj, y.0, n.0, e.0 = NULL)

Arguments

DS.GF.obj

Object resulting from running DS.prior function on a data set.

y.0

For Binomial family, number of success y_i for new study. In the Poisson family, it is the number of counts. Represents the study mean for the Normal family.

n.0

For the Binomial family, the total number of trials for the new study. In the Normal family, n.0 is the standard error of y.0. Not used for the Poisson family.

e.0

In the case of the Poisson family with exposure, represents the exposure value for a given count value y.0.

Details

Returns an object of class DS.GF.micro that can be used in conjunction with plot command to display the DS posterior distribution for the new study.

Value

DS.mean

Posterior mean for π_{LP}(θ | y_0).

DS.mode

Posterior mode for π_{LP}(θ | y_0).

PEB.mean

Posterior mean for π_G(θ | y_0).

PEB.mode

Posterior mode for π_G(θ | y_0).

post.vec

Vector containing PEB.mean, DS.mean, PEB.mode, and DS.mode.

study

User-provided y_0 and n_0.

post.fit

Dataframe with θ, π_G(θ | y_0), and π_{LP}(θ | y_0).

Author(s)

Doug Fletcher, Subhadeep Mukhopadhyay

References

Mukhopadhyay, S. and Fletcher, D., 2018. "Generalized Empirical Bayes via Frequentist Goodness of Fit," Nature Scientific Reports, 8(1), p.9983, https://www.nature.com/articles/s41598-018-28130-5.

Examples

1
2
3
4
5
6
### MicroInference for Naval Shipyard Data: sample where y = 0 and n = 5
data(ship)
ship.ds <- DS.prior(ship, max.m = 2, c(.5,.5), family = "Binomial")
ship.ds.micro <- DS.micro.inf(ship.ds, y.0 = 0, n.0 = 5)
ship.ds.micro
plot(ship.ds.micro)

BayesGOF documentation built on May 2, 2019, 8:57 a.m.