Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
1575 129988 81 505 109 0 20 1134 130358 46 329 68 1 38 192 7215 18 72 1 0 0 2044 112976 87 588 146 0 49 3283 219904 126 1100 124 0 76 5877 402036 218 1618 267 1 104 1322 117604 50 442 83 1 37 1225 131822 50 333 48 0 57 1463 99729 38 406 87 0 42 2671 269088 87 858 129 1 67 1810 113066 69 568 146 2 50 1915 165392 62 595 113 0 66 1452 78240 90 534 60 0 38 2415 152673 84 818 240 4 48 1254 134368 47 359 50 4 42 1375 125769 68 419 81 3 47 1504 123467 50 364 85 0 71 1016 57396 49 290 64 5 0 2222 108458 79 683 127 0 50 634 22762 21 188 44 0 12 849 48633 50 291 37 0 16 2189 182081 83 640 94 0 77 1520 149502 61 542 127 0 32 1791 93773 46 532 159 1 38 1751 133428 79 549 41 1 50 1180 113933 23 428 153 0 33 1750 153851 140 561 86 0 49 1101 140711 75 266 55 0 59 2398 303863 106 785 78 0 55 1826 163810 38 754 84 0 42 1410 134521 41 411 71 0 47 1433 157640 39 482 111 2 51 1893 103274 90 593 82 4 45 2525 193500 105 760 254 0 73 2033 178768 43 668 66 1 51 1 0 1 0 0 0 0 1817 181412 55 855 58 0 46 1506 92342 47 464 131 3 44 1924 115762 42 453 261 9 33 1649 178277 50 607 56 0 71 1672 145067 58 540 90 2 61 1433 114146 50 551 57 0 28 866 86039 26 310 35 2 21 1683 125481 66 647 53 1 42 1024 95535 42 321 46 2 44 1029 129221 78 262 38 2 40 629 61554 26 180 45 1 15 1693 170811 83 587 114 0 46 1715 159121 75 544 104 1 43 2248 137317 52 809 151 4 57 658 48188 28 205 37 0 12 1234 95461 56 317 49 0 46 2157 249356 65 734 83 0 60 1725 191094 68 590 67 0 47 1504 161082 51 546 39 1 50 1454 111388 47 443 69 6 35 1620 172614 58 429 58 0 45 733 63205 18 205 68 0 25 894 109102 56 310 30 0 47 2355 137519 75 788 54 10 28 1514 125777 51 438 65 6 48 1636 88650 66 605 81 0 32 1123 95845 50 318 84 11 28 897 83419 29 288 45 3 31 855 101723 25 285 52 0 13 1229 94982 37 391 36 0 38 2012 145568 62 453 80 8 49 2393 113325 63 715 144 2 68 878 87133 33 219 48 0 36 340 31970 15 101 40 0 5 2480 194516 103 875 126 3 53 1071 98324 56 321 75 1 36 1091 80820 56 360 54 2 54 1425 89141 60 429 84 1 37 2227 118147 55 568 89 0 52 1082 56544 32 292 62 2 0 1790 118838 52 499 105 1 52 2072 118781 80 690 63 0 51 816 60138 23 253 76 0 16 1121 73422 66 366 92 0 33 834 70248 60 201 45 0 48 1766 225857 54 652 57 0 35 751 51185 24 221 44 0 24 1309 97181 32 438 132 0 37 732 45100 39 247 44 0 17 1327 115801 43 388 67 0 32 2246 186310 190 541 82 0 55 968 71960 86 233 71 0 39 1015 80105 48 333 44 5 31 1149 110416 43 440 72 0 26 1301 98707 34 452 54 4 37 1982 136234 67 584 86 1 66 1091 136781 52 366 59 0 35 1162 116132 54 433 74 0 24 759 49164 33 291 30 0 22 1980 189493 93 632 156 0 42 1608 169406 50 491 87 0 86 223 19349 12 67 15 0 13 1810 160902 88 617 104 1 21 1466 109510 53 597 54 0 32 553 43803 25 240 11 0 8 708 47062 19 219 37 0 38 1079 110845 44 349 80 0 45 957 92517 52 241 66 1 24 585 58660 36 136 27 0 23 596 27676 22 194 59 0 2 981 98550 33 222 113 0 52 585 43646 24 153 24 0 5 0 0 0 0 0 0 0 975 75566 28 281 58 0 43 751 57359 49 240 43 0 18 1071 104330 36 358 45 0 44 931 70369 47 302 55 0 45 783 65494 56 267 66 0 29 78 3616 5 14 5 0 0 0 0 0 0 0 0 0 874 143931 37 287 67 0 32 1327 117946 66 476 67 0 65 1831 137332 85 519 118 1 26 750 84336 33 243 51 0 24 778 43410 19 292 63 0 7 1442 139695 61 430 88 1 62 807 79015 34 217 35 0 30 1613 106116 47 466 58 8 54 685 57586 38 160 29 3 3 285 19764 12 75 19 1 10 1418 112195 43 442 51 2 46 954 103651 25 332 64 0 23 1283 113402 35 417 96 0 40 256 11796 9 79 22 0 1 81 7627 9 25 7 0 0 1215 121085 50 431 34 0 29 41 6836 3 11 5 0 0 1634 139563 46 564 43 5 46 42 5118 3 6 1 0 5 528 40248 16 183 34 1 8 0 0 0 0 0 0 0 890 95079 42 295 49 0 21 1203 80763 32 230 44 0 21 81 7131 4 27 0 1 0 61 4194 11 14 4 0 0 849 60378 20 240 40 1 15 1035 109173 44 251 52 0 47 964 83484 16 347 47 0 17
Names of X columns:
pageviews timeRFC logins compendiumviews PRviews sharedcomp blogged
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