prior.pois: prior.pois

Description Usage Arguments Details Value References Examples

View source: R/prior_pois.R

Description

This function computes the Pois prior proposed in Du, Kao and Kou (2015), which is used under the Poisson assumption with conjugate prior. The data is assumed to follow Poisson(λ), where λ is assumed to have Beta prior with shape parameters α and β.

Usage

1
prior.pois(data.x)

Arguments

data.x

Observed data in vector form where each element represents a single observation.

Details

See Manual.pdf in "data" folder.

Value

Vector for prior parameters in the order of (α, β)

References

Chao Du, Chu-Lan Michael Kao and S. C. Kou (2015), "Stepwise Signal Extraction via Marginal Likelihood". Forthcoming in Journal of American Statistical Association.

Examples

1
2
3
4
5
6
7
8
9
n <- 20

data.x <- rpois(n, 1)
data.x <- c(data.x, rpois(n, 10))
data.x <- c(data.x, rpois(n, 50))
data.x <- c(data.x, rpois(n, 20))
data.x <- c(data.x, rpois(n, 80))

prior.pois(data.x)

StepSignalMargiLike documentation built on May 19, 2018, 5:04 p.m.