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