11.07.2015 Views

[U] User's Guide

[U] User's Guide

[U] User's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

96 [ U ] 11 Language syntaxDates specified with spaces, slashes, or commas must be bound in parentheses, as in(15 apr 1973) (april 17, 1973)(3)(april 23, 1973)Evenly spaced calendar dates are not especially useful, but with other time units, even spacingcan be useful, such as1999q1(1)2005q1when %tq dates are being used. 1999q1(1)2005q1 means every quarter between 1991q1 and 2005q1.1999q1(4)2005q1 would mean every first quarter.To interpret a datelist, Stata first looks at the format of the related variable and then uses thecorresponding date-to-numeric translation function. For instance, if the variable has a %td format,the td() function is used to translate the date; if the variable has a %tq format, the tq() functionis used; and so on.11.1.10 Prefix commandsStata has a handful of commands that are used to prefix other Stata commands. by varlist:,discussed in section [U] 11.1.2 by varlist:, is in fact an example of a prefix command. In that section,we demonstrated by usingand later,by region: summarize marriage rate divorce rateby region, sort: summarize marriage rate divorce rateand although we did not, we could also have demonstratedby region, sort: summarize marriage rate divorce rate, detailEach of the above runs the summarize command separately on the data for each region.by itself follows standard Stata syntax:by varlist[, options]: . . .In by region, sort: summarize marriage rate divorce rate, detail, region is by’s varlistand sort is by’s option, just as marriage rate and divorce rate are summarize’s varlist anddetail is summarize’s option.

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

Saved successfully!

Ooh no, something went wrong!