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

st: Re: modifying id code (p.s. bootstrapping)


From   baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: modifying id code (p.s. bootstrapping)
Date   Mon, 14 Oct 2002 10:50:07 -0400

--On Monday, October 14, 2002 2:33 -0400 Satyarth wrote:

i have to add "51" to all the id-codes in my dataset [variable "idcode" is
in the integer format]. can i convert it to string and add 51 at the end?
Use

gen str?? newcode = string(idcode)+"51"

Fill in the ?? with the maximum length of the resulting code.
The + operator is overloaded to denote concatenation of strings. Thus you
could also do string(givenname)+" "+string(surname) although there are other ways of doing that.

Re bootstrapping, I imagine Steve Stillman is right on target with the use of 'cluster' in this context. But the buzzword 'block bootstrap' may be useful to know, as there are many references to it (and elaborations, such as the 'block-block bootstrap' in the literature. Try a search in IDEAS
(http://ideas.repec.org).

Kit
________________________________________________________________________
Christopher F Baum, Boston College Economics, Chestnut Hill MA 02467 USA
baum@bc.edu http://fmwww.bc.edu/ec-v/baum.fac.html
*
* 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