Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_multipleregression.wasp
Title produced by softwareMultiple Regression
Date of computationMon, 19 Nov 2007 12:39:56 -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/19/t1195500874969nha7d2aznxsx.htm/, Retrieved Fri, 03 May 2024 09:51:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=5774, Retrieved Fri, 03 May 2024 09:51:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsQ3, workshop 8, lissabon, strategie
Estimated Impact192
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Multiple Regression] [Q3_WS8_LisStrat_9/11] [2007-11-19 19:39:56] [0ea70c1b491052c6d2a865ea09f80161] [Current]
Feedback Forum

Post a new message
Dataseries X:
513	0	2
503	0	2
471	0	2
471	0	2
476	0	2
475	0	2
470	0	2
461	0	2
455	0	2
456	0	2
517	0	2
525	0	1
523	0	1
519	0	1
509	0	1
512	0	1
519	0	1
517	0	1
510	0	1
509	0	1
501	0	1
507	0	1
569	0	1
580	0	1
578	0	1
565	0	1
547	0	1
555	0	1
562	0	0
561	0	0
555	0	0
544	0	0
537	0	0
543	0	0
594	0	0
611	0	0
613	0	0
611	0	0
594	0	0
595	0	0
591	0	0
589	0	0
584	0	0
573	0	0
567	0	0
569	0	0
621	0	0
629	0	0
628	0	0
612	0	0
595	1	0
597	1	0
593	1	0
590	1	0
580	1	0
574	1	0
573	1	0
573	1	0
620	1	0
626	1	0
620	1	0
588	1	0
566	1	0
557	1	0
561	1	0
549	1	0
532	1	0
526	1	0
511	1	0
499	1	0
555	1	0
565	1	0
542	1	0




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 6 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=5774&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]6 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=5774&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=5774&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 time6 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







Multiple Linear Regression - Estimated Regression Equation
Werklh[t] = + 618.793991160117 -10.1901969858548LisStrat[t] -55.9757379424133`9/11`[t] -3.51547013018365M1[t] -7.80296451303514M2[t] -25.2616139157730M3[t] -24.2519628161533M4[t] -30.9049347069358M5[t] -34.2286169406494M6[t] -42.3856325076963M7[t] -49.5426480747433M8[t] -56.5329969751236M9[t] -55.8566792088372M10[t] -0.847028109217495M11[t] -0.176317766286378t + e[t]

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Estimated Regression Equation \tabularnewline
Werklh[t] =  +  618.793991160117 -10.1901969858548LisStrat[t] -55.9757379424133`9/11`[t] -3.51547013018365M1[t] -7.80296451303514M2[t] -25.2616139157730M3[t] -24.2519628161533M4[t] -30.9049347069358M5[t] -34.2286169406494M6[t] -42.3856325076963M7[t] -49.5426480747433M8[t] -56.5329969751236M9[t] -55.8566792088372M10[t] -0.847028109217495M11[t] -0.176317766286378t  + e[t] \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=5774&T=1

