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, 28 Nov 2014 11:11:45 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2014/Nov/28/t1417173114mgri7l6uc1fjre2.htm/, Retrieved Sun, 19 May 2024 23:32:35 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=260831, Retrieved Sun, 19 May 2024 23:32:35 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact73
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Multiple Regression] [test] [2014-11-28 11:11:45] [52f27f122f36bfdf20d2404cd2faf7fa] [Current]
Feedback Forum

Post a new message
Dataseries X:
0,78	0,60	1,00	0,00	1,00	1,00																																													1974	122788
0,78	0,30	1,00	0,67	1,00	1,00																																													2084	220223
0,78	0,40	1,00	0,33	1,00	0,50																																													2473	252275
1,00	0,30	1,00	1,00	1,00	1,00																																													3036	248600
0,78	1,00	1,00	1,00	1,00	1,00																																													5262	522089
0,67	0,40	1,00	0,00	0,00	0,50																																													1389	84296
0,89	0,80	0,83	1,00	0,50	1,00																																													5973	431397
0,89	0,30	1,00	0,67	1,00	1,00																																													5687	530587
1,00	0,50	0,83	0,67	0,00	1,00																																													7124	775158
0,78	0,40	1,00	0,00	0,00	0,50																																													1067	84748
0,67	0,30	0,83	0,67	0,00	1,00																																													3498	300801
0,89	0,50	0,83	1,00	0,00	1,00																																													1329	107476
0,67	0,30	1,00	0,67	0,00	1,00																																													3077	277604
0,67	0,30	0,67	0,00	0,00	1,00																																													1802	164892
1,00	0,40	0,83	0,00	0,00	1,00																																													2098	217926
0,67	0,30	1,00	0,00	0,00	0,50																																													9459	641548
1,00	0,60	1,00	0,33	0,50	0,50																																													6635	575130
0,89	0,60	0,83	0,67	1,00	1,00																																													2145	205486
0,89	0,40	1,00	1,00	1,00	1,00																																													2047	152589
1,00	0,40	1,00	0,00	0,00	0,00																																													7429	586263
0,67	0,40	1,00	0,67	0,00	0,50																																													3258	271763
0,44	0,30	0,67	0,67	0,50	1,00																																													3433	339667
0,89	0,20	1,00	0,33	1,00	0,00																																													1960	162822
0,56	0,50	0,83	0,67	0,00	1,00																																													2180	281190
0,78	0,40	1,00	0,67	1,00	1,00																																													2541	167894
1,00	0,40	1,00	0,67	0,00	0,00																																													1390	103963
1,00	0,40	0,83	0,67	0,00	1,00																																													3782	349511
0,89	0,30	0,67	0,67	0,50	0,50																																													4302	417211
0,67	0,40	0,83	0,67	1,00	0,50																																													1342	116672
0,89	0,20	1,00	0,33	0,50	1,00																																													2086	181697
0,33	0,00	0,00	0,00	0,00	0,00																																													4055	425816
0,89	0,40	1,00	0,67	0,50	1,00																																													2247	236957
0,78	0,30	0,67	0,00	0,00	0,00																																													1653	172023
0,78	0,60	1,00	0,00	1,00	1,00																																													2694	310697
1,00	0,40	0,67	0,67	0,00	0,50																																													2747	321055
0,44	0,40	1,00	0,00	0,00	0,50																																													2571	274870
0,78	0,20	0,67	0,00	0,00	0,00																																													1348	140595
0,67	0,40	0,83	0,00	0,50	0,00																																													2486	269876
0,33	0,20	0,17	0,00	0,50	0,00																																													1899	204783
0,89	0,40	0,83	1,00	1,00	1,00																																													3420	257548
0,89	0,30	0,83	0,00	0,00	0,50																																													3927	216809
1,00	0,60	0,83	0,67	1,00	0,00																																													4698	390873
0,89	0,60	0,83	1,00	0,00	1,00																																													3123	273932
0,89	0,40	0,83	0,00	0,00	1,00																																													3147	232910
1,00	0,50	1,00	0,67	1,00	0,50																																													1613	143824
0,89	0,40	0,83	0,00	0,50	1,00																																													1938	208855
1,00	0,60	1,00	1,00	1,00	1,00																																													3586	442975
0,78	0,60	0,83	0,67	0,50	1,00																																													2669	255597
0,78	0,90	1,00	0,67	0,50	1,00																																													3997	366334
0,67	0,40	0,83	0,67	0,50	0,00																																													3740	286294
0,89	0,80	1,00	1,00	0,50	1,00																																													4528	350044
0,67	0,50	0,83	1,00	0,00	1,00																																													1957	164314
0,78	0,40	0,83	1,00	0,00	0,00																																													2837	333116
0,89	0,40	1,00	0,67	1,00	0,50																																													820	70154
0,89	0,70	1,00	1,00	1,00	0,50																																													6590	505048
0,78	0,40	1,00	0,33	1,00	1,00																																													8623	279292
1,00	0,80	1,00	0,67	0,50	1,00																																													2709	352129
1,00	0,40	1,00	1,00	1,00	0,50																																													1710	144191
1,00	0,30	1,00	0,67	0,00	0,50																																													3624	288411
0,67	0,50	1,00	0,67	0,50	1,00																																													3048	272522
0,89	0,80	1,00	0,67	1,00	1,00																																													2199	284231
1,00	0,40	0,83	0,33	0,00	0,50																																													3122	311762
1,00	1,00	1,00	1,00	0,50	0,00																																													3570	342350
0,89	0,50	1,00	0,67	1,00	1,00																																													4107	177034
0,89	0,50	1,00	0,67	1,00	1,00																																													4107	177034
0,89	0,30	1,00	0,33	0,00	1,00																																													3256	289214
0,89	0,30	0,83	0,33	0,50	1,00																																													2668	309277
0,89	0,30	0,50	0,00	0,00	1,00																																													2408	246966
1,00	0,40	0,67	0,33	0,50	0,50																																													2501	284308
0,67	0,50	1,00	0,33	0,00	1,00																																													2237	187677
1,00	0,50	0,67	0,67	0,50	1,00																																													3176	432628
0,89	0,40	1,00	0,00	0,00	0,00																																													3112	246861
0,89	0,70	1,00	1,00	0,50	0,00																																													3903	337931
0,89	0,50	0,50	0,33	0,00	0,50																																													3130	260080
0,89	0,40	0,67	0,33	1,00	0,00																																													1657	154768
1,00	0,70	0,67	1,00	0,00	1,00																																													3036	314379
1,00	0,70	0,67	1,00	0,00	1,00																																													2164	186002
1,00	0,70	0,67	1,00	0,00	1,00																																													2406	255530
0,89	0,70	0,67	1,00	0,00	1,00																																													2460	219180
0,89	0,70	0,67	0,00	0,00	0,00																																													2773	182739
0,89	0,70	1,00	0,67	0,50	1,00																																													2168	180278
0,33	0,10	0,67	0,33	0,50	0,00																																													2156	240123
0,67	0,20	0,67	0,67	0,50	1,00																																													944	109044
0,56	0,30	0,33	0,33	0,00	1,00																																													3036	251742
0,44	0,60	0,83	0,33	0,00	0,50																																													2833	187742
1,00	0,80	1,00	1,00	1,00	1,00																																													2559	270639
0,89	0,80	1,00	0,33	0,50	0,50																																													3862	314020
0,33	0,00	0,17	0,00	0,00	0,00																																													3130	246900
0,67	0,30	0,67	0,33	0,00	1,00																																													2247	259062
0,67	0,60	0,83	0,33	0,50	1,00																																													3154	282775
1,00	0,50	0,83	0,67	0,00	1,00																																													5517	435991
0,78	0,70	1,00	0,33	0,00	0,50																																													1824	154022
0,67	0,30	0,83	0,00	0,50	1,00																																													1922	209685
1,00	0,30	1,00	0,67	0,00	0,00																																													2205	205255
0,78	0,40	1,00	0,67	0,00	0,50																																													1881	178265
0,89	0,40	0,83	1,00	0,00	1,00																																													2920	248450
0,89	0,10	0,83	0,00	0,00	1,00																																													2333	229320
0,89	0,50	1,00	0,67	0,00	1,00																																													1819	135198
0,78	0,30	0,67	0,33	0,00	0,50																																													1784	189190
0,00	0,00	0,00	0,00	0,00	0,00																																													2886	322752
0,67	0,40	1,00	0,33	0,50	0,00																																													4443	343956
1,00	0,60	0,83	0,67	1,00	0,50																																													1446	176243
1,00	0,40	1,00	0,33	0,50	1,00																																													2679	200373
0,67	0,10	0,33	0,00	0,50	1,00																																													4600	366805
0,89	0,30	0,83	0,00	0,00	1,00																																													1875	142330
0,89	0,70	0,83	0,67	0,00	1,00																																													3793	360464
0,56	0,30	0,17	0,00	0,00	1,00																																													2683	242381
0,67	0,50	0,83	0,33	0,50	0,00																																													3496	281597
0,67	0,30	0,67	0,33	0,00	0,00																																													2598	223788
1,00	0,30	0,83	0,67	1,00	1,00																																													2700	199650
1,00	0,60	0,67	0,67	0,50	1,00																																													2327	210891
1,00	0,90	1,00	1,00	0,00	1,00																																													3888	343904
0,67	0,40	0,83	0,00	0,50	1,00																																													3607	309815
0,44	0,30	1,00	0,00	0,50	0,50																																													1351	137236
0,89	0,90	1,00	0,67	1,00	1,00																																													1927	153390
0,44	0,50	1,00	0,00	0,50	0,00																																													1339	82255
0,56	0,30	1,00	1,00	0,50	0,50																																													2235	278265
0,89	0,60	0,83	0,67	0,00	0,50																																													1850	172064
0,67	0,20	1,00	0,33	0,00	0,50																																													1607	93154
0,89	0,40	0,83	1,00	0,50	1,00																																													4350	326462
1,00	0,50	0,83	0,67	0,50	0,50																																													3233	338105
0,78	0,40	0,83	0,67	0,00	0,50																																													2081	224385
0,44	0,00	0,00	0,00	0,00	0,00																																													2700	265772
0,89	0,20	1,00	0,33	0,50	1,00																																													4146	409332
0,89	0,50	1,00	0,67	0,50	1,00																																													1507	188407
0,89	0,30	1,00	0,67	0,00	0,50																																													2168	229350
0,44	0,00	0,00	0,00	0,00	0,00																																													1420	112000
1,00	0,50	0,83	1,00	0,00	1,00																																													1581	136760
0,89	0,60	0,83	0,33	0,00	1,00																																													1187	96105
0,67	0,30	0,83	0,00	0,50	0,50																																													3985	378514
0,33	0,00	0,00	0,00	0,00	0,00																																													2172	231662
0,78	0,30	0,67	0,00	0,50	0,00																																													2493	222959
0,89	0,50	1,00	0,67	0,50	1,00																																													1975	232819
0,78	0,40	0,67	0,00	0,00	1,00																																													1959	208477
0,78	0,50	0,83	0,67	0,00	0,50																																													2620	273205
0,89	0,70	1,00	1,00	1,00	0,50																																													6590	505048
0,89	0,40	0,83	1,00	0,50	1,00																																													1704	174313
0,78	0,80	1,00	0,67	0,50	1,00																																													3355	243623
0,78	0,60	1,00	0,33	0,50	1,00																																													3609	288700
0,67	0,40	0,83	0,33	0,00	0,50																																													2187	254403
0,89	0,50	0,83	0,33	0,50	0,00																																													2394	272544
0,89	0,50	1,00	0,00	0,50	1,00																																													1956	225506
0,78	0,30	1,00	0,33	0,00	1,00																																													2316	166212
1,00	0,60	1,00	0,00	0,50	1,00																																													1844	192335
1,00	0,30	0,67	0,67	0,00	0,50																																													2068	266657
0,78	0,60	0,83	1,00	0,50	0,50																																													3259	250471
0,78	0,30	0,33	0,33	0,00	1,00																																													2404	281982
0,89	0,70	1,00	0,67	1,00	1,00																																													1588	201041
0,89	0,70	1,00	1,00	0,00	1,00																																													3928	358421
0,67	0,60	0,67	1,00	0,50	1,00																																													2539	185187
1,00	0,50	1,00	0,33	0,50	0,00																																													2196	186000
0,67	0,50	0,83	0,33	0,00	0,50																																													3523	368617
0,56	0,40	0,67	0,00	0,00	1,00																																													2667	281639
0,78	0,40	1,00	0,33	1,00	1,00																																													8623	279292
1,00	0,70	1,00	1,00	0,00	1,00																																													1819	199645
0,67	0,20	0,17	0,00	0,50	0,00																																													4477	352460
0,78	0,50	0,83	0,67	0,00	0,50																																													2620	273205
0,56	0,40	0,83	0,67	0,50	0,00																																													2599	261363
1,00	0,20	1,00	0,67	1,00	1,00																																													1673	169170
0,89	0,50	0,67	0,67	0,00	0,00																																													2390	161602
0,44	0,40	0,50	0,00	0,00	1,00																																													3896	298581
1,00	0,70	0,67	1,00	1,00	1,00																																													2372	217240
0,89	0,60	0,83	0,67	1,00	0,00																																													1611	172437
0,78	0,40	0,83	0,00	0,00	0,00																																													1899	178344
0,89	0,50	1,00	0,67	1,00	1,00																																													2498	202510
0,11	0,00	0,17	0,00	0,00	0,00																																													2999	278377
0,89	0,70	1,00	0,67	0,50	1,00																																													3086	328714
0,89	0,40	0,67	0,67	0,00	1,00																																													2749	273244
1,00	0,50	0,67	1,00	0,00	1,00																																													2349	244625
0,89	0,60	0,83	0,67	0,00	0,50																																													2555	267828
1,00	0,80	0,50	0,67	0,50	0,50																																													1334	105343




