Learn R Programming

sivipm (version 1.1-4.2)

crpolyX: Create polyX Object from Standard Polynomial

Description

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

Usage

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.

See Also

vect2polyX, crpolyXT

Examples

Run this code
# NOT RUN {
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")
# }

Run the code above in your browser using DataLab