Hi All,
I have a question about xtreg and xtmixed.
If I enter the following command I get this result.
xtset interven2
xtreg difftot i.gender2
Random-effects GLS regression Number of obs = 85
Group variable: interven2 Number of groups = 3
R-sq: within = 0.0015 Obs per group: min = 13
between = 0.1840 avg = 28.3
overall = 0.0007 max = 55
Wald chi2(2) = 0.06
corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.9722
----------------------------------------------------------------------------------
difftot | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-----------------+----------------------------------------------------------------
gender2 |
Female | .0294211 .151446 0.19 0.846 -.2674076 .3262497
Non-bin | -.0499999 .4162483 -0.12 0.904 -.8658316 .7658317
|
_cons | .281 .0724595 3.88 0.000 .1389819 .4230181
-----------------+----------------------------------------------------------------
sigma_u | 0
sigma_e | .55706407
rho | 0 (fraction of variance due to u_i)
----------------------------------------------------------------------------------
However if I request mle with xtreg I get the following result.
xtreg difftot i.gender2, mle
Fitting constant-only model:
Iteration 0: log likelihood = -72.359585
Iteration 1: log likelihood = -72.330535
Iteration 2: log likelihood = -72.33045
Fitting full model:
Iteration 0: log likelihood = -72.427795
Iteration 1: log likelihood = -72.067824
Iteration 2: log likelihood = -72.017598
Iteration 3: log likelihood = -72.013335
Iteration 4: log likelihood = -72.013311
Random-effects ML regression Number of obs = 85
Group variable: interven2 Number of groups = 3
Random effects u_i ~ Gaussian Obs per group: min = 13
avg = 28.3
max = 55
LR chi2(2) = 0.63
Log likelihood = -72.013311 Prob > chi2 = 0.7282
----------------------------------------------------------------------------------
difftot | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-----------------+----------------------------------------------------------------
gender2 |
Female | -.0463684 .1571585 -0.30 0.768 -.3543934 .2616566
Non-bin | -.3585661 .4490142 -0.80 0.425 -1.238618 .5214855
|
_cons | .3761473 .1436128 2.62 0.009 .0946713 .6576232
-----------------+----------------------------------------------------------------
/sigma_u | .1827952 .1268277 .0469224 .7121132
/sigma_e | .5517788 .0434 .4729487 .6437482
rho | .0988951 .1260109 .0033984 .5520696
----------------------------------------------------------------------------------
Likelihood-ratio test of sigma_u=0: chibar2(01)= 1.44 Prob>=chibar2 = 0.115
Why should the coefficients and sigma_u variance change?
Similarly this also occurs with xtmixed as can be seen with the following results just below.
It has to do with the constant which I notice is mentioned in the first line of the just previous output but I don't understand how.
Also, the results for xtmixed seem to be opposite to the results from xtreg in the sense that where I request no constant with xtmixed, the results are
identical to where xtreg does not have a constant only model - the first model above..
An explanation of why this is happening would be much appreciated.
xtmixed difftot i.gender2 || interven2:, mle
Performing EM optimization:
Performing gradient-based optimization:
Iteration 0: log likelihood = -72.013312
Iteration 1: log likelihood = -72.013311
Computing standard errors:
Mixed-effects ML regression Number of obs = 85
Group variable: interven2 Number of groups = 3
Obs per group: min = 13
avg = 28.3
max = 55
Wald chi2(2) = 0.77
Log likelihood = -72.013311 Prob > chi2 = 0.6805
----------------------------------------------------------------------------------
difftot | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-----------------+----------------------------------------------------------------
gender2 |
Female | -.0463684 .1537466 -0.30 0.763 -.3477063 .2549695
Non-bin|Diff-ID | -.3585661 .4175263 -0.86 0.390 -1.176903 .4597703
|
_cons | .3761473 .1364022 2.76 0.006 .1088039 .6434906
----------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
interven2: Identity |
sd(_cons) | .1827952 .1268308 .0469209 .7121365
-----------------------------+------------------------------------------------
sd(Residual) | .5517788 .0434 .4729487 .6437482
------------------------------------------------------------------------------
LR test vs. linear regression: chibar2(01) = 1.44 Prob >= chibar2 = 0.1151
xtmixed difftot i.gender2 || interven2:, mle noconstant
Note: all random-effects equations are empty; model is linear regression
Mixed-effects ML regression Number of obs = 85
Wald chi2(2) = 0.06
Log likelihood = -72.733388 Prob > chi2 = 0.9712
----------------------------------------------------------------------------------
difftot | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-----------------+----------------------------------------------------------------
gender2 |
Female | .0294211 .1487494 0.20 0.843 -.2621224 .3209645
Non-bin|Diff-ID | -.0499999 .4088367 -0.12 0.903 -.8513052 .7513053
|
_cons | .281 .0711693 3.95 0.000 .1415107 .4204894
----------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
sd(Residual) | .5693547 .0436675 .4898902 .6617091
------------------------------------------------------------------------------
Thanks in advance,
Don
Related Posts with mixed models xtreg xtmixed
Box-Tidwell Test for Linearity of Logit Regression and RemediesDear all, I am using a Logit Regression to see if companies did recover to their pre-crisis ROA lev…
Do file display problemI am using Stata 17 on Monterey on a 4K Retina iMac monitor. Recently the .do file editor started to…
multproc (Why am I getting the same corrected P value)Dear all, I am using the following command to correct for multiple testing. However I keep getting t…
One line code for dividing all countries by one specific countryI need to divide all countries HS code values by Australia. What code will be the most efficient one…
Additional Scalars not Showing Up in Esttab Table - TestparmHi, I'm running four cox models assessing the effect of interactions between different types of soci…
Subscribe to:
Post Comments (Atom)
0 Response to mixed models xtreg xtmixed
Post a Comment