Skip to content
Prev 284988 / 398502 Next

How to properly build model matrices

On 09.02.2012 22:39, Yang Zhang wrote:
You can preprocess the data and explicitly define the levels for factor 
variables in your data.frames.
R cannot know labels if you do not provide any.
Then change your model formula to: "label ~ . - 1". But note the 
interpretation changes and it is *not* redundant in general.

Uwe Ligges