Hello everyone,
I am using xtmlogit to build a mixed-effects multinomial logistic regression model. Here is the structure of my data:
The dependent variable is Function (coded as 1, 2a, 2b, 3a, and 3b). The independent variable is Type (coded as Quan or Qual). There are also variables named Author (85 unique authors) and Journals (4 different journals). The total number of observations is 2,408, with each row representing a function. My research question is whether quantitative or qualitative authors are different in choosing either one of the five functions. Here is what I have done so far.
The null model (only including the intercept and the by-author random effect)
xtset author
xtmlogit function, covariance(unstructured)
The fixed-effect model (including Type as the fixed effect and the by-author random effect)
xtset author
xtmlogit function i.type, covariance(unstructured)
Both models were fine. I also tried to examine the other types of random effects. For example, below is the by-journal random intercept as the random effect.
xtset journal
xtmlogit function, covariance(unstructured)
The model was fine, too.
My questions are:
Thank you!
I am using xtmlogit to build a mixed-effects multinomial logistic regression model. Here is the structure of my data:
The dependent variable is Function (coded as 1, 2a, 2b, 3a, and 3b). The independent variable is Type (coded as Quan or Qual). There are also variables named Author (85 unique authors) and Journals (4 different journals). The total number of observations is 2,408, with each row representing a function. My research question is whether quantitative or qualitative authors are different in choosing either one of the five functions. Here is what I have done so far.
The null model (only including the intercept and the by-author random effect)
xtset author
xtmlogit function, covariance(unstructured)
The fixed-effect model (including Type as the fixed effect and the by-author random effect)
xtset author
xtmlogit function i.type, covariance(unstructured)
Both models were fine. I also tried to examine the other types of random effects. For example, below is the by-journal random intercept as the random effect.
xtset journal
xtmlogit function, covariance(unstructured)
The model was fine, too.
My questions are:
- How can I specify the by-Author random effect and by-Journal random effect at the same time? In other words, I want to include these two random effects in the null model. The reason for this is that I want to see whether the null model with two random effects is better than the null model with only one random effect.
- How can I specify the nested structure of the random effect in the null model? In other words, I want to include the random effect where each author is nested within the journal.
- How can I specify the random slope? In other words, I want to include the Type by Journal random slope in the null model?
Thank you!