Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
210907 56 145 30 112285 24188 3201 120982 56 101 28 84786 18273 371 176508 54 98 38 83123 14130 1192 179321 89 132 30 101193 32287 1583 123185 40 60 22 38361 8654 1439 52746 25 38 26 68504 9245 1764 385534 92 144 25 119182 33251 1495 33170 18 5 18 22807 1271 1373 149061 44 84 26 116174 27101 1491 165446 33 79 25 57635 16373 4041 237213 84 127 38 66198 19716 1706 173326 88 78 44 71701 17753 2152 133131 55 60 30 57793 9028 1036 258873 60 131 40 80444 18653 1882 180083 66 84 34 53855 8828 1929 324799 154 133 47 97668 29498 2242 230964 53 150 30 133824 27563 1220 236785 119 91 31 101481 18293 1289 135473 41 132 23 99645 22530 2515 202925 61 136 36 114789 15977 2147 215147 58 124 36 99052 35082 2352 344297 75 118 30 67654 16116 1638 153935 33 70 25 65553 15849 1222 132943 40 107 39 97500 16026 1812 174724 92 119 34 69112 26569 1677 174415 100 89 31 82753 24785 1579 225548 112 112 31 85323 17569 1731 223632 73 108 33 72654 23825 807 124817 40 52 25 30727 7869 2452 221698 45 112 33 77873 14975 829 210767 60 116 35 117478 37791 1940 170266 62 123 42 74007 9605 2662 260561 75 125 43 90183 27295 186 84853 31 27 30 61542 2746 1499 294424 77 162 33 101494 34461 865 215641 46 64 32 55813 4787 2527 325107 99 92 36 79215 24919 2747 167542 66 83 28 55461 16329 2702 106408 30 41 14 31081 12558 1383 265769 146 120 32 83122 28522 2099 269651 67 105 30 70106 22265 4308 149112 56 79 35 60578 14459 918 152871 58 70 28 79892 22240 3373 111665 34 55 28 49810 11802 1713 116408 61 39 39 71570 7623 1438 362301 119 67 34 100708 11912 496 78800 42 21 26 33032 7935 2253 183167 66 127 39 82875 18220 744 277965 89 152 39 139077 19199 1161 150629 44 113 33 71595 19918 2352 168809 66 99 28 72260 21884 2144 24188 24 7 4 5950 2694 4691 329267 259 141 39 115762 15808 1112 65029 17 21 18 32551 3597 2694 101097 64 35 14 31701 5296 1973 218946 41 109 29 80670 25239 1769 244052 68 133 44 143558 29801 3148 233328 132 230 28 120733 34861 1954 256462 105 166 35 105195 35940 1226 206161 71 68 28 73107 16688 1389 311473 112 147 38 132068 24683 1496 235800 94 179 23 149193 46230 2269 177939 82 61 36 46821 10387 1833 207176 70 101 32 87011 21436 1268 196553 57 108 29 95260 30546 1943 174184 53 90 25 55183 19746 893 143246 103 114 27 106671 15977 1762 187559 121 103 36 73511 22583 1403 187681 62 142 28 92945 17274 1425 119016 52 79 23 78664 16469 1857 182192 52 88 40 70054 14251 1840 73566 32 25 23 22618 3007 1502 194979 62 83 40 74011 16851 1441 167488 45 113 28 83737 21113 1420 143756 46 118 34 69094 17401 1416 275541 63 110 33 93133 23958 2970 243199 75 129 28 95536 23567 1317 182999 88 51 34 225920 13065 1644 135649 46 93 30 62133 15358 870 152299 53 76 33 61370 14587 1654 120221 37 49 22 43836 12770 1054 346485 90 118 38 106117 24021 937 145790 63 38 26 38692 9648 3004 193339 78 141 35 84651 20537 2008 80953 25 58 8 56622 7905 2547 122774 45 27 24 15986 4527 1885 130585 46 91 29 95364 30495 1626 286468 144 63 29 89691 17719 2445 241066 82 56 45 67267 27056 1964 148446 91 144 37 126846 33473 1381 204713 71 73 33 41140 9758 1369 182079 63 168 33 102860 21115 1659 140344 53 64 25 51715 7236 2888 220516 62 97 32 55801 13790 1290 243060 63 117 29 111813 32902 2845 162765 32 100 28 120293 25131 1982 182613 39 149 28 138599 30910 1904 232138 62 187 31 161647 35947 1391 265318 117 127 52 115929 29848 602 310839 92 245 24 162901 42705 1559 225060 93 87 41 109825 31808 2014 232317 54 177 33 129838 26675 2143 144966 144 49 32 37510 8435 2146 43287 14 49 19 43750 7409 874 155754 61 73 20 40652 14993 1590 164709 109 177 31 87771 36867 1590 201940 38 94 31 85872 33835 1210 235454 73 117 32 89275 24164 2072 99466 50 55 23 192565 22609 1401 100750 72 58 30 140867 6440 391 224549 50 95 31 120662 21916 761 243511 71 129 42 101338 20556 1386 22938 10 11 1 1168 238 2395 152474 65 101 32 65567 22392 1742 61857 25 28 11 25162 3913 620 132487 41 89 36 40735 8388 800 317394 86 193 31 91413 22120 1684 21054 16 4 0 855 338 1050 209641 42 84 24 97068 11727 2699 31414 19 39 8 14116 3988 1502 244749 95 101 33 76643 20923 1459 184510 49 82 40 110681 20237 2158 128423 64 36 38 92696 3769 1421 97839 38 75 24 94785 12252 2833 38214 34 16 8 8773 1888 1955 151101 32 55 35 83209 14497 2922 272458 65 131 43 93815 28864 1002 172494 52 131 43 86687 21721 1060 328107 65 144 41 105547 33644 2186 250579 83 139 38 103487 15923 3604 351067 95 211 45 213688 42935 1035 158015 29 78 31 71220 18864 1417 85439 33 39 28 56926 7785 1587 229242 247 90 31 91721 17939 1424 351619 139 166 40 115168 23436 1701 84207 29 12 30 111194 325 1249 324598 110 133 37 135777 34538 1926 131069 67 69 30 51513 12198 3352 204271 42 119 35 74163 26924 1641 165543 65 119 32 51633 12716 2035 141722 94 65 27 75345 8172 2312 299775 95 101 31 98952 14300 2201 195838 67 196 31 102372 25515 961 173260 63 15 21 37238 2805 1900 254488 83 136 39 103772 29402 1254 104389 45 89 41 123969 16440 1335 199476 70 123 32 135400 28732 207 224330 83 163 39 130115 28608 2429 14688 10 5 0 6023 2065 1639 181633 70 96 30 64466 14817 872 271856 103 151 37 54990 16714 1318 7199 5 6 0 1644 556 1018 46660 20 13 5 6179 2089 1383 17547 5 3 1 3926 2658 1314 95227 34 23 32 34777 1669 1403 152601 48 57 24 73224 16267 910
Names of X columns:
time_in_rfc logins totblogs compendiums_reviewed totsize totrevisions Pageviews
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