Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: xtmixed versus spss mixed; random intercept only model

From   "Ploutz-Snyder, Robert (JSC-SK)[USRA]" <>
To   "" <>
Subject   RE: st: xtmixed versus spss mixed; random intercept only model
Date   Thu, 23 Sep 2010 15:56:15 -0500

Thanks Phil--I suspected/hoped you'd be monitoring this!

Your solution worked--I can now replicate the intercepts between SPSS and Stata.  So it was the choice of 0 as the reference (Stata's selection) versus 1 as the reference (SPSS's default) that caused the differences.

FYI, in my case, there is 100% balance because the "trmt" variable is actually a repeated-measures factor and all subjects underwent both treatments, with no missing obs.  Thus differences in the y-intercept and interaction effects still occur when the reference category is reversed, even with balance.  

Apparently you told Stata to "reverse reference" by using ib1.trmt instead of i.trmt.   Is this documented somewhere??  I wonder what other nifty stuff I can do with the "dot-notation" that I'm not taking advantage of??  I currently use i. and c., mostly to take advantage of -margins-,  and while I get confused about how to use the r. notation, I'm aware that it exists.  


-----Original Message-----
From: [] On Behalf Of Philip Ender
Sent: Thursday, September 23, 2010 2:44 PM
Subject: Re: st: xtmixed versus spss mixed; random intercept only model

I'm trying to understand why Stata and SPSS provide slightly (or not
so much) different results when analyzing the same data with the same
(I believe) model.  I'm trying to tie out the two software results,
beginning with a very SIMPLE model, then working up to what I'd really
like to do.  Since I've already ran into differences on a very simple
model, I thought to ping the list to see if I'm going down the wrong




Try rerunning the -xtmixed- command changing the reference group for
trmt.  If the groups are unbalanced than estimates for the intercept,
continuous variable and interaction can be different.  Try this code:

xtmixed y c.time##ib1.trmt||subj:, cov(id)

Phil Ender
UCLA Statistical Consulting Group
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index