Takes a matrix of covariates and generates a new matrix that contains the original covariates and all squared terms. Squared terms for binary covariates are omitted.
Usage
getsquares(mat)
Arguments
mat
n by k numeric matrix of covariates.
Value
n by k*2 numeric matrix that contains the original covariates plus all squared terms.