EC13 Week1-commands

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

Info icon This 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
Image of page 1

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

View Full Document Right Arrow Icon
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern