Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: xi command deletes variables without warning


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: xi command deletes variables without warning
Date   Fri, 24 Feb 2006 08:43:38 -0000

Everyone! 

In 18th century landscape architecture in Britain, 
designers used features called "ha-has" in country estates. 
These were little grassy trenches into which walkers dropped 
without warning. As some wit pointed out at the time, the 
"ha-ha" surprise or shock was never the same the second time round. 

-xi:- does do exactly what you report. It is a deliberate, designed 
feature. The argument is that 

(a) It is all too easy otherwise to accumulate lots and lots and 
lots of dummy variables from even a few analyses. In a strong 
sense, such variables contain no new information, as they 
can be derived immediately from the original variables. For most
purposes, such variables just bloat datasets unnecessarily. 

(b) It is very easy to generate them all over again with 
a subsequent -xi:-. 

(c) If you do want to keep those dummies, it is easy to 
generate them otherwise or to -rename- those you want. 

Nick 
[email protected] 

Thuy Le
 
> I have a panel data set with about 20 variables and less than 700
> observations. I used the following command in STATA9 SE 
> 
> .xi, noomit i.region i.income
> 
> to generate the dummies and it work fine. I saved the file 
> and when I used
> the command again with the same command for another variable
> 
> .xi, noomit i.interval
> 
> STATA somehow deleted some of the previously generated dummies. 
> 
> I used another command with no problem
> 
> .qui tab, gen(interval_)
> 
> Is there anyone experienced the same problem?
 

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