[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Re: destringing
A couple of points:
1) instead of
tab dxcode1 if dxcode1==V3000
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
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....
* For searches and help try: