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 computationMon, 05 Nov 2012 14:33:17 -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/05/t13521440414hc7iq60xyiygrk.htm/, Retrieved Sun, 05 Feb 2023 23:33:59 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=186256, Retrieved Sun, 05 Feb 2023 23:33:59 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact63
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Multiple Regression] [] [2010-11-17 09:55:05] [b98453cac15ba1066b407e146608df68]
- R PD    [Multiple Regression] [Pop] [2012-11-05 19:33:17] [c63d55528b56cf8bb48e0b5d1a959d8e] [Current]
Feedback Forum

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




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'George Udny Yule' @ yule.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 & 5 seconds \tabularnewline
R Server & 'George Udny Yule' @ yule.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=186256&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]5 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ yule.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=186256&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=186256&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 time5 seconds
R Server'George Udny Yule' @ yule.wessa.net



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