This function separates the data into k subsets, one for each of the k states, containing the subset of the original variables that are of interest for a given state.
An xts data matrix
Class labels as a logical (two states only) or finite numeric (two or more states) vector or matrix column (not from a data frame) with length equal to the number of rows in "data." For data with only one state, this will be a vector of 1s.
A matrix of logicals with number of rows equal to the number of states and number of columns equal to the number of columns in data. The i,j entry in the matrix indicates whether or not to monitor the jth variable in the ith state.
A list with the following components:
an xts data matrix containing the subset of the state 1 data.
an xts data matrix containing the subset of the state 2 data.
an xts data matrix containing the subset of the state 3 data.
This function is designed to be used in conjunction with mspTrain
and to allow the user to monitor a different subset of the variables during each state.