Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
79 210907 396 3 115 94 58 120982 297 4 109 103 60 176508 559 12 146 93 108 179321 967 2 116 103 49 123185 270 1 68 51 0 52746 143 3 101 70 121 385534 1562 0 96 91 1 33170 109 0 67 22 20 101645 371 0 44 38 43 149061 656 5 100 93 69 165446 511 0 93 60 78 237213 655 0 140 123 86 173326 465 7 166 148 44 133131 525 7 99 90 104 258873 885 3 139 124 63 180083 497 9 130 70 158 324799 1436 0 181 168 102 230964 612 4 116 115 77 236785 865 3 116 71 82 135473 385 0 88 66 115 202925 567 7 139 134 101 215147 639 0 135 117 80 344297 963 1 108 108 50 153935 398 5 89 84 83 132943 410 7 156 156 123 174724 966 0 129 120 73 174415 801 0 118 114 81 225548 892 5 118 94 105 223632 513 0 125 120 47 124817 469 0 95 81 105 221698 683 0 126 110 94 210767 643 3 135 133 44 170266 535 4 154 122 114 260561 625 1 165 158 38 84853 264 4 113 109 107 294424 992 2 127 124 30 101011 238 0 52 39 71 215641 818 0 121 92 84 325107 937 0 136 126 0 7176 70 0 0 0 59 167542 507 2 108 70 33 106408 260 1 46 37 42 96560 503 0 54 38 96 265769 927 2 124 120 106 269651 1269 10 115 93 56 149112 537 6 128 95 57 175824 910 0 80 77 59 152871 532 5 97 90 39 111665 345 4 104 80 34 116408 918 1 59 31 76 362301 1635 2 125 110 20 78800 330 2 82 66 91 183167 557 0 149 138 115 277965 1178 8 149 133 85 150629 740 3 122 113 76 168809 452 0 118 100 8 24188 218 0 12 7 79 329267 764 8 144 140 21 65029 255 5 67 61 30 101097 454 3 52 41 76 218946 866 1 108 96 101 244052 574 5 166 164 94 341570 1276 1 80 78 27 103597 379 1 60 49 92 233328 825 5 107 102 123 256462 798 0 127 124 75 206161 663 12 107 99 128 311473 1069 8 146 129 105 235800 921 8 84 62 55 177939 858 8 141 73 56 207176 711 8 123 114 41 196553 503 2 111 99 72 174184 382 0 98 70 67 143246 464 5 105 104 75 187559 717 8 135 116 114 187681 690 2 107 91 118 119016 462 5 85 74 77 182192 657 12 155 138 22 73566 385 6 88 67 66 194979 577 7 155 151 69 167488 619 2 104 72 105 143756 479 0 132 120 116 275541 817 4 127 115 88 243199 752 3 108 105 73 182999 430 6 129 104 99 135649 451 2 116 108 62 152299 537 0 122 98 53 120221 519 1 85 69 118 346485 1000 0 147 111 30 145790 637 5 99 99 100 193339 465 2 87 71 49 80953 437 0 28 27 24 122774 711 0 90 69 67 130585 299 5 109 107 46 112611 248 0 78 73 57 286468 1162 1 111 107 75 241066 714 0 158 93 135 148446 905 1 141 129 68 204713 649 1 122 69 124 182079 512 2 124 118 33 140344 472 6 93 73 98 220516 905 1 124 119 58 243060 786 4 112 104 68 162765 489 2 108 107 81 182613 479 3 99 99 131 232138 617 0 117 90 110 265318 925 10 199 197 37 85574 351 0 78 36 130 310839 1144 9 91 85 93 225060 669 7 158 139 118 232317 707 0 126 106 39 144966 458 0 122 50 13 43287 214 4 71 64 74 155754 599 4 75 31 81 164709 572 0 115 63 109 201940 897 0 119 92 151 235454 819 0 124 106 51 220801 720 1 72 63 28 99466 273 0 91 69 40 92661 508 1 45 41 56 133328 506 0 78 56 27 61361 451 0 39 25 37 125930 699 4 68 65 83 100750 407 0 119 93 54 224549 465 4 117 114 27 82316 245 4 39 38 28 102010 370 3 50 44 59 101523 316 0 88 87 133 243511 603 0 155 110 12 22938 154 0 0 0 0 41566 229 5 36 27 106 152474 577 0 123 83 23 61857 192 4 32 30 44 99923 617 0 99 80 71 132487 411 0 136 98 116 317394 975 1 117 82 4 21054 146 0 0 0 62 209641 705 5 88 60 12 22648 184 0 39 28 18 31414 200 0 25 9 14 46698 274 0 52 33 60 131698 502 0 75 59 7 91735 382 0 71 49 98 244749 964 2 124 115 64 184510 537 7 151 140 29 79863 438 1 71 49 32 128423 369 8 145 120 25 97839 417 2 87 66 16 38214 276 0 27 21 48 151101 514 2 131 124 100 272458 822 0 162 152 46 172494 389 0 165 139 45 108043 466 1 54 38 129 328107 1255 3 159 144 130 250579 694 0 147 120 136 351067 1024 3 170 160 59 158015 400 0 119 114 25 98866 397 0 49 39 32 85439 350 0 104 78 63 229242 719 4 120 119 95 351619 1277 4 150 141 14 84207 356 11 112 101 36 120445 457 0 59 56 113 324598 1402 0 136 133 47 131069 600 4 107 83 92 204271 480 0 130 116 70 165543 595 1 115 90 19 141722 436 0 107 36 50 116048 230 0 75 50 41 250047 651 0 71 61 91 299775 1367 9 120 97 111 195838 564 1 116 98 41 173260 716 3 79 78 120 254488 747 10 150 117 135 104389 467 5 156 148 27 136084 671 0 51 41 87 199476 861 2 118 105 25 92499 319 0 71 55 131 224330 612 1 144 132 45 135781 433 2 47 44 29 74408 434 4 28 21 58 81240 503 0 68 50 4 14688 85 0 0 0 47 181633 564 2 110 73 109 271856 824 1 147 86 7 7199 74 0 0 0 12 46660 259 0 15 13 0 17547 69 0 4 4 37 133368 535 1 64 57 37 95227 239 0 111 48 46 152601 438 2 85 46 15 98146 459 0 68 48 42 79619 426 3 40 32 7 59194 288 6 80 68 54 139942 498 0 88 87 54 118612 454 2 48 43 14 72880 376 0 76 67 16 65475 225 2 51 46 33 99643 555 1 67 46 32 71965 252 1 59 56 21 77272 208 2 61 48 15 49289 130 1 76 44 38 135131 481 0 60 60 22 108446 389 1 68 65 28 89746 565 3 71 55 10 44296 173 0 76 38 31 77648 278 0 62 52 32 181528 609 0 61 60 32 134019 422 0 67 54 43 124064 445 1 88 86 27 92630 387 4 30 24 37 121848 339 0 64 52 20 52915 181 0 68 49 32 81872 245 0 64 61 0 58981 384 7 91 61 5 53515 212 2 88 81 26 60812 399 0 52 43 10 56375 229 7 49 40 27 65490 224 3 62 40 11 80949 203 0 61 56 29 76302 333 0 76 68 25 104011 384 6 88 79 55 98104 636 2 66 47 23 67989 185 0 71 57 5 30989 93 0 68 41 43 135458 581 3 48 29 23 73504 248 0 25 3 34 63123 304 1 68 60 36 61254 344 1 41 30 35 74914 407 0 90 79 0 31774 170 1 66 47 37 81437 312 0 54 40 28 87186 507 0 59 48 16 50090 224 0 60 36 26 65745 340 0 77 42 38 56653 168 0 68 49 23 158399 443 0 72 57 22 46455 204 0 67 12 30 73624 367 0 64 40 16 38395 210 0 63 43 18 91899 335 0 59 33 28 139526 364 0 84 77 32 52164 178 0 64 43 21 51567 206 2 56 45 23 70551 279 0 54 47 29 84856 387 1 67 43 50 102538 490 1 58 45 12 86678 238 0 59 50 21 85709 343 0 40 35 18 34662 232 0 22 7 27 150580 530 0 83 71 41 99611 291 0 81 67 13 19349 67 0 2 0 12 99373 397 1 72 62 21 86230 467 0 61 54 8 30837 178 0 15 4 26 31706 175 0 32 25 27 89806 299 0 62 40 13 62088 154 1 58 38 16 40151 106 0 36 19 2 27634 189 0 59 17 42 76990 194 0 68 67 5 37460 135 0 21 14 37 54157 201 0 55 30 17 49862 207 0 54 54 38 84337 280 0 55 35 37 64175 260 0 72 59 29 59382 227 0 41 24 32 119308 239 0 61 58 35 76702 333 0 67 42 17 103425 428 1 76 46 20 70344 230 0 64 61 7 43410 292 0 3 3 46 104838 350 1 63 52 24 62215 186 0 40 25 40 69304 326 6 69 40 3 53117 155 3 48 32 10 19764 75 1 8 4 37 86680 361 2 52 49 17 84105 261 0 66 63 28 77945 299 0 76 67 19 89113 300 0 43 32 29 91005 450 3 39 23 8 40248 183 1 14 7 10 64187 238 0 61 54 15 50857 165 0 71 37 15 56613 234 1 44 35 28 62792 176 0 60 51 17 72535 329 0 64 39
Names of X columns:
blogged_computations time_in_rfc compendium_views_info shared_compendiums feedback_messages_p1 feedback_messages_p120
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