Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
1418 210907 79 30 115 869 120982 58 28 109 1530 176508 60 38 146 2172 179321 108 30 116 901 123185 49 22 68 463 52746 0 26 101 3201 385534 121 25 96 371 33170 1 18 67 1192 101645 20 11 44 1583 149061 43 26 100 1439 165446 69 25 93 1764 237213 78 38 140 1495 173326 86 44 166 1373 133131 44 30 99 2187 258873 104 40 139 1491 180083 63 34 130 4041 324799 158 47 181 1706 230964 102 30 116 2152 236785 77 31 116 1036 135473 82 23 88 1882 202925 115 36 139 1929 215147 101 36 135 2242 344297 80 30 108 1220 153935 50 25 89 1289 132943 83 39 156 2515 174724 123 34 129 2147 174415 73 31 118 2352 225548 81 31 118 1638 223632 105 33 125 1222 124817 47 25 95 1812 221698 105 33 126 1677 210767 94 35 135 1579 170266 44 42 154 1731 260561 114 43 165 807 84853 38 30 113 2452 294424 107 33 127 829 101011 30 13 52 1940 215641 71 32 121 2662 325107 84 36 136 186 7176 0 0 0 1499 167542 59 28 108 865 106408 33 14 46 1793 96560 42 17 54 2527 265769 96 32 124 2747 269651 106 30 115 1324 149112 56 35 128 2702 175824 57 20 80 1383 152871 59 28 97 1179 111665 39 28 104 2099 116408 34 39 59 4308 362301 76 34 125 918 78800 20 26 82 1831 183167 91 39 149 3373 277965 115 39 149 1713 150629 85 33 122 1438 168809 76 28 118 496 24188 8 4 12 2253 329267 79 39 144 744 65029 21 18 67 1161 101097 30 14 52 2352 218946 76 29 108 2144 244052 101 44 166 4691 341570 94 21 80 1112 103597 27 16 60 2694 233328 92 28 107 1973 256462 123 35 127 1769 206161 75 28 107 3148 311473 128 38 146 2474 235800 105 23 84 2084 177939 55 36 141 1954 207176 56 32 123 1226 196553 41 29 111 1389 174184 72 25 98 1496 143246 67 27 105 2269 187559 75 36 135 1833 187681 114 28 107 1268 119016 118 23 85 1943 182192 77 40 155 893 73566 22 23 88 1762 194979 66 40 155 1403 167488 69 28 104 1425 143756 105 34 132 1857 275541 116 33 127 1840 243199 88 28 108 1502 182999 73 34 129 1441 135649 99 30 116 1420 152299 62 33 122 1416 120221 53 22 85 2970 346485 118 38 147 1317 145790 30 26 99 1644 193339 100 35 87 870 80953 49 8 28 1654 122774 24 24 90 1054 130585 67 29 109 937 112611 46 20 78 3004 286468 57 29 111 2008 241066 75 45 158 2547 148446 135 37 141 1885 204713 68 33 122 1626 182079 124 33 124 1468 140344 33 25 93 2445 220516 98 32 124 1964 243060 58 29 112 1381 162765 68 28 108 1369 182613 81 28 99 1659 232138 131 31 117 2888 265318 110 52 199 1290 85574 37 21 78 2845 310839 130 24 91 1982 225060 93 41 158 1904 232317 118 33 126 1391 144966 39 32 122 602 43287 13 19 71 1743 155754 74 20 75 1559 164709 81 31 115 2014 201940 109 31 119 2143 235454 151 32 124 2146 220801 51 18 72 874 99466 28 23 91 1590 92661 40 17 45 1590 133328 56 20 78 1210 61361 27 12 39 2072 125930 37 17 68 1281 100750 83 30 119 1401 224549 54 31 117 834 82316 27 10 39 1105 102010 28 13 50 1272 101523 59 22 88 1944 243511 133 42 155 391 22938 12 1 0 761 41566 0 9 36 1605 152474 106 32 123 530 61857 23 11 32 1988 99923 44 25 99 1386 132487 71 36 136 2395 317394 116 31 117 387 21054 4 0 0 1742 209641 62 24 88 620 22648 12 13 39 449 31414 18 8 25 800 46698 14 13 52 1684 131698 60 19 75 1050 91735 7 18 71 2699 244749 98 33 124 1606 184510 64 40 151 1502 79863 29 22 71 1204 128423 32 38 145 1138 97839 25 24 87 568 38214 16 8 27 1459 151101 48 35 131 2158 272458 100 43 162 1111 172494 46 43 165 1421 108043 45 14 54 2833 328107 129 41 159 1955 250579 130 38 147 2922 351067 136 45 170 1002 158015 59 31 119 1060 98866 25 13 49 956 85439 32 28 104 2186 229242 63 31 120 3604 351619 95 40 150 1035 84207 14 30 112 1417 120445 36 16 59 3261 324598 113 37 136 1587 131069 47 30 107 1424 204271 92 35 130 1701 165543 70 32 115 1249 141722 19 27 107 946 116048 50 20 75 1926 250047 41 18 71 3352 299775 91 31 120 1641 195838 111 31 116 2035 173260 41 21 79 2312 254488 120 39 150 1369 104389 135 41 156 1577 136084 27 13 51 2201 199476 87 32 118 961 92499 25 18 71 1900 224330 131 39 144 1254 135781 45 14 47 1335 74408 29 7 28 1597 81240 58 17 68 207 14688 4 0 0 1645 181633 47 30 110 2429 271856 109 37 147 151 7199 7 0 0 474 46660 12 5 15 141 17547 0 1 4 1639 133368 37 16 64 872 95227 37 32 111 1318 152601 46 24 85 1018 98146 15 17 68 1383 79619 42 11 40 1314 59194 7 24 80 1335 139942 54 22 88 1403 118612 54 12 48 910 72880 14 19 76 616 65475 16 13 51 1407 99643 33 17 67 771 71965 32 15 59 766 77272 21 16 61 473 49289 15 24 76 1376 135131 38 15 60 1232 108446 22 17 68 1521 89746 28 18 71 572 44296 10 20 76 1059 77648 31 16 62 1544 181528 32 16 61 1230 134019 32 18 67 1206 124064 43 22 88 1205 92630 27 8 30 1255 121848 37 17 64 613 52915 20 18 68 721 81872 32 16 64 1109 58981 0 23 91 740 53515 5 22 88 1126 60812 26 13 52 728 56375 10 13 49 689 65490 27 16 62 592 80949 11 16 61 995 76302 29 20 76 1613 104011 25 22 88 2048 98104 55 17 66 705 67989 23 18 71 301 30989 5 17 68 1803 135458 43 12 48 799 73504 23 7 25 861 63123 34 17 68 1186 61254 36 14 41 1451 74914 35 23 90 628 31774 0 17 66 1161 81437 37 14 54 1463 87186 28 15 59 742 50090 16 17 60 979 65745 26 21 77 675 56653 38 18 68 1241 158399 23 18 72 676 46455 22 17 67 1049 73624 30 17 64 620 38395 16 16 63 1081 91899 18 15 59 1688 139526 28 21 84 736 52164 32 16 64 617 51567 21 14 56 812 70551 23 15 54 1051 84856 29 17 67 1656 102538 50 15 58 705 86678 12 15 59 945 85709 21 10 40 554 34662 18 6 22 1597 150580 27 22 83 982 99611 41 21 81 222 19349 13 1 2 1212 99373 12 18 72 1143 86230 21 17 61 435 30837 8 4 15 532 31706 26 10 32 882 89806 27 16 62 608 62088 13 16 58 459 40151 16 9 36 578 27634 2 16 59 826 76990 42 17 68 509 37460 5 7 21 717 54157 37 15 55 637 49862 17 14 54 857 84337 38 14 55 830 64175 37 18 72 652 59382 29 12 41 707 119308 32 16 61 954 76702 35 21 67 1461 103425 17 19 76 672 70344 20 16 64 778 43410 7 1 3 1141 104838 46 16 63 680 62215 24 10 40 1090 69304 40 19 69 616 53117 3 12 48 285 19764 10 2 8 1145 86680 37 14 52 733 84105 17 17 66 888 77945 28 19 76 849 89113 19 14 43 1182 91005 29 11 39 528 40248 8 4 14 642 64187 10 16 61 947 50857 15 20 71 819 56613 15 12 44 757 62792 28 15 60 894 72535 17 16 64
Names of X columns:
pageviews time_in_rfc blogged_computations compendiums_reviewed feedback_messages_p1
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