Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
162556 807 6282154 29790 444 4321023 87550 412 4111912 84738 428 223193 54660 315 1491348 42634 168 1629616 40949 263 1398893 45187 267 1926517 37704 228 983660 16275 129 1443586 25830 104 1073089 12679 122 984885 18014 393 1405225 43556 190 227132 24811 280 929118 6575 63 1071292 7123 102 638830 21950 265 856956 37597 234 992426 17821 277 444477 12988 73 857217 22330 67 711969 13326 103 702380 16189 290 358589 7146 83 297978 15824 56 585715 27664 236 657954 11920 73 209458 8568 34 786690 14416 139 439798 3369 26 688779 11819 70 574339 6984 40 741409 4519 42 597793 2220 12 644190 18562 211 377934 10327 74 640273 5336 80 697458 2365 83 550608 4069 131 207393 8636 203 301607 13718 56 345783 4525 89 501749 6869 88 379983 4628 39 387475 3689 25 377305 4891 49 370837 7489 149 430866 4901 58 469107 2284 41 194493 3160 90 530670 4150 136 518365 7285 97 491303 1134 63 527021 4658 114 233773 2384 77 405972 3748 6 652925 5371 47 446211 1285 51 341340 9327 85 387699 5565 43 493408 1528 32 146494 3122 25 414462 7561 77 364304 2675 54 355178 13253 251 357760 880 15 261216 2053 44 397144 1424 73 374943 4036 85 424898 3045 49 202055 5119 38 378525 1431 35 310768 554 9 325738 1975 34 394510 1765 20 247060 1012 29 368078 810 11 236761 1280 52 312378 666 13 339836 1380 29 347385 4677 66 426280 876 33 352850 814 15 301881 514 15 377516 5692 68 357312 3642 100 458343 540 13 354228 2099 45 308636 567 14 386212 2001 36 393343 2949 40 378509 2253 68 452469 6533 29 364839 1889 43 358649 3055 30 376641 272 9 429112 1414 22 330546 2564 19 403560 1383 9 317892 1261 31 307528 975 19 235133 3366 55 299243 576 8 314073 1686 28 368186 746 29 269661 3192 48 125390 2045 16 510834 5702 47 321896 1932 20 249898 936 22 408881 3437 33 158492 5131 44 292154 2397 13 289513 1389 6 378049 1503 35 343466 402 8 332743 2239 17 442882 2234 11 214215 837 21 315688 10579 92 375195 875 12 334280 1585 112 355864 1659 25 480382 2647 17 353058 3294 23 217193 0 0 315380 94 10 314533 422 23 318056 0 0 315380 34 7 314353 1558 25 369448 0 0 315380 43 20 312846 645 4 312075 316 4 315009 115 10 318903 5 1 314887 897 4 314913 0 0 315380 389 8 325506 0 0 315380 1002 11 298568 36 4 315834 460 15 329784 309 9 312878 0 0 315380 9 7 314987 271 2 325249 14 0 315877 520 7 291650 1766 46 305959 0 5 315380 458 7 297765 20 2 315245 0 0 315380 0 0 315380 98 2 315236 405 5 336425 0 0 315380 0 0 315380 0 0 315380 0 0 315380 483 7 306268 454 24 302187 47 1 314882 0 0 315380 757 18 382712 4655 55 341570 0 0 315380 0 0 315380 36 3 312412 0 0 315380 203 9 309596 0 0 315380 126 8 315547 400 113 313267 71 0 316176 0 0 315380 0 0 315380 972 19 359335 531 11 330068 2461 25 314289 378 16 297413 23 5 314806 638 11 333210 2300 23 352108 149 6 313332 226 5 291787 0 0 315380 275 7 318745 0 0 315380 141 7 315366 0 0 315380 28 3 315688 0 0 315380 4980 89 409642 0 0 315380 0 0 315380 472 19 269587 0 0 315380 0 0 315380 0 0 315380 203 12 300962 496 12 325479 10 5 316155 63 2 318574 0 0 315380 1136 26 343613 265 3 306948 0 0 315380 0 0 315380 267 11 330059 474 10 288985 534 5 304485 0 2 315380 15 6 315688 397 7 317736 0 2 315380 1866 28 322331 288 3 296656 0 0 315380 3 1 315354 468 20 312161 20 1 315576 278 22 314922 61 9 314551 0 0 315380 192 2 312339 0 0 315380 317 7 298700 738 9 321376 0 0 315380 368 13 303230 0 0 315380 2 0 315487 0 0 315380 53 6 315793 0 0 315380 0 0 315380 0 0 315380 94 3 312887 0 0 315380 24 7 315637 2332 2 324385 0 0 315380 0 0 315380 131 15 308989 0 0 315380 0 0 315380 206 9 296702 0 0 315380 167 1 307322 622 38 304376 2328 57 253588 0 0 315380 365 7 309560 364 26 298466 0 0 315380 0 0 315380 0 0 315380 0 0 315380 226 13 343929 307 10 331955 0 0 315380 0 0 315380 0 0 315380 188 9 381180 0 0 315380 138 26 331420 0 0 315380 0 0 315380 0 0 315380 125 19 310201 0 0 315380 282 12 320016 335 23 320398 0 0 315380 1324 29 291841 176 8 310670 0 0 315380 0 0 315380 249 26 313491 0 0 315380 333 9 331323 0 0 315380 601 5 319210 30 3 318098 0 0 315380 249 13 292754 0 0 315380 165 12 325176 453 19 365959 0 0 315380 53 10 302409 382 9 340968 0 0 315380 0 0 315380 0 0 315380 0 9 315380 30 4 313164 290 1 301164 0 1 315380 0 0 315380 366 14 344425 2 12 315394 0 0 315380 209 19 316647 384 17 309836 0 0 315380 0 0 315380 365 32 346611 0 0 315380 49 14 322031 3 8 315656 133 4 339445 32 0 314964 368 20 297141 1 5 315372 0 0 315380 0 0 315380 0 0 315380 0 0 315380 0 0 315380 0 0 315380 22 1 312502 0 0 315380 0 0 315380 0 0 315380 0 0 315380 0 0 315380 0 0 315380 0 0 315380 96 4 313729 1 1 315388 314 4 315371 844 20 296139 0 0 315380 26 1 313880 125 10 317698 304 12 295580 0 0 315380 0 0 315380 0 0 315380 621 13 308256 0 0 315380 119 3 303677 0 0 315380 0 0 315380 1595 10 319369 312 3 318690 60 7 314049 587 10 325699 135 1 314210 0 0 315380 0 0 315380 514 15 322378 0 0 315380 0 0 315380 0 0 315380 1 4 315398 0 0 315380 0 0 315380 1763 28 308336 180 9 316386 0 0 315380 0 0 315380 0 0 315380 0 0 315380 218 7 315553 0 0 315380 448 7 323361 227 7 336639 174 3 307424 0 0 315380 0 0 315380 121 11 295370 607 7 322340 2212 10 319864 0 0 315380 0 0 315380 530 18 317291 571 14 280398 0 0 315380 78 12 317330 2489 29 238125 131 3 327071 923 6 309038 72 3 314210 572 8 307930 397 10 322327 450 6 292136 622 8 263276 694 6 367655 3425 9 283910 562 8 283587 4917 26 243650 1442 239 438493 529 7 296261 2126 41 230621 1061 3 304252 776 8 333505 611 6 296919 1526 21 278990 592 7 276898 1182 11 327007 621 11 317046 989 12 304555 438 9 298096 726 3 231861 1303 57 309422 7419 21 286963 1164 15 269753 3310 32 448243 1920 11 165404 965 2 204325 3256 23 407159 1135 20 290476 1270 24 275311 661 1 246541 1013 1 253468 2844 74 240897 11528 68 -83265 6526 20 -42143 2264 20 272713 5109 82 215362 3999 21 42754 35624 244 306275 9252 32 253537 15236 86 372631 18073 69 -7170
Names of X columns:
kosten orders rijkdom
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
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation