SPSS is using REML whereas -xtreg- is using ML.
-xtreg- doesn't allow you to use REML, but -xtmixed- does.
______________________________________________
Kieran McCaul MPH PhD
WA Centre for Health & Ageing (M573)
University of Western Australia
Level 6, Ainslie House
48 Murray St
Perth 6000
Phone: (08) 9224-2140
Fax: (08) 9224 8009
email: [email protected]
http://myprofile.cos.com/mccaul
http://www.researcherid.com/rid/B-8751-2008
______________________________________________
The fact that no one understands you doesn't make you an artist.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Mandy fu
Sent: Wednesday, 7 January 2009 9:50 AM
To: [email protected]
Subject: Re: st:Why fixed effect estimates are different using Stata and
SPSS?
Hi Mr. Samuels,
Thanks for helping out! I really apprecaite it.
Sorry to bother you again . After adding the statement that I forgot,
the SPSS result is still different from Stata. It'll be great if you
could give me some suggestion how to revise the commands to get the
same result as Stata. Thanks a lot!
Mandy
Here's the command revised:
------------------------------------------SPSS--------------------------
------------------------------------
MIXED lnhr WITH lnwg kids ageh agesq disab
/FIXED=lnwg kids ageh agesq disab | SSTYPE(3)
/METHOD=REML
/RANDOM = INTERCEPT | SUBJECT(id)
/PRINT=SOLUTION.
------------------------------------------------------------------------
-----------------------------------------------------------
95%
Confidence Interval
Parameter Estimate Std. Error df t Sig.
Lower Bound Upper Bound
Intercept 7.208567 .104325 3713.093 69.097 .000
7.004028 7.413106
lnwg .116703 .013741 2092.169 8.493 .000 .089756 .143650
kids .004658 .004943 3000.492 .942 .346 -.005035
.014351
ageh .007799 .005394 3935.455 1.446 .148 -.002777
.018374
agesq -.000102 6.778785E-53744.521 -1.509 .131 -.000235
3.063344E-5
disab -.069206 .017256 5231.818 -4.011 .000 -.103034
-.035377
---------------------------------------------------------
On Tue, Jan 6, 2009 at 7:10 PM, Steven Samuels
<[email protected]> wrote:
> The two setups are not comparable. In your SPSS syntax, you left out
a
> statement like:
> /RANDOM = INTERCEPT | SUBJECT(id)
>
> -Steve
> On Jan 6, 2009, at 7:01 PM, Mandy fu wrote:
>
>>
>>
-----------------------------STATA--------------------------------------
--------------------------------------
>> . xtset id
>> . xtreg lnhr lnwg kids ageh agesq disab,fe
>>
>>
------------------------------------------------------------------------
----------------------------------
>> lnhr | Coef. Std. Err. t P>|t| [95% Conf.
>> Interval]
>> lnwg | .1647719 .0189379 8.70 0.000 .1276448
>> .2018989
>> kids | -.0011805 .0062019 -0.19 0.849 -.0133391
>> .0109781
>> ageh | .0142179 .0063804 2.23 0.026 .0017095
>> .0267263
>> agesq | -.0001676 .0000814 -2.06 0.039 -.0003272
>> -8.10e-06
>> disab | -.0628007 .0185922 -3.38 0.001 -.09925
>> -.0263514
>> _cons | 6.945659 .1258117 55.21 0.000 6.69901
>> 7.192308
>> _____________________________________________________________________
>> ----------------------------------SPSS----------------------------
>> MIXED lnhr WITH lnwg kids ageh agesq disab
>> E(0.000001, ABSOLUTE)
>> /FIXED=lnwg kids ageh agesq disab | SSTYPE(3)
>> /METHOD=REML
>> /PRINT=SOLUTION.
>>
>>
------------------------------------------------------------------------
-------------
>> Parameter Estimate Std. Error df t Sig.
>> Intercept 7.467766 .083797 5314.000 89.117 .000
>> lnwg .082290 .009305 5314.000 8.844 .000
>> kids .007982 .003652 5314.000 2.186 .029
>> ageh -.000745 .004363 5314.000 -.171 .864
>> agesq -1.681402E-6 5.407029E-5 5314.000 -.031 .975
>> disab -.095341 .016312 5314 -5.845 .000
>>
>>
------------------------------------------------------------------------
--------------
>> *
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/statalist/faq
>> * http://www.ats.ucla.edu/stat/stata/
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/