{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Stata-basics_by_example-2 - Stata Basics by example-2 This...

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

View Full Document Right Arrow Icon
1 Stata - Basics by example-2 This handout describes two Stata features. First, I’ll describe how to use the Do-file Editor to write, execute and save Stata programs. Second, I’ll describe how to save Stata output in a Log file suitable for importing into your favorite Word Processor. Click on the Do-file Editor icon (it looks like a pen on paper). A new editor window will open. Start typing in commands as you would in the Stata command window: set mem 5m use “d:\teaching\eco721\lab\fertility.dta”, clear summarize regress nchild age_mom age_dad edu_mom edu_dad income land livstk gen incdolth=income/30/1000 gen incdolth2=incdolth2^2 regress nchild age_mom age_dad edu_mom edu_dad incdolth incdolth2 land livstk To “do” this file, click on the Do Current File icon (second from right, looks like a page with writing on it). This will run the commands in Stata. If you want to do only a subset of commands, highlight them in the Do-file Editor and then click on Do Current File.
Image of page 1

Info icon This 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.

{[ 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