WEBVTT

1
00:00:02.266 --> 00:00:06.632 align:middle line:90%
In this video, you learn how  
to use the Time Series Data 

2
00:00:06.633 --> 00:00:14.499 align:middle line:90%
Preparation task in SAS Studio. 
From the Tasks list, click 

3
00:00:14.500 --> 00:00:20.433 align:middle line:90%
Forecasting to expand the list 
of Forecasting tasks. Double-

4
00:00:20.433 --> 00:00:26.366 align:middle line:90%
click the Time Series Data 
Preparation task to open it. To 

5
00:00:26.366 --> 00:00:30.232 align:middle line:90%
make the most of my screen 
space, I will click the 

6
00:00:30.233 --> 00:00:36.633 align:middle line:90%
Maximize View button. The data 
I am using is the RETAIL data 

7
00:00:36.633 --> 00:00:42.866 align:middle line:90%
set from the SAS Help library. 
This data is already a time 

8
00:00:42.866 --> 00:00:46.566 align:middle line:90%
series with the desired 
interval and accumulation 

9
00:00:46.566 --> 00:00:52.232 align:middle line:90%
method. It has been determined, 
either told directly or from 

10
00:00:52.233 --> 00:00:56.866 align:middle line:90%
exploration inside the Time 
Series Exploration task, that 

11
00:00:56.866 --> 00:01:02.066 align:middle line:90%
we need a transformation. 
Specifically, we need the first 

12
00:01:02.066 --> 00:01:07.999 align:middle line:90%
difference. Click the Select a 
table button on the Data tab. I 

13
00:01:08.000 --> 00:01:14.233 align:middle line:90%
am using the library named 
SASHELP. Expand SASHELP and 

14
00:01:14.233 --> 00:01:23.499 align:middle line:90%
select RETAIL. Click OK. You 
will notice my screen is split. 

15
00:01:23.500 --> 00:01:29.233 align:middle line:90%
On the left side, are my 
settings for the analysis. On 

16
00:01:29.233 --> 00:01:34.966 align:middle line:90%
the right, are tabs for my 
code, log, and results. I 

17
00:01:34.966 --> 00:01:40.832 align:middle line:90%
can choose whether to view the 
settings alone or the code and 

18
00:01:40.833 --> 00:01:47.733 align:middle line:90%
results alone, or I can 
split my screen between them. 

19
00:01:47.733 --> 00:01:52.599 align:middle line:90%
I am going to leave my screen 
split. You will then assign 

20
00:01:52.600 --> 00:01:57.233 align:middle line:90%
variables to different roles 
within the task. Click the 

21
00:01:57.233 --> 00:02:03.333 align:middle line:90%
plus next to Time Series 
variable. Select SALES. 

22
00:02:03.333 --> 00:02:10.266 align:middle line:90%
Click OK. Under Additional 
Roles, click the plus next 

23
00:02:10.266 --> 00:02:17.299 align:middle line:90%
to TimeID. Select DATE. 
This is the variable that 

24
00:02:17.300 --> 00:02:23.466 align:middle line:90%
contains the timestamp for each 
observation. After the TimeID 

25
00:02:23.466 --> 00:02:27.532 align:middle line:90%
variable is placed, SAS 
attempts to determine the 

26
00:02:27.533 --> 00:02:32.233 align:middle line:90%
interval of the time variable. 
In our example, this is 

27
00:02:32.233 --> 00:02:36.833 align:middle line:90%
quarterly. If this is not 
correct, it can be changed 

28
00:02:36.833 --> 00:02:43.799 align:middle line:90%
here. Click the Transformations 
tab. Notice that you have the 

29
00:02:43.800 --> 00:02:48.100 align:middle line:90%
option to set the accumulation 
method for the variable. Your 

30
00:02:48.100 --> 00:02:53.833 align:middle line:90%
choices are NONE, SUM, and 
AVERAGE. Because the data is 

31
00:02:53.833 --> 00:02:57.966 align:middle line:90%
already accumulated correctly 
for the desired interval, 

32
00:02:57.966 --> 00:03:03.266 align:middle line:90%
leave this at NONE. You also 
have the option to set the 

33
00:03:03.266 --> 00:03:07.566 align:middle line:90%
transformation method for 
the time series variable. Your 

34
00:03:07.566 --> 00:03:13.799 align:middle line:90%
choices are LOGARITHMIC, 
SQUARE-ROOT, and LOGISTIC. 

35
00:03:13.800 --> 00:03:17.666 align:middle line:90%
Notice that you also have 
options for SIMPLE DIFFERENCING 

36
00:03:17.666 --> 00:03:21.399 align:middle line:90%
and SEASONAL DIFFERENCING. 
Let's set the simple 

37
00:03:21.400 --> 00:03:29.333 align:middle line:90%
differencing to 1 unit. Click 
the Output tab. Select the Show 

38
00:03:29.333 --> 00:03:34.966 align:middle line:90%
output data check box. This 
will print the generated data 

39
00:03:34.966 --> 00:03:40.366 align:middle line:90%
set to our Results area. In the 
Number of observations to show 

40
00:03:40.366 --> 00:03:47.866 align:middle line:90%
box, enter 10. Change the name 
of the generated output data 

41
00:03:47.866 --> 00:03:54.466 align:middle line:90%
set to DiffRetail. To run this 
task, click the running person 

42
00:03:54.466 --> 00:04:05.232 align:middle line:90%
button. At this point, there 
are no further changes needed 

43
00:04:05.233 --> 00:04:10.799 align:middle line:90%
to the task settings, so 
maximize the Results window by 

44
00:04:10.800 --> 00:04:16.100 align:middle line:90%
clicking the Code/Results 
button. The results of the task 

45
00:04:16.100 --> 00:04:21.633 align:middle line:90%
are shown under the Results 
tab. The first 10 observations 

46
00:04:21.633 --> 00:04:26.766 align:middle line:90%
of the generated output data 
set have been printed. Clicking 

47
00:04:26.766 --> 00:04:32.232 align:middle line:90%
the Log tab will show a note 
saying that the generated 

48
00:04:32.233 --> 00:04:37.466 align:middle line:90%
output data set, which contains 
the first difference values, 

49
00:04:37.466 --> 00:04:45.599 align:middle line:90%
has been saved with the name 
DiffRetail. It is this data 

50
00:04:45.600 --> 00:04:50.533 align:middle line:90%
set, DiffRetail, that will be 
used by the Time Series 

51
00:04:50.533 --> 00:04:56.299 align:middle line:90%
Exploration task for further 
data exploration or by the 

52
00:04:56.300 --> 00:05:00.400 align:middle line:90%
Modeling and Forecasting task 
to generate models and 

53
00:05:00.400 --> 00:05:04.766 align:middle line:90%
forecasts for the time series 
variable. This analysis can be 

54
00:05:04.766 --> 00:05:09.066 align:middle line:90%
saved with a name that you 
specify, and you can reopen the 

55
00:05:09.066 --> 00:05:14.366 align:middle line:90%
analysis later. I'm going to 
exit the maximized view so that 

56
00:05:14.366 --> 00:05:19.599 align:middle line:90%
my left side navigation panel 
reappears. I'll also go ahead 

57
00:05:19.600 --> 00:05:24.166 align:middle line:90%
and split my screen again and 
point out that, if I wanted to, 

58
00:05:24.166 --> 00:05:28.532 align:middle line:90%
I could certainly change the 
task settings and re-run from 

59
00:05:28.533 --> 00:05:34.833 align:middle line:90%
here. On the left side, I could 
select another task, folder, 

60
00:05:34.833 --> 00:05:40.466 align:middle line:90%
snippet, library, or file 
shortcut. In this video, you 

61
00:05:40.466 --> 00:05:44.299 align:middle line:90%
have learned how to use the 
Time Series Data Preparation 

62
00:05:44.300 --> 00:05:47.066 align:middle line:90%
task in SAS Studio.  