\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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ jenkins.wessa.net \tabularnewline
R Framework error message & 
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.
\tabularnewline R Engine error message &
Error in array(list(0.78, 0.6, 1, 0, 1, 1, 1974, 122788, 0.78, 0.3, 1,  : 
  length of 'dimnames' [1] not equal to array extent
Execution halted
\tabularnewline \hline \end{tabular} %Source: https://freestatistics.org/blog/index.php?pk=260831&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ jenkins.wessa.net[/C][/ROW]
[ROW][C]R Framework error message[/C][C]
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.
[/C][/ROW] [ROW][C]R Engine error message[/C][C]
Error in array(list(0.78, 0.6, 1, 0, 1, 1, 1974, 122788, 0.78, 0.3, 1,  : 
  length of 'dimnames' [1] not equal to array extent
Execution halted
[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=260831&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=260831&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 time1 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net
R Framework error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.
R Engine error message
Error in array(list(0.78, 0.6, 1, 0, 1, 1, 1974, 122788, 0.78, 0.3, 1,  : 
  length of 'dimnames' [1] not equal to array extent
Execution halted



Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
Parameters (R input):
par1 = 1 ; 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, signif(mysum$coefficients[i,1],6), 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,signif(mysum$coefficients[i,1],6))
a<-table.element(a, signif(mysum$coefficients[i,2],6))
a<-table.element(a, signif(mysum$coefficients[i,3],4))
a<-table.element(a, signif(mysum$coefficients[i,4],6))
a<-table.element(a, signif(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, signif(sqrt(mysum$r.squared),6))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, signif(mysum$r.squared,6))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, signif(mysum$adj.r.squared,6))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, signif(mysum$fstatistic[1],6))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, signif(mysum$fstatistic[2],6))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, signif(mysum$fstatistic[3],6))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6))
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, signif(mysum$sigma,6))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, signif(sum(myerror*myerror),6))
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,signif(x[i],6))
a<-table.element(a,signif(x[i]-mysum$resid[i],6))
a<-table.element(a,signif(mysum$resid[i],6))
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,signif(gqarr[mypoint-kp3+1,1],6))
a<-table.element(a,signif(gqarr[mypoint-kp3+1,2],6))
a<-table.element(a,signif(gqarr[mypoint-kp3+1,3],6))
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,signif(numsignificant1,6))
a<-table.element(a,signif(numsignificant1/numgqtests,6))
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,signif(numsignificant5,6))
a<-table.element(a,signif(numsignificant5/numgqtests,6))
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,signif(numsignificant10,6))
a<-table.element(a,signif(numsignificant10/numgqtests,6))
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')
}