10.08.2013 Views

Introduction to Stata 8

Introduction to Stata 8

Introduction to Stata 8

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2. Windows in <strong>Stata</strong> [GSW] 2<br />

I Suggest arranging the main windows as shown below. Once you made your choices:<br />

Prefs ► Save Windowing Preferences<br />

█ Intercooled <strong>Stata</strong> 8.2<br />

File Edit Prefs Data Graphics Statistics User Window Help<br />

█ Review<br />

sysuse au<strong>to</strong>.dta<br />

summarize<br />

generate gp100m = 100/mp<br />

label variable gp100m " Gallo<br />

regress gp100m weight<br />

█ Variables<br />

make Make and M<br />

price Price<br />

mpg Mileage (mp<br />

rep78 Repair recor<br />

headroom Headroom (i<br />

trunk Trunk space<br />

weight Weight (lbs.)<br />

length Length (in.)<br />

turn Turn Circle (<br />

displacement Displaceme<br />

gear_ratio Gear Ratio<br />

foreign Car type<br />

█ <strong>Stata</strong> Results<br />

.<br />

generate gp100m = 100/mpg<br />

. label variable gp100m "Gallons per 100 miles"<br />

.<br />

regress gp100m weight<br />

Source | SS df MS Number of obs = 74<br />

-------------+------------------------------ F( 1, 72) = 194.71<br />

Model | 87.2964969 1 87.2964969 Prob > F = 0.0000<br />

Residual | 32.2797639 72 .448330054 R-squared = 0.7300<br />

-------------+------------------------------ Adj R-squared = 0.7263<br />

Total | 119.576261 73 1.63803097 Root MSE = .66957<br />

-----------------------------------------------------------------------<br />

gp100m | Coef. Std. Err. t P>|t| [95% Conf. Interval]<br />

-------------+---------------------------------------------------------<br />

weight | .001407 .0001008 13.95 0.000 .001206 .0016081<br />

_cons | .7707669 .3142571 2.45 0.017 .1443069 1.397227<br />

-----------------------------------------------------------------------<br />

-more-<br />

█ <strong>Stata</strong> Command<br />

gp100m Gallons per regress gp100m weight<br />

Command line window<br />

In this one line window you may enter single commands and execute them by [Enter].<br />

Review window<br />

This window displays the most recent commands. Click a command in the Review window <strong>to</strong><br />

paste it <strong>to</strong> the Command line window where you may edit and execute it. You may also scroll<br />

through past commands using the PgUp and PgDn keys.<br />

Save past commands <strong>to</strong> a do-file by clicking the upper left Review window but<strong>to</strong>n and: Save<br />

Review Contents. Another option is <strong>to</strong> use the command log file (cmdlog.txt; section 1.2).<br />

Variables window<br />

You see a list of the variables in memory. Paste a variable name <strong>to</strong> the Command line window<br />

by clicking it. You may also paste a variable name <strong>to</strong> an active dialog field.<br />

Results window<br />

This is the primary display of the output. Its size is limited, and you can't edit it. You may<br />

print the contents, but in general my suggestion <strong>to</strong> let NoteTab print the log-file is handier.<br />

5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!