I am building a model that has 10 dummy variables for a category called operator. The operator values are string, so I created binary variables to make sure each operator is within the model. I am predicting the time it takes for an operator to finish a job (dependent: DaysToCompletion, which is based on approval time approved = 1, notapproved = 0) based on one independent variables (# of codes for the job and the operator dummies.)

I am going off the rule of thumb that there are about 15 times as many nonevents/events as there are parameters in my model. this rule of thumb is met as I have 80k+ values in the dataset, and plenty for each event. However I don't know if this is the best approach since I only have one other independent variable.

Is there a better approach for this type of situation? I feel like this comes up a lot with datasets I am working with, another example would be having 12 countries and trying to predict an event that might happen in said country. But having 11 dummy variables seems like a ridiculous approach given the possible breach of degrees of freedom etc.

Any help is greatly appreciated!

  • 1
    $\begingroup$ If your outcome variable is DaysToCompletion which is presumably a count then why are you talking about logistic regression $\endgroup$
    – mdewey
    Apr 19, 2019 at 16:53
  • $\begingroup$ My bad, it is titled DaysToCompletion but it is actually Approved = 1, NotAprroved = 0. I just hadnt changed it to "Approval". I will edit that now $\endgroup$
    – Analyst101
    Apr 19, 2019 at 17:05
  • $\begingroup$ @mdewey, You can use logistic regression for binomially distributed outcomes, which are the count of successes out of a fixed number of trials. $\endgroup$ Apr 19, 2019 at 18:30

1 Answer 1


There is nothing unusual about having categorical variables with many levels in your regression models. That applies to linear regressions, logistic, and all the others. As you say this gives you many coefficients for that variable (one less than the number of levels). However it seems from your description that you are not interested in specific operators but rather in removing their differences from the model. In that case you could consider defining operator as a random effect in what is called a mixed model. That will then estimate the distribution of random intercepts for each operator rather than a fixed coefficient for each. As a general rule if the categorical variable has (a) few levels (b) other researchers would use the same ones (c) you are interested in those specific ones then it is probably best as a fixed effect whereas if it has (a) many levels (b) others would use different ones (c) they are not of intrinsic interest it is probably best as a random effect.

As a postscript your question makes it seem that you are having to generate the dummy variables yourself by hand. This should not be necessary as any purpose built statistical software should do this for you. Before you proceed to investigate mixed models you might want to explore the features of your software and, if necessary, swap to something with a richer set of features.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.