27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

DATE 433<br />

• The starting value is specified first, followed by the periodicity, if any.<br />

• You cannot specify a periodicity without first specifying a starting value.<br />

• Starting values for HOUR, MINUTE, and SECOND can range from 0 to the periodicity<br />

minus 1 (for example, 0 to 59). For all other keywords, the range is 1 to the periodicity.<br />

• If both MONTH and QUARTER are specified, DATE can infer the starting value of one from<br />

the other (see “Example 5” on p. 437).<br />

• Specifying conflicting starting values for MONTH and QUARTER, such as Q 1 M 4, results<br />

in an error.<br />

• For keyword YEAR, the starting value can be specified as the last two digits (93) instead<br />

of the whole year (1993) when the series and any forecasting are all within the same<br />

century. The same format (2 digits or 4 digits) must be used in all other commands that<br />

use year values.<br />

• If you specify keywords that describe short time periods and skip over a level of measurement<br />

(for example, if you specify HOUR and SECOND but not MINUTE), you must specify<br />

the starting value and periodicity of the keyword after the skipped keywords. Otherwise,<br />

inappropriate periodicities will be generated (see “Example 7” on p. 438).<br />

BY Keyword<br />

• Keyword BY and a positive integer can be specified after the lowest-order keyword on the<br />

command to indicate an increment value. This value indicates how much to increment<br />

values of the lowest-order date variable as they are assigned to observations (see<br />

“Example 4” on p. 436).<br />

• The increment value must divide evenly into the periodicity of the lowest-order DATE<br />

variable specified.<br />

Operations<br />

• DATE creates a numeric variable for every keyword specified, plus a string variable<br />

DATE_, which combines information from all the specified keywords.<br />

• DATE automatically creates variable labels for each keyword specified indicating the variable<br />

name and its periodicity. For the DATE_ variable, the label indicates the variable<br />

name and format.<br />

• If the highest-order DATE variable specified has a periodicity, the CYCLE_ variable will<br />

automatically be created. CYCLE_ cannot have a periodicity (see “Example 3” on p. 435).<br />

• Default periodicities are not used for the highest-order keyword specified. The exception<br />

is QUARTER, which will always have a default periodicity.<br />

• The periodicity of the lowest-order variable is the default periodicity used by the procedures<br />

when periodicity is not defined either within the procedure or by the TSET command.<br />

• The keyword name with an underscore is always used as the new variable name, even if<br />

keyword abbreviations are used in the specifications.<br />

• Each time the DATE command is used, any DATE variables already in the working data file<br />

are deleted.

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

Saved successfully!

Ooh no, something went wrong!