[TABLE]
[ROW][C]Multiple Linear Regression - Estimated Regression Equation[/C][/ROW]
[ROW][C]Werklh[t] =  +  618.793991160117 -10.1901969858548LisStrat[t] -55.9757379424133`9/11`[t] -3.51547013018365M1[t] -7.80296451303514M2[t] -25.2616139157730M3[t] -24.2519628161533M4[t] -30.9049347069358M5[t] -34.2286169406494M6[t] -42.3856325076963M7[t] -49.5426480747433M8[t] -56.5329969751236M9[t] -55.8566792088372M10[t] -0.847028109217495M11[t] -0.176317766286378t  + e[t][/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=5774&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=5774&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
Werklh[t] = + 618.793991160117 -10.1901969858548LisStrat[t] -55.9757379424133`9/11`[t] -3.51547013018365M1[t] -7.80296451303514M2[t] -25.2616139157730M3[t] -24.2519628161533M4[t] -30.9049347069358M5[t] -34.2286169406494M6[t] -42.3856325076963M7[t] -49.5426480747433M8[t] -56.5329969751236M9[t] -55.8566792088372M10[t] -0.847028109217495M11[t] -0.176317766286378t + e[t]







Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STATH0: parameter = 02-tail p-value1-tail p-value
(Intercept)618.79399116011720.83446229.700500
LisStrat-10.190196985854812.609701-0.80810.4223220.211161
`9/11`-55.97573794241338.851151-6.324100
M1-3.5154701301836512.34479-0.28480.7768320.388416
M2-7.8029645130351412.842065-0.60760.5458180.272909
M3-25.261613915773012.944365-1.95160.0558260.027913
M4-24.251962816153312.896758-1.88050.0650680.032534
M5-30.904934706935812.943757-2.38760.0202360.010118
M6-34.228616940649412.882318-2.6570.0101670.005083
M7-42.385632507696312.837414-3.30170.0016480.000824
M8-49.542648074743312.80922-3.86770.000280.00014
M9-56.532996975123612.797847-4.41744.4e-052.2e-05
M10-55.856679208837212.80334-4.36275.3e-052.7e-05
M11-0.84702810921749512.825676-0.0660.9475720.473786
t-0.1763177662863780.464671-0.37940.7057420.352871

\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) & 618.793991160117 & 20.834462 & 29.7005 & 0 & 0 \tabularnewline
LisStrat & -10.1901969858548 & 12.609701 & -0.8081 & 0.422322 & 0.211161 \tabularnewline
`9/11` & -55.9757379424133 & 8.851151 & -6.3241 & 0 & 0 \tabularnewline
M1 & -3.51547013018365 & 12.34479 & -0.2848 & 0.776832 & 0.388416 \tabularnewline
M2 & -7.80296451303514 & 12.842065 & -0.6076 & 0.545818 & 0.272909 \tabularnewline
M3 & -25.2616139157730 & 12.944365 & -1.9516 & 0.055826 & 0.027913 \tabularnewline
M4 & -24.2519628161533 & 12.896758 & -1.8805 & 0.065068 & 0.032534 \tabularnewline
M5 & -30.9049347069358 & 12.943757 & -2.3876 & 0.020236 & 0.010118 \tabularnewline
M6 & -34.2286169406494 & 12.882318 & -2.657 & 0.010167 & 0.005083 \tabularnewline
M7 & -42.3856325076963 & 12.837414 & -3.3017 & 0.001648 & 0.000824 \tabularnewline
M8 & -49.5426480747433 & 12.80922 & -3.8677 & 0.00028 & 0.00014 \tabularnewline
M9 & -56.5329969751236 & 12.797847 & -4.4174 & 4.4e-05 & 2.2e-05 \tabularnewline
M10 & -55.8566792088372 & 12.80334 & -4.3627 & 5.3e-05 & 2.7e-05 \tabularnewline
M11 & -0.847028109217495 & 12.825676 & -0.066 & 0.947572 & 0.473786 \tabularnewline
t & -0.176317766286378 & 0.464671 & -0.3794 & 0.705742 & 0.352871 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=5774&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]618.793991160117[/C][C]20.834462[/C][C]29.7005[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]LisStrat[/C][C]-10.1901969858548[/C][C]12.609701[/C][C]-0.8081[/C][C]0.422322[/C][C]0.211161[/C][/ROW]
[ROW][C]`9/11`[/C][C]-55.9757379424133[/C][C]8.851151[/C][C]-6.3241[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]M1[/C][C]-3.51547013018365[/C][C]12.34479[/C][C]-0.2848[/C][C]0.776832[/C][C]0.388416[/C][/ROW]
[ROW][C]M2[/C][C]-7.80296451303514[/C][C]12.842065[/C][C]-0.6076[/C][C]0.545818[/C][C]0.272909[/C][/ROW]
[ROW][C]M3[/C][C]-25.2616139157730[/C][C]12.944365[/C][C]-1.9516[/C][C]0.055826[/C][C]0.027913[/C][/ROW]
[ROW][C]M4[/C][C]-24.2519628161533[/C][C]12.896758[/C][C]-1.8805[/C][C]0.065068[/C][C]0.032534[/C][/ROW]
[ROW][C]M5[/C][C]-30.9049347069358[/C][C]12.943757[/C][C]-2.3876[/C][C]0.020236[/C][C]0.010118[/C][/ROW]
[ROW][C]M6[/C][C]-34.2286169406494[/C][C]12.882318[/C][C]-2.657[/C][C]0.010167[/C][C]0.005083[/C][/ROW]
[ROW][C]M7[/C][C]-42.3856325076963[/C][C]12.837414[/C][C]-3.3017[/C][C]0.001648[/C][C]0.000824[/C][/ROW]
[ROW][C]M8[/C][C]-49.5426480747433[/C][C]12.80922[/C][C]-3.8677[/C][C]0.00028[/C][C]0.00014[/C][/ROW]
[ROW][C]M9[/C][C]-56.5329969751236[/C][C]12.797847[/C][C]-4.4174[/C][C]4.4e-05[/C][C]2.2e-05[/C][/ROW]
[ROW][C]M10[/C][C]-55.8566792088372[/C][C]12.80334[/C][C]-4.3627[/C][C]5.3e-05[/C][C]2.7e-05[/C][/ROW]
[ROW][C]M11[/C][C]-0.847028109217495[/C][C]12.825676[/C][C]-0.066[/C][C]0.947572[/C][C]0.473786[/C][/ROW]
[ROW][C]t[/C][C]-0.176317766286378[/C][C]0.464671[/C][C]-0.3794[/C][C]0.705742[/C][C]0.352871[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=5774&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=5774&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)618.79399116011720.83446229.700500
LisStrat-10.190196985854812.609701-0.80810.4223220.211161
`9/11`-55.97573794241338.851151-6.324100
M1-3.5154701301836512.34479-0.28480.7768320.388416
M2-7.8029645130351412.842065-0.60760.5458180.272909
M3-25.261613915773012.944365-1.95160.0558260.027913
M4-24.251962816153312.896758-1.88050.0650680.032534
M5-30.904934706935812.943757-2.38760.0202360.010118
M6-34.228616940649412.882318-2.6570.0101670.005083
M7-42.385632507696312.837414-3.30170.0016480.000824
M8-49.542648074743312.80922-3.86770.000280.00014
M9-56.532996975123612.797847-4.41744.4e-052.2e-05
M10-55.856679208837212.80334-4.36275.3e-052.7e-05
M11-0.84702810921749512.825676-0.0660.9475720.473786
t-0.1763177662863780.464671-0.37940.7057420.352871







