Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
112285 146283 94 24188 144 84786 98364 103 18273 103 83123 86146 93 14130 98 101193 96933 103 32287 135 38361 79234 51 8654 61 68504 42551 70 9245 39 119182 195663 91 33251 150 22807 6853 22 1271 5 17140 21529 38 5279 28 116174 95757 93 27101 84 57635 85584 60 16373 80 66198 143983 123 19716 130 71701 75851 148 17753 82 57793 59238 90 9028 60 80444 93163 124 18653 131 53855 96037 70 8828 84 97668 151511 168 29498 140 133824 136368 115 27563 151 101481 112642 71 18293 91 99645 94728 66 22530 138 114789 105499 134 15977 150 99052 121527 117 35082 124 67654 127766 108 16116 119 65553 98958 84 15849 73 97500 77900 156 16026 110 69112 85646 120 26569 123 82753 98579 114 24785 90 85323 130767 94 17569 116 72654 131741 120 23825 113 30727 53907 81 7869 56 77873 178812 110 14975 115 117478 146761 133 37791 119 74007 82036 122 9605 129 90183 163253 158 27295 127 61542 27032 109 2746 27 101494 171975 124 34461 175 27570 65990 39 8098 35 55813 86572 92 4787 64 79215 159676 126 24919 96 1423 1929 0 603 0 55461 85371 70 16329 84 31081 58391 37 12558 41 22996 31580 38 7784 47 83122 136815 120 28522 126 70106 120642 93 22265 105 60578 69107 95 14459 80 39992 50495 77 14526 70 79892 108016 90 22240 73 49810 46341 80 11802 57 71570 78348 31 7623 40 100708 79336 110 11912 68 33032 56968 66 7935 21 82875 93176 138 18220 127 139077 161632 133 19199 154 71595 87850 113 19918 116 72260 127969 100 21884 102 5950 15049 7 2694 7 115762 155135 140 15808 148 32551 25109 61 3597 21 31701 45824 41 5296 35 80670 102996 96 25239 112 143558 160604 164 29801 137 117105 158051 78 18450 135 23789 44547 49 7132 26 120733 162647 102 34861 230 105195 174141 124 35940 181 73107 60622 99 16688 71 132068 179566 129 24683 147 149193 184301 62 46230 190 46821 75661 73 10387 64 87011 96144 114 21436 105 95260 129847 99 30546 107 55183 117286 70 19746 94 106671 71180 104 15977 116 73511 109377 116 22583 106 92945 85298 91 17274 143 78664 73631 74 16469 81 70054 86767 138 14251 89 22618 23824 67 3007 26 74011 93487 151 16851 84 83737 82981 72 21113 113 69094 73815 120 17401 120 93133 94552 115 23958 110 95536 132190 105 23567 134 225920 128754 104 13065 54 62133 66363 108 15358 96 61370 67808 98 14587 78 43836 61724 69 12770 51 106117 131722 111 24021 121 38692 68580 99 9648 38 84651 106175 71 20537 145 56622 55792 27 7905 59 15986 25157 69 4527 27 95364 76669 107 30495 91 26706 57283 73 7117 48 89691 105805 107 17719 68 67267 129484 93 27056 58 126846 72413 129 33473 150 41140 87831 69 9758 74 102860 96971 118 21115 181 51715 71299 73 7236 65 55801 77494 119 13790 97 111813 120336 104 32902 121 120293 93913 107 25131 99 138599 136048 99 30910 152 161647 181248 90 35947 188 115929 146123 197 29848 138 24266 32036 36 6943 40 162901 186646 85 42705 254 109825 102255 139 31808 87 129838 168237 106 26675 178 37510 64219 50 8435 51 43750 19630 64 7409 49 40652 76825 31 14993 73 87771 115338 63 36867 176 85872 109427 92 33835 94 89275 118168 106 24164 120 44418 84845 63 12607 66 192565 153197 69 22609 56 35232 29877 41 5892 39 40909 63506 56 17014 66 13294 22445 25 5394 27 32387 47695 65 9178 65 140867 68370 93 6440 58 120662 146304 114 21916 98 21233 38233 38 4011 25 44332 42071 44 5818 26 61056 50517 87 18647 77 101338 103950 110 20556 130 1168 5841 0 238 11 13497 2341 27 70 2 65567 84396 83 22392 101 25162 24610 30 3913 31 32334 35753 80 12237 36 40735 55515 98 8388 120 91413 209056 82 22120 195 855 6622 0 338 4 97068 115814 60 11727 89 44339 11609 28 3704 24 14116 13155 9 3988 39 10288 18274 33 3030 14 65622 72875 59 13520 78 16563 10112 49 1421 15 76643 142775 115 20923 106 110681 68847 140 20237 83 29011 17659 49 3219 24 92696 20112 120 3769 37 94785 61023 66 12252 77 8773 13983 21 1888 16 83209 65176 124 14497 56 93815 132432 152 28864 132 86687 112494 139 21721 144 34553 45109 38 4821 40 105547 170875 144 33644 153 103487 180759 120 15923 143 213688 214921 160 42935 220 71220 100226 114 18864 79 23517 32043 39 4977 50 56926 54454 78 7785 39 91721 78876 119 17939 95 115168 170745 141 23436 169 111194 6940 101 325 12 51009 49025 56 13539 63 135777 122037 133 34538 134 51513 53782 83 12198 69 74163 127748 116 26924 119 51633 86839 90 12716 119 75345 44830 36 8172 75 33416 77395 50 10855 63 83305 89324 61 11932 55 98952 103300 97 14300 103 102372 112283 98 25515 197 37238 10901 78 2805 16 103772 120691 117 29402 140 123969 58106 148 16440 89 27142 57140 41 11221 40 135400 122422 105 28732 125 21399 25899 55 5250 21 130115 139296 132 28608 167 24874 52678 44 8092 32 34988 23853 21 4473 36 45549 17306 50 1572 13 6023 7953 0 2065 5 64466 89455 73 14817 96 54990 147866 86 16714 151 1644 4245 0 556 6 6179 21509 13 2089 13 3926 7670 4 2658 3 32755 66675 57 10695 57 34777 14336 48 1669 23 73224 53608 46 16267 61 27114 30059 48 7768 21 20760 29668 32 7252 43 37636 22097 68 6387 20 65461 96841 87 18715 82 30080 41907 43 7936 90 24094 27080 67 8643 25 69008 35885 46 7294 60 54968 41247 46 4570 61 46090 28313 56 7185 85 27507 36845 48 10058 43 10672 16548 44 2342 25 34029 36134 60 8509 41 46300 55764 65 13275 26 24760 28910 55 6816 38 18779 13339 38 1930 12 21280 25319 52 8086 29 40662 66956 60 10737 49 28987 47487 54 8033 46 22827 52785 86 7058 41 18513 44683 24 6782 31 30594 35619 52 5401 41 24006 21920 49 6521 26 27913 45608 61 10856 23 42744 7721 61 2154 14 12934 20634 81 6117 16 22574 29788 43 5238 25 41385 31931 40 4820 21 18653 37754 40 5615 32 18472 32505 56 4272 9 30976 40557 68 8702 35 63339 94238 79 15340 42 25568 44197 47 8030 68 33747 43228 57 9526 32 4154 4103 41 1278 6 19474 44144 29 4236 68 35130 32868 3 3023 33 39067 27640 60 7196 84 13310 14063 30 3394 46 65892 28990 79 6371 30 4143 4694 47 1574 0 28579 42648 40 9620 36 51776 64329 48 6978 47 21152 21928 36 4911 20 38084 25836 42 8645 50 27717 22779 49 8987 30 32928 40820 57 5544 30 11342 27530 12 3083 34 19499 32378 40 6909 33 16380 10824 43 3189 34 36874 39613 33 6745 37 48259 60865 77 16724 83 16734 19787 43 4850 32 28207 20107 45 7025 30 30143 36605 47 6047 43 41369 40961 43 7377 41 45833 48231 45 9078 51 29156 39725 50 4605 19 35944 21455 35 3238 37 36278 23430 7 8100 33 45588 62991 71 9653 41 45097 49363 67 8914 54 3895 9604 0 786 14 28394 24552 62 6700 25 18632 31493 54 5788 25 2325 3439 4 593 8 25139 19555 25 4506 26 27975 21228 40 6382 20 14483 23177 38 5621 11 13127 22094 19 3997 14 5839 2342 17 520 3 24069 38798 67 8891 40 3738 3255 14 999 5 18625 24261 30 7067 38 36341 18511 54 4639 32 24548 40798 35 5654 41 21792 28893 59 6928 46 26263 21425 24 1514 47 23686 50276 58 9238 37 49303 37643 42 8204 51 25659 30377 46 5926 49 28904 27126 61 5785 21 2781 13 3 4 1 29236 42097 52 5930 44 19546 24451 25 3710 26 22818 14335 40 705 21 32689 5084 32 443 4 5752 9927 4 2416 10 22197 43527 49 7747 43 20055 27184 63 5432 34 25272 21610 67 4913 32 82206 20484 32 2650 20 32073 20156 23 2370 34 5444 6012 7 775 6 20154 18475 54 5576 12 36944 12645 37 1352 24 8019 11017 35 3080 16 30884 37623 51 10205 72 19540 35873 39 6095 27
Names of X columns:
totsize totseconds feedback_messages_p120 totrevisions tothyperlinks
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