Bookmark and Share

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


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

Re: st: Separate intercept mixed model


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Separate intercept mixed model
Date   Tue, 8 Feb 2011 10:24:13 +0000 (GMT)

--- On Tue, 8/2/11, Michael Mitchell wrote:
>   I am trying to estimate a mixed (multilevel) model
> using a separate intercept approach, and am getting an
> error saying that the likelihood evaluates to missing. 
<snip>

This seems to be a problem with factor variables as using
manually coded dummy variables does allow you to do that.

*-------------- begin example ---------------------
webuse pig, clear
replace week = week - 1
* create 2 groups, trt and control
generate trt = (id > 24)
generate non_trt = 1 - trt
* make weight 10 pounds more for treatment
replace weight = weight + 10     if trt == 1
* Model 0:
* Enter trt as factor variable
xtmixed weight trt non_trt c.week , nocons || id:
*--------------- end example ----------------------
(For more on examples I sent to the Statalist see: 
http://www.maartenbuis.nl/example_faq )

Hope this helps,
Maarten

I tried this because I thought I had seen this done by
Bobby Gutierrez at the Nordic Stata User meeting in 2007,
i.e. pre-factor-variable era, and this time my memory was
correct: page 18 of 
<http://ideas.repec.org/p/boc/nsug07/7.html> 

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
-------------------------- 


      

*
*   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/


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