Dear Stata Users,

Before explaining my problem, I should say that I have tried Stata's femlogit, cmxtmixlogit functions, and also gsem workaround as an alternative for the nonexistence xtmlogit function which was explained in this post: https://www.stata.com/stata-news/news29-2/xtmlogit/. I also tried SAS procedures like GENMOD, GEE, and GLIMMIX. Unfortunately, each of these functions has limitations and either not converging or not producing "goodness-of-fit" measures. So, I appreciate your insights and help on how to approach the following problem:

My data is monthly agent-level observations to study peer influence on agents' decision outcomes (for example three unordered/categorical outcomes like "A", "B", "C") that happens every month periodically, which is not the same as time-to-event observations in survival analysis. The data is unbalanced since agents' data are not available for all months of the panel, due to their start and ending dates of employment. Also, I only have values for independent variables of observed outcome (in other words it's different from choice models analysis where we have the values of independent variables for both selected alternative and un-selected alternatives). You may find a sample of my data in the attachment. The generic format of the model is as follows:
Yit = alpha + aitYit-1 + bitXit + citGXit,outcome_n + ditGYit,outcome_n + ft

where,

Yit is agent i's decision outcome at time t (multinomial variable, more than two outcomes)

Yit-1 is agent i's previous decision outcome (Granger causality)

Xit is an agent-specific exogenous or contextual variable at time t (this variable is continuous but can be binary or categorical too)

GXit,outcome_n is a decision-specific variable and equals to variable X's average of peers who have the same decision as agent i in Yit [for example if agent i's decision at time t is "outcome2", we use members from the reference group that have same "outcome2" decision] and calculated by (sum of X of peers with the same decision as in Yit)/(agent i's group size at time t)

GYit,outcome_n is a decision-specific variable and equals to the average of decisions that are the same as what we observed in Yit and calculated by (number of similar outcomes in the agent i's reference group at time t)/(agent i's group size at time t)

This is basically "linear-in-mean model + Granger causality". Assuming that we are allowed to ignore inherited linear-in-mean models' identification and reflection issues (Manski 1993), is there any efficient and usable command/functions in Stata to estimate the following parameters as well as generating "goodness-of-fit" measures:

alpha: constant factor
a: coefficient for Granger causality
b: coefficient vector for the agent's exogenous variable (X)
c: coefficient vector for the group's average contextual variable (GX)
d: coefficient for group's decision effect (GY)
f: time (or month) fixed effect


Thanking you in advance.