Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
1785 276257 71 492 3 96 41 1227 180480 66 436 4 71 34 1931 229040 75 694 16 70 44 2683 218443 104 1137 2 134 38 1247 171533 52 380 1 67 27 631 70849 28 179 3 8 35 4845 536497 125 2354 0 162 33 381 33186 19 111 0 1 18 2066 217320 60 740 7 83 34 1759 213274 45 595 0 82 33 2157 310843 112 809 0 92 46 2211 242788 122 693 7 117 57 1967 195022 76 738 10 56 37 3005 367785 81 1184 4 139 55 2228 261990 86 713 10 83 44 5009 392509 181 1729 0 176 62 2353 335528 75 844 8 114 40 3278 376673 163 1298 4 105 39 1473 181980 56 514 3 103 32 2347 266736 87 689 8 135 51 2522 278265 70 837 0 123 49 2987 461287 104 1330 1 87 39 1523 195786 42 491 5 74 25 1761 197058 55 622 9 103 56 3660 250284 126 1332 1 154 45 2937 245373 129 1043 0 113 38 2914 274121 129 1082 5 99 45 2009 278027 88 636 0 117 43 1555 165597 52 586 0 59 32 3049 371452 72 1170 0 142 41 2430 295296 80 973 3 132 50 2092 248320 81 721 6 50 50 2404 351980 95 863 1 141 51 1018 101014 40 343 4 43 37 3462 412722 101 1278 4 141 44 2764 273950 56 1186 0 83 42 3710 425531 122 1334 0 112 44 1947 231912 84 652 2 79 36 947 115658 33 284 1 33 17 3608 376008 201 1273 2 137 43 3324 335039 82 1518 10 125 41 1842 194127 71 715 10 80 41 1869 206947 78 671 5 78 38 1813 182286 64 486 6 68 49 2496 153778 82 1022 1 50 45 5557 457592 153 2084 2 101 42 918 78800 42 330 2 20 26 2254 208277 77 658 0 101 52 4103 359144 121 1385 10 149 50 2241 184648 60 930 3 108 45 1942 234078 76 620 0 96 40 496 24188 24 218 0 8 4 2594 380576 326 840 8 88 44 744 65029 17 255 5 21 18 1161 101097 64 454 3 30 14 3121 288327 60 1149 1 97 38 2621 334829 87 684 5 134 61 3905 359400 198 1190 6 132 39 2722 369577 146 1079 0 161 42 2312 269961 86 883 12 89 40 4061 389738 147 1331 10 160 51 3195 309474 119 1159 12 139 28 3041 282769 118 1217 11 104 43 2643 269324 89 946 8 92 42 1496 234773 69 579 2 54 37 1835 237561 68 474 0 119 30 2080 211396 135 626 6 93 39 2772 240376 151 843 10 85 44 2440 247447 84 893 2 145 36 1718 181550 70 633 5 143 28 2566 242152 70 873 13 99 47 893 73566 32 385 6 22 23 2227 246125 86 729 7 78 48 1878 199565 56 774 2 83 38 2177 222676 65 769 4 131 42 2352 363558 88 996 4 140 46 2981 365442 96 1194 3 148 37 1926 217036 108 575 6 80 41 2400 213466 66 725 2 133 42 2034 204477 67 706 0 99 41 1800 169080 48 665 1 62 36 4168 478396 128 1259 0 161 45 1369 145943 69 653 5 30 26 2403 288626 106 694 2 120 44 870 80953 25 437 0 49 8 1968 150221 55 822 0 52 27 1569 179317 60 458 6 76 38 3962 395368 213 1545 1 85 38 2928 349460 120 987 0 146 57 3098 180679 106 1051 1 165 45 2557 286578 100 838 1 87 40 2329 274477 81 703 3 165 42 1858 195623 65 613 10 48 31 3146 282361 77 1128 1 149 36 2581 329121 85 967 4 75 40 1824 198658 42 617 4 84 40 1914 262630 59 654 5 110 35 2210 300481 83 805 0 165 39 4118 403404 155 1355 12 155 65 3844 406613 114 1456 13 165 33 2791 294371 138 878 8 121 51 2425 313267 67 887 0 156 42 2052 189276 188 663 0 73 36 602 43287 14 214 4 13 19 2195 189520 83 733 4 89 25 2412 250254 148 830 0 105 44 2628 268886 51 1174 0 129 40 2758 314153 92 1068 0 169 44 1268 160308 81 413 0 28 30 3233 162843 97 946 0 118 45 2025 344925 74 657 5 82 42 2310 300526 89 690 0 147 45 398 23623 11 156 0 12 1 2205 195817 73 779 0 146 40 530 61857 25 192 4 23 11 1610 163931 50 461 0 83 45 3153 428191 120 1213 1 163 38 387 21054 16 146 0 4 0 2137 252805 52 866 5 81 30 492 31961 22 200 0 18 8 3674 335888 119 1290 3 115 41 2136 246100 68 715 7 76 48 1748 180591 93 514 13 55 48 1790 163400 54 697 3 53 32 568 38214 34 276 0 16 8 2191 224597 44 752 3 81 43 2792 357602 82 1021 0 137 52 1396 198104 62 481 0 50 53 3718 424398 85 1626 4 142 49 2554 348017 99 884 0 163 48 3460 421610 129 1187 3 141 56 1283 192170 37 488 0 71 40 1130 102510 43 403 0 42 36 2974 302158 347 977 4 94 44 4346 444599 182 1525 5 118 46 1785 148707 57 551 15 63 43 4349 407736 134 1807 5 127 46 1920 164406 79 723 5 55 39 1923 278077 50 632 2 117 41 2541 282461 96 898 1 110 46 1844 219544 115 621 0 39 32 4081 384177 122 1606 9 95 45 2339 246963 92 811 1 128 39 2035 173260 63 716 3 41 21 3108 336715 104 1001 11 146 49 1974 176654 58 732 5 147 55 2651 253341 87 1024 2 119 36 2702 307133 109 831 1 185 48 2 1 0 0 9 0 0 207 14688 10 85 0 4 0 5 98 1 0 0 0 0 8 455 2 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 2255 260901 88 773 2 75 43 3447 409280 162 1128 3 157 52 0 0 0 0 0 0 0 4 203 4 0 0 0 0 151 7199 5 74 0 7 0 474 46660 20 259 0 12 5 141 17547 5 69 0 0 1 1111 118589 45 301 0 37 45 29 969 2 0 0 0 0 2011 233108 70 668 2 61 34
Names of X columns:
pageviews timerfc logins compendiumviews sharedcompendiums bloggedcompendiums compendiumsreviewed
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