Stata Version 8

At the beginning of  2003, Stata Corp. released a major new version of their software.  Stata Version 8.0 contains a point-and-click interface and has greatly expanded graphics capabilities.  The point-and-click interface allows users to generate most Stata commands without knowing the precise command syntax.  Conventional text-based commands are also generated by this interface that may be saved in do files or recalled from the Review Window as in Version 7. 

Most of the changes in Version 8 syntax are in the graph commands.  These commands introduce many new features but can result in much longer command lines.  You may use the old graph syntax by replacing the Version 7 graph command by the graph7 command.  For example, a scatter plot in Version 7  with x-axis labels at 1, 3, 5, and 7 would be written 

graph x y, xlabel(1 3 to 7) 

The equivalent Version 8 command is 

scatter x y, xlabel(1(2)7) 

However, Version 8 will also accept 

graph7 x y, xlabel(1 3 to 7) 

Substituting graph7 for graph allows almost all of the graph commands given in the text to run under Version 8 without any other modifications. 

One difficulty with Version 8 is that it can generate very long commands.  These commands are easier to read if they are written over multiple lines.  Stata interprets three consecutive slashes at the end of a line to indicate that the next line is a continuation of the preceding one.  Hence, 

by treat: summarize age, detail 


by treat:                   ///
summarize age, detail 

are identical commands.  We use these continuation lines in the following do files to increase the clarity of the code.  Unfortunately, Stata does not allow these continuation marks to be used interactively in the Stata Command window.  If you wish to copy commands from these do files into the Command window you must first delete the continuation marks and end of line <Enter> characters before cutting and pasting these commands into an interactive Stata session. 

Below we give Version 8 log and do files that perform equivalent analyses to those given in my text but which take advantage of the new features in Version 8. 

Version 8 log and do files 

To download any of the following Stata log files or do files, click on the file name, then follow the directions to save the file on your computer.  These do files do not specify a folder location for the data files.  For this reason, you should download the do files into the same folder as your data files.

Log File Name Data Source
1.3.2.Sepsis.log Bernard et al. (1997)
1.3.6.Sepsis.log Bernard et al. (1997)
1.4.11.Sepsis.log Bernard et al. (1997)
1.4.14.Sepsis.log Bernard et al. (1997)
10.7.ERpolymorphism.log Parl et al. (1989)
11.11.Isoproterenol.log Lang et al. (1995)
11.2.Isoproterenol.log Lang et al. (1995)
11.5.Isoproterenol.log Lang et al. (1995)
11.AreaUnderCurve.log (no ref)
2.12.Poisson.log Brent et al. (1999)
2.16.Poisson.log Brent et al. (1999)
2.18.Funding.log Gross et al. (1999)
2.20.Framingham.log Levy (1999)
3.11.1.Framingham.log Levy (1999)
4.11.Sepsis.log Bernard et al. (1997)
4.13.1.Sepsis.log Bernard et al. (1997)
4.18.Sepsis.log Bernard et al. (1997)
4.22.EsophagealCa.log Breslow & Day (1980)
5.10.EsophagealCa.log Breslow & Day (1980)
5.11.1.EsophagealCa.log Breslow & Day (1980)
5.12.EsophagealCa.log Breslow & Day (1980)
5.20.EsophagealCa.log Breslow & Day (1980)
5.32.2.Sepsis.log Bernard et al. (1997)
5.5.EsophagealCa.log Breslow & Day (1980)
5.9.EsophagealCa.log Breslow & Day (1980)
6.16.Hemorrhage.log O'Donnell et al. (2000)
6.9.Hemorrhage.log O'Donnell et al. (2000)
7.7.Framingham.log Levy (1999)
7.9.4.Framingham.log Levy (1999)
8.12.Framingham.log Levy (1999)
8.2.Framingham.log Levy (1999)
8.7.Framingham.log Levy (1999)
8.8.2.Survival_to_Person-Years.log (no ref)
8.9.Framingham.log Levy (1999)
9.3.Framingham.log Levy (1999)

Do File Name Data Source Bernard et al. (1997) Bernard et al. (1997) Bernard et al. (1997) Bernard et al. (1997) Parl et al. (1989) Lang et al. (1995) Lang et al. (1995) Lang et al. (1995) (no ref) Brent et al. (1999) Brent et al. (1999) Gross et al. (1999) Levy (1999) Levy (1999) Bernard et al. (1997) Bernard et al. (1997) Bernard et al. (1997) Breslow & Day (1980) Breslow & Day (1980) Breslow & Day (1980) Breslow & Day (1980) Breslow & Day (1980) Bernard et al. (1997) Breslow & Day (1980) Breslow & Day (1980) O'Donnell et al. (2000) O'Donnell et al. (2000) Levy (1999) Levy (1999) Levy (1999) Levy (1999) Levy (1999)  (no ref) Levy (1999) Levy (1999)