EC13 Week1-commands

EC13 Week1-commands - . graph pie, over(hair) . graph pie,...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Ec 13 Recitation #1 Introduction to STATA 1. Open Data Editor - Click on the icon or the top menu bar “Data – Data Editor” 2. . describe or simply . d 3. . tabulate hair or simply . tab hair 4. Labeling categorical data requires two steps: . label define hairbl 1 "black" 2 "blond" 3 "brown" 4 "red" 5 "other" - We have just created a definition for values 1-5 called “hairbl”. . label values hair hairbl - This command connects the values 1-5 with the values in hair . . tabulate hair 5. Histogram . histogram hair, discrete - discrete option will tell Stata to use one bin for each value of the variable. . hist hair, discrete gap(10) . hist hair, discrete frequency 6. Pie Chart
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: . graph pie, over(hair) . graph pie, over(hair) plabel(_all percent)- Add the percentage values to each slice 7. . hist math, frequency xlabel (40 (5) 100) width(5) 8. . stem math . stem math, line(2) 9. 1 9/12/18 Ec 13 Recitation #1 Introduction to STATA . graph box math 10. . centile math, centile (25 75) 11. . help recode . gen mgrouped=math . recode mgrouped 40/49=1 50/59=2 60/69=3 70/79=4 80/89=5 90/100=6 . label define Scores 1 "40-49" 2 "50-59" 3 "60-69" 4 "70-79" 5 "80-89" 6 "90-100" . label values mgrouped Scores . tab mgrouped 12. . corr math gpa 13. . scatter gpa math . scatter gpa math || lfit gpa math 2 9/12/18...
View Full Document

Page1 / 2

EC13 Week1-commands - . graph pie, over(hair) . graph pie,...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online