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.

Example 5<br />

DATE Y 1950 Q 2 M.<br />

DATE 437<br />

• This example creates four variables (DATE_, YEAR_, QUARTER_, and MONTH_) in a file<br />

where observations are quarterly, starting with April 1950.<br />

• The starting value for MONTH_ is inferred from QUARTER_.<br />

• This specification is equivalent to DATE Y 1950 Q M 4. Here, the starting value for<br />

QUARTER_ (2) would be inferred from MONTH.<br />

Example 6<br />

DATE reports the following:<br />

Name Label<br />

YEAR_ YEAR, not periodic<br />

QUARTER_ QUARTER, period 4<br />

MONTH_ MONTH, period 12<br />

DATE_ DATE. FORMAT: "MMM YYYY"<br />

The following is a partial listing of the new variables:<br />

YEAR_ QUARTER_ MONTH_ DATE_<br />

1950 2 4 APR 1950<br />

1950 2 5 MAY 1950<br />

1950 2 6 JUN 1950<br />

1950 3 7 JUL 1950<br />

1950 3 8 AUG 1950<br />

...<br />

1988 4 11 NOV 1988<br />

1988 4 12 DEC 1988<br />

1989 1 1 JAN 1989<br />

1989 1 2 FEB 1989<br />

1989 1 3 MAR 1989<br />

1989 2 4 APR 1989<br />

1989 2 5 MAY 1989<br />

1989 2 6 JUN 1989<br />

1989 3 7 JUL 1989<br />

1989 3 8 AUG 1989<br />

1989 3 9 SEP 1989<br />

DATE OBS 9 17.<br />

• This command creates variables DATE_, CYCLE_, and OBS_ and assigns values to observations<br />

sequentially, starting with value 9. The periodicity is 17.<br />

DATE reports the following:<br />

Name Label<br />

CYCLE_ CYCLE, not periodic<br />

OBS_ OBS, period 17<br />

DATE_ DATE. FORMAT: "CCCC OO"

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

Saved successfully!

Ooh no, something went wrong!