Statalist The Stata Listserver


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

Re: st: superposed rolled windows


From   "Michael Blasnik" <michael.blasnik@verizon.net>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: superposed rolled windows
Date   Tue, 27 Jun 2006 14:40:45 -0400

You should only use -encode- if it is a string variable that is true text -- not a number . The resulting numeric variable is simply an index based on alphabetical order of string variable.

You should use -destring- if it is a number accidentally held as text. You may need to use the -ignore()- option of destring if the number has commas or currency symbols. For example:

destring dollarvar, ignore(,$) replace

You can list multiple variables in the destring command

Michael Blasnik
michael.blasnik@verizon.net


----- Original Message ----- From: "irodriguez" <irodriguez@utdt.edu>
To: <statalist@hsphsun2.harvard.edu>
Sent: Tuesday, June 27, 2006 1:37 PM
Subject: RE: st: superposed rolled windows



ok thks
there is some command for change all string variables simultaneously?
thanks again?

-----Original Message-----
From: "Alex Ogan" <aogan@ArrowstreetCapital.com>
To: <statalist@hsphsun2.harvard.edu>
Date: Tue, 27 Jun 2006 13:27:22 -0400
Subject: RE: st: superposed rolled windows

You probably want to try the command -encode-.

You might want to read the help file to learn more, but the basic
syntax
is:

encode stringvarname, gen(newvarname)

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of irodriguez
Sent: Tuesday, June 27, 2006 1:24 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: superposed rolled windows

the meaning is that is string but i dont know how to change variables
to

string format to a number format

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