Skip to content

Indicator variables for modeling in R ?

1 message · Bert Gunter

#
1. Is there ever a situation using the R recommended packages only (to
keep things reasonable) where one explicitly needs to create indicator
variables to do statistical modeling?

2. If so, does model.matrix() always suffice to do this?

In any situation I can imagine, one would create a factor and then
proceed from there. But I may lack imagination.

Thanks.

-- Bert