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

Re: st: Re: destringing


From   Suzy <[email protected]>
To   [email protected]
Subject   Re: st: Re: destringing
Date   Sat, 28 Aug 2004 12:31:32 -0400

Hi Daniel,
I have looked at the UCLA website - it's very good and I've used it before. I'll go through it again on this topic. Thanks too for the other tips. I think it's true that most of the learning happens through trial and error and then some handholding by others who have been there. I appreciate your time and insight on this topic.
Suzy

Daniel Egan wrote:


Hi Suzy,
A couple of points:
1) instead of
tab dxcode1 if dxcode1==V3000
use
tab dxcode1 if dxcode1=="V3000"

this tells stata that what it is tabulating is a string variable. This is
true for all of your string variables, i.e. any one that was read in as
"strX".

2) I would highly suggest taking about 1 hour to go through the relevant
modules at http://www.ats.ucla.edu/stat/stata/modules/default.htm . This
will give you a very useful overview of Stata datatypes, and how to
manipulate them as well as do various things

3) I would also strongly suggest that when doing analyses, you have your
"raw" dataset (i.e. what you -infiled- and saved), which is NEVER saved
over. Doing a "save-as" on the datasets once you have put them in analytic
format, like "Foo-A.dta". This prevents the over writing, and ties in with
my next point.

4) Look into using .do files for all of this - it allows you to 1) keep
track of what you have done, and look through your code quickly for problems
fix them, and rerun what you have done on the "raw" dataset, and 2) gives a
very easy replication file for anyone who is looking to proof your work.

5) Once comfortable with it, look into using -encode-.

All things which I learned painfully on my own....

Dan
*
* 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index