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 computationThu, 16 Nov 2017 22:39:28 +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/2017/Nov/16/t15108692028xjpvzjpl0eo8yk.htm/, Retrieved Sat, 18 May 2024 08:55:41 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=308116, Retrieved Sat, 18 May 2024 08:55:41 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact109
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Multiple Regression] [] [2017-11-16 21:39:28] [882f73a830550adcc53d3c05ef985140] [Current]
Feedback Forum

Post a new message
Dataseries X:
102750 282153 2.75 42.6
95276 259675 2.73 42.9
112053 316283 2.82 43.3
98841 279958 2.83 43.6
123102 357042 2.9 43.9
118152 360020 3.05 44.2
101752 320591 3.15 44.3
148219 483085 3.26 45.1
124966 421856 3.38 45.2
134741 476763 3.54 45.6
132168 503245 3.81 45.9
100950 532182 5.27 46.2
96418 647074 6.71 46.6
86891 789458 9.09 47.2
89796 994712 11.08 47.8
119663 1424738 11.91 48
130539 1541564 11.81 48.6
120851 1426809 11.81 49
145422 1758377 12.09 49.4
150583 1800085 11.95 50
127054 1483000 11.67 50.6
137473 1594167 11.6 51.1
127094 1487700 11.71 51.5
132080 1534900 11.62 51.9
188311 2192708 11.64 52.1
107487 1253734 11.66 52.5
84669 987684 11.67 52.7
149184 1743435 11.69 52.9
121026 1401287 11.58 53.2
81073 924485 11.4 53.6
132947 1521048 11.44 54.2
141294 1608249 11.38 54.3
155077 1754546 11.31 54.6
145154 1662646 11.45 54.9
127094 1491140 11.73 55.3
151414 1833427 12.11 55.5
167858 2052102 12.23 55.6
127070 1574206 12.39 55.8
154692 1908892 12.34 55.9
170905 2123327 12.42 56.1
127751 1580460 12.37 56.5
173795 2149062 12.37 56.8
190181 2357060 12.39 57.1
198417 2466075 12.43 57.4
183018 2283758 12.48 57.6
171608 2136874 12.45 57.9
188087 2366629 12.58 58
197042 2481438 12.59 58.2
208788 2618517 12.54 58.5
178111 2316637 13.01 59.1
236455 3147769 13.31 59.5
233219 3136534 13.45 60
188106 2497719 13.28 60.3
238876 3196612 13.38 60.7
205148 2740322 13.36 61
214727 2878105 13.4 61.2
213428 2878898 13.49 61.4
195128 2627735 13.47 61.6
206047 2805396 13.62 61.9
201773 2738332 13.57 62.1
192772 2620138 13.59 62.5
198230 2673110 13.48 62.9
181172 2441007 13.47 63.4
189079 2547261 13.47 63.9
179073 2392135 13.36 64.5
197421 2640130 13.37 65.2
195244 2615402 13.4 65.7
219826 2948757 13.41 66
211793 2832349 13.37 66.5
203394 2729442 13.42 67.1
209578 2810524 13.41 67.4
214769 2890134 13.46 67.7
226177 3083960 13.64 68.3
191449 2667818 13.93 69.1
200989 2907046 14.46 69.8
216707 3233685 14.92 70.6
192882 3138742 16.27 71.5
199736 3468137 17.36 72.3
202349 3858887 19.07 73.1
204137 4307915 21.1 73.8
215588 4826627 22.39 74.6
229454 5306430 23.13 75.2
175048 4073176 23.27 75.9
212799 5227557 24.57 76.7
181727 4783912 26.32 77.8
211607 6045056 28.57 78.9
185853 5657292 30.44 80.1
158277 4969642 31.4 81
180695 5752470 31.84 81.8
175959 5606154 31.86 82.7
139550 4507603 32.3 82.7
155810 5130418 32.93 83.3
138305 4526989 32.73 84
147014 4866502 33.1 84.8
135994 4518661 33.23 85.5
166455 5649625 33.94 86.3
177737 6091929 34.27 87
167021 6006906 35.96 87.9
132134 4789337 36.25 88.5
169834 6270633 36.92 89.1
130599 4721978 36.16 89.8
156836 5737894 36.59 90.6
119749 4197784 35.05 91.6
148996 5144820 34.53 92.3
147491 5024685 34.07 93.2
147216 4954025 33.65 93.4
153455 5193070 33.84 93.7
112004 3807206 33.99 94
158512 5612780 35.41 94.3
104139 3700067 35.53 94.6
102536 3558950 34.71 94.5
93017 3088444 33.2 94.9
91988 2966414 32.25 95.8
123616 4069622 32.92 97
134498 4474185 33.27 97.5
149812 4931024 32.91 97.7
110334 3574159 32.39 97.9
136639 4433006 32.44 98.2
102712 3372594 32.84 98
112951 3664209 32.44 97.6
107897 3506757 32.5 97.8
73242 2279010 31.12 97.9
72800 2204106 30.28 97.9
78767 2265598 28.76 98.6
114791 3282109 28.59 99.2
109351 3152261 28.83 99.5
122520 3545056 28.93 99.9
137338 4024797 29.31 100.2
132061 3865395 29.27 100.7
130607 3834147 29.36 101
118570 3444461 29.05 101.2
95873 2780293 29 101.3
103116 2851147 27.65 101.9
98619 2725835 27.64 102.4
104178 2896161 27.8 102.6
123468 3437337 27.84 103.1
99651 2775272 27.85 103.4
120264 3338534 27.76 103.7
122795 3444407 28.05 104.1
108524 3001766 27.66 104.5
105760 2896767 27.39 105
117191 3229794 27.56 105.3
122882 3385393 27.55 105.3
93275 2546408 27.3 105.3
99842 2733681 27.38 105.5
83803 2255134 26.91 106
61132 1592490 26.05 106.4
118563 3144303 26.52 106.9
106993 2866344 26.79 107.3
118108 3132212 26.52 107.6
99017 2565530 25.91 107.8
99852 2572196 25.76 108
112720 2865351 25.42 108.3
113636 2914776 25.65 108.7
118220 3037060 25.69 109
128854 3355359 26.04 109.3
123898 3196558 25.8 109.6
100823 2332029 23.13 109.3
115107 2083441 18.1 108.8
90624 1158172 12.78 108.6
132001 1615692 12.24 108.9
157969 1901948 12.04 109.5
169333 1867747 11.03 109.5
144907 1462108 10.09 109.7
169346 1876349 11.08 110.2
144666 1705609 11.79 110.3
158829 1942481 12.23 110.4
127286 1578344 12.4 110.5
120578 1670868 13.86 111.2
129293 2000491 15.47 111.6
122371 1941812 15.87 112.1
115176 1908866 16.57 112.7
142168 2405578 16.92 113.1
153260 2653680 17.31 113.5
173906 3091110 17.77 113.8
178446 3224968 18.07 114.4
155962 2727461 17.49 115
168257 2895730 17.21 115.3
149456 2559393 17.12 115.4
136105 2240558 16.46 115.4
141507 3169753 22.4 115.7
152084 2312408 15.2 116
145138 2066842 14.24 116.5
146548 2081852 14.21 117.1
173098 2543098 14.69 117.5
165471 2428877 14.68 118
152271 2134222 14.02 118.5
163201 2183883 13.38 119
157823 2064925 13.08 119.8
166167 1979904 11.92 120.2
154253 1777089 11.52 120.3
170299 2101211 12.34 120.5
166388 2313858 13.91 121.1
141051 2093014 14.84 121.6
160254 2490397 15.54 122.3
164995 2859846 17.33 123.1
195971 3520885 17.97 123.8
182635 3153454 17.27 124.1
189829 3214007 16.93 124.4
209476 3340225 15.95 124.6
189848 3064644 16.14 125
183746 3051988 16.61 125.6
192682 3291362 17.08 125.9
169677 3006537 17.72 126.1
201823 3803920 18.85 127.4
172643 3243341 18.79 128
202931 3601842 17.75 128.7
175863 2818118 16.02 128.9
222061 3243207 14.61 129.2
199797 2762248 13.83 129.9
214638 2988607 13.92 130.4
200106 3915503 19.57 131.6
166077 4256156 25.63 132.7
160586 4829792 30.08 133.5
158330 4672088 29.51 133.8
141749 3650011 25.75 133.8
170795 3924678 22.98 134.6
153286 2818502 18.39 134.8
163426 2736726 16.75 135
172562 2828136 16.39 135.2
197474 3271211 16.57 135.6
189822 3112378 16.4 136
188511 3043854 16.15 136.2
207437 3485119 16.8 136.6
192128 3293297 17.14 137.2
175716 3157805 17.97 137.4
159108 2873694 18.06 137.8
175801 2918067 16.6 137.9
186723 2776113 14.87 138.1
154970 2234530 14.42 138.6
172446 2496661 14.48 139.3
185965 2882685 15.5 139.5
195525 3273463 16.74 139.7
193156 3528964 18.27 140.2
212705 3871092 18.2 140.5
201357 3631372 18.03 140.9
189971 3392522 17.86 141.3
216523 3944956 18.22 141.8
193233 3405966 17.63 142
191996 3114731 16.22 141.9
211974 3285540 15.5 142.6
175907 2763937 15.71 143.1
206109 3399563 16.49 143.6
220275 3677320 16.69 144
211342 3531646 16.71 144.2
222528 3575302 16.07 144.4
229523 3434518 14.96 144.4
204153 2961343 14.51 144.8
206735 2970526 14.37 145.1
223416 3260463 14.59 145.7
228292 3131384 13.72 145.8
203121 2477834 12.2 145.8
205957 2397727 11.64 146.2
176918 2138125 12.09 146.7
219839 2585417 11.76 147.2
217213 2791878 12.85 147.4
216618 3044041 14.05 147.5
248057 3766521 15.18 148
245642 3951946 16.09 148.4
242485 3873141 15.97 149
260423 3905194 15 149.4
221030 3270182 14.8 149.5
229157 3507725 15.31 149.7
220858 3247520 14.7 149.7
212270 3196121 15.06 150.3
195944 3043149 15.53 150.9
239741 3782269 15.78 151.4
212013 3553012 16.76 151.9
240514 4184142 17.4 152.2
241982 4060682 16.78 152.5
245447 3806535 15.51 152.5
240839 3664622 15.22 152.9
244875 3780268 15.44 153.2
226375 3451415 15.25 153.7
231567 3497566 15.1 153.6
235746 3729872 15.82 153.5
238990 3926552 16.43 154.4
198120 3189228 16.1 154.9
201663 3491666 17.31 155.7
238198 4589427 19.27 156.3
261641 4944722 18.9 156.6
253014 4544250 17.96 156.7
275225 4998154 18.16 157
250957 4680889 18.65 157.3
260375 5199747 19.97 157.8
250694 5367469 21.41 158.3
216953 4637834 21.38 158.6
247816 5360919 21.63 158.6
224135 4900107 21.86 159.1
211073 4323793 20.48 159.6
245623 4607899 18.76 160
250947 4298102 17.13 160.2
278223 4745343 17.06 160.1
254232 4284696 16.85 160.3
266293 4368855 16.41 160.5
280897 4761558 16.95 160.8
274565 4593231 16.73 161.2
280555 4967610 17.71 161.6
252757 4360799 17.25 161.5
250131 4013914 16.05 161.3
271208 3880647 14.31 161.6
230593 3001696 13.02 161.9
263407 3128940 11.88 162.2
289968 3412229 11.77 162.5
282846 3337271 11.8 162.8
271314 3018342 11.12 163
289718 3122180 10.78 163.2
300227 3166475 10.55 163.4
259951 2857357 10.99 163.6
263149 3068900 11.66 164
267953 2890373 10.79 164
252378 2367812 9.38 163.9
280356 2581125 9.21 164.3
234298 2221070 9.48 164.5
271574 2850722 10.5 165
262378 3378898 12.88 166.2
289457 4225641 14.6 166.2
278274 4040329 14.52 166.2
288932 4653736 16.11 166.7
283813 5073475 17.88 167.1
267600 5269952 19.69 167.9
267574 5555979 20.76 168.2
254862 5365458 21.05 168.3
248974 5673236 22.79 168.3
256840 5986952 23.31 168.8
250914 6306821 25.14 169.8
279334 7376263 26.41 171.2
286549 6995605 24.41 171.3
302266 7339987 24.28 171.5
298205 7986628 26.78 172.4
300843 8342710 27.73 172.8
312955 8320435 26.59 172.8
275962 8012324 29.03 173.7
299561 8557200 28.57 174
260975 7395423 28.34 174.1
274836 7256085 26.4 174
284112 6587525 23.19 175.1
247331 5898237 23.85 175.8
298120 6781360 22.75 176.2
306008 6626718 21.66 176.9
306813 6948021 22.65 177.7
288550 6663067 23.09 178
301636 6735350 22.33 177.5
293215 6492209 22.14 177.5
270713 6231952 23.02 178.3
311803 6197131 19.88 177.7
281316 4781081 17 177.4
281450 4350243 15.46 176.7
295494 4813470 16.29 177.1
246411 4086188 16.58 177.8
267037 5144978 19.27 178.8
296134 6670620 22.53 179.8
296505 7040913 23.75 179.8
270677 6320662 23.35 179.9
290855 6902840 23.73 180.1
296068 7276197 24.58 180.7
272653 6951007 25.49 181
315720 8287834 26.25 181.3
286298 6926586 24.19 181.3
284170 6862036 24.15 180.9
273338 7586818 27.76 181.7
250262 7600554 30.37 183.1
294768 8957771 30.39 184.2
318088 8272846 26.01 183.8
319111 7673432 24.05 183.5
312982 7979665 25.5 183.7
335511 8975122 26.75 183.9
319674 8808654 27.56 184.6
316796 8372252 26.43 185.2
329992 8672081 26.28 185
291352 7733246 26.54 184.5
314131 8534732 27.17 184.3
309876 8852497 28.57 185.2
288494 8414097 29.17 186.2
329991 10118324 30.66 187.4
311663 9661668 31 188
317854 10534772 33.14 189.1
344729 11631044 33.74 189.7
324108 10817829 33.38 189.4
333756 12196274 36.54 189.5
297013 11142685 37.52 189.9
313249 13107077 41.84 190.9
329660 13577287 41.19 191
320586 11689111 36.46 190.3
325786 11491026 35.27 190.7
293425 10835581 36.93 191.8
324180 13383428 41.28 193.3
315528 14128664 44.78 194.6
319982 13773585 43.04 194.4
327865 14559106 44.41 194.5
312106 15314485 49.07 195.4
329039 17391215 52.85 196.4
277589 15938226 57.42 198.8
300884 16911547 56.21 199.2
314028 16380931 52.16 197.6
314259 15647547 49.79 196.8
303472 15719248 51.8 198.3
290744 15659664 53.86 198.7
313340 16393388 52.32 199.8
294281 16669884 56.65 201.5
325796 20212544 62.04 202.5
329839 20488311 62.12 202.9
322588 20944691 64.93 203.5
336528 22255220 66.13 203.9
316381 19740688 62.4 202.9
308602 17119687 55.47 201.8
299010 15615178 52.22 201.5
293645 15808828 53.84 201.8
320108 16720818 52.23 202.4
252869 12822771 50.71 203.5
324248 17186586 53 205.4
304775 17456146 57.28 206.7
320208 19006138 59.36 207.9
321260 19580491 60.95 208.4
310320 20344172 65.56 208.3
319197 21773947 68.21 207.9
297503 20383148 68.51 208.5
316184 22919110 72.49 208.9
303411 24168187 79.65 210.2
300841 24896124 82.76 210




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time10 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 time10 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308116&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]10 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=308116&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308116&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 time10 seconds
R ServerBig Analytics Cloud Computing Center







