Learn R Programming

StepSignalMargiLike (version 2.6.0)

prior.pois: prior.pois

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(\(\lambda\)), where \(\lambda\) is assumed to have Beta prior with shape parameters \(\alpha\) and \(\beta\).

Usage

prior.pois(data.x)

Arguments

data.x

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

Value

Vector for prior parameters in the order of (\(\alpha, \beta\))

Details

See Manual.pdf in "data" folder.

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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab