Dear All,

I am trying to analyse, using panel data, the extent of state dependance to a previous situation, let's say a form of employment. To do that and following the litterature (bellow an example of references) I need to run a dynamic multinomial logit with random effect. In a previous discussion Pr.Stephan Jenkins suggested to use -gsem- routine. My concern is when I add a lagged dependant variable to capture the state depedance the model run for hours and some times days without convergence; and it converge easily when I don't add the lagged dependant variable.

Here an exemple using data of Pr. Natalia Sarkisian related to hours of work (The link to data: https://www.sarkisian.net/socy7706/datasets.html : hrs_hours_reshaped.dta)

Code:
*Create variable of hours of work with 4 classes (modalities)
recode rworkhours80 (0=0) (1/30=1) (31/50=2) (51/80=3), gen(rworkhours4)

*Generate lagged variables:

tab rworkhours4, gen(altern)

gen lag_altern1 = altern1[ _n-1]
replace lag_altern1 =. if wave==1
gen lag_altern2 = altern2[ _n-1]
replace lag_altern2 =. if wave==1
gen lag_altern3 = altern3[ _n-1]
replace lag_altern3 =. if wave==1
gen lag_altern4 = altern4[ _n-1]
replace lag_altern4 =. if wave==1

*Running the -gsem- command:
gsem (1.rworkhours4 <- lag_altern1 female age white M1[hhidpn]) (2.rworkhours4 <- lag_altern1 female age white M2[hhidpn]) (3.rworkhours4 <- lag_altern1 female age white M3[hhidpn]) if wave>1, mlogit
Listed 100 out of 54676 observations:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long hhidpn byte(wave female rworkhours80 rworkhours4 altern1 altern2 altern3 altern4) float(lag_altern1 lag_altern2 lag_altern3 lag_altern4)
10003020 1 0 40 2 0 0 1 0 . . . .
10003020 2 0 20 1 0 1 0 0 0 0 1 0
10003020 3 0 20 1 0 1 0 0 0 1 0 0
10003020 4 0  0 0 1 0 0 0 0 1 0 0
10004010 1 0  0 0 1 0 0 0 . . . .
10004010 2 0  0 0 1 0 0 0 1 0 0 0
10004010 3 0  0 0 1 0 0 0 1 0 0 0
10004010 4 0  0 0 1 0 0 0 1 0 0 0
10004010 5 0  0 0 1 0 0 0 1 0 0 0
10004010 6 0  0 0 1 0 0 0 1 0 0 0
10004010 7 0  0 0 1 0 0 0 1 0 0 0
10004010 8 0  0 0 1 0 0 0 1 0 0 0
10004010 9 0  0 0 1 0 0 0 1 0 0 0
10013010 1 0 55 3 0 0 0 1 . . . .
10013010 2 0  . . . . . . 0 0 0 1
10013010 3 0 40 2 0 0 1 0 . . . .
10013010 4 0 20 1 0 1 0 0 0 0 1 0
10013010 5 0  0 0 1 0 0 0 0 1 0 0
10013010 6 0  0 0 1 0 0 0 1 0 0 0
10013010 7 0  0 0 1 0 0 0 1 0 0 0
10013010 8 0  0 0 1 0 0 0 1 0 0 0
10013010 9 0  0 0 1 0 0 0 1 0 0 0
10038010 1 0 55 3 0 0 0 1 . . . .
10038010 2 0 50 2 0 0 1 0 0 0 0 1
10038010 3 0 50 2 0 0 1 0 0 0 1 0
10038010 4 0 40 2 0 0 1 0 0 0 1 0
10038010 5 0 40 2 0 0 1 0 0 0 1 0
10038010 6 0 30 1 0 1 0 0 0 0 1 0
10038010 7 0 30 1 0 1 0 0 0 1 0 0
10038010 8 0 20 1 0 1 0 0 0 1 0 0
10038010 9 0 20 1 0 1 0 0 0 1 0 0
10050010 1 1 45 2 0 0 1 0 . . . .
10050010 2 1 35 2 0 0 1 0 0 0 1 0
10050010 3 1 35 2 0 0 1 0 0 0 1 0
10050010 4 1 35 2 0 0 1 0 0 0 1 0
10050010 5 1 35 2 0 0 1 0 0 0 1 0
10050010 6 1 35 2 0 0 1 0 0 0 1 0
10050010 7 1 35 2 0 0 1 0 0 0 1 0
10050010 8 1 35 2 0 0 1 0 0 0 1 0
10050010 9 1 35 2 0 0 1 0 0 0 1 0
10075020 1 1 40 2 0 0 1 0 . . . .
10075020 2 1 45 2 0 0 1 0 0 0 1 0
10075020 3 1  0 0 1 0 0 0 0 0 1 0
10075020 4 1  0 0 1 0 0 0 1 0 0 0
10075020 5 1  0 0 1 0 0 0 1 0 0 0
10075020 6 1  0 0 1 0 0 0 1 0 0 0
10075020 7 1  0 0 1 0 0 0 1 0 0 0
10075020 8 1  0 0 1 0 0 0 1 0 0 0
10075020 9 1  0 0 1 0 0 0 1 0 0 0
10083020 1 1  0 0 1 0 0 0 . . . .
10083020 2 1  0 0 1 0 0 0 1 0 0 0
10083020 3 1  0 0 1 0 0 0 1 0 0 0
10083020 4 1  0 0 1 0 0 0 1 0 0 0
10083020 5 1  0 0 1 0 0 0 1 0 0 0
10083020 6 1  0 0 1 0 0 0 1 0 0 0
10083020 7 1  0 0 1 0 0 0 1 0 0 0
10083020 8 1  0 0 1 0 0 0 1 0 0 0
10083020 9 1  0 0 1 0 0 0 1 0 0 0
10090010 1 1  0 0 1 0 0 0 . . . .
10090010 2 1  0 0 1 0 0 0 1 0 0 0
10097010 1 0 45 2 0 0 1 0 . . . .
10097010 2 0  0 0 1 0 0 0 0 0 1 0
10097010 3 0  . . . . . . 1 0 0 0
10097010 4 0  . . . . . . . . . .
10097010 5 0  . . . . . . . . . .
10097010 6 0  . . . . . . . . . .
10097010 7 0  . . . . . . . . . .
10097010 8 0  . . . . . . . . . .
10097010 9 0  . . . . . . . . . .
10106010 1 0  0 0 1 0 0 0 . . . .
10106010 2 0  0 0 1 0 0 0 1 0 0 0
10106010 3 0  0 0 1 0 0 0 1 0 0 0
10106010 4 0  0 0 1 0 0 0 1 0 0 0
10106010 5 0  . . . . . . 1 0 0 0
10106010 6 0  0 0 1 0 0 0 . . . .
10106010 7 0  . . . . . . 1 0 0 0
10106010 8 0  . . . . . . . . . .
10106010 9 0  . . . . . . . . . .
10109020 1 1 30 1 0 1 0 0 . . . .
10124010 1 1  0 0 1 0 0 0 . . . .
10124010 2 1  0 0 1 0 0 0 1 0 0 0
10124010 4 1  0 0 1 0 0 0 1 0 0 0
10124010 5 1  0 0 1 0 0 0 1 0 0 0
10124010 6 1  0 0 1 0 0 0 1 0 0 0
10124010 7 1  8 1 0 1 0 0 1 0 0 0
10155010 1 1 40 2 0 0 1 0 . . . .
10155010 2 1 40 2 0 0 1 0 0 0 1 0
10155010 3 1 40 2 0 0 1 0 0 0 1 0
10155010 4 1 40 2 0 0 1 0 0 0 1 0
10237020 1 0 40 2 0 0 1 0 . . . .
10237020 2 0  . . . . . . 0 0 1 0
10237020 3 0  . . . . . . . . . .
10237020 4 0  . . . . . . . . . .
10237020 5 0  . . . . . . . . . .
10237020 6 0  . . . . . . . . . .
10237020 7 0  . . . . . . . . . .
10237020 8 0  . . . . . . . . . .
10237020 9 0  . . . . . . . . . .
10240010 1 0 40 2 0 0 1 0 . . . .
10240010 2 0  . . . . . . 0 0 1 0
end
Any help how to fix this issue and getting the impact of the lagged variable (state dependance)?
Thanks



I am using Stata 15.

Example of Rferences on state dependance:

Haan, P. and Uhlendorff, A. (2006), ‘Estimation of multinomial logit models with unobserverd heterogeneity using maximum simulated likelihood’, The Stata Journal 6(2), 229–245.
Ki-Dong Lee , Seo-Hyeong Lee & Jong-Il Choe (2017): State dependence, individual heterogeneity, and the choice of employment status: evidence from Korea, Applied Economics, DOI: 10.1080/00036846.2017.134344