Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_multipleregression.wasp
Title produced by softwareMultiple Regression
Date of computationMon, 07 Jan 2019 16:33:50 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2019/Jan/07/t1546875274rfkjvaxgc8b84l9.htm/, Retrieved Sat, 27 Apr 2024 22:13:46 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=316282, Retrieved Sat, 27 Apr 2024 22:13:46 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact137
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Multiple Regression] [1 OIL] [2019-01-07 15:33:50] [69e7a94d6c2436510be1fa376d284346] [Current]
Feedback Forum

Post a new message
Dataseries X:
102750 2.75 1 45.498
95276 2.73 1 46.1773
112053 2.82 1 46.1937
98841 2.83 1 46.1272
123102 2.9 1 46.4199
118152 3.05 1 46.4535
101752 3.15 1 46.648
148219 3.26 1 46.5669
124966 3.38 1 46.9866
134741 3.54 1 47.2997
132168 3.81 1 47.548
100950 5.27 1 47.4375
96418 6.71 1 47.1083
86891 9.09 1 46.9634
89796 11.08 1 46.9733
119663 11.91 1 46.83
130539 11.81 1 47.1848
120851 11.81 1 47.1292
145422 12.09 1 47.1505
150583 11.95 1 46.6882
127054 11.67 1 46.7161
137473 11.6 1 46.536
127094 11.71 1 45.0062
132080 11.62 1 43.4204
188311 11.64 1 42.8246
107487 11.66 1 41.8301
84669 11.67 1 41.3862
149184 11.69 1 41.4258
121026 11.58 1 41.3326
81073 11.4 1 41.6042
132947 11.44 1 42.0025
141294 11.38 1 42.4426
155077 11.31 1 42.9708
145154 11.45 1 43.1611
127094 11.73 1 43.2561
151414 12.11 1 43.7944
167858 12.23 1 44.4309
127070 12.39 1 44.8644
154692 12.34 1 44.916
170905 12.42 1 45.1733
127751 12.37 1 45.3729
173795 12.37 1 45.3841
190181 12.39 1 45.6491
198417 12.43 1 45.9698
183018 12.48 1 46.1015
171608 12.45 1 46.1172
188087 12.58 1 46.7939
197042 12.59 1 47.2798
208788 12.54 1 47.023
178111 13.01 1 47.7335
236455 13.31 1 48.3415
233219 13.45 1 48.7789
188106 13.28 1 49.2046
238876 13.38 1 49.5627
205148 13.36 1 49.6389
214727 13.4 1 49.6517
213428 13.49 1 49.8872
195128 13.47 1 49.9859
206047 13.62 1 50.0357
201773 13.57 1 50.1135
192772 13.59 1 49.4201
198230 13.48 1 49.6618
181172 13.47 1 50.6053
189079 13.47 1 51.6639
179073 13.36 1 51.8472
197421 13.37 1 52.2056
195244 13.4 1 52.1834
219826 13.41 1 52.3807
211793 13.37 1 52.5124
203394 13.42 1 52.9384
209578 13.41 1 53.3363
214769 13.46 1 53.6296
226177 13.64 1 53.2837
191449 13.93 1 53.5675
200989 14.46 1 53.7364
216707 14.92 1 53.1571
192882 16.27 1 53.5566
199736 17.36 1 53.5534
202349 19.07 1 53.4808
204137 21.1 1 53.1195
215588 22.39 1 53.1786
229454 23.13 1 53.4617
175048 23.27 1 53.409
212799 24.57 1 53.4536
181727 26.32 1 53.7071
211607 28.57 1 53.7262
185853 30.44 1 53.5481
158277 31.4 1 52.4571
180695 31.84 1 51.1904
175959 31.86 1 50.5575
139550 32.3 1 50.166
155810 32.93 1 50.353
138305 32.73 1 51.1727
147014 33.1 1 51.8129
135994 33.23 1 52.7175
166455 33.94 1 53.0142
177737 34.27 1 52.7119
167021 35.96 1 52.4633
132134 36.25 1 52.7501
169834 36.92 1 52.5233
130599 36.16 1 52.8211
156836 36.59 1 53.0699
119749 35.05 1 53.4044
148996 34.53 1 53.3959
147491 34.07 1 53.0761
147216 33.65 1 52.6972
153455 33.84 1 52.0996
112004 33.99 1 51.5219
158512 35.41 1 50.4933
104139 35.53 1 51.4979
102536 34.71 1 51.1159
93017 33.2 1 50.6623
91988 32.25 1 50.3505
123616 32.92 1 50.1943
134498 33.27 1 50.0395
149812 32.91 1 49.6075
110334 32.39 1 49.4584
136639 32.44 1 49.011
102712 32.84 1 48.8232
112951 32.44 1 48.4682
107897 32.5 1 49.3992
73242 31.12 1 49.089
72800 30.28 1 49.4906
78767 28.76 1 50.0805
114791 28.59 1 50.4295
109351 28.83 1 50.7333
122520 28.93 1 51.5016
137338 29.31 1 52.0679
132061 29.27 1 52.8472
130607 29.36 1 53.2874
118570 29.05 1 53.4759
95873 29 1 53.7593
103116 27.65 1 54.8216
98619 27.64 1 55.0698
104178 27.8 1 55.3384
123468 27.84 1 55.6911
99651 27.85 1 55.9506
120264 27.76 1 56.1549
122795 28.05 1 56.3326
108524 27.66 1 56.3847
105760 27.39 1 56.2832
117191 27.56 1 56.1943
122882 27.55 1 56.4108
93275 27.3 1 56.4759
99842 27.38 1 56.3801
83803 26.91 1 56.5796
61132 26.05 1 56.6645
118563 26.52 1 56.5122
106993 26.79 1 56.5982
118108 26.52 1 56.6317
99017 25.91 1 56.2637
99852 25.76 1 56.496
112720 25.42 1 56.7412
113636 25.65 1 56.508
118220 25.69 1 56.6984
128854 26.04 1 57.2954
123898 25.8 1 57.5555
100823 23.13 1 57.1707
115107 18.1 1 56.7784
90624 12.78 1 56.8228
132001 12.24 0 56.938
157969 12.04 0 56.7427
169333 11.03 0 57.0569
144907 10.09 0 56.9807
169346 11.08 0 57.0954
144666 11.79 0 57.3542
158829 12.23 0 57.623
127286 12.4 0 58.1006
120578 13.86 0 57.9173
129293 15.47 0 58.663
122371 15.87 0 58.7602
115176 16.57 0 59.1416
142168 16.92 0 59.517
153260 17.31 0 59.7996
173906 17.77 0 60.2152
178446 18.07 0 60.7146
155962 17.49 0 60.8781
168257 17.21 0 61.7569
149456 17.12 0 62.091
136105 16.46 0 62.394
141507 22.4 0 62.4207
152084 15.2 0 62.6908
145138 14.24 0 62.8421
146548 14.21 0 63.1885
173098 14.69 0 63.1203
165471 14.68 0 63.2843
152271 14.02 0 63.3155
163201 13.38 0 63.5859
157823 13.08 0 63.405
166167 11.92 0 63.7184
154253 11.52 0 63.8175
170299 12.34 0 64.1273
166388 13.91 0 64.3162
141051 14.84 0 64.026
160254 15.54 0 64.166
164995 17.33 0 64.222
195971 17.97 0 63.7707
182635 17.27 0 63.8022
189829 16.93 0 63.236
209476 15.95 0 63.8059
189848 16.14 0 63.576
183746 16.61 0 63.5346
192682 17.08 0 63.7465
169677 17.72 0 64.1419
201823 18.85 0 63.7117
172643 18.79 0 64.3504
202931 17.75 0 64.6721
175863 16.02 0 64.5975
222061 14.61 0 64.7028
199797 13.83 0 64.9174
214638 13.92 0 64.8436
200106 19.57 0 65.043
166077 25.63 0 65.1372
160586 30.08 0 64.6442
158330 29.51 0 63.8853
141749 25.75 0 63.4658
170795 22.98 0 63.1915
153286 18.39 0 62.7585
163426 16.75 0 62.4265
172562 16.39 0 62.5503
197474 16.57 0 63.1756
189822 16.4 0 63.742
188511 16.15 0 63.8029
207437 16.8 0 63.8503
192128 17.14 0 64.4151
175716 17.97 0 64.2992
159108 18.06 0 64.2209
175801 16.6 0 63.9602
186723 14.87 0 63.596
154970 14.42 0 64.0409
172446 14.48 0 64.5973
185965 15.5 0 65.0756
195525 16.74 0 65.2831
193156 18.27 0 65.2957
212705 18.2 0 65.8801
201357 18.03 0 65.5581
189971 17.86 0 65.715
216523 18.22 0 66.2013
193233 17.63 0 66.4879
191996 16.22 0 66.5431
211974 15.5 0 66.8264
175907 15.71 0 67.1172
206109 16.49 0 67.0479
220275 16.69 0 67.2498
211342 16.71 0 67.0325
222528 16.07 0 67.1532
229523 14.96 0 67.3586
204153 14.51 0 67.2888
206735 14.37 0 67.6092
223416 14.59 0 68.1214
228292 13.72 0 68.4089
203121 12.2 0 68.7737
205957 11.64 0 69.0299
176918 12.09 0 69.0418
219839 11.76 0 69.7582
217213 12.85 0 70.125
216618 14.05 0 70.4978
248057 15.18 0 70.948
245642 16.09 0 71.0595
242485 15.97 0 71.4749
260423 15 0 71.7333
221030 14.8 0 72.3479
229157 15.31 0 72.8018
220858 14.7 0 73.5563
212270 15.06 0 73.6891
195944 15.53 0 73.5889
239741 15.78 0 73.6895
212013 16.76 0 73.676
240514 17.4 0 73.8858
241982 16.78 0 74.1391
245447 15.51 0 73.8447
240839 15.22 0 74.7803
244875 15.44 0 75.0755
226375 15.25 0 74.9925
231567 15.1 0 75.1822
235746 15.82 0 75.4725
238990 16.43 0 74.9823
198120 16.1 0 76.153
201663 17.31 0 76.0724
238198 19.27 0 76.7608
261641 18.9 0 77.3269
253014 17.96 0 77.9694
275225 18.16 0 77.8351
250957 18.65 0 78.3005
260375 19.97 0 78.8378
250694 21.41 0 78.7843
216953 21.38 0 79.4683
247816 21.63 0 79.9829
224135 21.86 0 80.0837
211073 20.48 0 81.0483
245623 18.76 0 81.6195
250947 17.13 0 81.6408
278223 17.06 0 82.1311
254232 16.85 0 82.5332
266293 16.41 0 83.1538
280897 16.95 0 84.0293
274565 16.73 0 84.7873
280555 17.71 0 85.5125
252757 17.25 0 86.2601
250131 16.05 0 86.5262
271208 14.31 0 86.9662
230593 13.02 0 87.0687
263407 11.88 0 87.1414
289968 11.77 0 87.4497
282846 11.8 0 88.0124
271314 11.12 0 87.4571
289718 10.78 0 87.1484
300227 10.55 0 88.936
259951 10.99 0 88.778
263149 11.66 0 89.4857
267953 10.79 0 89.4358
252378 9.38 0 89.7761
280356 9.21 0 90.1893
234298 9.48 0 90.6683
271574 10.5 0 90.831
262378 12.88 0 91.0632
289457 14.6 0 91.7311
278274 14.52 0 91.5818
288932 16.11 0 92.1587
283813 17.88 0 92.5363
267600 19.69 0 92.1699
267574 20.76 0 93.3786
254862 21.05 0 93.824
248974 22.79 0 94.5441
256840 23.31 0 94.5458
250914 25.14 0 94.8185
279334 26.41 0 95.1983
286549 24.41 0 95.8921
302266 24.28 0 96.0691
298205 26.78 0 96.1568
300843 27.73 0 96.0239
312955 26.59 0 95.7182
275962 29.03 0 96.1105
299561 28.57 0 95.8225
260975 28.34 0 95.8391
274836 26.4 0 95.5791
284112 23.19 0 94.9499
247331 23.85 0 94.369
298120 22.75 0 94.1259
306008 21.66 0 93.9061
306813 22.65 0 93.2803
288550 23.09 0 92.7057
301636 22.33 0 92.1721
293215 22.14 0 92.0023
270713 23.02 0 91.6795
311803 19.88 0 91.2682
281316 17 0 90.7894
281450 15.46 0 90.8311
295494 16.29 0 91.3471
246411 16.58 0 91.3672
267037 19.27 0 92.1054
296134 22.53 0 92.479
296505 23.75 0 92.8824
270677 23.35 0 93.7637
290855 23.73 0 93.5461
296068 24.58 0 93.5765
272653 25.49 0 93.7116
315720 26.25 0 93.4006
286298 24.19 0 93.8758
284170 24.15 0 93.4191
273338 27.76 0 93.9571
250262 30.37 0 94.2558
294768 30.39 0 94.0416
318088 26.01 0 93.3666
319111 24.05 0 93.3852
312982 25.5 0 93.5219
335511 26.75 0 93.9144
319674 27.56 0 93.7371
316796 26.43 0 94.3262
329992 26.28 0 94.4442
291352 26.54 0 95.2224
314131 27.17 0 95.1545
309876 28.57 0 95.3434
288494 29.17 0 95.9228
329991 30.66 0 95.4538
311663 31 0 95.8653
317854 33.14 0 96.6472
344729 33.74 0 95.8588
324108 33.38 0 96.5901
333756 36.54 0 96.6687
297013 37.52 0 96.745
313249 41.84 0 97.6604
329660 41.19 0 97.8427
320586 36.46 0 98.5495
325786 35.27 0 99.002
293425 36.93 0 99.6741
324180 41.28 0 99.5181
315528 44.78 0 99.6518
319982 43.04 0 99.8158
327865 44.41 0 100.2232
312106 49.07 0 99.8997
329039 52.85 0 100.1025
277589 57.42 0 98.2644
300884 56.21 0 99.4949
314028 52.16 0 100.5129
314259 49.79 0 101.1118
303472 51.8 0 101.2313
290744 53.86 0 101.2755
313340 52.32 0 101.4651
294281 56.65 0 101.9012
325796 62.04 0 101.7589
329839 62.12 0 102.1304
322588 64.93 0 102.0989
336528 66.13 0 102.4526
316381 62.4 0 102.2753
308602 55.47 0 102.2299
299010 52.22 0 102.1419
293645 53.84 0 103.2191
320108 52.23 0 102.7129
252869 50.71 0 103.7659
324248 53 0 103.9538
304775 57.28 0 104.7077
320208 59.36 0 104.7507
321260 60.95 0 104.7581
310320 65.56 0 104.7111
319197 68.21 0 104.9122
297503 68.51 0 105.2764
316184 72.49 0 104.772
303411 79.65 0 105.3295
300841 82.76 0 105.3213




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time15 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time15 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=316282&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]15 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=316282&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=316282&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time15 seconds
R ServerBig Analytics Cloud Computing Center







