Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

RE: st: Generating dummies with xi


From   Garry Anderson <g.anderson@unimelb.edu.au>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Generating dummies with xi
Date   Tue, 12 Apr 2011 11:37:21 +1000

I think another exception to use -xi:- with Stata 11, rather than use
factor variables, is when the following estimation commands are being
used
-exlogistic-, -expoisson-, -qreg-, -iqreg-, -sqreg- and -bsqreg-.

There may be other commands that do not allow factor variables.

Best wishes, Garry


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
Sent: Monday, 11 April 2011 10:51 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Generating dummies with xi

It is better to use factor variables directly than to use -xi:-.

The only exception would be if are using an out-of-date version of
Stata, say Stata 10, in which case you are asked to tell us that in the
Statalist FAQ.

That said, there seems to be some confusion here. First, -xi- will
generate all pertinent dummies if asked directly. Second, a modelling
command necessarily omits at least one such variable; that's the way
that dummies work. Third, the help for -xi:- explains the use of
-char- to get what you want, at least in Stata 10. (I don't have access
to earlier versions at this time.)

Nick

On Mon, Apr 11, 2011 at 1:34 PM, emanuele mazzini
<madsoenistata@gmail.com> wrote:
> Dear all Stata users,
> I just discovered the command xi to generate dummies, but I also 
> noticed that by default it omits one of the values. This is obvious on

> one hand, but on the other hand, does anyone of you knows a way to 
> tell Stata to generate dummies for all groups and to omit none of 
> them?
>
*
*   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/



*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index