Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
170588 46 95556 21387 114468 127 128 86621 48 54565 12341 88594 90 89 113337 37 63016 11397 74151 68 68 152510 75 79774 25533 77921 111 108 86206 31 31258 6630 53212 51 51 37257 18 52491 7745 34956 33 33 306055 79 91256 25304 149703 123 119 32750 16 22807 1271 6853 5 5 116502 38 77411 18035 58907 63 63 130539 24 48821 13284 67067 66 66 161876 65 52295 15628 110563 99 98 128274 74 63262 13990 58126 72 71 102350 43 50466 8532 57113 55 55 193024 42 62932 13953 77993 116 116 141574 55 38439 7210 68091 71 71 253559 121 70817 22436 124676 125 120 181110 42 105965 20238 109522 123 122 198432 102 73795 10244 75865 74 74 113853 36 82043 17390 79746 116 111 159940 50 74349 9917 77844 117 103 166822 48 82204 29625 98681 98 98 286675 56 55709 13193 105531 101 100 91657 19 37137 6815 51428 43 42 108278 32 70780 11807 65703 103 100 146342 77 55027 21472 72562 107 105 145142 90 56699 19589 81728 77 77 161740 81 65911 12266 95580 87 83 160905 55 56316 18391 98278 99 98 106888 34 26982 6711 46629 46 46 188150 38 54628 9004 115189 96 95 189401 53 96750 34301 124865 92 91 129484 48 53009 8061 59392 96 91 204030 63 64664 19463 127818 96 94 62731 25 36990 2053 17821 15 15 243625 56 85224 29618 154076 147 137 167255 37 37048 3963 64881 56 56 264528 83 59635 17609 136506 81 78 122024 50 42051 11738 66524 69 68 80964 26 26998 11082 45988 34 34 209795 108 63717 22648 107445 98 94 224205 55 55071 16538 102772 82 82 115971 41 40001 10149 46657 64 63 138191 49 54506 19787 97563 61 58 81106 31 35838 7740 36663 45 43 93125 49 50838 5873 55369 37 36 305756 96 86997 11694 77921 64 64 78800 42 33032 7935 56968 21 21 158835 55 61704 15093 77519 104 104 221745 70 117986 14533 129805 126 124 131108 39 56733 15834 72761 104 101 128734 53 55064 15699 81278 87 85 24188 24 5950 2694 15049 7 7 257662 209 84607 13834 113935 130 124 65029 17 32551 3597 25109 21 21 98066 58 31701 5296 45824 35 35 173587 27 71170 21637 89644 97 95 180042 58 101773 18081 109011 103 102 197266 114 101653 29016 134245 210 212 212060 75 81493 27279 136692 151 141 141582 51 55901 12889 50741 57 54 245107 86 109104 21550 149510 117 117 206879 77 114425 34042 147888 152 145 145696 62 36311 8190 54987 52 50 170635 60 70027 16163 74467 83 80 142064 39 73713 23471 100033 87 87 114820 35 40671 14220 85505 80 78 113461 86 89041 12759 62426 88 86 145285 102 57231 18142 82932 83 82 150999 49 68608 12416 72002 120 119 91812 35 59155 14069 65469 76 75 118807 33 55827 11131 63572 70 70 69471 28 22618 3007 23824 26 25 126630 44 58425 12530 73831 66 66 145908 37 65724 13205 63551 89 89 98393 33 56979 13025 56756 100 99 190926 45 72369 18778 81399 98 98 198797 57 79194 19793 117881 109 104 106193 58 202316 8238 70711 51 48 89318 36 44970 11285 50495 82 81 120362 42 49319 10490 53845 65 64 98791 30 36252 10457 51390 46 44 274953 67 75741 17313 104953 104 104 132798 53 38417 9592 65983 36 36 135251 59 64102 14282 76839 123 120 80953 25 56622 7905 55792 59 58 109237 39 15430 4525 25155 27 27 96634 36 72571 21179 55291 84 84 226191 114 67271 13724 84279 61 56 171286 54 43460 18446 99692 46 46 117815 70 99501 25961 59633 125 119 133561 51 28340 6602 63249 58 57 152193 49 76013 16795 82928 152 139 112004 42 37361 5463 50000 52 51 169613 51 48204 11299 69455 85 85 187483 51 76168 20390 84068 95 91 130533 27 85168 18558 76195 78 79 142339 29 125410 26262 114634 144 142 189764 54 123328 25267 139357 149 149 201603 92 83038 21091 110044 101 96 246834 72 120087 32425 155118 205 198 155947 63 91939 24380 83061 61 61 182581 41 103646 20460 127122 145 145 106351 111 29467 6515 45653 28 26 43287 14 43750 7409 19630 49 49 127493 45 34497 12300 67229 68 68 127930 91 66477 27127 86060 142 145 149006 29 71181 27687 88003 82 82 187653 64 74482 19255 95815 105 102 74112 32 174949 15070 85499 52 52 94006 65 46765 6291 27220 56 56 176625 42 90257 16577 109882 81 80 141933 55 51370 13027 72579 100 99 22938 10 1168 238 5841 11 11 125927 53 51360 17103 68369 87 87 61857 25 25162 3913 24610 31 28 91290 33 21067 5654 30995 67 67 255100 66 58233 14354 150662 150 150 21054 16 855 338 6622 4 4 169093 35 85903 8852 93694 75 71 31414 19 14116 3988 13155 39 39 188701 76 57637 15964 111908 88 87 137544 35 94137 14784 57550 67 66 77166 46 62147 2667 16356 24 23 74567 29 62832 7164 40174 58 56 38214 34 8773 1888 13983 16 16 90961 25 63785 12367 52316 49 49 194224 48 65196 20505 99585 109 108 135261 38 73087 18330 86271 124 112 244272 50 72631 24993 131012 115 110 201748 65 86281 11869 130274 128 126 256402 72 162365 31156 159051 159 155 139144 23 56530 15234 76506 75 75 76470 29 35606 6645 49145 30 30 189502 194 70111 15007 66398 83 78 280334 114 92046 16597 127546 135 135 50999 15 63989 317 6802 8 8 253274 86 104911 27627 99509 115 114 103239 50 43448 8658 43106 60 60 168059 33 60029 20493 108303 99 99 128768 50 38650 8877 64167 98 98 75746 72 47261 867 8579 36 33 249232 81 73586 13259 97811 93 93 152366 54 83042 20613 84365 158 157 173260 63 37238 2805 10901 16 15 197197 69 63958 20588 91346 100 98 67507 39 78956 9812 33660 49 49 139409 49 99518 20001 93634 89 88 185366 67 111436 23042 109348 153 151 0 0 0 0 0 0 0 14688 10 6023 2065 7953 5 5 98 1 0 0 0 0 0 455 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 137885 57 42564 10902 63538 80 80 185288 72 38885 11309 108281 122 122 0 0 0 0 0 0 0 203 4 0 0 0 0 0 7199 5 1644 556 4245 6 6 46660 20 6179 2089 21509 13 13 17547 5 3926 2658 7670 3 3 73567 27 23238 1419 10641 18 18 969 2 0 0 0 0 0 105477 33 49288 10699 41243 49 48
Names of X columns:
TimeRFCSEC #Logins CW#characters CW#revisions CW#seconds CWIncludedHyperlinks CWIncludedBlogs
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