These exercises are designed as stimulants to learning Stata and exploring its capabilities. These exercises will be treated the same way as assigned reading materials, and I will check if you have tried these exercises by randomly picking some of you to tell us how you would carry out the procedures.
If you don't have Stata installed on your own computers or lab computers, you can have access to it at College of Arts & Science Microcomputer Labs. [The labs are open to all with Vanderbilt ID but you may not be able to enter the buildings at night. At least you can go there during the day. The version they have is version 8, not 9. Version 8 should do all we want to do, probably with the same commands but somewhat different menu setup.]If you have chosen software packages other than Stata, please let me know.
describe
can give you some basic information on variable types. You can change variable types using command format
if you want to.
fev1
is different in children less than 9 years old and in those older than 9 years old. anova hemoglbn type oneway hemoglbn type, t oneway hemoglbn type, b sch siThe last command gives multiple comparison test results (Bonferroni, Scheffe, Sidak). Unfortunately, there is no Tukey's multiple comparison test in the standard distribution. It is implemented in the
prcomp
command in the user-contributed "sg101" package. [Type net search sg101
and click on the link and follow instructions for installation.] Once you have installed the package, type prcomp hemoglbn type, anova tukey
to get the Tukey's test. anova fev1 sex anova fev1 sex resp anova fev1 sex resp sex*resp regress fev1 sex regress fev1 sex resp
regress fev1 age scatter fev1 age || lfit fev age scatter fev1 age || lfitci fev ageAlso try to do separate linear regression fitting of fev1 as a function of age on the children with respiratory symptoms and those without. Compare the results on these two subsets. Can you draw graphs to compare them?
describe
, tabulate
, tab1
, tab2
, etc.