You are here:
Vanderbilt Biostatistics Wiki
>
Main Web
>
Education
>
IntroBiostatCourse2007
>
IntroBiostatCourse2007StataLab
(revision 19) (raw view)
Edit
Attach
<font size="3"><span style="font-family: times new roman,times,serif;"> ---+++!! IGP 304: Stata Labs %TOC% ---++++ Some words from the instructor Knowing the software is vital to your learning of statistics and your course performance. If you learn statistics without knowing the software, you will become crippled, armed with theory and methods and ideas but not knowing how to put them into practice. 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 [[http://www.vanderbilt.edu/cas/computers/labinfo][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. ---++++ Source of data sets and examples * Some of materials were copied/modified from course materials of Biostatistics, M.P.H. program at Vanderbilt University, and the course textbook, "Statistical Modeling for Biomedical Researchers", 2nd Ed., _in press_, by William Dupont. [WD] refers to William Dupont's book <!--- * Notes for Biostatistics II, M.P.H. program, instructed by Patrick Arbogast ---> #StataLab070115 ---++++ Assigned on 01/15 See Table 4.1 * enter a dataset displayed in Table 4.1 * assign the data description * make a note which documents the source of the data and the date of creation * label each variable * use =codebook=, =describe=, and =summarize= * save the commends that used so far in the review window as do file <!-- [[%PUBURL%/Main/LeenaStataNotes/delivery.txt][dataset]]: [[%PUBURL%/Main/LeenaStataNotes/plasmaVolume.dta][dataset]]: * find a way to let Stata output the number of subjects that are less than or equal to 5 years old * find a way to let Stata output the number of subjects that have missing values for the language variable * calculate the average age of the subjects --> #StataLab070117 ---++++ Assigned on 01/17 Practice what you learned about graphing using STATA * download [[%PUBURL%/%WEB%/LeenaStataNotes/haemoglobin.txt][Haemoglobin]] and use =infile= command to import the data: =infile id hemo using "C:\Teaching\IGP\data\haemoglobin.txt", clear= * make a box plot : go to Stata pulldown menus --> Graphics --> Box plots, choose _hemo_ in the box called "Variables" * observe what appears in the review window #StataLab070119 ---++++ Assigned on 01/19 You can modify the code provided in [[LeenaStataNotes][Stata notes for classes]] for [EMS] Chapter 3. * see =help axis_options= * make Fig. 3.8: put a main title and a subtitle (name them whatever you want) using =title= and =subtitle= * make Fig. 3.9: put the x title, add the x tick marks to the x-axis from 7 to 11 in units of 1, and add the x minor tick marks to the x-axis at 7.5, 8.5, 9.5, 10.5 * make Fig. 3.10-3.11: put x and y axis labels and tick marks, and put the main, x and y axis titles * make Fig. 3.12: put a main title and the y axis title #StataLab070122 ---++++ Assigned on 01/22 * Use [[%PUBURL%/%WEB%/LeenaStataNotes/haemoglobin.txt][Haemoglobin]] in Table 3.2: * calculate the mean and standard deviation for haemoglobin using the code provided in [[LeenaStataNotes][Stata notes for classes]] [EMS] Chapter 4. * compare the results with the output using =summarize= * Stata Lab: calculate the following values using the code provided in [[LeenaStataNotes][Stata notes for classes]] [EMS] Chapter 5 * find the area in upper tail of the standard normal distribution for *_z = 1.975_* * find the area in lower tail of the standard normal distribution for *_z = -1.95_* * find the area of the standard normal distribution between two values, *_z = -1_* and *_z = 1_* * find the area of the standard normal distribution between two values, *_z = -2.58_* and *_z = 2.58_* #StataLab070124 ---++++ Assigned on 01/24 * R Lab: The purpose of this lab is to examine how the standard deviation of a population and the sample size of a trial affect the standard errors using the code provided in [[LeenaRNotes][R notes]] [EMS] Chapter 4. * download R 2.4 [[http://www.r-project.org][official site]] and open R * open a text editor * copy the code to the text editor * change the values of the s.d of the population *_sigma_* and the number of observation in each sample, *n* e.g. =sigma <- 20= , =n <- 5= in R * copy the modified code and paste to R (do not copy the whole commands; copy several lines at each time) * observe how the standard errors change as function of *_sigma_* and *n* #StataLab070126 ---++++ Assigned on 01/26 Calculate confidence interval for a mean for [EMS] Example 6.3 on page 55 using the code provided in [[LeenaStataNotes][Stata notes for classes]] [EMS] Chapter 6 #StataLab070129 ---++++ Assigned on 01/29 Compare two means using the code provided in [[LeenaStataNotes][Stata notes for classes]] [EMS] Chapter 7 #StataLab070205 ---++++ Assigned on 02/05 * Generate ANOVA Table 9.1 (c) using the code provided in [[LeenaStataNotes][Stata notes for classes]] [EMS] Chapter 9 * then calculate F value <!-- and p-value: use Stata command to calculate p-value =display Ftail(2, 38, 50)= --> #StataLab070207 ---++++ Assigned on 02/07 #StataLab070209 ---++++ Assigned on 02/09 #StataLab070212 ---++++ Assigned on 02/12 #StataLab070214 ---++++ Assigned on 02/14 #StataLab070216 ---++++ Assigned on 02/16 #StataLab070219 ---++++ Assigned on 02/19 #StataLab070221 ---++++ Assigned on 02/21 #StataLab070223 ---++++ Assigned on 02/23 #StataLab070226 ---++++ Assigned on 02/26 </span></font>
Edit
|
Attach
|
P
rint version
|
H
istory
:
r22
|
r20
<
r19
<
r18
<
r17
|
B
acklinks
|
V
iew topic
|
Edit WikiText
|
More topic actions...
Topic revision: r19 - 03 Feb 2007,
LeenaChoi
Main
Department Home Page
Biostatistics Graduate Program
Vanderbilt University Medical Center
Main Web
Main Web Home
Search
Recent Changes
Changes
Topic list
Biostatistics Webs
Archive
Main
Sandbox
System
Register
|
Log In
Copyright © 2013-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki?
Send feedback