checkAndCorrectData checks that the data is set correctly and corrects it if not.
Throws an error if it can't convert the data to the correct form.
checkAndCorrectData(data, p)a numeric vector class 'ts' object containing the data. NA values are not supported.
a positive integer specifying the order of AR coefficients.
Returns a numeric column matrix containing the data.