Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_multipleregression.wasp
Title produced by softwareMultiple Regression
Date of computationSat, 24 Nov 2007 05:40:07 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2007/Nov/24/t1195907520621fhogtanvyr4u.htm/, Retrieved Fri, 03 May 2024 14:41:41 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=6266, Retrieved Fri, 03 May 2024 14:41:41 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact232
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Multiple Regression] [Case: the Seatbel...] [2007-11-24 12:40:07] [cb172450b25aceeff04d58e88e905157] [Current]
Feedback Forum

Post a new message
Dataseries X:
476	0
475	0
470	0
461	0
455	0
456	0
517	0
525	0
523	0
519	0
509	0
512	0
519	0
517	0
510	0
509	0
501	0
507	0
569	0
580	0
578	0
565	0
547	0
555	0
562	1
561	1
555	1
544	1
537	1
543	1
594	1
611	1
613	1
611	1
594	1
595	1




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\begin{tabular}{lllllllll}
\hline
Summary of compuational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 3 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=6266&T=0

[TABLE]
[ROW][C]Summary of compuational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=6266&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=6266&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







Multiple Linear Regression - Estimated Regression Equation
y[t] = + 463.5 -8.00000000000007x[t] + 7.70138888888876M1[t] + 2.48611111111117M2[t] -7.39583333333327M3[t] -18.2777777777777M4[t] -29.1597222222222M5[t] -28.7083333333333M6[t] + 25.4097222222223M7[t] + 33.5277777777778M8[t] + 28.9791666666667M9[t] + 18.7638888888889M10[t] -0.118055555555553M11[t] + 3.88194444444445t + e[t]

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Estimated Regression Equation \tabularnewline
y[t] =  +  463.5 -8.00000000000007x[t] +  7.70138888888876M1[t] +  2.48611111111117M2[t] -7.39583333333327M3[t] -18.2777777777777M4[t] -29.1597222222222M5[t] -28.7083333333333M6[t] +  25.4097222222223M7[t] +  33.5277777777778M8[t] +  28.9791666666667M9[t] +  18.7638888888889M10[t] -0.118055555555553M11[t] +  3.88194444444445t  + e[t] \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=6266&T=1