Multiple Linear Regression - Estimated Regression Equation
barrels_purchased[t] = + 71105 + 0.0106569total_value[t] -3118.19unit_price[t] + 86.4045cpi[t] + 0.151113`barrels_purchased(t-1)`[t] + 0.147353`barrels_purchased(t-2)`[t] + 0.119774`barrels_purchased(t-3)`[t] -0.0708038`barrels_purchased(t-4)`[t] -0.0246086`barrels_purchased(t-5)`[t] -0.0490106`barrels_purchased(t-6)`[t] + 0.00581478`barrels_purchased(t-7)`[t] + 0.0681785`barrels_purchased(t-8)`[t] + 0.0602412`barrels_purchased(t-9)`[t] -0.0191581`barrels_purchased(t-10)`[t] + 0.0467396`barrels_purchased(t-11)`[t] + 0.263825`barrels_purchased(t-12)`[t] + e[t]
Warning: you did not specify the column number of the endogenous series! The first column was selected by default.

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Estimated Regression Equation \tabularnewline
barrels_purchased[t] =  +  71105 +  0.0106569total_value[t] -3118.19unit_price[t] +  86.4045cpi[t] +  0.151113`barrels_purchased(t-1)`[t] +  0.147353`barrels_purchased(t-2)`[t] +  0.119774`barrels_purchased(t-3)`[t] -0.0708038`barrels_purchased(t-4)`[t] -0.0246086`barrels_purchased(t-5)`[t] -0.0490106`barrels_purchased(t-6)`[t] +  0.00581478`barrels_purchased(t-7)`[t] +  0.0681785`barrels_purchased(t-8)`[t] +  0.0602412`barrels_purchased(t-9)`[t] -0.0191581`barrels_purchased(t-10)`[t] +  0.0467396`barrels_purchased(t-11)`[t] +  0.263825`barrels_purchased(t-12)`[t]  + e[t] \tabularnewline
Warning: you did not specify the column number of the endogenous series! The first column was selected by default. \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308116&T=1

