change data to AR(k) model to analyse