Multiple Linear Regression - Regression Statistics
Multiple R0.903750956405106
R-squared0.816765791203144
Adjusted R-squared0.772536844252179
F-TEST (value)18.4667700116997
F-TEST (DF numerator)14
F-TEST (DF denominator)58
p-value2.22044604925031e-16
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation22.1354498812648
Sum Squared Residuals28418.7322038673

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Regression Statistics \tabularnewline
Multiple R & 0.903750956405106 \tabularnewline
R-squared & 0.816765791203144 \tabularnewline
Adjusted R-squared & 0.772536844252179 \tabularnewline
F-TEST (value) & 18.4667700116997 \tabularnewline
F-TEST (DF numerator) & 14 \tabularnewline
F-TEST (DF denominator) & 58 \tabularnewline
p-value & 2.22044604925031e-16 \tabularnewline
Multiple Linear Regression - Residual Statistics \tabularnewline
Residual Standard Deviation & 22.1354498812648 \tabularnewline
Sum Squared Residuals & 28418.7322038673 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=5774&T=3

[TABLE]
[ROW][C]Multiple Linear Regression - Regression Statistics[/C][/ROW]
[ROW][C]Multiple R[/C][C]0.903750956405106[/C][/ROW]
[ROW][C]R-squared[/C][C]0.816765791203144[/C][/ROW]
[ROW][C]Adjusted R-squared[/C][C]0.772536844252179[/C][/ROW]
[ROW][C]F-TEST (value)[/C][C]18.4667700116997[/C][/ROW]
[ROW][C]F-TEST (DF numerator)[/C][C]14[/C][/ROW]
[ROW][C]F-TEST (DF denominator)[/C][C]58[/C][/ROW]
[ROW][C]p-value[/C][C]2.22044604925031e-16[/C][/ROW]
[ROW][C]Multiple Linear Regression - Residual Statistics[/C][/ROW]
[ROW][C]Residual Standard Deviation[/C][C]22.1354498812648[/C][/ROW]
[ROW][C]Sum Squared Residuals[/C][C]28418.7322038673[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=5774&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=5774&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.903750956405106
R-squared0.816765791203144
Adjusted R-squared0.772536844252179
F-TEST (value)18.4667700116997
F-TEST (DF numerator)14
F-TEST (DF denominator)58
p-value2.22044604925031e-16
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation22.1354498812648
Sum Squared Residuals28418.7322038673



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')