[TABLE]
[ROW][C]Multiple Linear Regression - Estimated Regression Equation[/C][/ROW]
[ROW][C]barrels_purchased[t] =  +  71105 +  0.0106569total_value[t] -3118.19unit_price[t] +  86.4045cpi[t] +  0.151113`barrels_purchased(t-1)`[t] +  0.147353`barrels_purchased(t-2)`[t] +  0.119774`barrels_purchased(t-3)`[t] -0.0708038`barrels_purchased(t-4)`[t] -0.0246086`barrels_purchased(t-5)`[t] -0.0490106`barrels_purchased(t-6)`[t] +  0.00581478`barrels_purchased(t-7)`[t] +  0.0681785`barrels_purchased(t-8)`[t] +  0.0602412`barrels_purchased(t-9)`[t] -0.0191581`barrels_purchased(t-10)`[t] +  0.0467396`barrels_purchased(t-11)`[t] +  0.263825`barrels_purchased(t-12)`[t]  + e[t][/C][/ROW]
[ROW][C]Warning: you did not specify the column number of the endogenous series! The first column was selected by default.[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=308116&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308116&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] = + 71105 + 0.0106569total_value[t] -3118.19unit_price[t] + 86.4045cpi[t] + 0.151113`barrels_purchased(t-1)`[t] + 0.147353`barrels_purchased(t-2)`[t] + 0.119774`barrels_purchased(t-3)`[t] -0.0708038`barrels_purchased(t-4)`[t] -0.0246086`barrels_purchased(t-5)`[t] -0.0490106`barrels_purchased(t-6)`[t] + 0.00581478`barrels_purchased(t-7)`[t] + 0.0681785`barrels_purchased(t-8)`[t] + 0.0602412`barrels_purchased(t-9)`[t] -0.0191581`barrels_purchased(t-10)`[t] + 0.0467396`barrels_purchased(t-11)`[t] + 0.263825`barrels_purchased(t-12)`[t] + e[t]
Warning: you did not specify the column number of the endogenous series! The first column was selected by default.







Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STATH0: parameter = 02-tail p-value1-tail p-value
(Intercept)+7.11e+04 5206+1.3660e+01 5.155e-35 2.577e-35
total_value+0.01066 0.0007429+1.4350e+01 8.239e-38 4.119e-38
unit_price-3118 205.5-1.5170e+01 3.092e-41 1.546e-41
cpi+86.4 28.51+3.0310e+00 0.002602 0.001301
`barrels_purchased(t-1)`+0.1511 0.04081+3.7030e+00 0.0002435 0.0001218
`barrels_purchased(t-2)`+0.1474 0.04216+3.4950e+00 0.0005285 0.0002642
`barrels_purchased(t-3)`+0.1198 0.04286+2.7940e+00 0.005457 0.002729
`barrels_purchased(t-4)`-0.0708 0.04322-1.6380e+00 0.1022 0.05111
`barrels_purchased(t-5)`-0.02461 0.04313-5.7060e-01 0.5686 0.2843
`barrels_purchased(t-6)`-0.04901 0.04307-1.1380e+00 0.2558 0.1279
`barrels_purchased(t-7)`+0.005815 0.04308+1.3500e-01 0.8927 0.4463
`barrels_purchased(t-8)`+0.06818 0.04308+1.5820e+00 0.1143 0.05717
`barrels_purchased(t-9)`+0.06024 0.04303+1.4000e+00 0.1623 0.08114
`barrels_purchased(t-10)`-0.01916 0.04259-4.4980e-01 0.6531 0.3265
`barrels_purchased(t-11)`+0.04674 0.04206+1.1110e+00 0.2671 0.1335
`barrels_purchased(t-12)`+0.2638 0.04022+6.5590e+00 1.713e-10 8.564e-11

