Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_multipleregression.wasp
Title produced by softwareMultiple Regression
Date of computationWed, 21 Nov 2007 05:32:12 -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/21/t11956479810qwxts28vewqko6.htm/, Retrieved Wed, 08 May 2024 03:22:58 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=5845, Retrieved Wed, 08 May 2024 03:22:58 +0000
QR Codes:

Original text written by user:Werkloosheidscijfers 1982-2006 invloed invoering dienstencheques 2005
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact131
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Multiple Regression] [Seatbeltlaw-Q3] [2007-11-21 12:32:12] [4c115797c5b528fedc91527ab5de21b2] [Current]
Feedback Forum

Post a new message
Dataseries X:
588261	1
596397	1
576612	0
538141	0
491481	0
469740	0
474427	0
507632	0
541047	0
570046	0
588251	0
596872	0
588676	0
549738	0
472907	0
429496	0
402790	0
419304	0
459425	0
500845	0
516761	0
557423	0
595042	0
589496	0
535029	0




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=5845&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=5845&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=5845&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] = + 521435.337348363 + 70995.3633923778x[t] -67.8004938271601t + e[t]

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Estimated Regression Equation \tabularnewline
y[t] =  +  521435.337348363 +  70995.3633923778x[t] -67.8004938271601t  + e[t] \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=5845&T=1

[TABLE]
[ROW][C]Multiple Linear Regression - Estimated Regression Equation[/C][/ROW]
[ROW][C]y[t] =  +  521435.337348363 +  70995.3633923778x[t] -67.8004938271601t  + e[t][/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=5845&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=5845&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] = + 521435.337348363 + 70995.3633923778x[t] -67.8004938271601t + e[t]







Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STATH0: parameter = 02-tail p-value1-tail p-value
(Intercept)521435.33734836329113.94795617.910200
x70995.363392377849950.354741.42130.1692450.084623
t-67.80049382716011879.212152-0.03610.9715450.485772

\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) & 521435.337348363 & 29113.947956 & 17.9102 & 0 & 0 \tabularnewline
x & 70995.3633923778 & 49950.35474 & 1.4213 & 0.169245 & 0.084623 \tabularnewline
t & -67.8004938271601 & 1879.212152 & -0.0361 & 0.971545 & 0.485772 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=5845&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]521435.337348363[/C][C]29113.947956[/C][C]17.9102[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]x[/C][C]70995.3633923778[/C][C]49950.35474[/C][C]1.4213[/C][C]0.169245[/C][C]0.084623[/C][/ROW]
[ROW][C]t[/C][C]-67.8004938271601[/C][C]1879.212152[/C][C]-0.0361[/C][C]0.971545[/C][C]0.485772[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=5845&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=5845&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)521435.33734836329113.94795617.910200
x70995.363392377849950.354741.42130.1692450.084623
t-67.80049382716011879.212152-0.03610.9715450.485772







Multiple Linear Regression - Regression Statistics
Multiple R0.328285962584027
R-squared0.107771673229721
Adjusted R-squared0.0266600071596959
F-TEST (value)1.32868277094296
F-TEST (DF numerator)2
F-TEST (DF denominator)22
p-value0.285256848472841
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation59796.1645267063
Sum Squared Residuals78662788426.3084

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Regression Statistics \tabularnewline
Multiple R & 0.328285962584027 \tabularnewline
R-squared & 0.107771673229721 \tabularnewline
Adjusted R-squared & 0.0266600071596959 \tabularnewline
F-TEST (value) & 1.32868277094296 \tabularnewline
F-TEST (DF numerator) & 2 \tabularnewline
F-TEST (DF denominator) & 22 \tabularnewline
p-value & 0.285256848472841 \tabularnewline
Multiple Linear Regression - Residual Statistics \tabularnewline
Residual Standard Deviation & 59796.1645267063 \tabularnewline
Sum Squared Residuals & 78662788426.3084 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=5845&T=3

