Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
1565 129404 80 500 109 0 20 18 70 63 18158 5636 22622 30 28 1134 130358 46 329 68 1 38 17 68 50 30461 9079 73570 42 39 192 7215 18 72 1 0 0 0 0 0 1423 603 1929 0 0 2033 112861 85 584 146 0 49 22 68 51 25629 8874 36294 54 54 3283 219904 126 1100 124 0 76 30 120 112 48758 17988 62378 86 80 5877 402036 218 1618 267 1 104 31 120 118 129230 21325 167760 157 144 1322 117604 50 442 83 1 37 19 72 59 27376 8325 52443 36 36 1187 126737 49 321 48 0 53 25 96 90 26706 7117 57283 48 48 1463 99729 38 406 87 0 42 30 109 50 26505 7996 36614 45 42 2568 256310 86 818 129 1 62 26 104 79 49801 14218 93268 77 71 1810 113066 69 568 146 2 50 20 54 49 46580 6321 35439 49 49 1915 165392 62 595 113 0 66 30 118 91 48352 19690 72405 77 74 1443 77780 89 529 60 0 38 15 49 32 13899 5659 24044 28 27 2415 152673 84 818 240 4 48 22 88 82 39342 11370 55909 84 83 1254 134368 47 359 50 4 42 17 60 58 27465 4778 44689 31 31 1374 125769 67 419 81 3 47 19 74 65 55211 5954 49319 28 28 1504 123467 50 364 85 0 71 28 112 111 74098 22924 62075 99 98 999 56232 47 284 62 5 0 12 45 36 13497 70 2341 2 2 2222 108458 79 683 127 0 50 28 110 89 38338 14369 40551 41 43 634 22762 21 188 44 0 12 13 39 28 52505 3706 11621 25 24 849 48633 50 291 37 0 16 14 55 35 10663 3147 18741 16 16 2189 182081 83 640 94 0 77 27 102 78 74484 16801 84202 96 95 1469 140857 59 520 127 0 29 25 96 67 28895 2162 15334 23 22 1791 93773 46 532 159 1 38 30 86 61 32827 4721 28024 33 33 1743 133398 78 547 41 1 50 21 78 58 36188 5290 53306 46 45 1180 113933 23 428 153 0 33 17 64 49 28173 6446 37918 59 59 1749 153851 139 561 86 0 49 22 82 77 54926 14711 54819 72 66 1101 140711 75 266 55 0 59 28 100 71 38900 13311 89058 72 70 2391 303844 105 783 78 0 55 26 99 85 88530 13577 103354 62 56 1826 163810 38 754 84 0 42 17 67 56 35482 14634 70239 55 55 1301 123344 40 394 71 0 40 23 87 71 26730 6931 33045 27 27 1433 157640 39 482 111 2 51 20 65 58 29806 9992 63852 41 37 1893 103274 90 593 82 4 45 16 63 34 41799 6185 30905 51 48 2525 193500 105 760 254 0 73 20 80 59 54289 3445 24242 26 26 2033 178768 43 668 66 1 51 21 84 77 36805 12327 78907 65 64 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1817 181412 55 855 58 0 46 27 105 75 33146 9898 36005 28 21 1506 92342 47 464 131 3 44 14 51 39 23333 8022 31972 44 44 1820 100023 41 418 258 9 31 29 98 83 47686 10765 35853 36 36 1649 178277 50 607 56 0 71 31 124 123 77783 22717 115301 100 89 1672 145067 58 540 90 2 61 19 75 67 36042 10090 47689 104 101 1433 114146 50 551 57 0 28 30 120 105 34541 12385 34223 35 31 864 86039 25 309 35 2 21 23 84 76 75620 8513 43431 69 65 1683 125481 66 647 53 1 42 21 82 57 60610 5508 52220 73 71 1024 95535 42 321 46 2 44 22 87 82 55041 9628 33863 106 102 1029 129221 78 262 38 2 40 21 78 64 32087 11872 46879 53 53 629 61554 26 180 45 1 15 32 97 57 16356 4186 23228 43 41 1679 168048 82 582 113 0 46 20 80 80 40161 10877 42827 49 46 1715 159121 75 544 104 1 43 26 104 94 55459 17066 65765 38 37 2093 129362 51 758 150 4 47 25 93 72 36679 9175 38167 51 51 658 48188 28 205 37 0 12 22 82 39 22346 2102 14812 14 14 1234 95461 56 317 49 0 46 19 73 60 27377 10807 32615 40 40 2059 229864 64 709 83 0 56 24 87 84 50273 13662 82188 79 77 1725 191094 68 590 67 0 47 26 95 69 32104 9224 51763 52 51 1482 158572 50 537 39 1 48 27 105 102 27016 9001 59325 44 43 1454 111388 47 443 69 6 35 10 37 28 19715 7204 48976 34 33 1620 172614 58 429 58 0 45 26 96 65 33629 6572 43384 47 47 733 63205 18 205 68 0 25 23 88 67 27084 7509 26692 32 31 894 109102 56 310 30 0 47 21 83 80 32352 12920 53279 31 31 2343 137303 74 785 54 10 28 34 124 79 51845 5438 20652 40 40 1503 125304 50 434 65 6 48 29 116 107 26591 11489 38338 42 42 1627 88620 65 602 81 0 32 19 76 60 29677 6661 36735 34 35 1119 95808 48 317 84 11 28 19 65 53 54237 7941 42764 40 40 897 83419 29 288 45 3 31 23 86 59 20284 6173 44331 35 30 855 101723 25 285 52 0 13 22 85 80 22741 5562 41354 11 11 1229 94982 37 391 36 0 38 29 107 89 34178 9492 47879 43 41 1991 143566 61 449 80 8 48 31 124 115 69551 17456 103793 53 53 2393 113325 63 715 144 2 68 21 78 59 29653 9422 52235 82 82 820 81518 32 208 45 0 32 21 83 66 38071 10913 49825 41 41 340 31970 15 101 40 0 5 21 78 42 4157 1283 4105 6 6 2443 192268 102 858 126 3 53 15 59 35 28321 6198 58687 82 81 1030 91261 55 306 75 1 33 9 33 3 40195 4501 40745 47 47 1091 80820 56 360 54 2 54 23 92 72 48158 9560 33187 108 100 1414 85829 59 424 84 1 37 18 52 38 13310 3394 14063 46 46 2192 116322 53 562 86 0 52 31 121 107 78474 9871 37407 38 38 1082 56544 32 292 62 2 0 25 92 73 6386 2419 7190 0 0 1764 116173 51 492 99 1 52 24 99 80 31588 10630 49562 45 45 2072 118781 80 690 63 0 51 22 86 69 61254 8536 76324 57 56 816 60138 23 253 76 0 16 21 75 46 21152 4911 21928 20 18 1121 73422 66 366 92 0 33 26 96 52 41272 9775 27860 56 54 809 67751 57 192 45 0 48 22 81 58 34165 11227 28078 38 37 1699 214002 53 620 57 0 33 26 104 85 37054 6916 49577 42 40 751 51185 24 221 44 0 24 20 76 13 12368 3424 28145 37 37 1309 97181 32 438 132 0 37 25 90 61 23168 8637 36241 36 36 732 45100 39 247 44 0 17 19 75 49 16380 3189 10824 34 34 1327 115801 43 388 67 0 32 22 86 47 41242 8178 46892 53 49 2246 186310 190 541 82 0 55 25 100 93 48450 16739 61264 85 82 968 71960 86 233 71 0 39 22 88 65 20790 6094 22933 36 36 1015 80105 48 333 44 5 31 21 80 64 34585 7237 20787 33 33 1100 103613 41 422 68 0 26 20 73 64 35672 7355 43978 57 55 1300 98707 33 452 54 3 37 23 88 57 52168 9734 51305 50 50 1982 136234 67 584 86 1 66 22 79 61 53933 11225 55593 71 71 1091 136781 52 366 59 0 35 21 81 71 34474 6213 51648 32 31 1107 105863 52 406 74 0 24 12 48 43 43753 4875 30552 45 42 666 42228 32 265 18 0 22 9 33 18 36456 8159 23470 33 31 1903 179997 91 606 156 0 37 32 120 103 51183 11893 77530 53 51 1608 169406 50 491 87 0 86 24 90 76 52742 10754 57299 64 64 223 19349 12 67 15 0 13 1 2 0 3895 786 9604 14 14 1807 160819 87 617 104 1 21 24 96 83 37076 9706 34684 38 37 1466 109510 53 597 54 0 32 25 86 73 24079 7796 41094 39 37 552 43803 24 240 11 0 8 4 15 4 2325 593 3439 8 8 708 47062 19 219 37 0 38 15 48 41 29354 5600 25171 38 38 1079 110845 44 349 80 0 45 21 81 57 30341 7245 23437 24 23 957 92517 52 241 66 1 24 23 84 52 18992 7360 34086 22 22 585 58660 36 136 27 0 23 12 46 24 15292 4574 24649 18 18 596 27676 22 194 59 0 2 16 59 17 5842 522 2342 3 1 980 98550 32 222 113 0 52 24 96 89 28918 10905 45571 49 48 585 43646 24 153 24 0 5 9 29 20 3738 999 3255 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 975 75566 28 281 58 0 43 25 91 51 95352 9016 30002 47 46 750 57359 48 240 43 0 18 17 63 63 37478 5134 19360 33 33 1071 104330 36 358 45 0 44 18 68 48 26839 6608 43320 44 41 931 70369 47 302 55 0 45 21 84 70 26783 8577 35513 56 57 783 65494 56 267 66 0 29 17 54 32 33392 1543 23536 49 49 78 3616 5 14 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 874 143931 37 287 67 0 32 20 75 72 25446 9803 54438 45 45 1327 117946 66 476 67 0 65 26 87 56 59847 12140 56812 78 78 1831 137332 85 519 118 1 26 27 108 66 28162 6678 33838 51 46 750 84336 33 243 51 0 24 20 80 77 33298 6420 32366 25 25 778 43410 19 292 63 0 7 1 3 3 2781 4 13 1 1 1373 136250 58 410 84 1 62 24 93 73 37121 7979 55082 62 59 807 79015 34 217 35 0 30 14 55 37 22698 5141 31334 29 29 1544 100578 45 448 58 8 49 27 99 57 27615 1311 16612 26 26 685 57586 38 160 29 3 3 12 48 32 32689 443 5084 4 4 285 19764 12 75 19 1 10 2 8 4 5752 2416 9927 10 10 1336 105757 42 412 51 2 42 16 60 55 23164 8396 47413 43 43 954 103651 25 332 64 0 23 23 88 84 20304 5462 27389 36 36 1283 113402 35 417 96 0 40 28 112 90 34409 7271 30425 43 41 256 11796 9 79 22 0 1 2 8 1 0 0 0 0 0 81 7627 9 25 7 0 0 0 0 0 0 0 0 0 0 1214 121085 49 431 34 0 29 17 52 38 92538 4423 33510 33 32 41 6836 3 11 5 0 0 1 4 0 0 0 0 0 0 1634 139563 46 564 43 5 46 17 57 36 46037 5331 40389 53 53 42 5118 3 6 1 0 5 0 0 0 0 0 0 0 0 528 40248 16 183 34 1 8 4 14 7 5444 775 6012 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 890 95079 42 295 49 0 21 25 91 75 23924 6676 22205 19 18 1203 80763 32 230 44 0 21 26 89 52 52230 1489 17231 26 26 81 7131 4 27 0 1 0 0 0 0 0 0 0 0 0 61 4194 11 14 4 0 0 0 0 0 0 0 0 0 0 849 60378 20 240 40 1 15 15 54 45 8019 3080 11017 16 16 1035 109173 44 251 52 0 47 20 77 66 34542 11409 46741 84 84 964 83484 16 347 47 0 17 19 76 48 21157 6769 39869 28 22
Names of X columns:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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