Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
143827 829461 4.93 5.01 639.98 3536.15 0.94 109.57 9113 145191 837669 4.92 5.02 597.33 3240.92 0.92 107.08 9140 146832 854793 4.83 4.94 558.36 3121.58 0.91 110.33 9309 148577 850092 5.02 5.10 593.09 3302.70 0.89 110.36 9395 149873 848783 5.22 5.26 585.15 3292.49 0.87 106.50 10027 151847 846150 5.17 5.21 573.50 3162.62 0.85 104.30 10202 153252 828543 5.17 5.25 548.72 3051.60 0.86 107.21 10003 154292 830389 4.98 5.06 523.63 2848.11 0.90 109.34 9745 155657 848989 4.98 5.04 453.87 2577.68 0.91 108.20 9966 156523 841106 4.77 4.82 460.33 2680.55 0.91 109.86 10035 156416 854616 4.62 4.67 492.67 2775.70 0.89 108.68 9999 156693 832714 4.89 4.95 506.78 2879.30 0.89 113.38 9943 160312 839290 4.97 5.02 500.92 2790.11 0.88 117.12 10258 160438 840572 5.03 5.07 494.91 2764.18 0.87 116.23 10926 160882 869186 5.27 5.31 531.21 2868.37 0.88 114.75 10807 161668 856979 5.25 5.29 511.28 2740.50 0.89 115.81 10992 164391 872126 5.30 5.31 484.55 2622.87 0.92 115.86 11034 168556 868281 5.16 5.17 439.66 2376.70 0.96 117.80 10801 169738 862455 4.99 5.03 363.59 2133.57 0.99 117.11 10161 170387 881177 4.71 4.73 371.59 2120.90 0.98 116.31 10191 171294 886924 4.50 4.52 296.36 1789.81 0.98 118.38 10451 172202 886842 4.58 4.62 342.84 1999.59 0.98 121.57 10380 172651 916407 4.56 4.59 361.99 2095.87 1.00 121.65 10251 172770 890606 4.36 4.41 322.73 1909.40 1.02 124.20 10522 178366 900409 4.19 4.27 294.94 1773.09 1.06 126.12 10801 180014 920169 3.97 4.06 266.21 1712.20 1.08 128.60 10731 181067 922871 4.01 4.13 248.54 1655.69 1.08 128.16 10161 182586 920004 4.23 4.23 282.63 1833.04 1.08 130.12 9728 184957 945772 3.91 3.92 280.57 1840.93 1.16 135.83 9882 186417 937507 3.72 3.72 291.55 1897.71 1.17 138.05 9839 188599 941691 4.04 4.06 317.49 1962.54 1.14 134.99 9917 189490 958256 4.19 4.21 329.41 1982.29 1.11 132.38 10356 190264 963509 4.21 4.23 306.78 1903.72 1.12 128.94 10857 191221 970266 4.27 4.31 330.22 2029.31 1.17 128.12 10424 191110 972853 4.41 4.44 332.19 2052.05 1.17 127.84 10721 190674 982168 4.33 4.36 337.65 2126.04 1.23 132.43 10669 195438 999892 4.18 4.26 353.31 2166.17 1.26 134.13 10565 196393 1002099 4.12 4.18 356.59 2216.34 1.26 134.78 10289 197172 1017611 3.93 4.02 338.87 2149.88 1.23 133.13 10646 198760 1029782 4.13 4.24 341.41 2176.87 1.20 129.08 10858 200945 1047956 4.37 4.39 337.19 2150.98 1.20 134.48 10282 203845 1047689 4.42 4.44 345.13 2176.22 1.21 132.86 10377 204613 1060054 4.31 4.34 329.91 2143.40 1.23 134.08 10443 205487 1067078 4.15 4.17 323.12 2118.28 1.22 134.54 10561 206100 1072366 4.09 4.11 323.94 2153.11 1.22 134.51 10668 206315 1081823 3.96 3.98 330.48 2176.63 1.25 135.97 10818 206291 1087601 3.85 3.87 337.15 2222.87 1.30 136.09 10865 207801 1089905 3.63 3.69 348.08 2263.48 1.34 139.14 10636 211653 1116316 3.56 3.63 360.42 2297.09 1.31 135.63 10409 211325 1111355 3.55 3.62 374.37 2361.41 1.30 136.55 10460 211893 1124250 3.69 3.76 369.56 2350.32 1.32 138.83 10579 212056 1140597 3.48 3.57 348.20 2301.54 1.29 138.84 10664 214696 1151683 3.30 3.40 364.68 2396.60 1.27 135.37 10711 217455 1137532 3.13 3.25 383.83 2472.42 1.22 132.22 11374 218884 967532 3.27 3.32 395.77 2558.95 1.20 134.75 11345 219816 972994 3.28 3.32 389.60 2548.21 1.23 135.98 11456 219984 999207 3.12 3.16 402.99 2666.55 1.23 136.06 11966 219062 1007982 3.28 3.32 394.16 2609.40 1.20 138.05 12580 218550 1015892 3.48 3.53 418.79 2676.24 1.18 139.59 13006 218179 994850 3.35 3.41 436.78 2751.42 1.19 140.58 13815 222218 987503 3.33 3.39 450.50 2832.63 1.21 139.82 14579 222196 986743 3.48 3.55 458.72 2862.98 1.19 140.77 14960 223393 1020674 3.66 3.73 468.69 2907.81 1.20 140.96 14904 223292 1024067 3.92 4.01 469.40 2927.28 1.23 143.59 16028 226236 1040444 3.96 4.06 440.41 2784.06 1.28 142.70 17079 228831 1019081 3.97 4.08 440.25 2799.96 1.27 145.11 15155 228745 1027828 3.99 4.10 454.06 2856.24 1.27 146.70 16049 229140 1021010 3.90 3.97 469.01 2913.79 1.28 148.53 15841 229270 1025563 3.78 3.84 483.62 2949.45 1.27 148.99 15159 229359 1044756 3.82 3.88 486.57 3047.90 1.26 149.65 14956 230006 1062545 3.75 3.80 477.67 3006.92 1.29 151.11 15645 228810 1070425 3.81 3.89 495.34 3092.79 1.32 154.82 15318 232677 1100087 4.05 4.11 499.81 3146.87 1.30 156.56 15595 232961 1093596 4.07 4.12 490.21 3073.62 1.31 157.60 16355 234629 1109143 3.98 3.98 510.50 3126.60 1.32 155.24 15925 235660 1113855 4.19 4.25 530.81 3244.06 1.35 160.68 16175 240024 1129275 4.32 4.38 540.39 3323.03 1.35 163.22 15900 243554 1131996 4.61 4.66 548.21 3328.75 1.34 164.55 15711 244368 1144103 4.57 4.63 533.99 3211.79 1.37 166.76 15594 244356 1167830 4.38 4.43 522.73 3191.27 1.36 159.05 15693 245126 1153194 4.34 4.37 540.98 3248.57 1.39 159.82 16438 246321 1175008 4.38 4.40 547.85 3335.88 1.42 164.95 17048 246797 1175805 4.21 4.25 507.58 3209.49 1.47 162.89 17699 246735 1173456 4.34 4.38 515.77 3167.39 1.46 163.55 17733 251083 1187498 4.13 4.22 441.33 2791.94 1.47 158.68 19439 251786 1202958 4.05 4.14 446.53 2757.24 1.47 157.97 20148 252732 1206229 3.97 4.07 442.43 2636.45 1.55 156.59 20112 255051 1249533 4.21 4.28 475.56 2806.76 1.58 161.56 18607 259022 1279743 4.35 4.42 485.52 2783.36 1.56 162.31 18409 261698 1283496 4.73 4.81 425.93 2522.41 1.56 166.26 18388 263891 1282942 4.69 4.82 399.95 2493.36 1.58 168.45 19187 265247 1284739 4.40 4.50 412.84 2515.39 1.50 163.63 17983 262228 1337169 4.35 4.50 331.45 2268.77 1.44 153.20 18449 263429 1314087 4.23 4.44 267.69 2008.13 1.33 133.52 19589 264305 1306144 3.96 4.20 252.55 1868.25 1.27 123.28 19135 266371 1200391 3.65 3.89 245.94 1798.68 1.34 122.51 19604 273248 1265445 3.76 4.11 248.60 1717.60 1.32 119.73 20877 275472 1259329 3.80 4.20 219.81 1546.92 1.28 118.30 23639 278146 1219342 3.66 4.15 216.98 1580.19 1.31 127.65 22830 279506 1227626 3.77 4.09 240.76 1771.33 1.32 130.25 21760 283991 1232874 3.85 4.14 259.45 1846.92 1.37 131.85 21879 286794 1241046 3.96 4.32 254.71 1821.18 1.40 135.39 21712 288703 1244172 3.76 4.09 283.17 1988.41 1.41 133.09 21321 289285 1237838 3.61 3.89 296.27 2074.01 1.43 135.31 21396 288869 1212801 3.58 3.86 311.35 2119.77 1.46 133.14 22000 286942 1234237 3.53 3.80 302.36 2081.89 1.48 133.91 22642 285833 1224699 3.52 3.83 305.90 2099.55 1.49 132.97 24272 284095 1237432 3.44 3.88 335.33 2233.67 1.46 131.21 24933 289229 1248847 3.47 4.10 327.90 2150.37 1.43 130.34 25219 289389 1256543 3.36 4.11 317.74 2146.66 1.37 123.46 25745 290793 1252434 3.37 3.98 344.22 2287.88 1.36 123.03 26433 291454 1265176 3.32 4.17 345.91 2236.06 1.34 125.33 27546 294733 1314670 3.02 3.68 320.70 2110.35 1.26 115.83 30774 293853 1299329 2.90 3.70 316.81 2086.51 1.22 110.99 32456 294056 1216744 2.85 3.62 330.64 2187.47 1.28 111.73 30124 293982 1225275 2.56 3.44 316.47 2159.21 1.29 110.04 30250 293075 1193478 2.52 3.50 334.39 2218.23 1.31 110.26 31288 292391 1207226 2.58 3.34 337.23 2274.11 1.39 113.67 31072
Names of X columns:
SpaarNL Leningen 10jNL 10JEUR AEX EURO USD YEN GOLD
Sample Range:
(leave blank to include all observations)
From:
To:
Column Number of Endogenous Series
(?)
Fixed Seasonal Effects
Do not include Seasonal Dummies
Do not include Seasonal Dummies
Include Seasonal Dummies
Type of Equation
No Linear Trend
No Linear Trend
Linear Trend
First Differences
Seasonal Differences (s)
First and Seasonal Differences (s)
Degree of Predetermination (lagged endogenous variables)
Degree of Seasonal Predetermination
Seasonality
12
1
2
3
4
5
6
7
8
9
10
11
12
Chart options
R Code
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('http://www.xycoon.com/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<br />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<br />Forecast', 1, TRUE) a<-table.element(a, 'Residuals<br />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') }
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
1 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation