prior.norm.A: prior.norm.A

Description Usage Arguments Details Value References Examples

View source: R/prior_norm_A.R

Description

This function computes the Norm-A prior proposed in Du, Kao and Kou (2015), which is used under conjugate normal assumption. The variance σ^2 is assumed to be drawn from an inverse Gamma distribution with shape parameter ν0 and scale parameter σ0^2, while mean is assumed to be drawn from a normal distribution with mean μ0 and variance σ^2/κ0.

Usage

1
prior.norm.A(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 (μ0, κ0, ν0, σ0^2)

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
10
library(StepSignalMargiLike)

n <- 5
data.x <- rnorm(n, 1, 1)
data.x <- c(data.x, rnorm(n, 10,1))
data.x <- c(data.x, rnorm(n, 2,1))
data.x <- c(data.x, rnorm(n, 10,1))
data.x <- c(data.x, rnorm(n, 1,1))

prior.norm.A(data.x)

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