pelt.norm.mean.cost.seglen: Calculate Normal likelihood of data segment with segment...

Description Usage Arguments Value Examples

View source: R/pelt.bck.R View source: R/pelt.R

Description

Calculates the Normal likelihood of multiple segments of data, as defined by the vector of possible start-points (tau) and a single common end-point (R). This likelihood is penalised by the segment length. The calculation assumes that the variance is fixed as 1, and sets the mean equal to its maximum likelihood estimate.

Calculates the Normal likelihood of multiple segments of data, as defined by the vector of possible start-points (tau) and a single common end-point (R). This likelihood is penalised by the segment length. The calculation assumes that the variance is fixed as 1, and sets the mean equal to its maximum likelihood estimate.

Usage

1
2
3

Arguments

tau

A vector of locations indicating the possible beginnings of a segment.

R

A single location representing the end of the possible segment

sumx

The summary statistics for the entire time series being analysed.

tau

A vector of locations indicating the possible beginnings of a segment.

R

A single location representing the end of the possible segment

sumx

The summary statistics for the entire time series being analysed.

Value

A vector containing the cost of the different possible segments defined by tau and R.

A vector containing the cost of the different possible segments defined by tau and R.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data = rnorm(100, 10, 3)
sumx = pelt.norm.sum(data)
tau = c(30,40,50) # start-points of possible segments
R = 70 # end-point of possible segments
pelt.norm.mean.cost.seglen(tau,R,sumx) # costs for each segment
data = rnorm(100, 10, 3)
sumx = pelt.norm.sum(data)
tau = c(30,40,50) # start-points of possible segments
R = 70 # end-point of possible segments
pelt.norm.mean.cost.seglen(tau,R,sumx) # costs for each segment

benpickering/smop documentation built on Sept. 4, 2020, 1:45 a.m.