Description Usage Arguments Value Examples
View source: R/pelt.bck.R View source: R/pelt.R
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 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 likelihood is penalised by the segment length. The calculation sets both the mean and variance equal to their maximum likelihood estimates.
1 2 3 | pelt.norm.meanvar.cost.seglen(tau, R, sumx)
pelt.norm.meanvar.cost.seglen(tau, R, sumx)
|
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. |
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
.
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.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.meanvar.cost.seglen(tau,R,sumx) # costs for each segment
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.