Dear all,
Assume that one runs a model using the bayes prefix. This model includes also a large number of indicators apart from some standard controls.
I am wondering if there is a way not to have the results of the indicators shown at all in the Stata output.
I will will present a minimal working example.
Suppose we run the following model:
The results we get are:
Is it possible to show (or save) only the results for x1 and x2? It appears that estimates table does not work with Bayes.
Thank you.
Assume that one runs a model using the bayes prefix. This model includes also a large number of indicators apart from some standard controls.
I am wondering if there is a way not to have the results of the indicators shown at all in the Stata output.
I will will present a minimal working example.
Code:
input id year y x1 x2 1 1990 0.765290722 0.786241262 0.783572146 1 1991 0.611380163 0.739519495 0.60693537 1 1992 0.590601317 0.490306934 0.479196734 1 1993 0.708316766 0.97180118 0.40444494 1 1994 0.587700824 0.442869206 0.399139847 1 1995 0.092595406 0.475633824 0.055023827 2 1990 0.995706082 0.356060781 0.242968298 2 1991 0.688079045 0.36475865 0.829626742 2 1992 0.564536023 0.219309875 0.59165049 2 1993 0.728154736 0.370715204 0.319482427 2 1994 0.972550408 0.331836688 0.495801468 2 1995 0.907903102 0.643605887 0.04147437 3 1990 0.666757644 0.604741524 0.892619352 3 1991 0.945322031 0.076470116 0.83826142 3 1992 0.262225766 0.622579231 0.738801605 3 1993 0.14160545 0.420033382 0.883489729 3 1994 0.674649086 0.287176323 0.798404419 3 1995 0.462505639 0.782454944 0.206593929 4 1990 0.103318329 0.860360564 0.384564281 4 1991 0.892686701 0.387916868 0.911908676 4 1992 0.23782402 0.403880512 0.962117085 4 1993 0.733468764 0.376152156 0.237543589 4 1994 0.925702313 0.438672271 0.103990407 4 1995 0.309275933 0.771466795 0.119082256 end
Code:
bayes, rseed(12345) : reg y x1 x2 i.id i.year
Code:
Bayesian linear regression MCMC iterations = 12,500 Random-walk Metropolis-Hastings sampling Burn-in = 2,500 MCMC sample size = 10,000 Number of obs = 24 Acceptance rate = .327 Efficiency: min = .003156 avg = .006709 Log marginal likelihood = -74.144851 max = .02003 ------------------------------------------------------------------------------ | Equal-tailed | Mean Std. Dev. MCSE Median [95% Cred. Interval] -------------+---------------------------------------------------------------- y | x1 | .0390891 .1586424 .025329 .0357585 -.2741725 .3541185 x2 | -.3099317 .2938798 .039644 -.3094318 -.8912901 .2766925 | id | 2 | .2899881 .1213703 .021604 .2966582 .0641597 .5389639 3 | .055742 .1603441 .022674 .0559719 -.2698375 .3579688 4 | -.0549487 .1484017 .016786 -.0567729 -.3385171 .2308046 | year | 1991 | .2982491 .1879188 .026803 .3004807 -.1168325 .6647947 1992 | -.1464675 .1949344 .020653 -.1421357 -.5566844 .232561 1993 | -.0215075 .1920174 .031623 -.0132725 -.4371793 .3662122 1994 | .1843418 .1978521 .020934 .188863 -.2352899 .5520474 1995 | -.2889066 .2437549 .03487 -.2840871 -.7785481 .1575815 | _cons | .6705034 .2512025 .040967 .6678414 .1940561 1.183284 -------------+---------------------------------------------------------------- sigma2 | .0759295 .0308258 .002178 .0698249 .0363304 .1570932 ------------------------------------------------------------------------------
Thank you.
Comment