Hour of the day of the observation (integer).
Syntax: @hour
Return: series
Returns the integer hour (0–23) associated with each observation in the workfile (e.g., 9:35 a.m. returns 9, and 5:15 p.m. returns 17).
• If the workfile is of lower than hourly frequency, all observations will be set to 0.
• If the workfile is undated, observations will be set to -1.
Examples
series dt = @hour
saves the hours of the day into the series DT.
The command
smpl if @hour >= 12
sets the sample to only use afternoons and evenings.
Cross-references