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