# Trying to come up with a mixed design for categorical data analysis

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?

EDIT


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.

• 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? Commented May 21, 2017 at 11:52

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.