Create polyX Object from Standard Polynomial

Share:

Description

Create an object of class polyX from raw dataset of X-inputs and standard polynomial.

Usage

1
crpolyX(dataX, d, type = "full")

Arguments

dataX

Raw X-inputs. A data.frame with as many rows as observations, and as many columns as X-input variables.

d

Polynomial degree.

type

Polynomial type. A character string among:

  • full: complete polynomial with all monomials of degree less or equal to d,

  • power: power terms of degree less or equal to d,

  • interact: interactions of degree less or equal to d.

Value

An object of class polyX.

Note

The first monomials are always the X-input variables.

See Also

vect2polyX, crpolyXT

Examples

1
2
3
4
X <- cornell0[,1:3]
# Creation of the polynomial of degree 2 including the power terms:
# P= X1 + X2 + X3 + X1*X1 + X2*X2 + X3*X3 
P <- crpolyX(X, 2, type="power")