Hello,

I'm using Stata 15.1 and I have a problem with the mixed effect model, it doesn't converge but continue to iterate indefinitely

I don't have an error message to share with you but here I copied part of the output, the iteration will run until I break it ( it was going to over 590 iteration lines one time)



Array


here is a sample of my data:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float studycode str11 subjid byte aeyn float(age sex hdcat)
3 "011-915-432" 0 35 0 2
3 "013-009-435" 0 69 0 2
3 "013-009-435" 0 71 0 2
3 "013-009-435" 0 69 0 2
3 "015-044-111" 0 58 0 2
3 "015-044-111" 0 56 0 2
1 "015-044-111" 0 59 0 2
1 "015-044-111" 0 60 0 2
1 "015-044-111" 0 59 0 2
3 "016-877-556" 0 47 0 2
3 "016-877-556" 0 47 0 2
3 "016-877-584" 0 44 1 2
3 "017-871-584" 0 46 1 2
3 "019-321-124" 0 56 1 2
3 "020-234-495" 0 55 0 2
3 "021-000-241" 1 42 0 2
3 "021-444-846" 0 58 0 2
3 "022-098-47X" 0 30 1 1
2 "025-432-263" 1 38 1 1
3 "026-123-091" 0 50 1 0
end
label values studycode studyname
label def studyname 1 "studyhat", modify
label def studyname 2 "studyyat", modify
label def studyname 3 "studycat", modify
label values aeyn adverse_events
label def adverse_events 0 "no", modify
label def adverse_events 1 "yes", modify
label values sex gender
label def gender 0 "male", modify
label def gender 1 "female", modify
label values hdcat diseasecatg
label def diseasecatg 0 "control", modify
label def diseasecatg 1 "presymptomatic", modify
label def diseasecatg 2 "symptomatic", modify

The below explains the general concept of my data:

I have 500 subjid who participated in one or more of studies 1,2,3 , and had intervention each time they participate( so they might have the repeated intervention within the same study or they had it repeated in 2 different studies ).

here is the command


Code:
 melogit sex i.aeyn || _all: R.studycode|| _all: R.subjid
P.S I don't have missing values in these variables used.

your help is greatly appreciated.