Statalist


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

Re: st: Prob with -rename-


From   Johannes Geyer <JGeyer@diw.de>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Prob with -rename-
Date   Tue, 13 May 2008 10:32:44 +0200

try this:

**********
clear
set obs 100
g x14 = 0
g x2=5
rename x1 x90
**********

set varabbrev off

**********
clear
set obs 100
g x14 = 0
g x2=5
rename x1 x90
**********

and you get the desired error message. The reason is that you can use 
abbreviations (default) in Stata - see help varabbrev

hope this helps,

Johannes


----------------------
Johannes Geyer
Deutsches Institut für Wirtschaftsforschung (DIW Berlin)
German Institute for Economic Research 
Department of Public Economics
DIW Berlin
Mohrenstraße 58
10117 Berlin
Tel: +49-30-89789-258

owner-statalist@hsphsun2.harvard.edu schrieb am 13/05/2008 10:03:44:

> Dear Statalisters,
> 
> I am currently dealing with a nasty problem. Try the following:
> 
> **********
> clear*
> set obs 100
> g x14 = 0
> g x2=5
> rename x1 x90
> **********
> 
> The last -rename- simply hijacks variable x14  and renames it x90. If I
> wanted this behavior, I would say -rename x1? X90-. Should -rename- not
> alert me to the fact that there is no such variable?
> 
> Martin Weiss
> _________________________________________________________________
> 
> Diplom-Kaufmann Martin Weiss
> Mohlstrasse 36
> Room 415
> 72074 Tuebingen
> Germany
> 
> Fon: 0049-7071-2978184
> 
> Home: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1130
> 
> Publications: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1131
> 
> SSRN: http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=669945
> 
> 
> *
> *   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/


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