vect2polyX: Create polyX Object from Polynomial Description

Description Usage Arguments Value See Also Examples

Description

Create an object of class polyX from a dataset of X-inputs and a vector that describes the polynomial.

Usage

1
vect2polyX(dataX, monomials)

Arguments

dataX

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

monomials

Polynomial description. A character vector. Each element describes a monomial. The input variables are coded either by their numbers, or by their names. The character "*" denotes interaction between variables.

Value

An object of class polyX.

See Also

crpolyX, vect2polyXT

Examples

1
2
3
4
5
6
7
8
X <- cornell0[,1:3]
# Monomials expressed by variable numbers:
monomials <- c("1","2","3", "1*2*3")
polyXI <- vect2polyX (X, monomials)
# Monomials expressed by variable names:
monomials <- c("Distillation", "Reformat", "NaphthaT",
               "Distillation*Reformat*NaphthaT")
polyXI <- vect2polyX (X, monomials)

sivipm documentation built on May 2, 2019, 6:41 a.m.