Learn R Programming

radiant.data (version 1.4.5)

qterms: Create a vector of quadratic and cubed terms for use in linear and logistic regression

Description

Create a vector of quadratic and cubed terms for use in linear and logistic regression

Usage

qterms(vars, nway = 2)

Value

Character vector of (regression) term labels

Arguments

vars

Variables labels to use

nway

quadratic (2) or cubic (3) term labels to create

Examples

Run this code
qterms(c("a", "b"), 3)
qterms(c("a", "b"), 2)

Run the code above in your browser using DataLab