Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
3.04 493 9 3.030 9.026 25.64 104.8 3.28 481 11 2.803 9.787 27.97 105.2 3.51 462 13 2.768 9.536 27.62 105.6 3.69 457 12 2.883 9.490 23.31 105.8 3.92 442 13 2.863 9.736 29.07 106.1 4.29 439 15 2.897 9.694 29.58 106.5 4.31 488 13 3.013 9.647 28.63 106.71 4.42 521 16 3.143 9.753 29.92 106.68 4.59 501 10 3.033 10.070 32.68 107.41 4.76 485 14 3.046 10.137 31.54 107.15 4.83 464 14 3.111 9.984 32.43 107.5 4.83 460 45 3.013 9.732 26.54 107.22 4.76 467 13 2.987 9.103 25.85 107.11 4.99 460 8 2.996 9.155 27.60 107.57 4.78 448 7 2.833 9.308 25.71 107.81 5.06 443 3 2.849 9.394 25.38 108.75 4.65 436 3 2.795 9.948 28.57 109.43 4.54 431 4 2.845 10.177 27.64 109.62 4.51 484 4 2.915 10.002 25.36 109.54 4.49 510 0 2.893 9.728 25.90 109.53 3.99 513 -4 2.604 10.002 26.29 109.84 3.97 503 -14 2.642 10.063 21.74 109.67 3.51 471 -18 2.660 10.018 19.20 109.79 3.34 471 -8 2.639 9.960 19.32 109.56 3.29 476 -1 2.720 10.236 19.82 110.22 3.28 475 1 2.746 10.893 20.36 110.4 3.26 470 2 2.736 10.756 24.31 110.69 3.32 461 0 2.812 10.940 25.97 110.72 3.31 455 1 2.799 10.997 25.61 110.89 3.35 456 0 2.555 10.827 24.67 110.58 3.30 517 -1 2.305 10.166 25.59 110.94 3.29 525 -3 2.215 10.186 26.09 110.91 3.32 523 -3 2.066 10.457 28.37 111.22 3.30 519 -3 1.940 10.368 27.34 111.09 3.30 509 -4 2.042 10.244 24.46 111 3.09 512 -8 1.995 10.511 27.46 111.06 2.79 519 -9 1.947 10.812 30.23 111.55 2.76 517 -13 1.766 10.738 32.33 112.32 2.75 510 -18 1.635 10.171 29.87 112.64 2.56 509 -11 1.833 9.721 24.87 112.36 2.56 501 -9 1.910 9.897 25.48 112.04 2.21 507 -10 1.960 9.828 27.28 112.37 2.08 569 -13 1.970 9.924 28.24 112.59 2.10 580 -11 2.061 10.371 29.58 112.89 2.02 578 -5 2.093 10.846 26.95 113.22 2.01 565 -15 2.121 10.413 29.08 112.85 1.97 547 -6 2.175 10.709 28.76 113.06 2.06 555 -6 2.197 10.662 29.59 112.99 2.02 562 -3 2.350 10.570 30.70 113.32 2.03 561 -1 2.440 10.297 30.52 113.74 2.01 555 -3 2.409 10.635 32.67 113.91 2.08 544 -4 2.473 10.872 33.19 114.52 2.02 537 -6 2.408 10.296 37.13 114.96 2.03 543 0 2.455 10.383 35.54 114.91 2.07 594 -4 2.448 10.431 37.75 115.3 2.04 611 -2 2.498 10.574 41.84 115.44 2.05 613 -2 2.646 10.653 42.94 115.52 2.11 611 -6 2.757 10.805 49.14 116.08 2.09 594 -7 2.849 10.872 44.61 115.94 2.05 595 -6 2.921 10.625 40.22 115.56 2.08 591 -6 2.982 10.407 44.23 115.88 2.06 589 -3 3.081 10.463 45.85 116.66 2.06 584 -2 3.106 10.556 53.38 117.41 2.08 573 -5 3.119 10.646 53.26 117.68 2.07 567 -11 3.061 10.702 51.80 117.85 2.06 569 -11 3.097 11.353 55.30 118.21 2.07 621 -11 3.162 11.346 57.81 118.92 2.06 629 -10 3.257 11.451 63.96 119.03 2.09 628 -14 3.277 11.964 63.77 119.17 2.07 612 -8 3.295 12.574 59.15 118.95 2.09 595 -9 3.364 13.031 56.12 118.92 2.28 597 -5 3.494 13.812 57.42 118.9 2.33 593 -1 3.667 14.544 63.52 118.92 2.35 590 -2 3.813 14.931 61.71 119.44 2.52 580 -5 3.918 14.886 63.01 119.40 2.63 574 -4 3.896 16.005 68.18 119.98 2.58 573 -6 3.801 17.064 72.03 120.43 2.70 573 -2 3.570 15.168 69.75 120.41 2.81 620 -2 3.702 16.050 74.41 120.82 2.97 626 -2 3.862 15.839 74.33 120.97 3.04 620 -2 3.970 15.137 64.24 120.63 3.28 588 2 4.139 14.954 60.03 120.38 3.33 566 1 4.200 15.648 59.44 120.68 3.50 557 -8 4.291 15.305 62.50 120.84 3.56 561 -1 4.444 15.579 55.04 120.90 3.57 549 1 4.503 16.348 58.34 121.56 3.69 532 -1 4.357 15.928 61.92 121.57 3.82 526 2 4.591 16.171 67.65 122.12 3.79 511 2 4.697 15.937 67.68 121.97 3.96 499 1 4.621 15.713 70.30 121.96 4.06 555 -1 4.563 15.594 75.26 122.48 4.05 565 -2 4.203 15.683 71.44 122.33 4.03 542 -2 4.296 16.438 76.36 122.44 3.94 527 -1 4.435 17.032 81.71 123.08 4.02 510 -8 4.105 17.696 92.60 124.23 3.88 514 -4 4.117 17.745 90.60 124.58 4.02 517 -6 3.844 19.394 92.23 125.08 4.03 508 -3 3.721 20.148 94.09 125.98 4.09 493 -3 3.674 20.108 102.79 126.90 3.99 490 -7 3.858 18.584 109.65 127.19 4.01 469 -9 3.801 18.441 124.05 128.33 4.01 478 -11 3.504 18.391 132.69 129.04 4.19 528 -13 3.033 19.178 135.81 129.72 4.30 534 -11 3.047 18.079 116.07 128.92 4.27 518 -9 2.962 18.483 101.42 129.13 3.82 506 -17 2.198 19.644 75.73 128.90 3.15 502 -22 2.014 19.195 55.48 128.13 2.49 516 -25 1.863 19.650 43.80 127.85 1.81 528 -20 1.905 20.830 45.29 127.98 1.26 533 -24 1.811 23.595 44.01 128.42 1.06 536 -24 1.670 22.937 47.48 127.68 0.84 537 -22 1.864 21.814 51.07 127.95 0.78 524 -19 2.052 21.928 57.84 127.85 0.70 536 -18 2.030 21.777 69.04 127.61 0.36 587 -17 2.071 21.383 65.61 127.53 0.35 597 -11 2.293 21.467 72.87 127.92 0.36 581 -11 2.443 22.052 68.41 127.59 0.36 564 -12 2.513 22.680 73.25 127.65 0.36 558 -10 2.467 24.320 77.43 127.98 0.35 575 -15 2.503 24.977 75.28 128.19 0.34 580 -15 2.540 25.204 77.33 128.77 0.34 575 -15 2.483 25.739 74.31 129.31 0.35 563 -13 2.626 26.434 79.70 129.80 0.35 552 -8 2.656 27.525 85.47 130.24 0.34 537 -13 2.447 30.695 77.98 130.76 0.35 545 -9 2.467 32.436 75.69 130.75 0.48 601 -7 2.462 30.160 75.20 130.81 0.43 604 -4 2.505 30.236 77.21 130.89 0.45 586 -4 2.579 31.293 77.85 131.30 0.70 564 -2 2.649 31.077 83.53 131.49 0.59 549 0 2.637 32.226 85.99 131.65
Names of X columns:
Eonia Werkloosheid Consumentenvertrouwen BEL20 Goudprijs Olieprijs CPI
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
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
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation