Whether the columns should be centered before interacting.
deletion
Whether to automatically drop pairwise linearly dependent columns and columns of all 0's or 1's.
threshold
Threshold to drop correlated columns.
frame.meanPre
An argument to use when maketwoway is called within predict.FindIt.
predict
An argument to use when maketwoway is called within predict.FindIt.
Details
Useful for constructing a matrix for FindIt. Takes a matrix and returns a matrix of two-way interactions. A named matrix with an intercept, all two-way interactions and square terms are returned. If center=TRUE, interactions are formed by (1) centering, (2) scaling to sd 1, and (3) interacting.
Non-sensible interactions, such as interacting dummy variables for male and female, as well as squared terms for dummy variables, are not returned. A rescaling vector is returned, so that the columns of the standardized matrix can be returned to their original scale.
Value
X
A matrix with all linear terms, squared terms, and two-way interactions from the original matrix.
scale.X
A vector of weights for reutrning X to its original scale.