Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
84 65 95556 47 1168 170588 72 54 54565 48 669 86621 41 58 63016 40 1098 118522 85 99 79774 75 1939 152510 30 41 31258 32 679 86206 53 0 52491 18 321 37257 74 111 91256 80 2667 306055 22 1 22807 16 345 32750 68 37 77411 38 1367 116502 47 60 48821 25 1159 130539 102 64 52295 65 1385 161876 123 71 63262 74 1155 128274 69 38 50466 45 1154 104367 108 76 62932 42 1703 193024 59 62 38439 56 1190 141574 122 126 70817 124 3103 254150 91 85 105965 42 1357 181110 45 74 73795 102 1892 198432 53 78 82043 36 883 113853 112 100 74349 51 1627 159940 82 79 82204 49 1412 166822 92 76 55709 57 1901 286675 51 42 37137 21 825 95297 120 81 70780 32 904 108278 99 103 55027 77 2115 146342 86 70 56699 90 1858 145142 59 75 65911 82 1781 161740 98 93 56316 56 1304 162716 71 42 26982 34 1035 106888 100 95 54628 39 1557 188150 113 87 96750 53 1527 189401 92 44 53009 48 1220 129484 107 88 64664 64 1368 204030 75 29 36990 27 564 68538 100 89 85224 56 1990 243625 69 71 37048 37 1557 167255 106 70 59635 83 2057 264528 51 50 42051 50 1111 122024 18 30 26998 26 686 80964 91 87 63717 109 2012 209795 75 78 55071 56 2232 224205 63 48 40001 42 1033 115971 72 57 54506 49 1166 138191 59 31 35838 31 1020 81106 29 30 50838 49 1735 93125 85 70 86997 97 3644 307743 66 20 33032 42 918 78800 106 84 61704 55 1579 158835 113 81 117986 71 2805 223590 101 79 56733 39 1496 131108 65 72 55064 54 1108 128734 7 8 5950 24 496 24188 111 67 84607 213 1753 257677 61 21 32551 17 744 65029 41 30 31701 58 1101 98066 70 70 71170 27 1612 173587 136 87 101773 59 1806 180042 87 87 101653 114 2460 197266 90 116 81493 76 1653 212060 76 54 55901 51 1234 141582 101 96 109104 87 2368 245107 57 94 114425 78 2204 206879 61 51 36311 62 1633 145696 92 51 70027 61 1664 173535 80 38 73713 39 958 142064 35 65 40671 37 1118 117926 72 64 89041 87 1258 113461 88 66 57231 102 1964 145285 80 98 68608 50 1483 150999 62 100 59155 37 1034 91838 81 56 55827 33 1348 118807 63 22 22618 28 837 69471 91 51 58425 44 1310 126630 65 61 65724 38 1144 145908 79 94 56979 34 987 98393 85 98 72369 45 1334 190926 75 76 79194 58 1452 198797 70 57 202316 59 957 106193 78 75 44970 36 911 89318 75 48 49319 43 1114 120362 55 48 36252 30 1209 98791 80 109 75741 68 2541 283982 83 27 38417 53 1176 132798 38 85 64102 59 1253 135251 27 49 56622 25 870 80953 62 24 15430 39 1473 109237 82 46 72571 36 811 96634 88 44 67271 115 2435 226191 59 49 43460 55 1410 172071 92 108 99501 71 1982 117815 40 42 28340 52 1214 133561 91 110 76013 49 1356 152193 63 28 37361 43 1197 112004 88 79 48204 52 1971 169613 85 49 76168 51 1432 187483 76 64 85168 27 1030 130533 67 75 125410 29 1145 142339 69 122 123328 56 1509 199232 150 95 83038 94 2230 201744 77 106 120087 74 2236 247024 103 73 91939 66 1324 158054 81 108 103646 42 1599 182581 37 30 29467 112 999 106351 64 13 43750 14 602 43287 22 69 34497 45 1379 127493 35 75 66477 92 1172 127930 61 82 71181 29 1337 149006 80 108 74482 66 1709 187714 54 28 174949 32 668 74112 76 83 46765 66 1128 94006 87 51 90257 43 1209 176625 75 90 51370 56 1324 141933 0 12 1168 10 391 22938 61 87 51360 53 1264 125927 30 23 25162 25 530 61857 66 57 21067 34 983 91290 56 93 58233 66 1926 255100 0 4 855 16 387 21054 40 56 85903 38 1481 174150 9 18 14116 19 449 31414 82 86 57637 77 2135 189461 110 40 94137 35 1128 137544 71 16 62147 46 800 77166 50 18 62832 30 964 74567 21 16 8773 34 568 38214 78 42 63785 25 901 90961 118 78 65196 50 1568 194652 102 31 73087 38 859 135261 109 104 72631 51 2229 244272 104 121 86281 66 1566 201748 124 111 162365 73 2153 256402 76 57 56530 23 828 139144 57 28 35606 29 809 76470 91 56 70111 196 1848 193518 101 82 92046 115 2914 280334 66 2 63989 16 589 50999 98 91 104911 88 2613 254825 63 41 43448 51 1298 103239 85 84 60029 33 1109 168059 74 55 38650 53 1437 129762 19 3 47261 74 682 78256 57 68 73586 82 2799 249232 74 93 83042 54 1281 152366 78 41 37238 63 2035 173260 91 94 63958 70 1752 197197 112 105 78956 41 1133 68388 79 70 99518 49 1667 139409 100 114 111436 68 1558 185366 0 0 0 0 0 0 0 4 6023 10 207 14688 0 0 0 1 5 98 0 0 0 2 8 455 0 0 0 0 0 0 0 0 0 0 0 0 48 42 42564 58 1300 137885 55 97 38885 72 1718 185288 0 0 0 0 0 0 0 0 0 4 4 203 0 7 1644 5 151 7199 13 12 6179 20 474 46660 4 0 3926 5 141 17547 31 37 23238 27 705 73567 0 0 0 2 29 969 29 39 49288 33 1020 105477
Names of X columns:
Feedback_messages Blogged_Computations Aantal_karakters Logins Pageviews Time_Rfc
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
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation