GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Applying-Data-Science-Using-SAS/Chapter 07.sas at master · Deepak12545/Applying-Data-Science-Using-SAS

Expand file tree

/

Chapter 07.sas

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
138 lines (90 loc) · 2.51 KB
/

Chapter 07.sas

Copy path

File metadata and controls

138 lines (90 loc) · 2.51 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
*** 7.2;
data timeplot;
call streaminit(20656);
do Year = 1970 to 2016;
Value = (year - 1960)*2+rand('normal',0,6);
Value_Shift = value+(year>=1990)*20;
Value_Outlier = value+(year=1992) *40;
output;
end;
run;
proc sgplot data=timeplot;
scatter x=year y=value;
yaxis min=0 max=140;
run;
proc sgplot data=timeplot;
scatter x=year y=value_shift;
refline 1990 /axis=x;
yaxis min=0 max=140;
run;
proc sgplot data=timeplot;
scatter x=year y=value_outlier;
yaxis min=0 max=140;
refline 1992 /axis=x;
run;
*** 7.3;
proc sgplot data=flights_911;
format Passengers comma8.;
series x=date y=passengers;
run;
proc x13 data=flights_911 date=date;
var passengers;
arima model=( (0,1,1)(0,1,1) );
outlier;
ods select RegParameterEstimates;
run;
proc x13 data=flights_911 date=date;
var passengers;
arima model=( (0,1,1)(0,1,1) );
outlier;
ods output RegParameterEstimates=RegParameterEstimates;
ods select RegParameterEstimates;
run ;
filename reflines 'c:/tmp/reflines_airline.sas';
data _NULL_;
set RegParameterEstimates;
file reflines;
Date=cats("'01",compress(substr(regvar,3,length(regvar))),"'d");
put @04 "refline " Date " / axis = x label = '" regvar "';";
run;
proc sgplot data=flights_911;
series x=date y=passengers;
yaxis label="Passengers";
xaxis label="Date";
%include reflines;
run;
proc print data=RegParameterEstimates noobs;
format estimate nlnum16.1;
var regvar estimate;
run;
proc sgplot data=flights_911;
series x=date y=passengers;
yaxis label='Passengers';
xaxis label="Date";
refline '01SEP2001'd / axis = x label="Level Shift at 9/11";
refline '01NOV2001'd / axis = x label="Level Shift +";
refline '01DEC2002'd / axis = x label="Outlier +";
refline '01DEC2003'd / axis = x Label="Level Shift -";
run;
*** 7.4;
proc x11 data=flights_911;
monthly date=date additive
fullweight=3.0 zeroweight=3.5;
var passengers;
ods select d9;
table d9;
run;
*** 7.4.3;
proc hpfdiagnose data=flights_911 print=short outoutlier=outliers;
id date interval=month accumulate=total;
forecast passengers;
arimax outlier=(detect=maybe);
ods select arimaspec;
run;
*** 7.4.3;
proc hpfdiagnose data=flights_911 print=all outoutlier=outliers;
id date interval=month accumulate=total;
forecast passengers;
arimax outlier=(detect=maybe);
ods select OutlierInfo;
run;
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.