| subset {TSPred} | R Documentation | 
Subsetting data into training and testing sets
Description
subset is a generic function for subsetting time series data
into training and testing sets. The function invokes particular methods which
depend on the class of the first argument.
Usage
subset(obj, ...)
## S3 method for class 'tspred'
subset(obj, data = NULL, ...)
Arguments
| obj | An object of class  | 
| ... | Other parameters passed to the method  | 
| data | A list of time series to be transformed. | 
Details
The function subset.tspred calls the method preprocess
on the subsetting object from obj. The produced training and
testing sets of time series data are introduced in the structure
of the tspred class object in obj.
Value
An object of class tspred with updated structure containing
the produced training and testing sets of time series data.
Author(s)
Rebecca Pontes Salles
See Also
[tspred()] for defining a particular time series prediction process, and [subsetting()] for defining a time series subsetting transformation.
Other preprocess: 
postprocess.tspred(),
preprocess.tspred()
Examples
data(CATS)
#Obtaining objects of the processing class
proc1 <- subsetting(test_len=20)
proc2 <- BoxCoxT(lambda=NULL)
#Obtaining objects of the modeling class
modl1 <- ARIMA()
#Obtaining objects of the evaluating class
eval1 <- MSE_eval()
#Defining a time series prediction process
tspred_1 <- tspred(subsetting=proc1,
                   processing=list(BCT=proc2),
                   modeling=modl1,
                   evaluating=list(MSE=eval1)
)
summary(tspred_1)
tspred_1_subset <- subset(tspred_1, data=CATS[3])