\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) & +7.11e+04 &  5206 & +1.3660e+01 &  5.155e-35 &  2.577e-35 \tabularnewline
total_value & +0.01066 &  0.0007429 & +1.4350e+01 &  8.239e-38 &  4.119e-38 \tabularnewline
unit_price & -3118 &  205.5 & -1.5170e+01 &  3.092e-41 &  1.546e-41 \tabularnewline
cpi & +86.4 &  28.51 & +3.0310e+00 &  0.002602 &  0.001301 \tabularnewline
`barrels_purchased(t-1)` & +0.1511 &  0.04081 & +3.7030e+00 &  0.0002435 &  0.0001218 \tabularnewline
`barrels_purchased(t-2)` & +0.1474 &  0.04216 & +3.4950e+00 &  0.0005285 &  0.0002642 \tabularnewline
`barrels_purchased(t-3)` & +0.1198 &  0.04286 & +2.7940e+00 &  0.005457 &  0.002729 \tabularnewline
`barrels_purchased(t-4)` & -0.0708 &  0.04322 & -1.6380e+00 &  0.1022 &  0.05111 \tabularnewline
`barrels_purchased(t-5)` & -0.02461 &  0.04313 & -5.7060e-01 &  0.5686 &  0.2843 \tabularnewline
`barrels_purchased(t-6)` & -0.04901 &  0.04307 & -1.1380e+00 &  0.2558 &  0.1279 \tabularnewline
`barrels_purchased(t-7)` & +0.005815 &  0.04308 & +1.3500e-01 &  0.8927 &  0.4463 \tabularnewline
`barrels_purchased(t-8)` & +0.06818 &  0.04308 & +1.5820e+00 &  0.1143 &  0.05717 \tabularnewline
`barrels_purchased(t-9)` & +0.06024 &  0.04303 & +1.4000e+00 &  0.1623 &  0.08114 \tabularnewline
`barrels_purchased(t-10)` & -0.01916 &  0.04259 & -4.4980e-01 &  0.6531 &  0.3265 \tabularnewline
`barrels_purchased(t-11)` & +0.04674 &  0.04206 & +1.1110e+00 &  0.2671 &  0.1335 \tabularnewline
`barrels_purchased(t-12)` & +0.2638 &  0.04022 & +6.5590e+00 &  1.713e-10 &  8.564e-11 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308116&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]+7.11e+04[/C][C] 5206[/C][C]+1.3660e+01[/C][C] 5.155e-35[/C][C] 2.577e-35[/C][/ROW]
[ROW][C]total_value[/C][C]+0.01066[/C][C] 0.0007429[/C][C]+1.4350e+01[/C][C] 8.239e-38[/C][C] 4.119e-38[/C][/ROW]
[ROW][C]unit_price[/C][C]-3118[/C][C] 205.5[/C][C]-1.5170e+01[/C][C] 3.092e-41[/C][C] 1.546e-41[/C][/ROW]
[ROW][C]cpi[/C][C]+86.4[/C][C] 28.51[/C][C]+3.0310e+00[/C][C] 0.002602[/C][C] 0.001301[/C][/ROW]
[ROW][C]`barrels_purchased(t-1)`[/C][C]+0.1511[/C][C] 0.04081[/C][C]+3.7030e+00[/C][C] 0.0002435[/C][C] 0.0001218[/C][/ROW]
[ROW][C]`barrels_purchased(t-2)`[/C][C]+0.1474[/C][C] 0.04216[/C][C]+3.4950e+00[/C][C] 0.0005285[/C][C] 0.0002642[/C][/ROW]
[ROW][C]`barrels_purchased(t-3)`[/C][C]+0.1198[/C][C] 0.04286[/C][C]+2.7940e+00[/C][C] 0.005457[/C][C] 0.002729[/C][/ROW]
[ROW][C]`barrels_purchased(t-4)`[/C][C]-0.0708[/C][C] 0.04322[/C][C]-1.6380e+00[/C][C] 0.1022[/C][C] 0.05111[/C][/ROW]
[ROW][C]`barrels_purchased(t-5)`[/C][C]-0.02461[/C][C] 0.04313[/C][C]-5.7060e-01[/C][C] 0.5686[/C][C] 0.2843[/C][/ROW]
[ROW][C]`barrels_purchased(t-6)`[/C][C]-0.04901[/C][C] 0.04307[/C][C]-1.1380e+00[/C][C] 0.2558[/C][C] 0.1279[/C][/ROW]
[ROW][C]`barrels_purchased(t-7)`[/C][C]+0.005815[/C][C] 0.04308[/C][C]+1.3500e-01[/C][C] 0.8927[/C][C] 0.4463[/C][/ROW]
[ROW][C]`barrels_purchased(t-8)`[/C][C]+0.06818[/C][C] 0.04308[/C][C]+1.5820e+00[/C][C] 0.1143[/C][C] 0.05717[/C][/ROW]
[ROW][C]`barrels_purchased(t-9)`[/C][C]+0.06024[/C][C] 0.04303[/C][C]+1.4000e+00[/C][C] 0.1623[/C][C] 0.08114[/C][/ROW]
[ROW][C]`barrels_purchased(t-10)`[/C][C]-0.01916[/C][C] 0.04259[/C][C]-4.4980e-01[/C][C] 0.6531[/C][C] 0.3265[/C][/ROW]
[ROW][C]`barrels_purchased(t-11)`[/C][C]+0.04674[/C][C] 0.04206[/C][C]+1.1110e+00[/C][C] 0.2671[/C][C] 0.1335[/C][/ROW]
[ROW][C]`barrels_purchased(t-12)`[/C][C]+0.2638[/C][C] 0.04022[/C][C]+6.5590e+00[/C][C] 1.713e-10[/C][C] 8.564e-11[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=308116&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308116&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)+7.11e+04 5206+1.3660e+01 5.155e-35 2.577e-35
total_value+0.01066 0.0007429+1.4350e+01 8.239e-38 4.119e-38
unit_price-3118 205.5-1.5170e+01 3.092e-41 1.546e-41
cpi+86.4 28.51+3.0310e+00 0.002602 0.001301
`barrels_purchased(t-1)`+0.1511 0.04081+3.7030e+00 0.0002435 0.0001218
`barrels_purchased(t-2)`+0.1474 0.04216+3.4950e+00 0.0005285 0.0002642
`barrels_purchased(t-3)`+0.1198 0.04286+2.7940e+00 0.005457 0.002729
`barrels_purchased(t-4)`-0.0708 0.04322-1.6380e+00 0.1022 0.05111
`barrels_purchased(t-5)`-0.02461 0.04313-5.7060e-01 0.5686 0.2843
`barrels_purchased(t-6)`-0.04901 0.04307-1.1380e+00 0.2558 0.1279
`barrels_purchased(t-7)`+0.005815 0.04308+1.3500e-01 0.8927 0.4463
`barrels_purchased(t-8)`+0.06818 0.04308+1.5820e+00 0.1143 0.05717
`barrels_purchased(t-9)`+0.06024 0.04303+1.4000e+00 0.1623 0.08114
`barrels_purchased(t-10)`-0.01916 0.04259-4.4980e-01 0.6531 0.3265
`barrels_purchased(t-11)`+0.04674 0.04206+1.1110e+00 0.2671 0.1335
`barrels_purchased(t-12)`+0.2638 0.04022+6.5590e+00 1.713e-10 8.564e-11







