powered by
Creates polynomial variables.
polynomial(x,degree=2,center=mean(x,na.rm=T), version=F)
variable used to create the polynomials.
the maximum degree polynomial to be returned. Polynomials of degree <= degree will be returned.
degree
the value to center the polynomials at.
if TRUE, returns the version of the function and nothing else.
TRUE
A matrix containing the linear splines.
# NOT RUN { # Reading in a dataset mri <- read.table("http://www.emersonstatistics.com/datasets/mri.txt", header=TRUE) attach(mri) # Create a polynomial on ldl polynomial(ldl, degree=3) # }
Run the code above in your browser using DataLab