Skip to content

under certain conditions, model.matrix appears to lack one (PR#647)

1 message · Brian Ripley

#
On Sun, 27 Aug 2000 rnassar@duke.edu wrote:

            
Right, but first is not allowed by (?contrasts)

     ctr: either a matrix whose columns give coefficients for contrasts
          in the levels of `x', or the (quoted) name of a function
          which computes such matrices.

and the second is arguably correct: you chose to use only two columns.
However, the behaviour is different in the development version, 
which does not code x in models such as this, and so does not
have the problem.

That is not precisely what S does, but seems a sane way of interpreting the
contradictory information given (which is that you don't want an intercept
and that you only want two columns for the coding matrix for x!  That
applies to the function case too: there the coding matrix is evaluated
before knowing if contrast are required, that is using argument contrasts =
FALSE).