Multiple Linear Regression - Regression Statistics
Multiple R 0.9793
R-squared 0.959
Adjusted R-squared 0.9574
F-TEST (value) 611.3
F-TEST (DF numerator)15
F-TEST (DF denominator)392
p-value 0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation 1.453e+04
Sum Squared Residuals 8.277e+10

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Regression Statistics \tabularnewline
Multiple R &  0.9793 \tabularnewline
R-squared &  0.959 \tabularnewline
Adjusted R-squared &  0.9574 \tabularnewline
F-TEST (value) &  611.3 \tabularnewline
F-TEST (DF numerator) & 15 \tabularnewline
F-TEST (DF denominator) & 392 \tabularnewline
p-value &  0 \tabularnewline
Multiple Linear Regression - Residual Statistics \tabularnewline
Residual Standard Deviation &  1.453e+04 \tabularnewline
Sum Squared Residuals &  8.277e+10 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308116&T=3

[TABLE]
[ROW][C]Multiple Linear Regression - Regression Statistics[/C][/ROW]
[ROW][C]Multiple R[/C][C] 0.9793[/C][/ROW]
[ROW][C]R-squared[/C][C] 0.959[/C][/ROW]
[ROW][C]Adjusted R-squared[/C][C] 0.9574[/C][/ROW]
[ROW][C]F-TEST (value)[/C][C] 611.3[/C][/ROW]
[ROW][C]F-TEST (DF numerator)[/C][C]15[/C][/ROW]
[ROW][C]F-TEST (DF denominator)[/C][C]392[/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.453e+04[/C][/ROW]
[ROW][C]Sum Squared Residuals[/C][C] 8.277e+10[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=308116&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308116&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.9793
R-squared 0.959
Adjusted R-squared 0.9574
F-TEST (value) 611.3
F-TEST (DF numerator)15
F-TEST (DF denominator)392
p-value 0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation 1.453e+04
Sum Squared Residuals 8.277e+10







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=308116&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=308116&T=4

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308116&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 = 14.459, df1 = 2, df2 = 390, p-value = 8.759e-07
Ramsey RESET F-Test for powers (2 and 3) of regressors
> reset_test_regressors
	RESET test
data:  mylm
RESET = 28.143, df1 = 30, df2 = 362, p-value < 2.2e-16
Ramsey RESET F-Test for powers (2 and 3) of principal components
> reset_test_principal_components
	RESET test
data:  mylm
RESET = 182.7, df1 = 2, df2 = 390, p-value < 2.2e-16

\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 = 14.459, df1 = 2, df2 = 390, p-value = 8.759e-07
\tabularnewline Ramsey RESET F-Test for powers (2 and 3) of regressors \tabularnewline
> reset_test_regressors
	RESET test
data:  mylm
RESET = 28.143, df1 = 30, df2 = 362, p-value < 2.2e-16
\tabularnewline Ramsey RESET F-Test for powers (2 and 3) of principal components \tabularnewline
> reset_test_principal_components
	RESET test
data:  mylm
RESET = 182.7, df1 = 2, df2 = 390, p-value < 2.2e-16
\tabularnewline \hline \end{tabular} %Source: https://freestatistics.org/blog/index.php?pk=308116&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 = 14.459, df1 = 2, df2 = 390, p-value = 8.759e-07
[/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 = 28.143, df1 = 30, df2 = 362, p-value < 2.2e-16
[/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 = 182.7, df1 = 2, df2 = 390, p-value < 2.2e-16
[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=308116&T=5

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308116&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 = 14.459, df1 = 2, df2 = 390, p-value = 8.759e-07
Ramsey RESET F-Test for powers (2 and 3) of regressors
> reset_test_regressors
	RESET test
data:  mylm
RESET = 28.143, df1 = 30, df2 = 362, p-value < 2.2e-16
Ramsey RESET F-Test for powers (2 and 3) of principal components
> reset_test_principal_components
	RESET test
data:  mylm
RESET = 182.7, df1 = 2, df2 = 390, p-value < 2.2e-16







Variance Inflation Factors (Multicollinearity)
> vif
              total_value                unit_price                       cpi 
                21.243028                 13.703998                  3.299382 
 `barrels_purchased(t-1)`  `barrels_purchased(t-2)`  `barrels_purchased(t-3)` 
                15.944901                 16.992600                 17.505379 
 `barrels_purchased(t-4)`  `barrels_purchased(t-5)`  `barrels_purchased(t-6)` 
                17.787644                 17.624765                 17.575618 
 `barrels_purchased(t-7)`  `barrels_purchased(t-8)`  `barrels_purchased(t-9)` 
                17.534147                 17.479163                 17.443003 
`barrels_purchased(t-10)` `barrels_purchased(t-11)` `barrels_purchased(t-12)` 
                17.037903                 16.690901                 15.239198 

\begin{tabular}{lllllllll}
\hline
Variance Inflation Factors (Multicollinearity) \tabularnewline
> vif
              total_value                unit_price                       cpi 
                21.243028                 13.703998                  3.299382 
 `barrels_purchased(t-1)`  `barrels_purchased(t-2)`  `barrels_purchased(t-3)` 
                15.944901                 16.992600                 17.505379 
 `barrels_purchased(t-4)`  `barrels_purchased(t-5)`  `barrels_purchased(t-6)` 
                17.787644                 17.624765                 17.575618 
 `barrels_purchased(t-7)`  `barrels_purchased(t-8)`  `barrels_purchased(t-9)` 
                17.534147                 17.479163                 17.443003 
`barrels_purchased(t-10)` `barrels_purchased(t-11)` `barrels_purchased(t-12)` 
                17.037903                 16.690901                 15.239198 
\tabularnewline \hline \end{tabular} %Source: https://freestatistics.org/blog/index.php?pk=308116&T=6

[TABLE]
[ROW][C]Variance Inflation Factors (Multicollinearity)[/C][/ROW]
[ROW][C]
> vif
              total_value                unit_price                       cpi 
                21.243028                 13.703998                  3.299382 
 `barrels_purchased(t-1)`  `barrels_purchased(t-2)`  `barrels_purchased(t-3)` 
                15.944901                 16.992600                 17.505379 
 `barrels_purchased(t-4)`  `barrels_purchased(t-5)`  `barrels_purchased(t-6)` 
                17.787644                 17.624765                 17.575618 
 `barrels_purchased(t-7)`  `barrels_purchased(t-8)`  `barrels_purchased(t-9)` 
                17.534147                 17.479163                 17.443003 
`barrels_purchased(t-10)` `barrels_purchased(t-11)` `barrels_purchased(t-12)` 
                17.037903                 16.690901                 15.239198 
[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=308116&T=6

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308116&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
              total_value                unit_price                       cpi 
                21.243028                 13.703998                  3.299382 
 `barrels_purchased(t-1)`  `barrels_purchased(t-2)`  `barrels_purchased(t-3)` 
                15.944901                 16.992600                 17.505379 
 `barrels_purchased(t-4)`  `barrels_purchased(t-5)`  `barrels_purchased(t-6)` 
                17.787644                 17.624765                 17.575618 
 `barrels_purchased(t-7)`  `barrels_purchased(t-8)`  `barrels_purchased(t-9)` 
                17.534147                 17.479163                 17.443003 
`barrels_purchased(t-10)` `barrels_purchased(t-11)` `barrels_purchased(t-12)` 
                17.037903                 16.690901                 15.239198 



Parameters (Session):
Parameters (R input):
par1 = ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ; par4 = 12 ; par5 = ; 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')