[TABLE]
[ROW][C]Multiple Linear Regression - Estimated Regression Equation[/C][/ROW]
[ROW][C]y[t] =  +  463.5 -8.00000000000007x[t] +  7.70138888888876M1[t] +  2.48611111111117M2[t] -7.39583333333327M3[t] -18.2777777777777M4[t] -29.1597222222222M5[t] -28.7083333333333M6[t] +  25.4097222222223M7[t] +  33.5277777777778M8[t] +  28.9791666666667M9[t] +  18.7638888888889M10[t] -0.118055555555553M11[t] +  3.88194444444445t  + e[t][/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=6266&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=6266&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
y[t] = + 463.5 -8.00000000000007x[t] + 7.70138888888876M1[t] + 2.48611111111117M2[t] -7.39583333333327M3[t] -18.2777777777777M4[t] -29.1597222222222M5[t] -28.7083333333333M6[t] + 25.4097222222223M7[t] + 33.5277777777778M8[t] + 28.9791666666667M9[t] + 18.7638888888889M10[t] -0.118055555555553M11[t] + 3.88194444444445t + e[t]







Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STATH0: parameter = 02-tail p-value1-tail p-value
(Intercept)463.53.336804138.905400
x-8.000000000000072.776389-2.88140.0086660.004333
M17.701388888888763.5265882.18380.0399240.019962
M22.486111111111173.4730550.71580.4816270.240813
M3-7.395833333333273.4239-2.16010.0419310.020965
M4-18.27777777777773.379313-5.40872e-051e-05
M5-29.15972222222223.339476-8.731800
M6-28.70833333333333.304563-8.687500
M725.40972222222233.2747317.759300
M833.52777777777783.25011910.315900
M928.97916666666673.2308468.969500
M1018.76388888888893.217015.83277e-064e-06
M11-0.1180555555555533.208679-0.03680.9709820.485491
t3.881944444444450.13357929.06100

\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) & 463.5 & 3.336804 & 138.9054 & 0 & 0 \tabularnewline
x & -8.00000000000007 & 2.776389 & -2.8814 & 0.008666 & 0.004333 \tabularnewline
M1 & 7.70138888888876 & 3.526588 & 2.1838 & 0.039924 & 0.019962 \tabularnewline
M2 & 2.48611111111117 & 3.473055 & 0.7158 & 0.481627 & 0.240813 \tabularnewline
M3 & -7.39583333333327 & 3.4239 & -2.1601 & 0.041931 & 0.020965 \tabularnewline
M4 & -18.2777777777777 & 3.379313 & -5.4087 & 2e-05 & 1e-05 \tabularnewline
M5 & -29.1597222222222 & 3.339476 & -8.7318 & 0 & 0 \tabularnewline
M6 & -28.7083333333333 & 3.304563 & -8.6875 & 0 & 0 \tabularnewline
M7 & 25.4097222222223 & 3.274731 & 7.7593 & 0 & 0 \tabularnewline
M8 & 33.5277777777778 & 3.250119 & 10.3159 & 0 & 0 \tabularnewline
M9 & 28.9791666666667 & 3.230846 & 8.9695 & 0 & 0 \tabularnewline
M10 & 18.7638888888889 & 3.21701 & 5.8327 & 7e-06 & 4e-06 \tabularnewline
M11 & -0.118055555555553 & 3.208679 & -0.0368 & 0.970982 & 0.485491 \tabularnewline
t & 3.88194444444445 & 0.133579 & 29.061 & 0 & 0 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=6266&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]463.5[/C][C]3.336804[/C][C]138.9054[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]x[/C][C]-8.00000000000007[/C][C]2.776389[/C][C]-2.8814[/C][C]0.008666[/C][C]0.004333[/C][/ROW]
[ROW][C]M1[/C][C]7.70138888888876[/C][C]3.526588[/C][C]2.1838[/C][C]0.039924[/C][C]0.019962[/C][/ROW]
[ROW][C]M2[/C][C]2.48611111111117[/C][C]3.473055[/C][C]0.7158[/C][C]0.481627[/C][C]0.240813[/C][/ROW]
[ROW][C]M3[/C][C]-7.39583333333327[/C][C]3.4239[/C][C]-2.1601[/C][C]0.041931[/C][C]0.020965[/C][/ROW]
[ROW][C]M4[/C][C]-18.2777777777777[/C][C]3.379313[/C][C]-5.4087[/C][C]2e-05[/C][C]1e-05[/C][/ROW]
[ROW][C]M5[/C][C]-29.1597222222222[/C][C]3.339476[/C][C]-8.7318[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]M6[/C][C]-28.7083333333333[/C][C]3.304563[/C][C]-8.6875[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]M7[/C][C]25.4097222222223[/C][C]3.274731[/C][C]7.7593[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]M8[/C][C]33.5277777777778[/C][C]3.250119[/C][C]10.3159[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]M9[/C][C]28.9791666666667[/C][C]3.230846[/C][C]8.9695[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]M10[/C][C]18.7638888888889[/C][C]3.21701[/C][C]5.8327[/C][C]7e-06[/C][C]4e-06[/C][/ROW]
[ROW][C]M11[/C][C]-0.118055555555553[/C][C]3.208679[/C][C]-0.0368[/C][C]0.970982[/C][C]0.485491[/C][/ROW]
[ROW][C]t[/C][C]3.88194444444445[/C][C]0.133579[/C][C]29.061[/C][C]0[/C][C]0[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=6266&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=6266&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)463.53.336804138.905400
x-8.000000000000072.776389-2.88140.0086660.004333
M17.701388888888763.5265882.18380.0399240.019962
M22.486111111111173.4730550.71580.4816270.240813
M3-7.395833333333273.4239-2.16010.0419310.020965
M4-18.27777777777773.379313-5.40872e-051e-05
M5-29.15972222222223.339476-8.731800
M6-28.70833333333333.304563-8.687500
M725.40972222222233.2747317.759300
M833.52777777777783.25011910.315900
M928.97916666666673.2308468.969500
M1018.76388888888893.217015.83277e-064e-06
M11-0.1180555555555533.208679-0.03680.9709820.485491
t3.881944444444450.13357929.06100







