calculate.alpha.cost: Intra-Variable Penalised Cost Calculation

Description Usage Arguments Details Value

View source: R/mv.costs.R

Description

Calculates the intra-variable penalised cost (i.e. using only the alpha penalty) for all variables for all possible previous changepoint vectors.

Usage

1
2
calculate.alpha.cost(n, n.nonzero, x, x2, p, alpha, length.checklist,
  cost.func = norm.meanvar)

Arguments

n

A matrix containing the lengths between the changepoints in current changepoint vector being considered and the changepoints in the check-list of previous changepoint vectors.

n.nonzero

A matrix containing the logical values indicating which of the corresponding values in n are non-zero.

x

A p x length.checklist matrix containing the cumulative sums of the observations between the current changepoint vector and each corresponding changepoint vector on the check-list.

x2

The same as x, except containing the cumulative sums of the squared observations.

p

The number of variables in the series.

alpha

The variable-specific penalty, used to penalise the addition of a given changepoint into a given variable. A non-negative numeric value.

length.checklist

The number of possible previous changepoint vectors on the check-list being considered.

cost.func

The function being used to calculate the multivariate cost. Required to be a function (not a string name).

Details

An internal function, not designed for use by the end-user.

Value

A vector of length length.checklist containing the intra-variable penalised costs for each changepoint vector on the check-list.


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