Multiple Linear Regression - Estimated Regression Equation
barrels_purchased[t] = -19242 -295.764unit_price[t] + 268.903dum[t] + 390.741US_IND_PROD[t] + 0.362847`barrels_purchased(t-1)`[t] + 0.346738`barrels_purchased(t-2)`[t] + 0.203354`barrels_purchased(t-1s)`[t] + 20739.4M1[t] + 28552.5M2[t] + 25105.6M3[t] + 23106.2M4[t] + 22847.5M5[t] + 23231M6[t] + 11142.1M7[t] + 17623.2M8[t] + 12494.6M9[t] + 13895.2M10[t] + 23684.3M11[t] + e[t]

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Estimated Regression Equation \tabularnewline
barrels_purchased[t] =  -19242 -295.764unit_price[t] +  268.903dum[t] +  390.741US_IND_PROD[t] +  0.362847`barrels_purchased(t-1)`[t] +  0.346738`barrels_purchased(t-2)`[t] +  0.203354`barrels_purchased(t-1s)`[t] +  20739.4M1[t] +  28552.5M2[t] +  25105.6M3[t] +  23106.2M4[t] +  22847.5M5[t] +  23231M6[t] +  11142.1M7[t] +  17623.2M8[t] +  12494.6M9[t] +  13895.2M10[t] +  23684.3M11[t]  + e[t] \tabularnewline
 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=316282&T=1