Multiple Linear Regression - Regression Statistics
Multiple R0.997638373600889
R-squared0.995282324481027
Adjusted R-squared0.992494607128906
F-TEST (value)357.024116424117
F-TEST (DF numerator)13
F-TEST (DF denominator)22
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.92640632979658
Sum Squared Residuals339.166666666666

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Regression Statistics \tabularnewline
Multiple R & 0.997638373600889 \tabularnewline
R-squared & 0.995282324481027 \tabularnewline
Adjusted R-squared & 0.992494607128906 \tabularnewline
F-TEST (value) & 357.024116424117 \tabularnewline
F-TEST (DF numerator) & 13 \tabularnewline
F-TEST (DF denominator) & 22 \tabularnewline
p-value & 0 \tabularnewline
Multiple Linear Regression - Residual Statistics \tabularnewline
Residual Standard Deviation & 3.92640632979658 \tabularnewline
Sum Squared Residuals & 339.166666666666 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=6266&T=3

[TABLE]
[ROW][C]Multiple Linear Regression - Regression Statistics[/C][/ROW]
[ROW][C]Multiple R[/C][C]0.997638373600889[/C][/ROW]
[ROW][C]R-squared[/C][C]0.995282324481027[/C][/ROW]
[ROW][C]Adjusted R-squared[/C][C]0.992494607128906[/C][/ROW]
[ROW][C]F-TEST (value)[/C][C]357.024116424117[/C][/ROW]
[ROW][C]F-TEST (DF numerator)[/C][C]13[/C][/ROW]
[ROW][C]F-TEST (DF denominator)[/C][C]22[/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]3.92640632979658[/C][/ROW]
[ROW][C]Sum Squared Residuals[/C][C]339.166666666666[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=6266&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=6266&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 R0.997638373600889
R-squared0.995282324481027
Adjusted R-squared0.992494607128906
F-TEST (value)357.024116424117
F-TEST (DF numerator)13
F-TEST (DF denominator)22
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.92640632979658
Sum Squared Residuals339.166666666666







Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolationForecastResidualsPrediction Error
1476475.0833333333340.916666666666312
2475473.751.25000000000003
3470467.752.25000000000002
4461460.750.250000000000032
5455453.751.25000000000003
6456458.083333333333-2.08333333333332
7517516.0833333333330.916666666666717
8525528.083333333333-3.08333333333328
9523527.416666666667-4.41666666666666
10519521.083333333333-2.0833333333333
11509506.0833333333332.91666666666671
12512510.0833333333331.91666666666671
13519521.666666666667-2.66666666666649
14517520.333333333333-3.33333333333334
15510514.333333333333-4.33333333333335
16509507.3333333333331.66666666666665
17501500.3333333333330.666666666666645
18507504.6666666666672.33333333333332
19569562.6666666666676.33333333333332
20580574.6666666666675.3333333333333
215785744
22565567.666666666667-2.66666666666668
23547552.666666666667-5.66666666666669
24555556.666666666667-1.66666666666668
25562560.251.75000000000018
26561558.9166666666672.08333333333331
27555552.9166666666672.08333333333332
28544545.916666666667-1.91666666666668
29537538.916666666667-1.91666666666667
30543543.25-0.250000000000004
31594601.25-7.25000000000003
32611613.25-2.25000000000003
33613612.5833333333330.416666666666659
34611606.254.74999999999998
35594591.252.74999999999998
36595595.25-0.250000000000023

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Actuals, Interpolation, and Residuals \tabularnewline
Time or Index & Actuals & InterpolationForecast & ResidualsPrediction Error \tabularnewline
1 & 476 & 475.083333333334 & 0.916666666666312 \tabularnewline
2 & 475 & 473.75 & 1.25000000000003 \tabularnewline
3 & 470 & 467.75 & 2.25000000000002 \tabularnewline
4 & 461 & 460.75 & 0.250000000000032 \tabularnewline
5 & 455 & 453.75 & 1.25000000000003 \tabularnewline
6 & 456 & 458.083333333333 & -2.08333333333332 \tabularnewline
7 & 517 & 516.083333333333 & 0.916666666666717 \tabularnewline
8 & 525 & 528.083333333333 & -3.08333333333328 \tabularnewline
9 & 523 & 527.416666666667 & -4.41666666666666 \tabularnewline
10 & 519 & 521.083333333333 & -2.0833333333333 \tabularnewline
11 & 509 & 506.083333333333 & 2.91666666666671 \tabularnewline
12 & 512 & 510.083333333333 & 1.91666666666671 \tabularnewline
13 & 519 & 521.666666666667 & -2.66666666666649 \tabularnewline
14 & 517 & 520.333333333333 & -3.33333333333334 \tabularnewline
15 & 510 & 514.333333333333 & -4.33333333333335 \tabularnewline
16 & 509 & 507.333333333333 & 1.66666666666665 \tabularnewline
17 & 501 & 500.333333333333 & 0.666666666666645 \tabularnewline
18 & 507 & 504.666666666667 & 2.33333333333332 \tabularnewline
19 & 569 & 562.666666666667 & 6.33333333333332 \tabularnewline
20 & 580 & 574.666666666667 & 5.3333333333333 \tabularnewline
21 & 578 & 574 & 4 \tabularnewline
22 & 565 & 567.666666666667 & -2.66666666666668 \tabularnewline
23 & 547 & 552.666666666667 & -5.66666666666669 \tabularnewline
24 & 555 & 556.666666666667 & -1.66666666666668 \tabularnewline
25 & 562 & 560.25 & 1.75000000000018 \tabularnewline
26 & 561 & 558.916666666667 & 2.08333333333331 \tabularnewline
27 & 555 & 552.916666666667 & 2.08333333333332 \tabularnewline
28 & 544 & 545.916666666667 & -1.91666666666668 \tabularnewline
29 & 537 & 538.916666666667 & -1.91666666666667 \tabularnewline
30 & 543 & 543.25 & -0.250000000000004 \tabularnewline
31 & 594 & 601.25 & -7.25000000000003 \tabularnewline
32 & 611 & 613.25 & -2.25000000000003 \tabularnewline
33 & 613 & 612.583333333333 & 0.416666666666659 \tabularnewline
34 & 611 & 606.25 & 4.74999999999998 \tabularnewline
35 & 594 & 591.25 & 2.74999999999998 \tabularnewline
36 & 595 & 595.25 & -0.250000000000023 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=6266&T=4

[TABLE]
[ROW][C]Multiple Linear Regression - Actuals, Interpolation, and Residuals[/C][/ROW]
[ROW][C]Time or Index[/C][C]Actuals[/C][C]InterpolationForecast[/C][C]ResidualsPrediction Error[/C][/ROW]
[ROW][C]1[/C][C]476[/C][C]475.083333333334[/C][C]0.916666666666312[/C][/ROW]
[ROW][C]2[/C][C]475[/C][C]473.75[/C][C]1.25000000000003[/C][/ROW]
[ROW][C]3[/C][C]470[/C][C]467.75[/C][C]2.25000000000002[/C][/ROW]
[ROW][C]4[/C][C]461[/C][C]460.75[/C][C]0.250000000000032[/C][/ROW]
[ROW][C]5[/C][C]455[/C][C]453.75[/C][C]1.25000000000003[/C][/ROW]
[ROW][C]6[/C][C]456[/C][C]458.083333333333[/C][C]-2.08333333333332[/C][/ROW]
[ROW][C]7[/C][C]517[/C][C]516.083333333333[/C][C]0.916666666666717[/C][/ROW]
[ROW][C]8[/C][C]525[/C][C]528.083333333333[/C][C]-3.08333333333328[/C][/ROW]
[ROW][C]9[/C][C]523[/C][C]527.416666666667[/C][C]-4.41666666666666[/C][/ROW]
[ROW][C]10[/C][C]519[/C][C]521.083333333333[/C][C]-2.0833333333333[/C][/ROW]
[ROW][C]11[/C][C]509[/C][C]506.083333333333[/C][C]2.91666666666671[/C][/ROW]
[ROW][C]12[/C][C]512[/C][C]510.083333333333[/C][C]1.91666666666671[/C][/ROW]
[ROW][C]13[/C][C]519[/C][C]521.666666666667[/C][C]-2.66666666666649[/C][/ROW]
[ROW][C]14[/C][C]517[/C][C]520.333333333333[/C][C]-3.33333333333334[/C][/ROW]
[ROW][C]15[/C][C]510[/C][C]514.333333333333[/C][C]-4.33333333333335[/C][/ROW]
[ROW][C]16[/C][C]509[/C][C]507.333333333333[/C][C]1.66666666666665[/C][/ROW]
[ROW][C]17[/C][C]501[/C][C]500.333333333333[/C][C]0.666666666666645[/C][/ROW]
[ROW][C]18[/C][C]507[/C][C]504.666666666667[/C][C]2.33333333333332[/C][/ROW]
[ROW][C]19[/C][C]569[/C][C]562.666666666667[/C][C]6.33333333333332[/C][/ROW]
[ROW][C]20[/C][C]580[/C][C]574.666666666667[/C][C]5.3333333333333[/C][/ROW]
[ROW][C]21[/C][C]578[/C][C]574[/C][C]4[/C][/ROW]
[ROW][C]22[/C][C]565[/C][C]567.666666666667[/C][C]-2.66666666666668[/C][/ROW]
[ROW][C]23[/C][C]547[/C][C]552.666666666667[/C][C]-5.66666666666669[/C][/ROW]
[ROW][C]24[/C][C]555[/C][C]556.666666666667[/C][C]-1.66666666666668[/C][/ROW]
[ROW][C]25[/C][C]562[/C][C]560.25[/C][C]1.75000000000018[/C][/ROW]
[ROW][C]26[/C][C]561[/C][C]558.916666666667[/C][C]2.08333333333331[/C][/ROW]
[ROW][C]27[/C][C]555[/C][C]552.916666666667[/C][C]2.08333333333332[/C][/ROW]
[ROW][C]28[/C][C]544[/C][C]545.916666666667[/C][C]-1.91666666666668[/C][/ROW]
[ROW][C]29[/C][C]537[/C][C]538.916666666667[/C][C]-1.91666666666667[/C][/ROW]
[ROW][C]30[/C][C]543[/C][C]543.25[/C][C]-0.250000000000004[/C][/ROW]
[ROW][C]31[/C][C]594[/C][C]601.25[/C][C]-7.25000000000003[/C][/ROW]
[ROW][C]32[/C][C]611[/C][C]613.25[/C][C]-2.25000000000003[/C][/ROW]
[ROW][C]33[/C][C]613[/C][C]612.583333333333[/C][C]0.416666666666659[/C][/ROW]
[ROW][C]34[/C][C]611[/C][C]606.25[/C][C]4.74999999999998[/C][/ROW]
[ROW][C]35[/C][C]594[/C][C]591.25[/C][C]2.74999999999998[/C][/ROW]
[ROW][C]36[/C][C]595[/C][C]595.25[/C][C]-0.250000000000023[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=6266&T=4

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

As an alternative you can also use a QR Code:  

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

Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolationForecastResidualsPrediction Error
1476475.0833333333340.916666666666312
2475473.751.25000000000003
3470467.752.25000000000002
4461460.750.250000000000032
5455453.751.25000000000003
6456458.083333333333-2.08333333333332
7517516.0833333333330.916666666666717
8525528.083333333333-3.08333333333328
9523527.416666666667-4.41666666666666
10519521.083333333333-2.0833333333333
11509506.0833333333332.91666666666671
12512510.0833333333331.91666666666671
13519521.666666666667-2.66666666666649
14517520.333333333333-3.33333333333334
15510514.333333333333-4.33333333333335
16509507.3333333333331.66666666666665
17501500.3333333333330.666666666666645
18507504.6666666666672.33333333333332
19569562.6666666666676.33333333333332
20580574.6666666666675.3333333333333
215785744
22565567.666666666667-2.66666666666668
23547552.666666666667-5.66666666666669
24555556.666666666667-1.66666666666668
25562560.251.75000000000018
26561558.9166666666672.08333333333331
27555552.9166666666672.08333333333332
28544545.916666666667-1.91666666666668
29537538.916666666667-1.91666666666667
30543543.25-0.250000000000004
31594601.25-7.25000000000003
32611613.25-2.25000000000003
33613612.5833333333330.416666666666659
34611606.254.74999999999998
35594591.252.74999999999998
36595595.25-0.250000000000023



Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
R code (references can be found in the software module):
library(lattice)
par1 <- as.numeric(par1)
x <- 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'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
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[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
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')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
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')
qqnorm(mysum$resid, main='Residual Normal Q-Q 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)
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()
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, mysum$coefficients[i,1], 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.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('ols1.htm','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,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
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, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
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, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
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,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')