crpolyX: Create polyX Object from
Create an object of class
from raw dataset of X-inputs and standard polynomial.
Raw X-inputs. A
data.frame with as many rows as observations, and as many
columns as X-input variables.
Polynomial type. A character string among:
full: complete polynomial with all monomials
of degree less or equal to
power: power terms of degree less or equal to
interact: interactions of degree less or equal to
An object of class
The first monomials are always the X-input variables.
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")