Skip to content
Prev 54330 / 63424 Next

Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing

Hi Arie,

I understand what you're saying. The following excerpt out of the book
shows that F_j does not refer exclusively to categorical factors: "...the
rule does not do anything special for them, and it remains valid, in a
trivial sense, whenever any of the F_j is numeric rather than categorical."
Since F_j refers to both categorical and numeric variables, the behavior of
model.matrix is not consistent with the heuristic.

Best regards,
Tyler
On Sat, Nov 4, 2017 at 6:50 AM, Arie ten Cate <arietencate at gmail.com> wrote: