Dear statalist users,

I am running xtpmg on stata 16.0.
When I use the xtmpg, pmg option, my regression returns results. However, when I try to run a mg or dfe specification, I recieve an error message:

Maximum number of iterations exceeded.
r(498);


Any guidance on how to rectify this in order to run an mg or dfe specification would be appreciated.

Code:
xtpmg d.ew d.y d.y_sq , lr(l.ew y y_sq) replace pmg
*This regression works

xtpmg d.ew d.y d.y_sq , lr(l.ew y y_sq) replace dfe
xtpmg d.ew d.y d.y_sq , lr(l.ew y y_sq) replace mg
/*These regression don't work and give error message:
Maximum number of iterations exceeded.
r(498); */

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input byte c_id str3 code int year double(ew y y_sq)
1 "AUT" 1980     .1741481592368 27595.835141684922  761530117.1670525
1 "AUT" 1981 .45075286962799993 27485.832480773406  755470987.1611384
1 "AUT" 1982       .81234098454 28018.541310971457  785038657.1946142
1 "AUT" 1983 1.2558122744999998  28898.21930155769  835107078.8009213
1 "AUT" 1984       1.7727198049  28914.85690022889  836068949.5607142
1 "AUT" 1985  2.359033229049999 29623.434457371444  877547869.0501817
1 "AUT" 1986 3.0069857904999986 30285.933643176995  917237776.6389202
1 "AUT" 1987  3.707667224400001 30677.544478405067  941111735.2245212
1 "AUT" 1988       4.4527085541  31643.80936449562 1001330671.0965407
1 "AUT" 1989  5.225882327600002 32726.059853340415 1070994993.5244193
1 "AUT" 1990       5.9988151774  33888.99598320519 1148464048.7496974
1 "AUT" 1991  6.770896029900002  34707.07175559477 1204580829.8480043
1 "AUT" 1992  7.525642734839999  35045.84478974855 1228211237.0271459
1 "AUT" 1993       8.2797122028  34941.14380008988 1220883530.0585594
1 "AUT" 1994       9.0674935115   35643.0281994678  1270425459.228057
1 "AUT" 1995  9.843949903100002 36537.993518946714  1335024970.390592
1 "AUT" 1996 10.640005449999999 37346.007471329955 1394724274.0486329
1 "AUT" 1997       11.419943132  38084.70250173403  1450444564.645586
1 "AUT" 1998 12.206928473999996  39405.41521812483 1552786748.5128238
1 "AUT" 1999       12.994849036  40727.48449771233  1658727993.511398
1 "AUT" 2000 13.796464614999998  42001.21077457701 1764101706.5304441
1 "AUT" 2001 14.569064125000002  42370.93025364256 1795295730.5590425
1 "AUT" 2002 15.305841565000003  42859.32993805239  1836922162.738834
1 "AUT" 2003 15.987642181999998  43052.60259800403 1853526590.4616632
1 "AUT" 2004 16.677198974299998 43956.582903255214 1932181180.5307486
1 "AUT" 2005 17.415686579000006  44637.85601097287  1992538189.256347
1 "AUT" 2006 18.143880529999993  45951.73463654262 2111561916.1072307
1 "AUT" 2007       18.835514084   47510.2937856663  2257228015.600322
1 "AUT" 2008 19.422979114000007  48053.48235672149 2309137166.6077437
1 "AUT" 2009       19.902043972  46123.49110319651 2127376431.5466475
1 "AUT" 2010  20.31179351900001 46858.043273371695 2195676219.4091744
1 "AUT" 2011       20.656796474  48065.31654118983  2310274654.204777
1 "AUT" 2012 20.896891242999992  48172.23811514523 2320564525.0222507
1 "AUT" 2013       21.030040009  47901.36612963197  2294540877.085053
1 "AUT" 2014 21.076568914000003  47842.74890823534  2288928623.096454
1 "AUT" 2015 21.009391377999997  47789.38501543893 2283825320.1538587
1 "AUT" 2016       20.932675976  48215.89052872178 2324772099.4776826
1 "AUT" 2017 20.848224054999996   49031.1070286152  2404049456.451519
1 "AUT" 2018 20.777999547999993  50051.78591263671  2505181273.044419
1 "AUT" 2019 20.735579838000003  50552.90612128228 2555596317.3071795
2 "BEL" 1980      .183155752275  27069.43582733449  732754356.0101801
2 "BEL" 1981  .4748391834099999 26994.547297740057   728705583.809925
2 "BEL" 1982       .85473536075  27162.54221277288  737803699.4606687
2 "BEL" 1983 1.3123662358499997   27249.4113540089   742530419.139989
2 "BEL" 1984 1.8433467946000004 27921.905452464227  779632804.0963515
2 "BEL" 1985 2.4390252137999995 28374.664447675517   805121582.518181
2 "BEL" 1986 3.0939944251999996  28881.56921798121  834145040.4930397
2 "BEL" 1987  3.796928483200001 29522.589326236997  871583280.5256426
2 "BEL" 1988 4.5377484790999985 30818.865705131342  949802483.3509208
2 "BEL" 1989 5.2882161540000014 31772.401140687296 1009485474.2447474
2 "BEL" 1990        6.075981418 32671.645235089065  1067436402.367518
2 "BEL" 1991 6.8668513409999985  33147.13912223698 1098732831.9889333
2 "BEL" 1992  7.667817932999998 33518.243175467804  1123472625.569794
2 "BEL" 1993  8.462457951000003 33066.417354758916 1093387956.6791017
2 "BEL" 1994  9.266027181000002  34028.42484112313  1157933697.167966
2 "BEL" 1995 10.021485641000004  34767.02890969576 1208746299.2076206
2 "BEL" 1996 10.800279689000003  35157.69524214952 1236063534.7398632
2 "BEL" 1997 11.567655469000004  36403.25822438519 1325197209.3512678
2 "BEL" 1998 12.311762726000001  37038.24895632375  1371831885.750617
2 "BEL" 1999 13.056366327999994  38262.62476467848 1464028453.8825872
2 "BEL" 2000 13.814949576500002 39588.597878434455  1567257081.980385
2 "BEL" 2001 14.573781226999996  39886.49531161745  1590932508.243681
2 "BEL" 2002 15.277295398899996  40385.86809293145 1631018341.6196587
2 "BEL" 2003 15.983816527799998  40634.59648863257 1651170431.7939901
2 "BEL" 2004 16.706760475599996  41903.99239921433 1755944578.9934123
2 "BEL" 2005      17.4625781206  42641.69357754736  1818314031.161444
2 "BEL" 2006 18.203965585600006  43442.58270250485 1887257991.8639736
2 "BEL" 2007        18.91428737  44710.38425322717 1999018460.0712237
2 "BEL" 2008 19.502845847999993 44556.825223238535 1985310673.9742258
2 "BEL" 2009 19.951713849999997  43306.59602310204 1875461259.1081576
2 "BEL" 2010        20.29906075  44141.87814157338  1948505405.865514
2 "BEL" 2011 20.430185186999996  44309.63253826867 1963343535.6763976
2 "BEL" 2012 20.648736420000002 44361.210093056725  1967916960.920318
2 "BEL" 2013       20.854945323  44355.37730987665   1967399496.30152
2 "BEL" 2014 21.061384635999996  44855.97020187566 2012058062.7515569
2 "BEL" 2015  21.29726360800001  45507.23105820373 2070908078.5847423
2 "BEL" 2016        21.22829592  45850.93303033067  2102308059.751868
2 "BEL" 2017 21.126185946000014   46409.1300759444 2153807354.4059267
2 "BEL" 2018 21.012386916999986  47035.61395433857  2212348980.061569
2 "BEL" 2019 20.901548551999998  47618.29820678536 2267502324.1103377
3 "BGR" 1980     .0333787578013  3651.359286009268 13332424.635526111
3 "BGR" 1981 .09162346968100003 3817.5379134453938 14573595.720593011
3 "BGR" 1982      .171209446631 3895.1215136924707 15171971.606429923
3 "BGR" 1983 .27066395347999994 4018.6950570431254 16149909.961502848
3 "BGR" 1984  .3889701086099999  4145.477144746261  17184980.75761361
3 "BGR" 1985  .5253379338499999 4256.7812740724985 18120186.815294284
3 "BGR" 1986  .6785937958299999  4437.066231338455 19687556.741284035
3 "BGR" 1987  .8474113140000002   4698.79157444701 22078642.260094214
3 "BGR" 1988 1.0300121448000001  5207.205091484827 27114984.864785504
3 "BGR" 1989 1.2244438699999998  5095.162143548361  25960677.26904833
3 "BGR" 1990 1.4328989832000005  4714.899612439404 22230278.355381247
3 "BGR" 1991 1.6559866783000006  4359.675830403374 19006773.346203346
3 "BGR" 1992       1.8928588505 4086.2690540139047  16697594.78179169
3 "BGR" 1993  2.141627570699999 4058.0242122509017 16467560.507214552
3 "BGR" 1994       2.3985589643  4145.854413606448 17188108.818820067
3 "BGR" 1995       2.6608854037 4283.2558083368995 18346280.319651786
3 "BGR" 1996 2.9257787028999993  4526.653916210356 20490595.677142557
3 "BGR" 1997       3.1908095762 3907.9133080758356  15271786.42343622
3 "BGR" 1998 3.4553826420000004  4102.664455890649 16831855.637628518
3 "BGR" 1999        3.719453988 3784.0781037794695 14319247.095503226
end