xregMultiplier: Exogenous variables cross-products

View source: R/xregMultiplier.R

xregMultiplierR Documentation

Exogenous variables cross-products

Description

Function generates the cross-products of the provided exogenous variables.

Usage

xregMultiplier(xreg, silent = TRUE)

Arguments

xreg

matrix or data.frame, containing variables that need to be expanded. This matrix needs to contain at least two columns.

silent

If silent=FALSE, then the progress is printed out. Otherwise the function won't print anything in the console.

Details

This function might be useful if you have several variables and want to introduce their cross-products. This might be useful when introducing the interactions between dummy and continuous variables.

Value

ts matrix with the transformed and the original variables is returned.

Author(s)

Ivan Svetunkov, ivan@svetunkov.com

See Also

es, stepwise, xregExpander, xregTransformer

Examples

# Create matrix of two variables and expand it
x <- cbind(rnorm(100,100,1),rnorm(100,50,3))
xregMultiplier(x)


config-i1/greybox documentation built on Dec. 26, 2024, 1:09 p.m.