I am trying to come up with a statistical model for my categorical dataset which consists of 3 categories (YES, NO, NoChange) taken across 7 different time points from 5 different locations. I have two exclusive groups (treatement1 and treatement2).

I am interested in seeing whether the proportion of YES, NO, and NoChanges is significantly different between groups (treatement1 and treatement2) at each of the 7 time points. I am not expecting to see a difference between the 5 locations, but I still need to check to make sure that this is the case. Does anyone know how one might go about testing such a dataset?


Some additional information from comments: My dependent variable is nominal. the number of observations per time point is 86 across all 5 locations for group 1 (treatement 1) and 78 across all 5 locations for group 2 (treatement 2). In addition I do not expect to find a linear trend with time. Also my time intervals aren't equally spaced, if that's relevant.

  • $\begingroup$ Your categorical dependent variable is nominal or ordinal? According to the answer to that question, we could use multinomial/ordinal logistic regression, with the variables treatment, time and location. Treatment and location would factors, time could be treated as a factor, or as ordered factor, or as numerical, the last if you have reason to expect a linear trend with time. Exact decisions would also depend on number of observations. Could you add some such information to the post? $\endgroup$ Commented May 21, 2017 at 11:52

1 Answer 1


If the dependent variable is nominal, you can use multinomial logistic regression. That is a complicated model with many parameters, so you will need a lot of data for that to work. Introduce some notation: $Y$ is the response with three nominal categories, $t$ is time, $x$ is treatment (two levels) and $z$ is geographical location (5 levels). Then the multinomial logistic regression is then $$ \DeclareMathOperator{\P}{\mathbb{P}} \P (Y_i=r \mid t_i,x_i,z_i) = \frac{e^{ \beta_{0r}+t_i \beta_t +x_i \beta_x + z_i \beta_z }}{1+\sum_{s=1}^2 e^{\beta_{0s}+t_i \beta_t +x_i \beta_x + z_i \beta_z } } $$ for $r=1,2,3$ where $r=3$ is taken as reference. So $\beta_{03}=0$. This model then has slope parameters that do not depend on the alternative chosen, only the intercepts depend on alternative. In the formula above, some of the variables (for instance time) are really vectors of dummys, so the corresponding parameter is also a vector and the product must be read as a dot product. In R, for instance, such models can be estimated by the nnet package (the basic model), while mlogit also contains extensions of this model.

Another question is if you really have enough data to estimate such a complicated model.

  • 1
    $\begingroup$ Thank you very much for your help. I am going to try to sneak one more question in, but I will figure it out on my own if you don't feel like spelling it out for me. How would you go about making sure that the dataset is big enough? Once again thanks for taking the time to answer my question. $\endgroup$ Commented May 21, 2017 at 19:22
  • $\begingroup$ One way is just to try ... then compute confidence intervals, look if they are reasonably short (short enough to be useful) $\endgroup$ Commented May 21, 2017 at 20:07
  • $\begingroup$ Thank you! I am sorry I can't upvote your answers enough, I don't have the "reputation" yet. $\endgroup$ Commented May 21, 2017 at 20:28

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.