Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: fixed, random effects


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: fixed, random effects
Date   Mon, 28 Nov 2005 10:05:21 -0600

The problem is a few of lines in -rfregk- are wrapped.

Lines 99 - 108 read:

if "`weight'"!="" {
	by `ivar': replace ``i'' = /*
	*/
	cond(`dup',sum(`w'[_n-1]*``i''[_n-1])/s
	um(`w'[_n-1]),``i'')
}
else {
	by `ivar': replace ``i'' = /*
	*/
	cond(`dup',sum(``i''[_n-1])/(_n-1),``i'
	')
}

Either replace the -by `ivar' ...- lines so that the entire statement is on
one line or use /// to connect the lines:

if "`weight'"!="" {
	by `ivar': replace ``i'' = /// 
	cond(`dup',sum(`w'[_n-1]*``i''[_n-1]) /// 
	/sum(`w'[_n-1]),``i'')
}
else {
	by `ivar': replace ``i'' = /// 
	cond(`dup',sum(``i''[_n-1])/(_n-1),``i'')
}

Save the file, -discard-, and try again.


Scott

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Raphael Schoenle
> Sent: Monday, November 28, 2005 9:33 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: Re: st: RE: fixed, random effects
> 
> Hi Scott,
> 
> I just tried to run the example you sent me- does it work on your
> computer? (i have stata se/8.2) I get an error message as below.
> Thank you very much for the valuable hint!
> 
> Best,
> 
> Raphael
> 


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index