Stata Tutorial - Data and Statistical Services - Princeton University
Stata Tutorial - Data and Statistical Services - Princeton University
Stata Tutorial - Data and Statistical Services - Princeton University
- No tags were found...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Typing comm<strong>and</strong>s in the Comm<strong>and</strong> windowThe –list- comm<strong>and</strong> is particularly helpful to use after sorting data,or combining with if. For example, you can obtain five minimumvalues of MPG by listing the first five records after sorting.. sort mpg. list mpg in 1/5Suppose you want to see the make of the cars whose price is lessthan $5000. Try:. list make price if price greater than>= greater than or equal to< less than= b ora>=b), but you cannot put spaces within them (e.g., it must be‘>=’, not ‘> =’).Combining tests: -<strong>and</strong>- <strong>and</strong> –or--if- can be combined with <strong>and</strong> (&) to evaluate for more than oneconditions. Let's say you want to find out the MAKE of the carswhose MPG is greater than 30 <strong>and</strong> PRICE is less than $5000.. list make if mpg>30 & price30 | price