x: T by k data matrix: T data points in rows with each row being data at a given time point, and k time series in columns.
type: A character vector indicating the type of outlier to be considered by the detection procedure. See 'types' in tso function.
tsmethod: The framework for time series modeling. Default is "arima". See 'tsmethod' in tso function.
args.tsmethod: An optional list containing arguments to be passed to the function invoking the method selected in tsmethod. See 'args.tsmethod' in tso function. Default value is c(5,0,0).
Returns
A list containing:
Otable - Summary of various types of outliers detected.
x.cleaned - Outlier-adjusted data.
xadja - T-dimensional vector containing the number of time series that have outlier at a given time point.