[TABLE]
[ROW][C]Multiple Linear Regression - Regression Statistics[/C][/ROW]
[ROW][C]Multiple R[/C][C]0.328285962584027[/C][/ROW]
[ROW][C]R-squared[/C][C]0.107771673229721[/C][/ROW]
[ROW][C]Adjusted R-squared[/C][C]0.0266600071596959[/C][/ROW]
[ROW][C]F-TEST (value)[/C][C]1.32868277094296[/C][/ROW]
[ROW][C]F-TEST (DF numerator)[/C][C]2[/C][/ROW]
[ROW][C]F-TEST (DF denominator)[/C][C]22[/C][/ROW]
[ROW][C]p-value[/C][C]0.285256848472841[/C][/ROW]
[ROW][C]Multiple Linear Regression - Residual Statistics[/C][/ROW]
[ROW][C]Residual Standard Deviation[/C][C]59796.1645267063[/C][/ROW]
[ROW][C]Sum Squared Residuals[/C][C]78662788426.3084[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=5845&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=5845&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.328285962584027
R-squared0.107771673229721
Adjusted R-squared0.0266600071596959
F-TEST (value)1.32868277094296
F-TEST (DF numerator)2
F-TEST (DF denominator)22
p-value0.285256848472841
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation59796.1645267063
Sum Squared Residuals78662788426.3084







Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolationForecastResidualsPrediction Error
1588261592362.900246914-4101.90024691353
2596397592295.0997530864101.90024691352
3576612521231.93586688155380.0641331186
4538141521164.13537305416976.8646269458
5491481521096.334879227-29615.3348792271
6469740521028.5343854-51288.5343853999
7474427520960.733891573-46533.7338915727
8507632520892.933397746-13260.9333977456
9541047520825.13290391820221.8670960816
10570046520757.33241009149288.6675899087
11588251520689.53191626467561.4680837359
12596872520621.73142243776250.2685775631
13588676520553.9309286168122.0690713902
14549738520486.13043478329251.8695652174
15472907520418.329940955-47511.3299409555
16429496520350.529447128-90854.5294471283
17402790520282.728953301-117492.728953301
18419304520214.928459474-100910.928459474
19459425520147.127965647-60722.1279656468
20500845520079.32747182-19234.3274718196
21516761520011.526977993-3250.52697799248
22557423519943.72648416537479.2735158347
23595042519875.92599033875166.0740096618
24589496519808.12549651169687.874503489
25535029519740.32500268415288.6749973162

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Actuals, Interpolation, and Residuals \tabularnewline
Time or Index & Actuals & InterpolationForecast & ResidualsPrediction Error \tabularnewline
1 & 588261 & 592362.900246914 & -4101.90024691353 \tabularnewline
2 & 596397 & 592295.099753086 & 4101.90024691352 \tabularnewline
3 & 576612 & 521231.935866881 & 55380.0641331186 \tabularnewline
4 & 538141 & 521164.135373054 & 16976.8646269458 \tabularnewline
5 & 491481 & 521096.334879227 & -29615.3348792271 \tabularnewline
6 & 469740 & 521028.5343854 & -51288.5343853999 \tabularnewline
7 & 474427 & 520960.733891573 & -46533.7338915727 \tabularnewline
8 & 507632 & 520892.933397746 & -13260.9333977456 \tabularnewline
9 & 541047 & 520825.132903918 & 20221.8670960816 \tabularnewline
10 & 570046 & 520757.332410091 & 49288.6675899087 \tabularnewline
11 & 588251 & 520689.531916264 & 67561.4680837359 \tabularnewline
12 & 596872 & 520621.731422437 & 76250.2685775631 \tabularnewline
13 & 588676 & 520553.93092861 & 68122.0690713902 \tabularnewline
14 & 549738 & 520486.130434783 & 29251.8695652174 \tabularnewline
15 & 472907 & 520418.329940955 & -47511.3299409555 \tabularnewline
16 & 429496 & 520350.529447128 & -90854.5294471283 \tabularnewline
17 & 402790 & 520282.728953301 & -117492.728953301 \tabularnewline
18 & 419304 & 520214.928459474 & -100910.928459474 \tabularnewline
19 & 459425 & 520147.127965647 & -60722.1279656468 \tabularnewline
20 & 500845 & 520079.32747182 & -19234.3274718196 \tabularnewline
21 & 516761 & 520011.526977993 & -3250.52697799248 \tabularnewline
22 & 557423 & 519943.726484165 & 37479.2735158347 \tabularnewline
23 & 595042 & 519875.925990338 & 75166.0740096618 \tabularnewline
24 & 589496 & 519808.125496511 & 69687.874503489 \tabularnewline
25 & 535029 & 519740.325002684 & 15288.6749973162 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=5845&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]588261[/C][C]592362.900246914[/C][C]-4101.90024691353[/C][/ROW]
[ROW][C]2[/C][C]596397[/C][C]592295.099753086[/C][C]4101.90024691352[/C][/ROW]
[ROW][C]3[/C][C]576612[/C][C]521231.935866881[/C][C]55380.0641331186[/C][/ROW]
[ROW][C]4[/C][C]538141[/C][C]521164.135373054[/C][C]16976.8646269458[/C][/ROW]
[ROW][C]5[/C][C]491481[/C][C]521096.334879227[/C][C]-29615.3348792271[/C][/ROW]
[ROW][C]6[/C][C]469740[/C][C]521028.5343854[/C][C]-51288.5343853999[/C][/ROW]
[ROW][C]7[/C][C]474427[/C][C]520960.733891573[/C][C]-46533.7338915727[/C][/ROW]
[ROW][C]8[/C][C]507632[/C][C]520892.933397746[/C][C]-13260.9333977456[/C][/ROW]
[ROW][C]9[/C][C]541047[/C][C]520825.132903918[/C][C]20221.8670960816[/C][/ROW]
[ROW][C]10[/C][C]570046[/C][C]520757.332410091[/C][C]49288.6675899087[/C][/ROW]
[ROW][C]11[/C][C]588251[/C][C]520689.531916264[/C][C]67561.4680837359[/C][/ROW]
[ROW][C]12[/C][C]596872[/C][C]520621.731422437[/C][C]76250.2685775631[/C][/ROW]
[ROW][C]13[/C][C]588676[/C][C]520553.93092861[/C][C]68122.0690713902[/C][/ROW]
[ROW][C]14[/C][C]549738[/C][C]520486.130434783[/C][C]29251.8695652174[/C][/ROW]
[ROW][C]15[/C][C]472907[/C][C]520418.329940955[/C][C]-47511.3299409555[/C][/ROW]
[ROW][C]16[/C][C]429496[/C][C]520350.529447128[/C][C]-90854.5294471283[/C][/ROW]
[ROW][C]17[/C][C]402790[/C][C]520282.728953301[/C][C]-117492.728953301[/C][/ROW]
[ROW][C]18[/C][C]419304[/C][C]520214.928459474[/C][C]-100910.928459474[/C][/ROW]
[ROW][C]19[/C][C]459425[/C][C]520147.127965647[/C][C]-60722.1279656468[/C][/ROW]
[ROW][C]20[/C][C]500845[/C][C]520079.32747182[/C][C]-19234.3274718196[/C][/ROW]
[ROW][C]21[/C][C]516761[/C][C]520011.526977993[/C][C]-3250.52697799248[/C][/ROW]
[ROW][C]22[/C][C]557423[/C][C]519943.726484165[/C][C]37479.2735158347[/C][/ROW]
[ROW][C]23[/C][C]595042[/C][C]519875.925990338[/C][C]75166.0740096618[/C][/ROW]
[ROW][C]24[/C][C]589496[/C][C]519808.125496511[/C][C]69687.874503489[/C][/ROW]
[ROW][C]25[/C][C]535029[/C][C]519740.325002684[/C][C]15288.6749973162[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=5845&T=4

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=5845&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
1588261592362.900246914-4101.90024691353
2596397592295.0997530864101.90024691352
3576612521231.93586688155380.0641331186
4538141521164.13537305416976.8646269458
5491481521096.334879227-29615.3348792271
6469740521028.5343854-51288.5343853999
7474427520960.733891573-46533.7338915727
8507632520892.933397746-13260.9333977456
9541047520825.13290391820221.8670960816
10570046520757.33241009149288.6675899087
11588251520689.53191626467561.4680837359
12596872520621.73142243776250.2685775631
13588676520553.9309286168122.0690713902
14549738520486.13043478329251.8695652174
15472907520418.329940955-47511.3299409555
16429496520350.529447128-90854.5294471283
17402790520282.728953301-117492.728953301
18419304520214.928459474-100910.928459474
19459425520147.127965647-60722.1279656468
20500845520079.32747182-19234.3274718196
21516761520011.526977993-3250.52697799248
22557423519943.72648416537479.2735158347
23595042519875.92599033875166.0740096618
24589496519808.12549651169687.874503489
25535029519740.32500268415288.6749973162



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