Learn R Programming

CARRoT (version 3.0.2)

cub: Three-way interactions and squares

Description

Function transforms a set of predictors into a set of predictors, their squares, pairwise interactions, cubes and three-way interactions

Usage

cub(A, n = 1000)

Value

Returns the predictors including their squares, pairwise interactions, cubes and three-way interactions

Arguments

A

set of predictors

n

first n predictors, whose interactions with the rest should be taken into account, defaults to all of the predictors

Examples

Run this code
cub(cbind(1:100,rnorm(100),runif(100),rnorm(100,0,2)))


Run the code above in your browser using DataLab