11.07.2015 Views

[U] User's Guide

[U] User's Guide

[U] User's Guide

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.

82 [ U ] 10 Keyboard useAnother method for reviewing previous lines, #review, is convenient when you want to see thelines in context.Example 2Typing #review by itself causes Stata to list the last five commands you typed. (You need nottype #review—pressing F2 has the same effect.) For instance,. #review5 list make mpg weight if abs(res)>64 list make mpg weight if abs(res)>53 tabulate foreign if abs(res)>52 regress mpg weight weight21 test weight2=0.We can see from the listing that the last command typed by the user was test weight2=0. Or, youmay just look at the Review window to see the history of commands you typed.Example 3Perhaps the command you are looking for is not among the last five commands you typed. Youcan tell Stata to go back any number of lines. For instance, typing #review 15 tells Stata to showyou the last 15 lines you typed:. #review 1515 replace resmpg=mpg-pred14 summarize resmpg, detail13 drop predmpg12 describe11 sort foreign10 by foreign: summarize mpg weight9 * lines that start with a * are comments.8 * they go into the review buffer too.7 summarize resmpg, detail6 list make mpg weight5 list make mpg weight if abs(res)>64 list make mpg weight if abs(res)>53 tabulate foreign if abs(res)>52 regress mpg weight weight21 test weight2=0.If you wanted to resubmit the 10th previous line, you could type 10 and press Seek, or you couldpress PrevLine 10 times. No matter which of the above methods you prefer for retrieving lines, youmay edit previous lines by using the editing keys.10.6 Tab expansion of variable namesAnother way to quickly enter a variable name is to take advantage of Stata’s variable namecompletion feature. Simply type the first few letters of the variable name in the Command windowand press the Tab key. Stata will automatically type the rest of the variable name for you. If morethan one variable name matches the letters you have typed, Stata will complete as much as it canand beep at you to let you know that you have typed a nonunique variable abbreviation.

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

Saved successfully!

Ooh no, something went wrong!