Creates the augmented predictor matrix based on an appropriately defined changepoint structure.
Usage
aug.x(X, cp.locs, cp, delta = NULL)
Value
aug.x returns a matrix of the original matrix X with the predictor adjusted for changepoints and (optional) discontinuities.
Arguments
X
The raw matrix of predictor values. Note that the raw data matrix should not include a columns of 1's.
cp.locs
The locations of the changepoints. The length of this vector must be equal to the sum of the entries of cp.
cp
A vector having length equal to the number of predictors.
delta
A vector to accommodate discontinuities. If NULL, then no discontinuities are included. Otherwise, this must be a vector of the same length as cp.locs.
Details
This function is called by segregmixEM and the associated internal functions.