Dear All, I use (ssc install) xtpmg to estimate the following model.
In both Stata 13/14, it works just fine.
However, in both Stata 15/16, I encountered an error message as
That is, the `mg' option (pmg option is OK) does not work. Any possibilities? Thanks. (In fact, I sent an email to the author of -xtpmg- but didn't get any response.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str14 cn str3 code int year float(pi y c id) "Australia" "AUS" 1960 . 9.126777 8.817785 1 "Australia" "AUS" 1961 .005512 9.117796 8.821845 1 "Australia" "AUS" 1962 .010618 9.165926 8.861888 1 "Australia" "AUS" 1963 .016399 9.242287 8.904936 1 "Australia" "AUS" 1964 .033551 9.285301 8.930625 1 "Australia" "AUS" 1965 .031854 9.275299 8.940616 1 "Australia" "AUS" 1966 .029922 9.324277 8.970143 1 "Australia" "AUS" 1967 .035304 9.335888 9.00631 1 "Australia" "AUS" 1968 .034349 9.406322 9.038895 1 "Australia" "AUS" 1969 .040493 9.444981 9.076191 1 "Australia" "AUS" 1970 .060083 9.461569 9.096202 1 "Australia" "AUS" 1971 .065964 9.48824 9.117048 1 "Australia" "AUS" 1972 .060993 9.540829 9.153357 1 "Australia" "AUS" 1973 .114068 9.597275 9.191398 1 "Australia" "AUS" 1974 .162968 9.595092 9.210077 1 "Australia" "AUS" 1975 .146564 9.597939 9.230286 1 "Australia" "AUS" 1976 .10849 9.610383 9.244958 1 "Australia" "AUS" 1977 .089166 9.586189 9.251227 1 "Australia" "AUS" 1978 .085865 9.618374 9.274227 1 "Australia" "AUS" 1979 .095046 9.635564 9.289895 1 "Australia" "AUS" 1980 .0932 9.660865 9.317696 1 "Australia" "AUS" 1981 .090036 9.668748 9.342647 1 "Australia" "AUS" 1982 .103054 9.618184 9.337695 1 "Australia" "AUS" 1983 .07155 9.667136 9.349161 1 "Australia" "AUS" 1984 .058712 9.697061 9.371945 1 "Australia" "AUS" 1985 .07722 9.704076 9.395497 1 "Australia" "AUS" 1986 .082827 9.698622 9.38767 1 "Australia" "AUS" 1987 .068714 9.742806 9.412477 1 "Australia" "AUS" 1988 .065982 9.789676 9.441179 1 "Australia" "AUS" 1989 .062069 9.78746 9.469853 1 "Australia" "AUS" 1990 .049224 9.745213 9.465416 1 "Australia" "AUS" 1991 .023524 9.734775 9.476471 1 "Australia" "AUS" 1992 .016738 9.750171 9.489652 1 "Australia" "AUS" 1993 .016277 9.779519 9.507699 1 "Austria" "AUT" 1960 . 11.23057 10.83956 2 "Austria" "AUT" 1961 .038935 11.28918 10.88387 2 "Austria" "AUT" 1962 .042951 11.30787 10.91059 2 "Austria" "AUT" 1963 .026052 11.33956 10.95798 2 "Austria" "AUT" 1964 .036576 11.39296 10.98502 2 "Austria" "AUT" 1965 .043585 11.42352 11.02673 2 "Austria" "AUT" 1966 .022746 11.4812 11.06216 2 "Austria" "AUT" 1967 .038128 11.49353 11.08902 2 "Austria" "AUT" 1968 .02443 11.5351 11.12317 2 "Austria" "AUT" 1969 .032794 11.59165 11.14846 2 "Austria" "AUT" 1970 .038183 11.66228 11.18577 2 "Austria" "AUT" 1971 .048633 11.71937 11.24638 2 "Austria" "AUT" 1972 .062847 11.78281 11.29955 2 "Austria" "AUT" 1973 .063725 11.83885 11.34633 2 "Austria" "AUT" 1974 .095457 11.87076 11.3741 2 "Austria" "AUT" 1975 .075892 11.8527 11.40869 2 "Austria" "AUT" 1976 .063366 11.89498 11.45485 2 "Austria" "AUT" 1977 .054728 11.93163 11.50765 2 "Austria" "AUT" 1978 .040782 11.94743 11.49356 2 "Austria" "AUT" 1979 .044355 11.99659 11.53841 2 "Austria" "AUT" 1980 .061759 12.0092 11.55339 2 "Austria" "AUT" 1981 .073392 11.98788 11.55459 2 "Austria" "AUT" 1982 .058669 11.99772 11.56568 2 "Austria" "AUT" 1983 .033303 12.02444 11.61679 2 "Austria" "AUT" 1984 .054477 12.03306 11.6159 2 "Austria" "AUT" 1985 .032592 12.0552 11.6388 2 "Austria" "AUT" 1986 .019039 12.0855 11.65526 2 "Austria" "AUT" 1987 .009723 12.11462 11.68486 2 "Austria" "AUT" 1988 .014354 12.15201 11.71764 2 "Austria" "AUT" 1989 .026292 12.18964 11.748 2 "Austria" "AUT" 1990 .030695 12.22534 11.77114 2 "Austria" "AUT" 1991 .033915 12.24126 11.7866 2 "Austria" "AUT" 1992 .038296 12.24679 11.7981 2 "Austria" "AUT" 1993 .034073 12.22574 11.78618 2 "Belgium" "BEL" 1960 . 12.25262 11.97938 3 "Belgium" "BEL" 1961 .026331 12.28599 11.99238 3 "Belgium" "BEL" 1962 .010655 12.33874 12.02688 3 "Belgium" "BEL" 1963 .036261 12.36487 12.06295 3 "Belgium" "BEL" 1964 .040851 12.42882 12.0793 3 "Belgium" "BEL" 1965 .045149 12.46139 12.11195 3 "Belgium" "BEL" 1966 .040604 12.48451 12.1314 3 "Belgium" "BEL" 1967 .025073 12.52161 12.15387 3 "Belgium" "BEL" 1968 .02847 12.55721 12.20188 3 "Belgium" "BEL" 1969 .028044 12.62701 12.25122 3 "Belgium" "BEL" 1970 .024651 12.70672 12.29345 3 "Belgium" "BEL" 1971 .051846 12.74088 12.33748 3 "Belgium" "BEL" 1972 .052345 12.79966 12.39164 3 "Belgium" "BEL" 1973 .059157 12.86504 12.46322 3 "Belgium" "BEL" 1974 .120161 12.89866 12.48594 3 "Belgium" "BEL" 1975 .115999 12.87614 12.48952 3 "Belgium" "BEL" 1976 .075352 12.93466 12.53503 3 "Belgium" "BEL" 1977 .069176 12.9326 12.55756 3 "Belgium" "BEL" 1978 .041536 12.9606 12.57946 3 "Belgium" "BEL" 1979 .038004 12.98042 12.6259 3 "Belgium" "BEL" 1980 .061659 12.99318 12.64449 3 "Belgium" "BEL" 1981 .083256 12.93911 12.63251 3 "Belgium" "BEL" 1982 .075041 12.94013 12.64548 3 "Belgium" "BEL" 1983 .068942 12.92719 12.62945 3 "Belgium" "BEL" 1984 .055551 12.94947 12.64147 3 "Belgium" "BEL" 1985 .057751 12.95861 12.66028 3 "Belgium" "BEL" 1986 .006867 13.00825 12.68271 3 "Belgium" "BEL" 1987 .018904 13.0316 12.71176 3 "Belgium" "BEL" 1988 .015478 13.07057 12.7342 3 "Belgium" "BEL" 1989 .035452 13.12134 12.7695 3 "Belgium" "BEL" 1990 .03588 13.13903 12.79296 3 "Belgium" "BEL" 1991 .024687 13.17091 12.82042 3 "Belgium" "BEL" 1992 .020526 13.19306 12.84251 3 "Canada" "CAN" 1960 . 8.899075 8.631179 4 "Canada" "CAN" 1961 .00529 8.913204 8.622852 4 "Canada" "CAN" 1962 .013456 8.971992 8.655091 4 "Canada" "CAN" 1963 .020884 9.000994 8.680049 4 "Canada" "CAN" 1964 .01532 9.058849 8.716622 4 "Canada" "CAN" 1965 .020621 9.115803 8.757779 4 "Canada" "CAN" 1966 .037562 9.172612 8.790492 4 "Canada" "CAN" 1967 .039474 9.187241 8.81161 4 "Canada" "CAN" 1968 .04357 9.220095 8.838357 4 "Canada" "CAN" 1969 .04006 9.26968 8.875424 4 "Canada" "CAN" 1970 .03471 9.280592 8.881181 4 "Canada" "CAN" 1971 .023561 9.332674 8.926323 4 "Canada" "CAN" 1972 .04111 9.403598 8.987632 4 "Canada" "CAN" 1973 .062225 9.492468 9.048448 4 "Canada" "CAN" 1974 .099482 9.558039 9.090315 4 "Canada" "CAN" 1975 .099736 9.555314 9.121487 4 "Canada" "CAN" 1976 .070503 9.614869 9.171438 4 "Canada" "CAN" 1977 .072335 9.614909 9.189951 4 "Canada" "CAN" 1978 .072841 9.634393 9.212977 4 "Canada" "CAN" 1979 .082693 9.676215 9.231655 4 "Canada" "CAN" 1980 .09573 9.680829 9.241051 4 "Canada" "CAN" 1981 .10594 9.693285 9.251542 4 "Canada" "CAN" 1982 .097657 9.628247 9.215019 4 "Canada" "CAN" 1983 .058135 9.642993 9.24092 4 "Canada" "CAN" 1984 .039114 9.692215 9.278929 4 "Canada" "CAN" 1985 .037062 9.719261 9.32174 4 "Canada" "CAN" 1986 .036995 9.723492 9.356698 4 "Canada" "CAN" 1987 .03861 9.764948 9.38862 4 "Canada" "CAN" 1988 .03793 9.821083 9.420688 4 "Canada" "CAN" 1989 .04719 9.827632 9.440114 4 "Canada" "CAN" 1990 .041061 9.785636 9.435515 4 "Canada" "CAN" 1991 .045899 9.729815 9.405815 4 "Canada" "CAN" 1992 .012979 9.679651 9.367965 4 "Canada" "CAN" 1993 .017363 9.681681 9.366916 4 "Switzerland" "CHE" 1960 . 9.965399 9.591429 5 "Switzerland" "CHE" 1961 .027754 10.04744 9.656388 5 "Switzerland" "CHE" 1962 .047931 10.07565 9.692879 5 "Switzerland" "CHE" 1963 .035305 10.11212 9.718802 5 "Switzerland" "CHE" 1964 .041613 10.15347 9.748298 5 "Switzerland" "CHE" 1965 .039101 10.17203 9.770731 5 "Switzerland" "CHE" 1966 .045801 10.18876 9.789802 5 "Switzerland" "CHE" 1967 .042941 10.20935 9.806178 5 "Switzerland" "CHE" 1968 .025469 10.24062 9.831609 5 "Switzerland" "CHE" 1969 .027288 10.28156 9.873432 5 "Switzerland" "CHE" 1970 .038991 10.32932 9.904316 5 "Switzerland" "CHE" 1971 .06716 10.37654 9.93925 5 "Switzerland" "CHE" 1972 .073388 10.41439 9.983094 5 "Switzerland" "CHE" 1973 .086496 10.43622 10.0041 5 "Switzerland" "CHE" 1974 .095292 10.42758 9.996275 5 "Switzerland" "CHE" 1975 .064161 10.36775 9.975313 5 "Switzerland" "CHE" 1976 .022172 10.38155 9.997073 5 "Switzerland" "CHE" 1977 .011412 10.39939 10.02961 5 "Switzerland" "CHE" 1978 .006066 10.42801 10.04888 5 "Switzerland" "CHE" 1979 .04291 10.43364 10.0587 5 "Switzerland" "CHE" 1980 .044178 10.45403 10.07929 5 "Switzerland" "CHE" 1981 .063516 10.47382 10.07745 5 "Switzerland" "CHE" 1982 .054087 10.47155 10.07132 5 "Switzerland" "CHE" 1983 .02582 10.48852 10.08568 5 "Switzerland" "CHE" 1984 .032523 10.50972 10.0976 5 "Switzerland" "CHE" 1985 .036411 10.53396 10.10766 5 "Switzerland" "CHE" 1986 .002854 10.58168 10.12936 5 "Switzerland" "CHE" 1987 .015313 10.60068 10.14294 5 "Switzerland" "CHE" 1988 .022848 10.62891 10.15625 5 "Switzerland" "CHE" 1989 .034838 10.67106 10.18205 5 "Switzerland" "CHE" 1990 .052054 10.67919 10.18732 5 "Switzerland" "CHE" 1991 .055286 10.66348 10.18889 5 "Switzerland" "CHE" 1992 .040839 10.62828 10.17621 5 "Switzerland" "CHE" 1993 .029346 10.60321 10.15904 5 end xtset id year // PMG xtpmg D.c D.y D.pi, lr(L.c y pi) ec(ec) replace pmg est store pmg // MG xtpmg D.c D.y D.pi, lr(L.c y pi) ec(ec) replace mg est store mg
Code:
. // PMG . xtpmg D.c D.y D.pi, lr(L.c y pi) ec(ec) replace pmg Iteration 0: log likelihood = 533.08568 Iteration 1: log likelihood = 533.97325 Iteration 2: log likelihood = 534.01755 Iteration 3: log likelihood = 534.01765 Iteration 4: log likelihood = 534.01765 Pooled Mean Group Regression (Estimate results saved as pmg) Panel Variable (i): id Number of obs = 159 Time Variable (t): year Number of groups = 5 Obs per group: min = 31 avg = 31.8 max = 32 Log Likelihood = 534.0176 ------------------------------------------------------------------------------ D.c | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- ec | y | .9558091 .013805 69.24 0.000 .9287518 .9828664 pi | -.7580091 .1499926 -5.05 0.000 -1.051989 -.4640289 -------------+---------------------------------------------------------------- SR | ec | -.196124 .0649038 -3.02 0.003 -.3233331 -.0689148 | y | D1. | .2564224 .0904152 2.84 0.005 .079212 .4336329 | pi | D1. | -.0375937 .0591728 -0.64 0.525 -.1535703 .0783829 | _cons | .0399847 .0124331 3.22 0.001 .0156163 .0643531 ------------------------------------------------------------------------------ . est store pmg . . // MG . xtpmg D.c D.y D.pi, lr(L.c y pi) ec(ec) replace mg ------------------------------------------------------------------------------ Mean Group Estimation: Error Correction Form (Estimate results saved as mg) ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ D.c | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- ec | y | .9098558 .0751301 12.11 0.000 .7626036 1.057108 pi | -.7133219 .1565366 -4.56 0.000 -1.020128 -.4065159 -------------+---------------------------------------------------------------- SR | ec | -.2394112 .0489541 -4.89 0.000 -.3353595 -.143463 | y | D1. | .2037221 .0623671 3.27 0.001 .0814848 .3259595 | pi | D1. | -.0211505 .0791552 -0.27 0.789 -.1762919 .1339909 | _cons | .0711615 .0829173 0.86 0.391 -.0913534 .2336764 ------------------------------------------------------------------------------ . est store mg
Code:
. // PMG . xtpmg D.c D.y D.pi, lr(L.c y pi) ec(ec) replace pmg Iteration 0: log likelihood = 533.08568 Iteration 1: log likelihood = 533.97325 Iteration 2: log likelihood = 534.01755 Iteration 3: log likelihood = 534.01765 Iteration 4: log likelihood = 534.01765 Pooled Mean Group Regression (Estimate results saved as pmg) Panel Variable (i): id Number of obs = 159 Time Variable (t): year Number of groups = 5 Obs per group: min = 31 avg = 31.8 max = 32 Log Likelihood = 534.0176 ------------------------------------------------------------------------------ D.c | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- ec | y | .9558091 .013805 69.24 0.000 .9287518 .9828664 pi | -.7580091 .1499926 -5.05 0.000 -1.051989 -.4640289 -------------+---------------------------------------------------------------- SR | ec | -.196124 .0649038 -3.02 0.003 -.3233331 -.0689148 | y | D1. | .2564224 .0904152 2.84 0.005 .079212 .4336329 | pi | D1. | -.0375937 .0591728 -0.64 0.525 -.1535703 .0783829 | _cons | .0399847 .0124331 3.22 0.001 .0156163 .0643531 ------------------------------------------------------------------------------ . est store pmg . . // MG . xtpmg D.c D.y D.pi, lr(L.c y pi) ec(ec) replace mg invalid new variable name; variable name ec is in the list of predictors r(110); end of do-file r(110);
Comment