Skip to content
Prev 308823 / 398503 Next

Error in contrasts message when using logistic regression code.

On Oct 23, 2012, at 1:43 PM, hoguejm <hoguejm at gmail.com> wrote:

            
More than likely, one or more of your categorical variables are not set up as factors, or if they are, then one or more have only a single factor level present in the dataset that is used for the model, thus are constant.

You might want to run:

  # see ?str
  str(data)

and:

  # see ?summary
  summary(data)

to get a sense of the structure of your data set (to make sure that you have factors and not character vectors) and to get a sense for the distribution of your IVs.

Regards,

Marc Schwartz