[TABLE]
[ROW][C]Multiple Linear Regression - Estimated Regression Equation[/C][/ROW]
[ROW][C]barrels_purchased[t] =  -19242 -295.764unit_price[t] +  268.903dum[t] +  390.741US_IND_PROD[t] +  0.362847`barrels_purchased(t-1)`[t] +  0.346738`barrels_purchased(t-2)`[t] +  0.203354`barrels_purchased(t-1s)`[t] +  20739.4M1[t] +  28552.5M2[t] +  25105.6M3[t] +  23106.2M4[t] +  22847.5M5[t] +  23231M6[t] +  11142.1M7[t] +  17623.2M8[t] +  12494.6M9[t] +  13895.2M10[t] +  23684.3M11[t]  + e[t][/C][/ROW]
[ROW][C][/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=316282&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=316282&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Multiple Linear Regression - Estimated Regression Equation
barrels_purchased[t] = -19242 -295.764unit_price[t] + 268.903dum[t] + 390.741US_IND_PROD[t] + 0.362847`barrels_purchased(t-1)`[t] + 0.346738`barrels_purchased(t-2)`[t] + 0.203354`barrels_purchased(t-1s)`[t] + 20739.4M1[t] + 28552.5M2[t] + 25105.6M3[t] + 23106.2M4[t] + 22847.5M5[t] + 23231M6[t] + 11142.1M7[t] + 17623.2M8[t] + 12494.6M9[t] + 13895.2M10[t] + 23684.3M11[t] + e[t]







Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STATH0: parameter = 02-tail p-value1-tail p-value
(Intercept)-1.924e+04 7442-2.5850e+00 0.01009 0.005045
unit_price-295.8 92.84-3.1860e+00 0.001561 0.0007803
dum+268.9 3290+8.1740e-02 0.9349 0.4674
US_IND_PROD+390.7 155.9+2.5060e+00 0.01261 0.006306
`barrels_purchased(t-1)`+0.3629 0.04752+7.6360e+00 1.761e-13 8.803e-14
`barrels_purchased(t-2)`+0.3467 0.04632+7.4850e+00 4.833e-13 2.417e-13
`barrels_purchased(t-1s)`+0.2034 0.03915+5.1940e+00 3.323e-07 1.662e-07
M1+2.074e+04 4485+4.6250e+00 5.12e-06 2.56e-06
M2+2.855e+04 4371+6.5320e+00 2.044e-10 1.022e-10
M3+2.511e+04 4309+5.8260e+00 1.195e-08 5.975e-09
M4+2.311e+04 4290+5.3860e+00 1.249e-07 6.243e-08
M5+2.285e+04 4299+5.3140e+00 1.809e-07 9.046e-08
M6+2.323e+04 4325+5.3720e+00 1.346e-07 6.73e-08
M7+1.114e+04 4217+2.6420e+00 0.008565 0.004282
M8+1.762e+04 4328+4.0720e+00 5.651e-05 2.826e-05
M9+1.25e+04 4196+2.9780e+00 0.003088 0.001544
M10+1.39e+04 4256+3.2650e+00 0.001192 0.0005961
M11+2.368e+04 4326+5.4750e+00 7.868e-08 3.934e-08

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Ordinary Least Squares \tabularnewline
Variable & Parameter & S.D. & T-STATH0: parameter = 0 & 2-tail p-value & 1-tail p-value \tabularnewline
(Intercept) & -1.924e+04 &  7442 & -2.5850e+00 &  0.01009 &  0.005045 \tabularnewline
unit_price & -295.8 &  92.84 & -3.1860e+00 &  0.001561 &  0.0007803 \tabularnewline
dum & +268.9 &  3290 & +8.1740e-02 &  0.9349 &  0.4674 \tabularnewline
US_IND_PROD & +390.7 &  155.9 & +2.5060e+00 &  0.01261 &  0.006306 \tabularnewline
`barrels_purchased(t-1)` & +0.3629 &  0.04752 & +7.6360e+00 &  1.761e-13 &  8.803e-14 \tabularnewline
`barrels_purchased(t-2)` & +0.3467 &  0.04632 & +7.4850e+00 &  4.833e-13 &  2.417e-13 \tabularnewline
`barrels_purchased(t-1s)` & +0.2034 &  0.03915 & +5.1940e+00 &  3.323e-07 &  1.662e-07 \tabularnewline
M1 & +2.074e+04 &  4485 & +4.6250e+00 &  5.12e-06 &  2.56e-06 \tabularnewline
M2 & +2.855e+04 &  4371 & +6.5320e+00 &  2.044e-10 &  1.022e-10 \tabularnewline
M3 & +2.511e+04 &  4309 & +5.8260e+00 &  1.195e-08 &  5.975e-09 \tabularnewline
M4 & +2.311e+04 &  4290 & +5.3860e+00 &  1.249e-07 &  6.243e-08 \tabularnewline
M5 & +2.285e+04 &  4299 & +5.3140e+00 &  1.809e-07 &  9.046e-08 \tabularnewline
M6 & +2.323e+04 &  4325 & +5.3720e+00 &  1.346e-07 &  6.73e-08 \tabularnewline
M7 & +1.114e+04 &  4217 & +2.6420e+00 &  0.008565 &  0.004282 \tabularnewline
M8 & +1.762e+04 &  4328 & +4.0720e+00 &  5.651e-05 &  2.826e-05 \tabularnewline
M9 & +1.25e+04 &  4196 & +2.9780e+00 &  0.003088 &  0.001544 \tabularnewline
M10 & +1.39e+04 &  4256 & +3.2650e+00 &  0.001192 &  0.0005961 \tabularnewline
M11 & +2.368e+04 &  4326 & +5.4750e+00 &  7.868e-08 &  3.934e-08 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=316282&T=2

[TABLE]
[ROW][C]Multiple Linear Regression - Ordinary Least Squares[/C][/ROW]
[ROW][C]Variable[/C][C]Parameter[/C][C]S.D.[/C][C]T-STATH0: parameter = 0[/C][C]2-tail p-value[/C][C]1-tail p-value[/C][/ROW]
[ROW][C](Intercept)[/C][C]-1.924e+04[/C][C] 7442[/C][C]-2.5850e+00[/C][C] 0.01009[/C][C] 0.005045[/C][/ROW]
[ROW][C]unit_price[/C][C]-295.8[/C][C] 92.84[/C][C]-3.1860e+00[/C][C] 0.001561[/C][C] 0.0007803[/C][/ROW]
[ROW][C]dum[/C][C]+268.9[/C][C] 3290[/C][C]+8.1740e-02[/C][C] 0.9349[/C][C] 0.4674[/C][/ROW]
[ROW][C]US_IND_PROD[/C][C]+390.7[/C][C] 155.9[/C][C]+2.5060e+00[/C][C] 0.01261[/C][C] 0.006306[/C][/ROW]
[ROW][C]`barrels_purchased(t-1)`[/C][C]+0.3629[/C][C] 0.04752[/C][C]+7.6360e+00[/C][C] 1.761e-13[/C][C] 8.803e-14[/C][/ROW]
[ROW][C]`barrels_purchased(t-2)`[/C][C]+0.3467[/C][C] 0.04632[/C][C]+7.4850e+00[/C][C] 4.833e-13[/C][C] 2.417e-13[/C][/ROW]
[ROW][C]`barrels_purchased(t-1s)`[/C][C]+0.2034[/C][C] 0.03915[/C][C]+5.1940e+00[/C][C] 3.323e-07[/C][C] 1.662e-07[/C][/ROW]
[ROW][C]M1[/C][C]+2.074e+04[/C][C] 4485[/C][C]+4.6250e+00[/C][C] 5.12e-06[/C][C] 2.56e-06[/C][/ROW]
[ROW][C]M2[/C][C]+2.855e+04[/C][C] 4371[/C][C]+6.5320e+00[/C][C] 2.044e-10[/C][C] 1.022e-10[/C][/ROW]
[ROW][C]M3[/C][C]+2.511e+04[/C][C] 4309[/C][C]+5.8260e+00[/C][C] 1.195e-08[/C][C] 5.975e-09[/C][/ROW]
[ROW][C]M4[/C][C]+2.311e+04[/C][C] 4290[/C][C]+5.3860e+00[/C][C] 1.249e-07[/C][C] 6.243e-08[/C][/ROW]
[ROW][C]M5[/C][C]+2.285e+04[/C][C] 4299[/C][C]+5.3140e+00[/C][C] 1.809e-07[/C][C] 9.046e-08[/C][/ROW]
[ROW][C]M6[/C][C]+2.323e+04[/C][C] 4325[/C][C]+5.3720e+00[/C][C] 1.346e-07[/C][C] 6.73e-08[/C][/ROW]
[ROW][C]M7[/C][C]+1.114e+04[/C][C] 4217[/C][C]+2.6420e+00[/C][C] 0.008565[/C][C] 0.004282[/C][/ROW]
[ROW][C]M8[/C][C]+1.762e+04[/C][C] 4328[/C][C]+4.0720e+00[/C][C] 5.651e-05[/C][C] 2.826e-05[/C][/ROW]
[ROW][C]M9[/C][C]+1.25e+04[/C][C] 4196[/C][C]+2.9780e+00[/C][C] 0.003088[/C][C] 0.001544[/C][/ROW]
[ROW][C]M10[/C][C]+1.39e+04[/C][C] 4256[/C][C]+3.2650e+00[/C][C] 0.001192[/C][C] 0.0005961[/C][/ROW]
[ROW][C]M11[/C][C]+2.368e+04[/C][C] 4326[/C][C]+5.4750e+00[/C][C] 7.868e-08[/C][C] 3.934e-08[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=316282&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=316282&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STATH0: parameter = 02-tail p-value1-tail p-value
(Intercept)-1.924e+04 7442-2.5850e+00 0.01009 0.005045
unit_price-295.8 92.84-3.1860e+00 0.001561 0.0007803
dum+268.9 3290+8.1740e-02 0.9349 0.4674
US_IND_PROD+390.7 155.9+2.5060e+00 0.01261 0.006306
`barrels_purchased(t-1)`+0.3629 0.04752+7.6360e+00 1.761e-13 8.803e-14
`barrels_purchased(t-2)`+0.3467 0.04632+7.4850e+00 4.833e-13 2.417e-13
`barrels_purchased(t-1s)`+0.2034 0.03915+5.1940e+00 3.323e-07 1.662e-07
M1+2.074e+04 4485+4.6250e+00 5.12e-06 2.56e-06
M2+2.855e+04 4371+6.5320e+00 2.044e-10 1.022e-10
M3+2.511e+04 4309+5.8260e+00 1.195e-08 5.975e-09
M4+2.311e+04 4290+5.3860e+00 1.249e-07 6.243e-08
M5+2.285e+04 4299+5.3140e+00 1.809e-07 9.046e-08
M6+2.323e+04 4325+5.3720e+00 1.346e-07 6.73e-08
M7+1.114e+04 4217+2.6420e+00 0.008565 0.004282
M8+1.762e+04 4328+4.0720e+00 5.651e-05 2.826e-05
M9+1.25e+04 4196+2.9780e+00 0.003088 0.001544
M10+1.39e+04 4256+3.2650e+00 0.001192 0.0005961
M11+2.368e+04 4326+5.4750e+00 7.868e-08 3.934e-08







Multiple Linear Regression - Regression Statistics
Multiple R 0.9716
R-squared 0.9439
Adjusted R-squared 0.9415
F-TEST (value) 384.4
F-TEST (DF numerator)17
F-TEST (DF denominator)388
p-value 0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation 1.696e+04
Sum Squared Residuals 1.116e+11

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Regression Statistics \tabularnewline
Multiple R &  0.9716 \tabularnewline
R-squared &  0.9439 \tabularnewline
Adjusted R-squared &  0.9415 \tabularnewline
F-TEST (value) &  384.4 \tabularnewline
F-TEST (DF numerator) & 17 \tabularnewline
F-TEST (DF denominator) & 388 \tabularnewline
p-value &  0 \tabularnewline
Multiple Linear Regression - Residual Statistics \tabularnewline
Residual Standard Deviation &  1.696e+04 \tabularnewline
Sum Squared Residuals &  1.116e+11 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=316282&T=3

[TABLE]
[ROW][C]Multiple Linear Regression - Regression Statistics[/C][/ROW]
[ROW][C]Multiple R[/C][C] 0.9716[/C][/ROW]
[ROW][C]R-squared[/C][C] 0.9439[/C][/ROW]
[ROW][C]Adjusted R-squared[/C][C] 0.9415[/C][/ROW]
[ROW][C]F-TEST (value)[/C][C] 384.4[/C][/ROW]
[ROW][C]F-TEST (DF numerator)[/C][C]17[/C][/ROW]
[ROW][C]F-TEST (DF denominator)[/C][C]388[/C][/ROW]
[ROW][C]p-value[/C][C] 0[/C][/ROW]
[ROW][C]Multiple Linear Regression - Residual Statistics[/C][/ROW]
[ROW][C]Residual Standard Deviation[/C][C] 1.696e+04[/C][/ROW]
[ROW][C]Sum Squared Residuals[/C][C] 1.116e+11[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=316282&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=316282&T=3

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Multiple Linear Regression - Regression Statistics
Multiple R 0.9716
R-squared 0.9439
Adjusted R-squared 0.9415
F-TEST (value) 384.4
F-TEST (DF numerator)17
F-TEST (DF denominator)388
p-value 0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation 1.696e+04
Sum Squared Residuals 1.116e+11







Menu of Residual Diagnostics
DescriptionLink
HistogramCompute
Central TendencyCompute
QQ PlotCompute
Kernel Density PlotCompute
Skewness/Kurtosis TestCompute
Skewness-Kurtosis PlotCompute
Harrell-Davis PlotCompute
Bootstrap Plot -- Central TendencyCompute
Blocked Bootstrap Plot -- Central TendencyCompute
(Partial) Autocorrelation PlotCompute
Spectral AnalysisCompute
Tukey lambda PPCC PlotCompute
Box-Cox Normality PlotCompute
Summary StatisticsCompute

\begin{tabular}{lllllllll}
\hline
Menu of Residual Diagnostics \tabularnewline
Description & Link \tabularnewline
Histogram & Compute \tabularnewline
Central Tendency & Compute \tabularnewline
QQ Plot & Compute \tabularnewline
Kernel Density Plot & Compute \tabularnewline
Skewness/Kurtosis Test & Compute \tabularnewline
Skewness-Kurtosis Plot & Compute \tabularnewline
Harrell-Davis Plot & Compute \tabularnewline
Bootstrap Plot -- Central Tendency & Compute \tabularnewline
Blocked Bootstrap Plot -- Central Tendency & Compute \tabularnewline
(Partial) Autocorrelation Plot & Compute \tabularnewline
Spectral Analysis & Compute \tabularnewline
Tukey lambda PPCC Plot & Compute \tabularnewline
Box-Cox Normality Plot & Compute \tabularnewline
Summary Statistics & Compute \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=316282&T=4

[TABLE]
[ROW][C]Menu of Residual Diagnostics[/C][/ROW]
[ROW][C]Description[/C][C]Link[/C][/ROW]
[ROW][C]Histogram[/C][C]Compute[/C][/ROW]
[ROW][C]Central Tendency[/C][C]Compute[/C][/ROW]
[ROW][C]QQ Plot[/C][C]Compute[/C][/ROW]
[ROW][C]Kernel Density Plot[/C][C]Compute[/C][/ROW]
[ROW][C]Skewness/Kurtosis Test[/C][C]Compute[/C][/ROW]
[ROW][C]Skewness-Kurtosis Plot[/C][C]Compute[/C][/ROW]
[ROW][C]Harrell-Davis Plot[/C][C]Compute[/C][/ROW]
[ROW][C]Bootstrap Plot -- Central Tendency[/C][C]Compute[/C][/ROW]
[ROW][C]Blocked Bootstrap Plot -- Central Tendency[/C][C]Compute[/C][/ROW]
[ROW][C](Partial) Autocorrelation Plot[/C][C]Compute[/C][/ROW]
[ROW][C]Spectral Analysis[/C][C]Compute[/C][/ROW]
[ROW][C]Tukey lambda PPCC Plot[/C][C]Compute[/C][/ROW]
[ROW][C]Box-Cox Normality Plot[/C][C]Compute[/C][/ROW]
[ROW][C]Summary Statistics[/C][C]Compute[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=316282&T=4

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=316282&T=4

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Menu of Residual Diagnostics
DescriptionLink
HistogramCompute
Central TendencyCompute
QQ PlotCompute
Kernel Density PlotCompute
Skewness/Kurtosis TestCompute
Skewness-Kurtosis PlotCompute
Harrell-Davis PlotCompute
Bootstrap Plot -- Central TendencyCompute
Blocked Bootstrap Plot -- Central TendencyCompute
(Partial) Autocorrelation PlotCompute
Spectral AnalysisCompute
Tukey lambda PPCC PlotCompute
Box-Cox Normality PlotCompute
Summary StatisticsCompute







Ramsey RESET F-Test for powers (2 and 3) of fitted values
> reset_test_fitted
	RESET test
data:  mylm
RESET = 0.007783, df1 = 2, df2 = 386, p-value = 0.9922
Ramsey RESET F-Test for powers (2 and 3) of regressors
> reset_test_regressors
	RESET test
data:  mylm
RESET = 0.59647, df1 = 34, df2 = 354, p-value = 0.9658
Ramsey RESET F-Test for powers (2 and 3) of principal components
> reset_test_principal_components
	RESET test
data:  mylm
RESET = 0.038841, df1 = 2, df2 = 386, p-value = 0.9619

\begin{tabular}{lllllllll}
\hline
Ramsey RESET F-Test for powers (2 and 3) of fitted values \tabularnewline
> reset_test_fitted
	RESET test
data:  mylm
RESET = 0.007783, df1 = 2, df2 = 386, p-value = 0.9922
\tabularnewline Ramsey RESET F-Test for powers (2 and 3) of regressors \tabularnewline
> reset_test_regressors
	RESET test
data:  mylm
RESET = 0.59647, df1 = 34, df2 = 354, p-value = 0.9658
\tabularnewline Ramsey RESET F-Test for powers (2 and 3) of principal components \tabularnewline
> reset_test_principal_components
	RESET test
data:  mylm
RESET = 0.038841, df1 = 2, df2 = 386, p-value = 0.9619
\tabularnewline \hline \end{tabular} %Source: https://freestatistics.org/blog/index.php?pk=316282&T=5

[TABLE]
[ROW][C]Ramsey RESET F-Test for powers (2 and 3) of fitted values[/C][/ROW]
[ROW][C]
> reset_test_fitted
	RESET test
data:  mylm
RESET = 0.007783, df1 = 2, df2 = 386, p-value = 0.9922
[/C][/ROW] [ROW][C]Ramsey RESET F-Test for powers (2 and 3) of regressors[/C][/ROW] [ROW][C]
> reset_test_regressors
	RESET test
data:  mylm
RESET = 0.59647, df1 = 34, df2 = 354, p-value = 0.9658
[/C][/ROW] [ROW][C]Ramsey RESET F-Test for powers (2 and 3) of principal components[/C][/ROW] [ROW][C]
> reset_test_principal_components
	RESET test
data:  mylm
RESET = 0.038841, df1 = 2, df2 = 386, p-value = 0.9619
[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=316282&T=5

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=316282&T=5

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Ramsey RESET F-Test for powers (2 and 3) of fitted values
> reset_test_fitted
	RESET test
data:  mylm
RESET = 0.007783, df1 = 2, df2 = 386, p-value = 0.9922
Ramsey RESET F-Test for powers (2 and 3) of regressors
> reset_test_regressors
	RESET test
data:  mylm
RESET = 0.59647, df1 = 34, df2 = 354, p-value = 0.9658
Ramsey RESET F-Test for powers (2 and 3) of principal components
> reset_test_principal_components
	RESET test
data:  mylm
RESET = 0.038841, df1 = 2, df2 = 386, p-value = 0.9619







Variance Inflation Factors (Multicollinearity)
> vif
               unit_price                       dum               US_IND_PROD 
                 2.038244                  3.517158                 12.418907 
 `barrels_purchased(t-1)`  `barrels_purchased(t-2)` `barrels_purchased(t-1s)` 
                15.678477                 14.924917                 10.479343 
                       M1                        M2                        M3 
                 2.177529                  2.069024                  2.010739 
                       M4                        M5                        M6 
                 1.992411                  2.001242                  2.024911 
                       M7                        M8                        M9 
                 1.925100                  2.028035                  1.906562 
                      M10                       M11 
                 1.961163                  1.971781 

\begin{tabular}{lllllllll}
\hline
Variance Inflation Factors (Multicollinearity) \tabularnewline
> vif
               unit_price                       dum               US_IND_PROD 
                 2.038244                  3.517158                 12.418907 
 `barrels_purchased(t-1)`  `barrels_purchased(t-2)` `barrels_purchased(t-1s)` 
                15.678477                 14.924917                 10.479343 
                       M1                        M2                        M3 
                 2.177529                  2.069024                  2.010739 
                       M4                        M5                        M6 
                 1.992411                  2.001242                  2.024911 
                       M7                        M8                        M9 
                 1.925100                  2.028035                  1.906562 
                      M10                       M11 
                 1.961163                  1.971781 
\tabularnewline \hline \end{tabular} %Source: https://freestatistics.org/blog/index.php?pk=316282&T=6

[TABLE]
[ROW][C]Variance Inflation Factors (Multicollinearity)[/C][/ROW]
[ROW][C]
> vif
               unit_price                       dum               US_IND_PROD 
                 2.038244                  3.517158                 12.418907 
 `barrels_purchased(t-1)`  `barrels_purchased(t-2)` `barrels_purchased(t-1s)` 
                15.678477                 14.924917                 10.479343 
                       M1                        M2                        M3 
                 2.177529                  2.069024                  2.010739 
                       M4                        M5                        M6 
                 1.992411                  2.001242                  2.024911 
                       M7                        M8                        M9 
                 1.925100                  2.028035                  1.906562 
                      M10                       M11 
                 1.961163                  1.971781 
[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=316282&T=6

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=316282&T=6

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Variance Inflation Factors (Multicollinearity)
> vif
               unit_price                       dum               US_IND_PROD 
                 2.038244                  3.517158                 12.418907 
 `barrels_purchased(t-1)`  `barrels_purchased(t-2)` `barrels_purchased(t-1s)` 
                15.678477                 14.924917                 10.479343 
                       M1                        M2                        M3 
                 2.177529                  2.069024                  2.010739 
                       M4                        M5                        M6 
                 1.992411                  2.001242                  2.024911 
                       M7                        M8                        M9 
                 1.925100                  2.028035                  1.906562 
                      M10                       M11 
                 1.961163                  1.971781 



Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ; par4 = 1 ; par5 = 2 ; par6 = 12 ;
Parameters (R input):
par1 = 1 ; par2 = Include Seasonal Dummies ; par3 = No Linear Trend ; par4 = 2 ; par5 = 1 ; par6 = 12 ;
R code (references can be found in the software module):
library(lattice)
library(lmtest)
library(car)
library(MASS)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
mywarning <- ''
par6 <- as.numeric(par6)
if(is.na(par6)) {
par6 <- 12
mywarning = 'Warning: you did not specify the seasonality. The seasonal period was set to s = 12.'
}
par1 <- as.numeric(par1)
if(is.na(par1)) {
par1 <- 1
mywarning = 'Warning: you did not specify the column number of the endogenous series! The first column was selected by default.'
}
if (par4=='') par4 <- 0
par4 <- as.numeric(par4)
if (!is.numeric(par4)) par4 <- 0
if (par5=='') par5 <- 0
par5 <- as.numeric(par5)
if (!is.numeric(par5)) par5 <- 0
x <- na.omit(t(y))
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
(n <- n -1)
x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B)',colnames(x),sep='')))
for (i in 1:n) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par3 == 'Seasonal Differences (s)'){
(n <- n - par6)
x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-Bs)',colnames(x),sep='')))
for (i in 1:n) {
for (j in 1:k) {
x2[i,j] <- x[i+par6,j] - x[i,j]
}
}
x <- x2
}
if (par3 == 'First and Seasonal Differences (s)'){
(n <- n -1)
x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B)',colnames(x),sep='')))
for (i in 1:n) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
(n <- n - par6)
x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-Bs)',colnames(x),sep='')))
for (i in 1:n) {
for (j in 1:k) {
x2[i,j] <- x[i+par6,j] - x[i,j]
}
}
x <- x2
}
if(par4 > 0) {
x2 <- array(0, dim=c(n-par4,par4), dimnames=list(1:(n-par4), paste(colnames(x)[par1],'(t-',1:par4,')',sep='')))
for (i in 1:(n-par4)) {
for (j in 1:par4) {
x2[i,j] <- x[i+par4-j,par1]
}
}
x <- cbind(x[(par4+1):n,], x2)
n <- n - par4
}
if(par5 > 0) {
x2 <- array(0, dim=c(n-par5*par6,par5), dimnames=list(1:(n-par5*par6), paste(colnames(x)[par1],'(t-',1:par5,'s)',sep='')))
for (i in 1:(n-par5*par6)) {
for (j in 1:par5) {
x2[i,j] <- x[i+par5*par6-j*par6,par1]
}
}
x <- cbind(x[(par5*par6+1):n,], x2)
n <- n - par5*par6
}
if (par2 == 'Include Seasonal Dummies'){
x2 <- array(0, dim=c(n,par6-1), dimnames=list(1:n, paste('M', seq(1:(par6-1)), sep ='')))
for (i in 1:(par6-1)){
x2[seq(i,n,par6),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
(k <- length(x[n,]))
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
print(x)
(k <- length(x[n,]))
head(x)
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
sresid <- studres(mylm)
hist(sresid, freq=FALSE, main='Distribution of Studentized Residuals')
xfit<-seq(min(sresid),max(sresid),length=40)
yfit<-dnorm(xfit)
lines(xfit, yfit)
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqPlot(mylm, main='QQ Plot')
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
print(z)
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, signif(mysum$coefficients[i,1],6), sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, mywarning)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Multiple Linear Regression - Ordinary Least Squares', 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,formatC(signif(mysum$coefficients[i,1],5),format='g',flag='+'))
a<-table.element(a,formatC(signif(mysum$coefficients[i,2],5),format='g',flag=' '))
a<-table.element(a,formatC(signif(mysum$coefficients[i,3],4),format='e',flag='+'))
a<-table.element(a,formatC(signif(mysum$coefficients[i,4],4),format='g',flag=' '))
a<-table.element(a,formatC(signif(mysum$coefficients[i,4]/2,4),format='g',flag=' '))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a,formatC(signif(sqrt(mysum$r.squared),6),format='g',flag=' '))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a,formatC(signif(mysum$r.squared,6),format='g',flag=' '))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a,formatC(signif(mysum$adj.r.squared,6),format='g',flag=' '))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a,formatC(signif(mysum$fstatistic[1],6),format='g',flag=' '))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, signif(mysum$fstatistic[2],6))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, signif(mysum$fstatistic[3],6))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a,formatC(signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6),format='g',flag=' '))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a,formatC(signif(mysum$sigma,6),format='g',flag=' '))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a,formatC(signif(sum(myerror*myerror),6),format='g',flag=' '))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
myr <- as.numeric(mysum$resid)
myr
a <-table.start()
a <- table.row.start(a)
a <- table.element(a,'Menu of Residual Diagnostics',2,TRUE)
a <- table.row.end(a)
a <- table.row.start(a)
a <- table.element(a,'Description',1,TRUE)
a <- table.element(a,'Link',1,TRUE)
a <- table.row.end(a)
a <- table.row.start(a)
a <-table.element(a,'Histogram',1,header=TRUE)
a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_histogram.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1)
a <- table.row.end(a)
a <- table.row.start(a)
a <-table.element(a,'Central Tendency',1,header=TRUE)
a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_centraltendency.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1)
a <- table.row.end(a)
a <- table.row.start(a)
a <-table.element(a,'QQ Plot',1,header=TRUE)
a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_fitdistrnorm.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1)
a <- table.row.end(a)
a <- table.row.start(a)
a <-table.element(a,'Kernel Density Plot',1,header=TRUE)
a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_density.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1)
a <- table.row.end(a)
a <- table.row.start(a)
a <-table.element(a,'Skewness/Kurtosis Test',1,header=TRUE)
a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_skewness_kurtosis.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1)
a <- table.row.end(a)
a <- table.row.start(a)
a <-table.element(a,'Skewness-Kurtosis Plot',1,header=TRUE)
a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_skewness_kurtosis_plot.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1)
a <- table.row.end(a)
a <- table.row.start(a)
a <-table.element(a,'Harrell-Davis Plot',1,header=TRUE)
a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_harrell_davis.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1)
a <- table.row.end(a)
a <- table.row.start(a)
a <-table.element(a,'Bootstrap Plot -- Central Tendency',1,header=TRUE)
a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_bootstrapplot1.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1)
a <- table.row.end(a)
a <- table.row.start(a)
a <-table.element(a,'Blocked Bootstrap Plot -- Central Tendency',1,header=TRUE)
a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_bootstrapplot.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1)
a <- table.row.end(a)
a <- table.row.start(a)
a <-table.element(a,'(Partial) Autocorrelation Plot',1,header=TRUE)
a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_autocorrelation.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1)
a <- table.row.end(a)
a <- table.row.start(a)
a <-table.element(a,'Spectral Analysis',1,header=TRUE)
a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_spectrum.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1)
a <- table.row.end(a)
a <- table.row.start(a)
a <-table.element(a,'Tukey lambda PPCC Plot',1,header=TRUE)
a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_tukeylambda.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1)
a <- table.row.end(a)
a <- table.row.start(a)
a <-table.element(a,'Box-Cox Normality Plot',1,header=TRUE)
a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_boxcoxnorm.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1)
a <- table.row.end(a)
a <- table.row.start(a)
a <- table.element(a,'Summary Statistics',1,header=TRUE)
a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_summary1.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1)
a <- table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable7.tab')
if(n < 200) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,formatC(signif(x[i],6),format='g',flag=' '))
a<-table.element(a,formatC(signif(x[i]-mysum$resid[i],6),format='g',flag=' '))
a<-table.element(a,formatC(signif(mysum$resid[i],6),format='g',flag=' '))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,1],6),format='g',flag=' '))
a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,2],6),format='g',flag=' '))
a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,3],6),format='g',flag=' '))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,signif(numsignificant1,6))
a<-table.element(a,formatC(signif(numsignificant1/numgqtests,6),format='g',flag=' '))
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,signif(numsignificant5,6))
a<-table.element(a,signif(numsignificant5/numgqtests,6))
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,signif(numsignificant10,6))
a<-table.element(a,signif(numsignificant10/numgqtests,6))
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
}
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Ramsey RESET F-Test for powers (2 and 3) of fitted values',1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
reset_test_fitted <- resettest(mylm,power=2:3,type='fitted')
a<-table.element(a,paste('
',RC.texteval('reset_test_fitted'),'
',sep=''))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Ramsey RESET F-Test for powers (2 and 3) of regressors',1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
reset_test_regressors <- resettest(mylm,power=2:3,type='regressor')
a<-table.element(a,paste('
',RC.texteval('reset_test_regressors'),'
',sep=''))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Ramsey RESET F-Test for powers (2 and 3) of principal components',1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
reset_test_principal_components <- resettest(mylm,power=2:3,type='princomp')
a<-table.element(a,paste('
',RC.texteval('reset_test_principal_components'),'
',sep=''))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable8.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Variance Inflation Factors (Multicollinearity)',1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
vif <- vif(mylm)
a<-table.element(a,paste('
',RC.texteval('vif'),'
',sep=''))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable9.tab')