Learn R Programming

GPoM (version 1.0)

regSeries: regSeries : Estimate regressors time series

Description

Creates series by multiplying given time series among them.

Usage

regSeries(nVar, dMax, series, pReg = NULL)

Arguments

nVar

The model dimension expected. This parameter will be deduced from the input data (series) if series is a matrix. If series is a vector, the expected dimension nVar should be provided.

dMax

Maximum degree of the polynomial functions allowed in the model (see poLabs).

series

A matrix containing the original time series from which the regressors ones are built. One time series by column

pReg

A matrix filled, for each column, with powers of time series used to create

Value

rpFull A matrix of time series. Each column correspond to one regressor such as \(X_1^2 X_3 X_4\)

Examples

Run this code
# NOT RUN {
data(sprottK)
sprottK <- as.matrix(sprottK)
dMax <- 2
nVar <- dim(sprottK)[2]

#Example 1
polySeries2 <- regSeries(nVar, dMax, sprottK)

#Example 2
p <- c(1,3,1)
polySeries2 <- regSeries(nVar, dMax, sprottK, pReg=p)

# }

Run the code above in your browser using DataLab