stataa

stataa - Stata Assignments [stata_assignments] 1. Estimates...

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

View Full Document Right Arrow Icon
1 Stata Assignments [stata_assignments] 1. Estimates table . Estimates table is useful in comparing a set of regression models & for displaying/printing the results in publishable form. (See view help outreg for a more powerful way to display/print regression results for publication.) . use hsb2, clear 1. Estimate increasingly complex regression models & display the results via “estimates table.” . reg read math science socst . est store Model3, title(Most complex model) . est t . est t, star . est t, se . reg read math science . est store Model2, title(Intermediate model) . est table . est table, star . reg read math . estimates store Model1, title(Simplest model) . est table . est table, star . est replay Model3 . est query [to confirm which model is ‘active’] . est replay Model2 . est query . est dir _all . est t Model1 Model2 Model3, coded . est t Model1 Model 2 Model3 . est t Model1 Model2 Model3, se . est t Model1 Model2 Model3, star(.01 .05 .10) . xi:reg read math science female i.race . est store Model4 . est t Model4, se . est t Model4, star(.01 .05 .10) . est for Model4: test female . est for Model4: test _Irace_2 _Irace_3 _Irace_4
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 2. Specify particular model-fit statistics to compare & display. . ereturn list [list matrix coefficients for current regression model] . est t Model1 Model2 Model3, stats(N r2 r2_a) [specify selected model statistics] 3 . Clear the models from memory. . est clear 2. Log & Cmdlog: how to log Stata sessions. From now on you must log the results and commands for all Stata assignments (but turn in only the ‘log’ and ‘cmdlog’ commands, not the logs themselves). . log using practice, replace [or: append] . cmdlog using practice, replace [or: append] [Note: The downloadable command ‘log2do’ turns logfiles into command files.] * I will practice logging a Stata session’s results and commands. . use hsb2, clear . d . su . su math, d . codebook race . insp race * I will now practice turning log and command log off and on during a session. . log off . cmdlog off . log on . cmdlog on * I will now practice making wrap-around lines during a session. I will /// now practice making wrap-around lines. I will now practice making /// wrap-around lines. I will stop practicing wrap-around lines because /// I am tired of this. . d race ses * I will stop logging the results and commands. I will stop logging the /// results and commands. . log close . cmdlog close . view practice.log [or: Click log icon] . view practice.txt [Note: You can use your word processor to select log or cmdlog from the Windows- Explorer folder, edit, save, and print, but always save in ASCII or Stata format.]
Background image of page 2
3 3. Create variables § Categorizing a quantitative variable can be problematic if the variable has pronounced skewness, but doing so can be useful in key ways. Here are various ways to categorize variables. Compare the results. In the long run you’ll want to learn how to tailor the procedures to your particular needs. . gr7 science, bin(8) norm
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/11/2011 for the course SYA 6306 taught by Professor Tardanico during the Spring '09 term at FIU.

Page1 / 26

stataa - Stata Assignments [stata_assignments] 1. Estimates...

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

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