Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
1418 210907 79 94 24188 869 120982 58 103 18273 1530 176508 60 93 14130 2172 179321 108 103 32287 901 123185 49 51 8654 463 52746 0 70 9245 3201 385534 121 91 33251 371 33170 1 22 1271 1192 101645 20 38 5279 1583 149061 43 93 27101 1439 165446 69 60 16373 1764 237213 78 123 19716 1495 173326 86 148 17753 1373 133131 44 90 9028 2187 258873 104 124 18653 1491 180083 63 70 8828 4041 324799 158 168 29498 1706 230964 102 115 27563 2152 236785 77 71 18293 1036 135473 82 66 22530 1882 202925 115 134 15977 1929 215147 101 117 35082 2242 344297 80 108 16116 1220 153935 50 84 15849 1289 132943 83 156 16026 2515 174724 123 120 26569 2147 174415 73 114 24785 2352 225548 81 94 17569 1638 223632 105 120 23825 1222 124817 47 81 7869 1812 221698 105 110 14975 1677 210767 94 133 37791 1579 170266 44 122 9605 1731 260561 114 158 27295 807 84853 38 109 2746 2452 294424 107 124 34461 829 101011 30 39 8098 1940 215641 71 92 4787 2662 325107 84 126 24919 186 7176 0 0 603 1499 167542 59 70 16329 865 106408 33 37 12558 1793 96560 42 38 7784 2527 265769 96 120 28522 2747 269651 106 93 22265 1324 149112 56 95 14459 2702 175824 57 77 14526 1383 152871 59 90 22240 1179 111665 39 80 11802 2099 116408 34 31 7623 4308 362301 76 110 11912 918 78800 20 66 7935 1831 183167 91 138 18220 3373 277965 115 133 19199 1713 150629 85 113 19918 1438 168809 76 100 21884 496 24188 8 7 2694 2253 329267 79 140 15808 744 65029 21 61 3597 1161 101097 30 41 5296 2352 218946 76 96 25239 2144 244052 101 164 29801 4691 341570 94 78 18450 1112 103597 27 49 7132 2694 233328 92 102 34861 1973 256462 123 124 35940 1769 206161 75 99 16688 3148 311473 128 129 24683 2474 235800 105 62 46230 2084 177939 55 73 10387 1954 207176 56 114 21436 1226 196553 41 99 30546 1389 174184 72 70 19746 1496 143246 67 104 15977 2269 187559 75 116 22583 1833 187681 114 91 17274 1268 119016 118 74 16469 1943 182192 77 138 14251 893 73566 22 67 3007 1762 194979 66 151 16851 1403 167488 69 72 21113 1425 143756 105 120 17401 1857 275541 116 115 23958 1840 243199 88 105 23567 1502 182999 73 104 13065 1441 135649 99 108 15358 1420 152299 62 98 14587 1416 120221 53 69 12770 2970 346485 118 111 24021 1317 145790 30 99 9648 1644 193339 100 71 20537 870 80953 49 27 7905 1654 122774 24 69 4527 1054 130585 67 107 30495 937 112611 46 73 7117 3004 286468 57 107 17719 2008 241066 75 93 27056 2547 148446 135 129 33473 1885 204713 68 69 9758 1626 182079 124 118 21115 1468 140344 33 73 7236 2445 220516 98 119 13790 1964 243060 58 104 32902 1381 162765 68 107 25131 1369 182613 81 99 30910 1659 232138 131 90 35947 2888 265318 110 197 29848 1290 85574 37 36 6943 2845 310839 130 85 42705 1982 225060 93 139 31808 1904 232317 118 106 26675 1391 144966 39 50 8435 602 43287 13 64 7409 1743 155754 74 31 14993 1559 164709 81 63 36867 2014 201940 109 92 33835 2143 235454 151 106 24164 2146 220801 51 63 12607 874 99466 28 69 22609 1590 92661 40 41 5892 1590 133328 56 56 17014 1210 61361 27 25 5394 2072 125930 37 65 9178 1281 100750 83 93 6440 1401 224549 54 114 21916 834 82316 27 38 4011 1105 102010 28 44 5818 1272 101523 59 87 18647 1944 243511 133 110 20556 391 22938 12 0 238 761 41566 0 27 70 1605 152474 106 83 22392 530 61857 23 30 3913 1988 99923 44 80 12237 1386 132487 71 98 8388 2395 317394 116 82 22120 387 21054 4 0 338 1742 209641 62 60 11727 620 22648 12 28 3704 449 31414 18 9 3988 800 46698 14 33 3030 1684 131698 60 59 13520 1050 91735 7 49 1421 2699 244749 98 115 20923 1606 184510 64 140 20237 1502 79863 29 49 3219 1204 128423 32 120 3769 1138 97839 25 66 12252 568 38214 16 21 1888 1459 151101 48 124 14497 2158 272458 100 152 28864 1111 172494 46 139 21721 1421 108043 45 38 4821 2833 328107 129 144 33644 1955 250579 130 120 15923 2922 351067 136 160 42935 1002 158015 59 114 18864 1060 98866 25 39 4977 956 85439 32 78 7785 2186 229242 63 119 17939 3604 351619 95 141 23436 1035 84207 14 101 325 1417 120445 36 56 13539 3261 324598 113 133 34538 1587 131069 47 83 12198 1424 204271 92 116 26924 1701 165543 70 90 12716 1249 141722 19 36 8172 946 116048 50 50 10855 1926 250047 41 61 11932 3352 299775 91 97 14300 1641 195838 111 98 25515 2035 173260 41 78 2805 2312 254488 120 117 29402 1369 104389 135 148 16440 1577 136084 27 41 11221 2201 199476 87 105 28732 961 92499 25 55 5250 1900 224330 131 132 28608 1254 135781 45 44 8092 1335 74408 29 21 4473 1597 81240 58 50 1572 207 14688 4 0 2065 1645 181633 47 73 14817 2429 271856 109 86 16714 151 7199 7 0 556 474 46660 12 13 2089 141 17547 0 4 2658 1639 133368 37 57 10695 872 95227 37 48 1669 1318 152601 46 46 16267 1018 98146 15 48 7768 1383 79619 42 32 7252 1314 59194 7 68 6387 1335 139942 54 87 18715 1403 118612 54 43 7936 910 72880 14 67 8643 616 65475 16 46 7294 1407 99643 33 46 4570 771 71965 32 56 7185 766 77272 21 48 10058 473 49289 15 44 2342 1376 135131 38 60 8509 1232 108446 22 65 13275 1521 89746 28 55 6816 572 44296 10 38 1930 1059 77648 31 52 8086 1544 181528 32 60 10737 1230 134019 32 54 8033 1206 124064 43 86 7058 1205 92630 27 24 6782 1255 121848 37 52 5401 613 52915 20 49 6521 721 81872 32 61 10856 1109 58981 0 61 2154 740 53515 5 81 6117 1126 60812 26 43 5238 728 56375 10 40 4820 689 65490 27 40 5615 592 80949 11 56 4272 995 76302 29 68 8702 1613 104011 25 79 15340 2048 98104 55 47 8030 705 67989 23 57 9526 301 30989 5 41 1278 1803 135458 43 29 4236 799 73504 23 3 3023 861 63123 34 60 7196 1186 61254 36 30 3394 1451 74914 35 79 6371 628 31774 0 47 1574 1161 81437 37 40 9620 1463 87186 28 48 6978 742 50090 16 36 4911 979 65745 26 42 8645 675 56653 38 49 8987 1241 158399 23 57 5544 676 46455 22 12 3083 1049 73624 30 40 6909 620 38395 16 43 3189 1081 91899 18 33 6745 1688 139526 28 77 16724 736 52164 32 43 4850 617 51567 21 45 7025 812 70551 23 47 6047 1051 84856 29 43 7377 1656 102538 50 45 9078 705 86678 12 50 4605 945 85709 21 35 3238 554 34662 18 7 8100 1597 150580 27 71 9653 982 99611 41 67 8914 222 19349 13 0 786 1212 99373 12 62 6700 1143 86230 21 54 5788 435 30837 8 4 593 532 31706 26 25 4506 882 89806 27 40 6382 608 62088 13 38 5621 459 40151 16 19 3997 578 27634 2 17 520 826 76990 42 67 8891 509 37460 5 14 999 717 54157 37 30 7067 637 49862 17 54 4639 857 84337 38 35 5654 830 64175 37 59 6928 652 59382 29 24 1514 707 119308 32 58 9238 954 76702 35 42 8204 1461 103425 17 46 5926 672 70344 20 61 5785 778 43410 7 3 4 1141 104838 46 52 5930 680 62215 24 25 3710 1090 69304 40 40 705 616 53117 3 32 443 285 19764 10 4 2416 1145 86680 37 49 7747 733 84105 17 63 5432 888 77945 28 67 4913 849 89113 19 32 2650 1182 91005 29 23 2370 528 40248 8 7 775 642 64187 10 54 5576 947 50857 15 37 1352 819 56613 15 35 3080 757 62792 28 51 10205 894 72535 17 39 6095
Names of X columns:
pageviews time_in_rfc blogged_comp. feedb.mess.long tot.revisions
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