-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnova_student.sas
117 lines (86 loc) · 2.59 KB
/
Anova_student.sas
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
*-------------------------------------------------------------------------;
* Project : ANOVA ;
* Developer(s) : Khasha Dehand ;
* Comments : ;
*-------------------------------------------------------------------------;
data sales;
infile datalines;
input channel $10. sales ;
datalines;
channel_1 5
channel_1 3
channel_1 10
channel_1 6
channel_2 10
channel_2 15
channel_2 8
channel_2 7
channel_3 23
channel_3 18
channel_3 16
channel_3 11
;
run;
proc univariate data=sales;
var sales;
run;
proc anova data=sales;
class channel;
model sales = channel;
run;
libname sas_data "C:\Users\sanja\Google Drive\2ndSem\BIA672_MarketingAnalytics_KashaDehnad\SAS_Data";
run;
proc copy in=sas_data out=work;
select vehicles;
run;
title1 "Sales of Passenger Cars";
proc sgplot data=vehicles;
series x=period y=vehicles / markers;
run;
proc forecast data=vehicles
method=expo lead=12
out=out_expo outfull outresid outest=est_expo;
id period;
var vehicles;
run;
title1 "Sales of Passenger Cars";
title2 "Plot of residuals";
proc sgplot data=out_expo;
where _type_="RESIDUAL" and period>200;
needle x=period y=vehicles / markers markerattrs=(symbol=circlefilled);
run;
title1 "Sales of Passenger Cars";
proc sgplot data=vehicles;
series x=period y=vehicles / markers;
run;
proc forecast data=vehicles
method=expo lead=12
out=out_expo outfull outresid outest=est_expo;
id period;
var vehicles;
run;
title1 "Sales of Passenger Cars";
title2 'Plot of Residuals';
proc sgplot data=out_expo;
where _type_ = 'RESIDUAL' and period>200;
needle x=period y=vehicles / markers markerattrs=(symbol=circlefilled);
run;
title1 "Sales of Passenger Cars";
title2 'Plot of Forecast from WINTERS Method';
proc sgplot data=out;
series x=period y=vehicles / group=_type_ lineattrs=(pattern=1);
where _type_ ^= 'RESIDUAL' and period>230;
run;
proc forecast data=vehicles
method=winters seasons=12 lead=12
out=out_winters outfull outresid outest=est;
id period;
var vehicles;
run;
*;
title1 "Sales of Passenger Cars";
title2 'Plot of Forecast from WINTERS Method';
proc sgplot data=out_winters;
series x=period y=vehicles / group=_type_ lineattrs=(pattern=1);
where _type_ ^= 'RESIDUAL' and period>200;
run;