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