Jennifer Ng
> I like to use excel to organize the data before I run
> regression. Usually,
> I prefer to use some upper case and lower case for the
> characters of the
> variable names. When I use the insheet
> command, the variables are all changed to lower case. It is quite
> time-consuming to change them. Is there any quick way to do it?
Rufus Browning
> Here are a couple of ways.
>
> The program StatTransfer,
...
> Alternatively, you could
> (1) use -describe- or -ds- to obtain the list of the
> all-lc-varnames in Stata
> (2) put the word -rename- into all the cells of the first
> column of an
> Excel worksheet,
> (3) put the Stata varnames into the second column,
> (4) put the list of your Excel uc/lc varnames into the
> third column, then
> (5) paste the worksheet as unformatted text into a word processor,
> (6) replace all the tabs or other mess into spaces between
> the terms,
> (7) paste the resulting set of Stata -rename- commands into
> Stata's Do-File
> Editor, and
> (8) run the do-file.
In addition, there is a purpose-built renaming
command -renvars-, published in STB-60. That permits
Rufus's second approach to be implemented in Stata
with less typing.
Nick
[email protected]
*
* 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/