07.02.2014 Views

Introduction to Stata 8 - (GRIPS

Introduction to Stata 8 - (GRIPS

Introduction to Stata 8 - (GRIPS

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 />

The organisation shown here is different from that shown in the manuals: The Review and<br />

Variables windows must be placed <strong>to</strong> the left of the main <strong>Stata</strong> window, not within it, <strong>to</strong><br />

avoid conflicts with dialogs. Section 3 gives some further advice.<br />

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

use c:\dokumenter\proj1\<br />

summarize<br />

generate bmi=weight/(he<br />

regress bmi age sex<br />

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

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

. generate bmi=weight/(height^2)<br />

. regress bmi age sex<br />

█ Variables<br />

id<br />

sex<br />

age<br />

height<br />

weight<br />

bmi<br />

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

-------------+------------------------------ F( 2, 227) = 1.18<br />

Model | 982.996648 2 491.498324 Prob > F = 0.3090<br />

Residual | 94516.5394 227 416.37242 R-squared = 0.0103<br />

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

Total | 95499.536 229 417.028542 Root MSE = 20.405<br />

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

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

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

age | .1452639 .0947552 1.53 0.127 -.0414483 .3319761<br />

sex | .0681109 3.074339 0.02 0.982 -5.989781 6.126003<br />

_cons | 15.89703 6.938118 2.29 0.023 2.225677 29.56838<br />

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

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

regress bmi age sex<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 select<br />

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

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!