tsmat: 'tsmat' constructs a (n-p+1,p) matrix from a time series...

Description Usage Arguments Value Examples

View source: R/auxilary.r

Description

tsmat constructs a (n-p+1,p) matrix from a time series where the first column is the shortened series y[p],...,y[n], the second is y[p-1],...,y[n-1], etc.

Usage

1
tsmat(y, p)

Arguments

y

the series, a vector or a time series of length n

p

desired number of columns

Value

mat (n-p+1,p) matrix

Examples

1
out <- tsmat(c(1:20),4)

tsapp documentation built on Oct. 30, 2021, 5:08 p.m.

Related to tsmat in tsapp...