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

Re: st: xi regress: noconstant option


From   "Hans J. Baumgartner" <[email protected]>
To   [email protected]
Subject   Re: st: xi regress: noconstant option
Date   Mon, 14 Feb 2005 16:33:38 +0100

Hi Yvonne,

I don't know, whether you can solve your problem using xi.

But the following should help, too:

tab country, gen(country_d)
regress return country_d*, nocons

Good luck
Hans

Yvonne Capstick schrieb:

Hi,

I have two categories: "return" and "country", where return is "numeric" and "country" is a three letter code corresponding to the country. I know that I can use the "xi" function to create dummy variables and run the regressions all in one step, i.e.

xi : regress return country

To avoid the dummy variable trap, it automatically omits the first group of "country". I know that I can use the "char" function to specify omitting another group, e.g.

char country[omit] "ita"

would omit the group "ita".

However, I haven't found a way to omit no groups - i.e. include all the dummy variables, and avoid the dummy variable trap by specifying "noconstant" in the regression. If I try:

xi: regress return country, noconstant

it will omit the constant but still omit the first group of "country". Any advice would be appreciated.

Thanks,
Yvonne

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee� Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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

--
Hans J. Baumgartner DIW Berlin
German Institute for Economic Research
Dept. Public Economics
K�nigin-Luise-Str. 5; 14195 Berlin; Germany
Tel.: +49/30/89789-307
Fax.: +49/30/89789-114
http://www.diw.de
http://www.hansbaumgartner.de

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