reform_data: Reform data

View source: R/parameterReforms.R

reform_dataR Documentation

Reform data

Description

reform_data reforms the data into a form that is easier to use when calculating log-likelihood values etc.

Usage

reform_data(data, p)

Arguments

data

a matrix or class 'ts' object with d>1 columns. Each column is taken to represent a univariate time series. NA values are not supported.

p

a positive integer specifying the autoregressive order of the model.

Value

Returns the data reformed into a ((n_obs-p+1)x(dp)) matrix. The i:th row of the matrix contains the vector (y_{i-1}',...,y_{i-p}') ((dp)x1), where y_{i}=(y_{1i},...,y_{di}) (dx1).

Warning

No argument checks!


saviviro/gmvarkit documentation built on March 8, 2024, 4:15 a.m.