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

st: RE: bcoeff


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: bcoeff
Date   Tue, 2 Nov 2004 15:14:30 -0000

This -bcoeff- is a hack by Zhiqiang Wang and another
dating from 2000. I guess even its parents thought it 
was an ugly baby. 

You are right that there is no provision for regressions
to be done with the -noconstant- option for those 
situations in which the modeller is confident that the 
correct model is a hyperplane through the origin. 

You have various options: 

1. Hack at a copy of -bcoeff- until it does what you 
want it to do. It looks as if one line needs changing. 
It is now your program. 

2. Use -statsby-. 

3. Do it yourself from first principles. 

gen coeff = . 
levels catvar, local(levels) 
qui foreach l of local levels { 
	regress whatever whoever wherever whichever if catvar == `l' 
	replace coeff = _b[whoever] if catvar == `l' 
}

is one recipe. 

4. There must be other options. Nader??? nadir?????? 

Nick 
[email protected] 

Daniel Klein
 
> I have some problem with bcoeff (saves regression coefficients as new 
> variables). I do my regressions with lots of dummies and 
> without the use 
> of a constant term (option noconstant). My problem is that bcoeff 
> returns my coefficients as if I would have had a contant term in my 
> previous regression.  Unfortunately there is no 'noconstant' option 
> allowed for bcoeff.Can anyone out there help me.

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index