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 computationFri, 16 Nov 2012 10:39:31 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Nov/16/t13530803920banxcifxj4o2ll.htm/, Retrieved Sat, 27 Apr 2024 08:56:11 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=189966, Retrieved Sat, 27 Apr 2024 08:56:11 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact81
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Multiple Regression] [Competence to learn] [2010-11-17 07:43:53] [b98453cac15ba1066b407e146608df68]
- R PD  [Multiple Regression] [] [2012-11-16 10:35:30] [6808ef3204f32b6b44f616bd4c52b0ae]
-   P     [Multiple Regression] [] [2012-11-16 15:07:35] [6808ef3204f32b6b44f616bd4c52b0ae]
-   PD        [Multiple Regression] [] [2012-11-16 15:39:31] [00ffffaac852cc6d7cd42123567c45a2] [Current]
Feedback Forum

Post a new message
Dataseries X:
46,8	46,6	39,8	45,5	59,9	47,9	19,9	39,3	28,2	40
47,9	48,3	36,7	45,3	61,6	46,8	19,6	40,3	28,9	41
48,5	51,3	35,4	46,7	62,6	49	19,6	32,4	30	32,6
49,7	48,3	37,1	47,3	62,8	49,6	20,6	32,7	32,8	32,7
48	44,9	37,9	46,5	61,5	48,9	20,1	34,5	33,6	34,6
48,2	43,9	36,8	44,8	60	46,6	19,8	32,4	34	32,3
47,3	43,2	35,8	44,1	58,5	46,1	19,6	33,1	34,3	33,1
46,6	44,6	36,7	43,9	55,7	47,2	19,7	34,9	34,8	34,9
45,6	46,5	34,6	42,3	53,8	45	19,9	34,1	35	34,1
47,7	50,4	33,2	40,9	52,4	43,1	20,1	31,9	34,6	31,7
48,1	50	32,9	39,8	51,2	41,7	20	32,7	34,5	32,6
47,6	47,6	32	38,9	50,1	40,4	20	32,5	34,1	32,4
46,3	45,2	31,6	37,8	49,5	38,7	19,9	27,2	32,9	26,9
46,1	46,5	33,8	38,4	49,2	40,1	19,5	24,3	32,4	23,8
46,7	45,2	34,5	38,3	47,8	40,7	19,5	24	30,2	23,7
47,1	45,4	34,7	38,9	48,6	41,8	18,9	24,7	28,9	24,5
46,7	44,8	34,8	39,4	49,8	41,9	19,2	25,6	29,8	25,3
46,3	46,7	37,2	40,6	51,2	43,3	19,5	30,1	30,1	30,1
45,9	47,4	37,2	40,3	51	42,7	20	32,1	29,5	32,3
46,6	48,9	36,2	40,1	50,9	41,9	20,8	32,3	28,5	32,5
49	51,1	35,9	40,9	52,3	42,6	21,3	31	27,9	31,2
54,1	55,6	37,4	41	53,5	42,1	21,6	32,2	26,2	32,5
59,2	55,5	37,2	39,9	53,1	40,2	21,6	33,2	24,6	33,8
63,8	55	41,3	40,2	53,6	40,4	21,6	35,2	25,1	35,8
62,5	52,6	43,2	40,3	53,4	40,7	21,5	34,2	25,6	34,7
59,5	54,1	42,1	41,6	54,4	42,8	21,6	31	27,1	31,2
56,9	53,9	42,4	41,8	54,7	43	21,7	34,1	27,3	34,6
54,4	54,1	44,6	43,2	56,9	43,6	23,7	37,8	27,4	38,5
54,7	55	46	44,8	59,1	45,1	24,9	40,6	27,3	41,4
53,3	54,4	41,8	45,1	61,4	44,1	25,4	37,5	26,8	38,1
52,9	56,5	41,4	44,3	62,1	42,3	25,3	31,8	26,1	32,2
54,8	59,6	40,7	45,4	63,2	44,2	24,5	32,4	25,9	32,8
52,6	59,1	37,2	45,5	63,1	44,9	23,3	34,6	26,7	35,1
49,1	55,7	38,4	45,6	61,9	45,8	23,4	35,6	27,5	36,1
52,6	54,3	38,7	46,3	61,9	46,7	24,4	37	28,4	37,5
53,6	58,9	39,6	46,6	63,1	46,3	25,2	33,8	30	34
52,7	68,6	37,6	49,2	66,6	49,1	26,2	36,2	31,1	36,5
55,8	71,8	37	50,4	67,4	50,9	26,3	36,6	33,6	36,8
57,9	71,8	38,6	51,7	65,9	53,7	27,3	37,8	38,3	37,8
60,6	76,7	41,2	54,7	67,8	56,8	31,8	39,8	42,9	39,6
61,9	79,9	41,2	57,6	69,1	60,2	35,5	39,7	44,3	39,4
65,5	90,4	41,9	58,2	70	60	38,1	42,8	53	42,1
67,5	92,1	40,9	58	69,9	60,7	35,5	43,4	55,6	42,6
65,5	88,5	41,2	55,6	70,7	56,7	32,5	47,8	58,8	47,1
62,2	81,8	43,1	56,6	71,2	59	31,1	46,3	64,4	45,2
55,5	74,5	42,7	58,2	71	60,9	34,4	48,6	63,3	47,8
52,3	58,7	43,3	57,9	69,4	59,9	37,1	53,1	58,7	52,8
52,5	54,6	44	58,3	70,1	60,6	36,6	52,7	57,4	52,4
50,8	51,8	44,1	60,1	69,4	64	37,9	59	55,3	59,2
50,9	52,1	47,3	61,2	69,7	64,3	41,9	53,9	53,3	54
51,5	52,8	51	60,9	69,3	65,1	39	49,7	53,2	49,5
51,1	51,9	50,9	63,9	71,6	65,5	49,3	54,3	50,9	54,5
51,1	52,7	55,1	65,4	73,6	67,4	49,5	55,9	48,4	56,3
54,3	60,8	60,5	67,4	74,8	70,7	49,3	63,9	51,8	64,6
51,9	60,3	57,5	66,1	74,1	68,6	49,2	64	51,6	64,7
52,4	61,8	57,6	62,5	70,7	65,2	44,6	60,7	52,4	61,2
53,4	66,6	56,9	61,3	67,8	65,6	41,8	67,8	52,9	68,7
56	66,1	54,1	61,7	69,1	65,8	41,5	70,5	52,8	71,5
53,4	60,6	53,3	64,4	69,5	68,9	46,4	76,6	48	78,3
53,8	56,2	51,8	65	69,6	68,5	50,1	76,2	46,3	78,1
53,8	55,2	53,6	65,8	71,4	70,6	46,1	71,8	42	73,6
51,6	55,7	54,8	67,6	70,4	74,1	47,7	67,8	38,6	69,6
54,2	58	57,3	71,3	71,1	81,1	47,2	69,7	41,3	71,5
55,7	57,1	65	75,5	74	85,8	51,9	76,7	45,3	78,7
59,2	56,8	65,3	77,8	75,2	89,3	52,6	74,2	49,9	75,7
59,8	56,1	62,9	78,1	75	89,6	53,7	75,8	53,8	77,1
61,6	55,5	63,5	85	75,1	102,6	54,8	84,3	55,1	86,1
65,8	57	62,1	93,7	78	117,7	55,4	84,9	52,9	86,8
64,2	57	59,3	87,4	80	104,1	55,9	84,4	53,5	86,3
67	56,5	61,6	91,8	82,4	111	56,8	89,4	53,8	91,5
62,8	54,2	61,5	91,9	82,4	112,2	54,1	88,5	52	90,7
65,5	53,9	60,1	90,9	79,7	112	53,2	76,5	48,2	78,2
75,2	58	59,5	94,5	80,6	118,4	53,7	71,4	45,5	73
80,9	64,1	62,7	94,5	80,9	118,4	53,5	72,1	45,7	73,7
83,2	63,4	65,5	96,8	84,1	120,8	53,9	75,8	52,5	77,3
83,7	67,2	63,8	96,6	89,1	116,1	58,4	66,6	52,3	67,5
86,4	72	63,8	98,3	90,6	118	59,3	71,7	54,8	72,7
85,9	72,1	62,7	101,6	90,7	122,7	63,9	75,4	54,7	76,6
80,4	70	62,3	107,7	94,6	132,4	64	80,9	54,9	82,4
81,8	73,9	62,4	108,1	95,4	133,7	61,5	80,7	54,9	82,3
87,5	79,1	64,8	102,6	94,1	124,2	60,5	85	64,2	86,3
83,7	81,1	66,4	103	96,2	123,7	60,8	91,5	66,4	93
87	81,1	65,1	97,3	95,5	113,2	60,3	87,7	69,1	88,8
99,7	90,3	67,4	96,2	94,3	111,5	61,1	95,3	68,3	96,9
101,4	94,2	68,8	98,5	94,2	115,7	61,3	102,4	77,3	103,9
101,9	100,8	68,6	96,2	95,1	111	61	114,2	89,6	115,7
115,7	108,4	71,5	92,7	96,6	103,1	61,4	111,7	93	112,8
123,2	119,6	75	101,3	95,9	107,3	93,6	113,7	96,1	114,7
136,9	128,8	84,3	106,9	94	118,9	94,3	118,8	131,3	118
146,8	127,9	84	112,6	94,9	128,3	97,3	129	125,3	129,3
149,6	123,9	79,1	113,2	95,2	126,5	104,6	136,4	126	137
146,5	125,4	78,8	112,9	95,8	121,7	113,8	155	138,3	156
157	139,5	82,7	112,3	97,9	119,5	113,8	166	163	166,2
147,9	139	85,3	113,2	98,3	121,4	113,1	168,7	182,5	167,8
133,6	117,3	84,5	105	93,7	110,3	107,2	145,5	164,6	144,3
128,7	108,1	80,8	96,7	91,7	101,5	91,6	127,3	148,8	126
100,8	85,4	70,1	79,2	80,1	78,5	79,7	91,5	109,3	90,4
91,8	82,8	68,2	69,4	71,1	66,8	73,7	69	93,5	67,5
89,3	80	68,1	63,1	67,1	55,2	77,4	54	80,2	52,4
96,7	92,6	72,3	60,1	66	55,3	63,9	56,3	84	54,6
91,6	88,2	73,1	58,2	62,9	53,1	64,5	54,2	75,5	52,9
93,3	85,2	71,5	59,2	62,9	55,2	64,1	59,3	62,4	59,1
93,3	96,5	74,1	62,6	63,9	61,2	64,5	63,4	64,2	63,3
101	109,1	80,3	65,1	66,2	64,1	65,9	73,3	64,7	73,8
100,4	115,6	80,6	69,4	69,5	70,4	66,8	86,7	71	87,6
86,9	100	81,4	72,3	72,8	73,6	68,7	81,3	73,7	81,8
83,9	101,8	87,4	80,6	78	86,2	70,2	89,6	72,6	90,7
80,3	88,8	89,3	80,4	82,2	83,5	70,6	85,3	68,1	86,3
87,7	90,9	93,2	82,6	86,3	85,9	69,6	92,4	72,3	93,6
92,7	95,7	92,8	85,1	90,3	88,6	69,2	96,8	78,5	98
95,5	97,7	96,8	89,3	92,2	95,2	70,7	93,6	81,9	94,3
92	93,4	100,3	91,8	93,1	99,5	70,7	97,6	97,8	97,6
87,4	89,7	95,6	87,9	92,4	92,2	71	94,2	93,1	94,2
86,8	89,7	89	93,5	96	100,7	72,1	99,9	94,2	100,2
83,7	92,5	87,4	103,7	99,6	106,6	101,7	106,4	101,1	106,7
85	90,9	86,7	96,4	96,6	93,6	103	96	101	95,7
81,7	91,7	92,8	93,1	96,3	87,3	103,1	94,9	99,7	94,6
90,9	95,8	98,6	98	98,7	90,1	116,5	94,8	97,1	94,7
101,5	99,5	100,8	102,1	100,4	97,1	116,9	95,9	91,7	96,2
113,8	101,5	105,5	104,9	102	101,3	117,6	96,2	95	96,3
120,1	110,6	107,8	108,6	107,1	109,5	108,3	103,1	98,9	103,3
122,1	119	113,7	108,6	108,2	109,2	107,7	106,9	109	106,8
132,5	124,5	120,3	110,9	108,6	113	108,8	114,2	121,9	113,7
140	133,4	126,5	116,5	112,9	118,2	117,1	118,2	131,5	117,4
149,4	133,3	134,8	120,2	116,4	123,1	118,3	123,9	128,5	123,6
144,3	127,8	134,5	118,9	114,1	121,5	118,8	137,1	128,4	137,6
154,4	127,3	133,1	124,7	118,1	123,8	135,8	146,2	126,4	147,4
151,4	127,6	128,8	120,5	115	117,8	134,6	136,4	123,1	137,2
145,5	126,3	127,1	119,9	116	116	134,8	133,2	123	133,8
136,8	125,1	129,1	120,5	114,1	119,1	132,7	135,9	123,3	136,7
146,6	124,7	128,4	117,3	113,5	112,1	135,7	127,1	123,6	127,3
145,1	121,9	126,5	113,1	110	105,4	136,2	128,5	124,9	128,7
133,6	111,2	117,1	104	105,1	97	120	126,6	120,4	127
131,4	108,5	114,2	99,2	97,7	95,2	111,3	132,6	114,9	133,7
127,5	105,9	109,1	97,6	94	94,1	111	130,9	113,4	132
130,1	111,9	110,3	100,9	93,8	99,8	113	134,1	117,6	135,1
131,1	116,6	109,2	103,8	96,5	103,9	113,2	141,1	117,4	142,6
132,3	125,6	103,6	103,7	97,7	102,4	115,1	147	109	149,3
128,6	133,7	98,9	101,8	98,2	98	116,1	141,3	105,6	143,5
125,1	132,6	95,9	98	95,4	94,8	109,6	129,6	99	131,4
128,7	132	91,2	93,4	90,4	89,4	107,3	113,3	89,8	114,7
156,1	150,4	98,7	92,3	88,9	89,6	103,4	120,5	90,9	122,3
163,2	155,7	94,5	88,5	86,8	88,2	91,6	131,2	93,6	133,4
159,8	153,4	95,6	92,2	88,1	97	85,7	132,1	91,2	134,6
157,4	141,1	93,8	93	89,6	94,9	92,9	128,3	85,4	130,9




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ fisher.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational 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 & 'Sir Ronald Aylmer Fisher' @ fisher.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=189966&T=0

[TABLE]
[ROW][C]Summary of computational 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]'Sir Ronald Aylmer Fisher' @ fisher.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=189966&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=189966&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 Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ fisher.wessa.net



Parameters (Session):
par1 = 8 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
Parameters (R input):
par1 = 8 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
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))
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')
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')
qqline(mysum$resid)
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()
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, 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')
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,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
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,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
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,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
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,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
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')
}