check_and_correct_data function

Check that the data is set correctly and correct if not

Check that the data is set correctly and correct if not

check_and_correct_data checks that the data is set correctly and throws an error if there is something wrong with the data.

check_and_correct_data(data, p)

Arguments

  • data: a numeric vector or class 'ts' object containing the data. NA values are not supported.
  • p: a positive integer specifying the autoregressive order of the model.

Returns

Returns the data as a class 'ts' object.

  • Maintainer: Savi Virolainen
  • License: GPL-3
  • Last published: 2025-04-07

Useful links