Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
112285 210907 79 144 145 3 1 84786 120982 58 103 101 4 1 83123 176508 60 98 98 12 1 101193 179321 108 135 132 2 1 38361 123185 49 61 60 1 1 68504 52746 0 39 38 3 1 119182 385534 121 150 144 0 1 22807 33170 1 5 5 0 1 17140 101645 20 28 28 0 0 116174 149061 43 84 84 5 1 57635 165446 69 80 79 0 1 66198 237213 78 130 127 0 1 71701 173326 86 82 78 7 1 57793 133131 44 60 60 7 1 80444 258873 104 131 131 3 1 53855 180083 63 84 84 9 1 97668 324799 158 140 133 0 1 133824 230964 102 151 150 4 1 101481 236785 77 91 91 3 1 99645 135473 82 138 132 0 1 114789 202925 115 150 136 7 1 99052 215147 101 124 124 0 1 67654 344297 80 119 118 1 1 65553 153935 50 73 70 5 1 97500 132943 83 110 107 7 1 69112 174724 123 123 119 0 1 82753 174415 73 90 89 0 1 85323 225548 81 116 112 5 1 72654 223632 105 113 108 0 1 30727 124817 47 56 52 0 1 77873 221698 105 115 112 0 1 117478 210767 94 119 116 3 1 74007 170266 44 129 123 4 1 90183 260561 114 127 125 1 1 61542 84853 38 27 27 4 1 101494 294424 107 175 162 2 1 27570 101011 30 35 32 0 0 55813 215641 71 64 64 0 1 79215 325107 84 96 92 0 1 1423 7176 0 0 0 0 0 55461 167542 59 84 83 2 1 31081 106408 33 41 41 1 1 22996 96560 42 47 47 0 0 83122 265769 96 126 120 2 1 70106 269651 106 105 105 10 1 60578 149112 56 80 79 6 1 39992 175824 57 70 65 0 0 79892 152871 59 73 70 5 1 49810 111665 39 57 55 4 1 71570 116408 34 40 39 1 1 100708 362301 76 68 67 2 1 33032 78800 20 21 21 2 1 82875 183167 91 127 127 0 1 139077 277965 115 154 152 8 1 71595 150629 85 116 113 3 1 72260 168809 76 102 99 0 1 5950 24188 8 7 7 0 1 115762 329267 79 148 141 8 1 32551 65029 21 21 21 5 1 31701 101097 30 35 35 3 1 80670 218946 76 112 109 1 1 143558 244052 101 137 133 5 1 117105 341570 94 135 123 1 0 23789 103597 27 26 26 1 0 120733 233328 92 230 230 5 1 105195 256462 123 181 166 0 1 73107 206161 75 71 68 12 1 132068 311473 128 147 147 8 1 149193 235800 105 190 179 8 1 46821 177939 55 64 61 8 1 87011 207176 56 105 101 8 1 95260 196553 41 107 108 2 1 55183 174184 72 94 90 0 1 106671 143246 67 116 114 5 1 73511 187559 75 106 103 8 1 92945 187681 114 143 142 2 1 78664 119016 118 81 79 5 1 70054 182192 77 89 88 12 1 22618 73566 22 26 25 6 1 74011 194979 66 84 83 7 1 83737 167488 69 113 113 2 1 69094 143756 105 120 118 0 1 93133 275541 116 110 110 4 1 95536 243199 88 134 129 3 1 225920 182999 73 54 51 6 1 62133 135649 99 96 93 2 1 61370 152299 62 78 76 0 1 43836 120221 53 51 49 1 1 106117 346485 118 121 118 0 1 38692 145790 30 38 38 5 1 84651 193339 100 145 141 2 1 56622 80953 49 59 58 0 1 15986 122774 24 27 27 0 1 95364 130585 67 91 91 5 1 26706 112611 46 48 48 0 0 89691 286468 57 68 63 1 1 67267 241066 75 58 56 0 1 126846 148446 135 150 144 1 1 41140 204713 68 74 73 1 1 102860 182079 124 181 168 2 1 51715 140344 33 65 64 6 1 55801 220516 98 97 97 1 1 111813 243060 58 121 117 4 1 120293 162765 68 99 100 2 1 138599 182613 81 152 149 3 1 161647 232138 131 188 187 0 1 115929 265318 110 138 127 10 1 24266 85574 37 40 37 0 0 162901 310839 130 254 245 9 1 109825 225060 93 87 87 7 1 129838 232317 118 178 177 0 1 37510 144966 39 51 49 0 1 43750 43287 13 49 49 4 1 40652 155754 74 73 73 4 1 87771 164709 81 176 177 0 1 85872 201940 109 94 94 0 1 89275 235454 151 120 117 0 1 44418 220801 51 66 60 1 0 192565 99466 28 56 55 0 1 35232 92661 40 39 39 1 0 40909 133328 56 66 64 0 0 13294 61361 27 27 26 0 0 32387 125930 37 65 64 4 0 140867 100750 83 58 58 0 1 120662 224549 54 98 95 4 1 21233 82316 27 25 25 4 0 44332 102010 28 26 26 3 0 61056 101523 59 77 76 0 0 101338 243511 133 130 129 0 1 1168 22938 12 11 11 0 1 13497 41566 0 2 2 5 0 65567 152474 106 101 101 0 1 25162 61857 23 31 28 4 1 32334 99923 44 36 36 0 0 40735 132487 71 120 89 0 1 91413 317394 116 195 193 1 1 855 21054 4 4 4 0 1 97068 209641 62 89 84 5 1 44339 22648 12 24 23 0 0 14116 31414 18 39 39 0 1 10288 46698 14 14 14 0 0 65622 131698 60 78 78 0 0 16563 91735 7 15 14 0 0 76643 244749 98 106 101 2 1 110681 184510 64 83 82 7 1 29011 79863 29 24 24 1 0 92696 128423 32 37 36 8 1 94785 97839 25 77 75 2 1 8773 38214 16 16 16 0 1 83209 151101 48 56 55 2 1 93815 272458 100 132 131 0 1 86687 172494 46 144 131 0 1 34553 108043 45 40 39 1 0 105547 328107 129 153 144 3 1 103487 250579 130 143 139 0 1 213688 351067 136 220 211 3 1 71220 158015 59 79 78 0 1 23517 98866 25 50 50 0 0 56926 85439 32 39 39 0 1 91721 229242 63 95 90 4 1 115168 351619 95 169 166 4 1 111194 84207 14 12 12 11 1 51009 120445 36 63 57 0 0 135777 324598 113 134 133 0 1 51513 131069 47 69 69 4 1 74163 204271 92 119 119 0 1 51633 165543 70 119 119 1 1 75345 141722 19 75 65 0 1 33416 116048 50 63 61 0 0 83305 250047 41 55 49 0 0 98952 299775 91 103 101 9 1 102372 195838 111 197 196 1 1 37238 173260 41 16 15 3 1 103772 254488 120 140 136 10 1 123969 104389 135 89 89 5 1 27142 136084 27 40 40 0 0 135400 199476 87 125 123 2 1 21399 92499 25 21 21 0 0 130115 224330 131 167 163 1 1 24874 135781 45 32 29 2 0 34988 74408 29 36 35 4 0 45549 81240 58 13 13 0 0 6023 14688 4 5 5 0 1 64466 181633 47 96 96 2 1 54990 271856 109 151 151 1 1 1644 7199 7 6 6 0 1 6179 46660 12 13 13 0 1 3926 17547 0 3 3 0 1 32755 133368 37 57 56 1 0 34777 95227 37 23 23 0 1 73224 152601 46 61 57 2 1 27114 98146 15 21 14 0 0 20760 79619 42 43 43 3 0 37636 59194 7 20 20 6 0 65461 139942 54 82 72 0 0 30080 118612 54 90 87 2 0 24094 72880 14 25 21 0 0 69008 65475 16 60 56 2 0 54968 99643 33 61 59 1 0 46090 71965 32 85 82 1 0 27507 77272 21 43 43 2 0 10672 49289 15 25 25 1 0 34029 135131 38 41 38 0 0 46300 108446 22 26 25 1 0 24760 89746 28 38 38 3 0 18779 44296 10 12 12 0 0 21280 77648 31 29 29 0 0 40662 181528 32 49 47 0 0 28987 134019 32 46 45 0 0 22827 124064 43 41 40 1 0 18513 92630 27 31 30 4 0 30594 121848 37 41 41 0 0 24006 52915 20 26 25 0 0 27913 81872 32 23 23 0 0 42744 58981 0 14 14 7 0 12934 53515 5 16 16 2 0 22574 60812 26 25 26 0 0 41385 56375 10 21 21 7 0 18653 65490 27 32 27 3 0 18472 80949 11 9 9 0 0 30976 76302 29 35 33 0 0 63339 104011 25 42 42 6 0 25568 98104 55 68 68 2 0 33747 67989 23 32 32 0 0 4154 30989 5 6 6 0 0 19474 135458 43 68 67 3 0 35130 73504 23 33 33 0 0 39067 63123 34 84 77 1 0 13310 61254 36 46 46 1 0 65892 74914 35 30 30 0 0 4143 31774 0 0 0 1 0 28579 81437 37 36 36 0 0 51776 87186 28 47 46 0 0 21152 50090 16 20 18 0 0 38084 65745 26 50 48 0 0 27717 56653 38 30 29 0 0 32928 158399 23 30 28 0 0 11342 46455 22 34 34 0 0 19499 73624 30 33 33 0 0 16380 38395 16 34 34 0 0 36874 91899 18 37 33 0 0 48259 139526 28 83 80 0 0 16734 52164 32 32 32 0 0 28207 51567 21 30 30 2 0 30143 70551 23 43 41 0 0 41369 84856 29 41 41 1 0 45833 102538 50 51 51 1 0 29156 86678 12 19 18 0 0 35944 85709 21 37 34 0 0 36278 34662 18 33 31 0 0 45588 150580 27 41 39 0 0 45097 99611 41 54 54 0 0 3895 19349 13 14 14 0 0 28394 99373 12 25 24 1 0 18632 86230 21 25 24 0 0 2325 30837 8 8 8 0 0 25139 31706 26 26 26 0 0 27975 89806 27 20 19 0 0 14483 62088 13 11 11 1 0 13127 40151 16 14 14 0 0 5839 27634 2 3 1 0 0 24069 76990 42 40 39 0 0 3738 37460 5 5 5 0 0 18625 54157 37 38 37 0 0 36341 49862 17 32 32 0 0 24548 84337 38 41 38 0 0 21792 64175 37 46 47 0 0 26263 59382 29 47 47 0 0 23686 119308 32 37 37 0 0 49303 76702 35 51 51 0 0 25659 103425 17 49 45 1 0 28904 70344 20 21 21 0 0 2781 43410 7 1 1 0 0 29236 104838 46 44 42 1 0 19546 62215 24 26 26 0 0 22818 69304 40 21 21 6 0 32689 53117 3 4 4 3 0 5752 19764 10 10 10 1 0 22197 86680 37 43 43 2 0 20055 84105 17 34 34 0 0 25272 77945 28 32 31 0 0 82206 89113 19 20 19 0 0 32073 91005 29 34 34 3 0 5444 40248 8 6 6 1 0 20154 64187 10 12 11 0 0 36944 50857 15 24 24 0 0 8019 56613 15 16 16 1 0 30884 62792 28 72 72 0 0 19540 72535 17 27 21 0 0
Names of X columns:
TotChar TotTim TotBlogCom TotHyp TotBlog Shared Pop
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