bic.penalty: Bayesian Information Criterion penalty term

Description Usage Arguments Value Examples

Description

The function evaluates the penalty term for the standard Bayesian Information Criterion applied to the change-point detection problem. This routine is typically not called directly by the user; its name can be passed as an argument to changepoints.

Usage

1
bic.penalty(n, cpt)

Arguments

n

the number of observations

cpt

a vector with localisations of change-points

Value

the penalty term k * log(n) where k denotes the number of elements in cpt

Examples

1
2
3
4
5
6
7
8
x <- rnorm(300) + c(rep(1,50),rep(0,250))
w <- wbs(x)
w.cpt <- changepoints(w,penalty="bic.penalty")
w.cpt$cpt.ic
x <- rnorm(300) + c(rep(1,50),rep(0,250))
w <- wbs(x)
w.cpt <- changepoints(w,penalty="bic.penalty")
w.cpt$cpt.ic

Example output

$bic.penalty
[1] 55

$bic.penalty
[1] 56

wbs documentation built on May 15, 2019, 1:04 a.m.