Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
94 146283 112285 210907 30 103 98364 84786 120982 28 93 86146 83123 176508 38 103 96933 101193 179321 30 51 79234 38361 123185 22 70 42551 68504 52746 26 91 195663 119182 385534 25 22 6853 22807 33170 18 38 21529 17140 101645 11 93 95757 116174 149061 26 60 85584 57635 165446 25 123 143983 66198 237213 38 148 75851 71701 173326 44 90 59238 57793 133131 30 124 93163 80444 258873 40 70 96037 53855 180083 34 168 151511 97668 324799 47 115 136368 133824 230964 30 71 112642 101481 236785 31 66 94728 99645 135473 23 134 105499 114789 202925 36 117 121527 99052 215147 36 108 127766 67654 344297 30 84 98958 65553 153935 25 156 77900 97500 132943 39 120 85646 69112 174724 34 114 98579 82753 174415 31 94 130767 85323 225548 31 120 131741 72654 223632 33 81 53907 30727 124817 25 110 178812 77873 221698 33 133 146761 117478 210767 35 122 82036 74007 170266 42 158 163253 90183 260561 43 109 27032 61542 84853 30 124 171975 101494 294424 33 39 65990 27570 101011 13 92 86572 55813 215641 32 126 159676 79215 325107 36 0 1929 1423 7176 0 70 85371 55461 167542 28 37 58391 31081 106408 14 38 31580 22996 96560 17 120 136815 83122 265769 32 93 120642 70106 269651 30 95 69107 60578 149112 35 77 50495 39992 175824 20 90 108016 79892 152871 28 80 46341 49810 111665 28 31 78348 71570 116408 39 110 79336 100708 362301 34 66 56968 33032 78800 26 138 93176 82875 183167 39 133 161632 139077 277965 39 113 87850 71595 150629 33 100 127969 72260 168809 28 7 15049 5950 24188 4 140 155135 115762 329267 39 61 25109 32551 65029 18 41 45824 31701 101097 14 96 102996 80670 218946 29 164 160604 143558 244052 44 78 158051 117105 341570 21 49 44547 23789 103597 16 102 162647 120733 233328 28 124 174141 105195 256462 35 99 60622 73107 206161 28 129 179566 132068 311473 38 62 184301 149193 235800 23 73 75661 46821 177939 36 114 96144 87011 207176 32 99 129847 95260 196553 29 70 117286 55183 174184 25 104 71180 106671 143246 27 116 109377 73511 187559 36 91 85298 92945 187681 28 74 73631 78664 119016 23 138 86767 70054 182192 40 67 23824 22618 73566 23 151 93487 74011 194979 40 72 82981 83737 167488 28 120 73815 69094 143756 34 115 94552 93133 275541 33 105 132190 95536 243199 28 104 128754 225920 182999 34 108 66363 62133 135649 30 98 67808 61370 152299 33 69 61724 43836 120221 22 111 131722 106117 346485 38 99 68580 38692 145790 26 71 106175 84651 193339 35 27 55792 56622 80953 8 69 25157 15986 122774 24 107 76669 95364 130585 29 73 57283 26706 112611 20 107 105805 89691 286468 29 93 129484 67267 241066 45 129 72413 126846 148446 37 69 87831 41140 204713 33 118 96971 102860 182079 33 73 71299 51715 140344 25 119 77494 55801 220516 32 104 120336 111813 243060 29 107 93913 120293 162765 28 99 136048 138599 182613 28 90 181248 161647 232138 31 197 146123 115929 265318 52 36 32036 24266 85574 21 85 186646 162901 310839 24 139 102255 109825 225060 41 106 168237 129838 232317 33 50 64219 37510 144966 32 64 19630 43750 43287 19 31 76825 40652 155754 20 63 115338 87771 164709 31 92 109427 85872 201940 31 106 118168 89275 235454 32 63 84845 44418 220801 18 69 153197 192565 99466 23 41 29877 35232 92661 17 56 63506 40909 133328 20 25 22445 13294 61361 12 65 47695 32387 125930 17 93 68370 140867 100750 30 114 146304 120662 224549 31 38 38233 21233 82316 10 44 42071 44332 102010 13 87 50517 61056 101523 22 110 103950 101338 243511 42 0 5841 1168 22938 1 27 2341 13497 41566 9 83 84396 65567 152474 32 30 24610 25162 61857 11 80 35753 32334 99923 25 98 55515 40735 132487 36 82 209056 91413 317394 31 0 6622 855 21054 0 60 115814 97068 209641 24 28 11609 44339 22648 13 9 13155 14116 31414 8 33 18274 10288 46698 13 59 72875 65622 131698 19 49 10112 16563 91735 18 115 142775 76643 244749 33 140 68847 110681 184510 40 49 17659 29011 79863 22 120 20112 92696 128423 38 66 61023 94785 97839 24 21 13983 8773 38214 8 124 65176 83209 151101 35 152 132432 93815 272458 43 139 112494 86687 172494 43 38 45109 34553 108043 14 144 170875 105547 328107 41 120 180759 103487 250579 38 160 214921 213688 351067 45 114 100226 71220 158015 31 39 32043 23517 98866 13 78 54454 56926 85439 28 119 78876 91721 229242 31 141 170745 115168 351619 40 101 6940 111194 84207 30 56 49025 51009 120445 16 133 122037 135777 324598 37 83 53782 51513 131069 30 116 127748 74163 204271 35 90 86839 51633 165543 32 36 44830 75345 141722 27 50 77395 33416 116048 20 61 89324 83305 250047 18 97 103300 98952 299775 31 98 112283 102372 195838 31 78 10901 37238 173260 21 117 120691 103772 254488 39 148 58106 123969 104389 41 41 57140 27142 136084 13 105 122422 135400 199476 32 55 25899 21399 92499 18 132 139296 130115 224330 39 44 52678 24874 135781 14 21 23853 34988 74408 7 50 17306 45549 81240 17 0 7953 6023 14688 0 73 89455 64466 181633 30 86 147866 54990 271856 37 0 4245 1644 7199 0 13 21509 6179 46660 5 4 7670 3926 17547 1 57 66675 32755 133368 16 48 14336 34777 95227 32 46 53608 73224 152601 24 48 30059 27114 98146 17 32 29668 20760 79619 11 68 22097 37636 59194 24 87 96841 65461 139942 22 43 41907 30080 118612 12 67 27080 24094 72880 19 46 35885 69008 65475 13 46 41247 54968 99643 17 56 28313 46090 71965 15 48 36845 27507 77272 16 44 16548 10672 49289 24 60 36134 34029 135131 15 65 55764 46300 108446 17 55 28910 24760 89746 18 38 13339 18779 44296 20 52 25319 21280 77648 16 60 66956 40662 181528 16 54 47487 28987 134019 18 86 52785 22827 124064 22 24 44683 18513 92630 8 52 35619 30594 121848 17 49 21920 24006 52915 18 61 45608 27913 81872 16 61 7721 42744 58981 23 81 20634 12934 53515 22 43 29788 22574 60812 13 40 31931 41385 56375 13 40 37754 18653 65490 16 56 32505 18472 80949 16 68 40557 30976 76302 20 79 94238 63339 104011 22 47 44197 25568 98104 17 57 43228 33747 67989 18 41 4103 4154 30989 17 29 44144 19474 135458 12 3 32868 35130 73504 7 60 27640 39067 63123 17 30 14063 13310 61254 14 79 28990 65892 74914 23 47 4694 4143 31774 17 40 42648 28579 81437 14 48 64329 51776 87186 15 36 21928 21152 50090 17 42 25836 38084 65745 21 49 22779 27717 56653 18 57 40820 32928 158399 18 12 27530 11342 46455 17 40 32378 19499 73624 17 43 10824 16380 38395 16 33 39613 36874 91899 15 77 60865 48259 139526 21 43 19787 16734 52164 16 45 20107 28207 51567 14 47 36605 30143 70551 15 43 40961 41369 84856 17 45 48231 45833 102538 15 50 39725 29156 86678 15 35 21455 35944 85709 10 7 23430 36278 34662 6 71 62991 45588 150580 22 67 49363 45097 99611 21 0 9604 3895 19349 1 62 24552 28394 99373 18 54 31493 18632 86230 17 4 3439 2325 30837 4 25 19555 25139 31706 10 40 21228 27975 89806 16 38 23177 14483 62088 16 19 22094 13127 40151 9 17 2342 5839 27634 16 67 38798 24069 76990 17 14 3255 3738 37460 7 30 24261 18625 54157 15 54 18511 36341 49862 14 35 40798 24548 84337 14 59 28893 21792 64175 18 24 21425 26263 59382 12 58 50276 23686 119308 16 42 37643 49303 76702 21 46 30377 25659 103425 19 61 27126 28904 70344 16 3 13 2781 43410 1 52 42097 29236 104838 16 25 24451 19546 62215 10 40 14335 22818 69304 19 32 5084 32689 53117 12 4 9927 5752 19764 2 49 43527 22197 86680 14 63 27184 20055 84105 17 67 21610 25272 77945 19 32 20484 82206 89113 14 23 20156 32073 91005 11 7 6012 5444 40248 4 54 18475 20154 64187 16 37 12645 36944 50857 20 35 11017 8019 56613 12 51 37623 30884 62792 15 39 35873 19540 72535 16
Names of X columns:
feedback_messages_p120 totseconds totsize time_in_rfc compendiums_reviewed
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