{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

stataa

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

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

1 Stata Assignments [stata_assignments] 1. Estimates table See view help estimates & view help est_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

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

View Full Document
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.]
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.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online