pelt.norm.meanvar.cost: Calculate Normal likelihood of data segment, assuming...

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 calculation sets both the mean and variance equal to their maximum likelihood estimates.

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 calculation sets both the mean and variance equal to their maximum likelihood estimates.

Usage

1
2
3
pelt.norm.meanvar.cost(tau, R, sumx)

pelt.norm.meanvar.cost(tau, R, sumx)

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.meanvar.cost(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.meanvar.cost(tau,R,sumx) # costs for each segment

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