Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
1683 150596 84 535 109 0 37 18 1323 154801 50 396 73 1 42 20 192 7215 18 72 1 0 0 0 2172 122139 91 617 154 0 49 26 3335 221399 129 1118 124 0 76 30 6310 441870 237 1755 276 1 118 34 1478 134379 52 498 89 1 42 23 1324 140428 53 355 54 0 57 30 1488 103255 40 413 87 0 45 30 2756 271630 91 891 129 1 67 26 1931 121593 71 629 158 2 50 24 1966 172071 63 611 113 0 71 30 1575 83707 94 564 75 0 41 19 2855 197412 98 964 255 4 66 25 1263 134398 48 362 50 4 42 17 1479 139224 73 442 81 3 54 19 1636 134153 52 391 92 0 75 33 1076 64149 52 305 72 5 0 15 2376 122294 82 721 142 0 54 34 678 24889 22 206 47 0 13 15 902 52197 52 310 40 0 16 15 2308 188915 89 686 94 0 77 27 1590 163147 66 572 127 0 34 25 1863 98575 48 558 164 1 38 34 1799 143546 80 569 41 1 50 21 1385 139780 25 513 160 0 39 21 1870 163784 146 602 90 0 54 25 1161 152479 75 276 55 0 67 28 2417 304108 109 791 78 0 55 26 1952 184024 40 815 90 0 52 20 1514 151621 41 427 76 0 50 28 1487 164516 41 496 111 2 54 20 2051 120179 94 653 87 4 53 17 2843 214701 116 857 302 0 76 25 2216 196865 48 736 84 1 52 24 1 0 1 0 0 0 0 0 1830 181527 57 862 58 0 46 27 1563 93107 49 483 137 3 44 14 2046 129352 45 495 267 9 35 32 2005 229143 58 749 56 0 82 31 1934 177063 67 627 94 2 70 21 1572 126602 53 597 62 0 31 34 950 93742 29 348 35 2 25 23 1877 152153 72 711 59 1 48 24 1036 95704 42 322 46 2 44 22 1097 139793 84 280 40 2 40 22 730 76348 30 205 49 1 23 35 1918 188980 86 648 114 0 63 21 1826 172100 79 580 113 1 43 31 2444 146552 54 875 171 7 62 26 658 48188 28 205 37 0 12 22 1425 109185 60 363 51 0 63 21 2246 263652 68 757 89 0 60 27 1899 215609 75 647 67 0 53 26 1630 174876 54 584 49 1 53 33 1496 115124 49 457 74 6 35 11 1681 179712 60 438 58 0 49 26 816 70369 20 235 72 0 25 26 902 109215 58 312 30 0 47 21 2606 166096 85 877 59 10 30 38 1557 130414 51 454 65 6 50 29 1780 102057 71 668 81 0 36 19 1265 115310 56 346 84 11 43 19 1117 101181 32 377 46 3 44 24 1069 135228 31 365 56 0 14 26 1229 94982 37 391 36 0 38 29 2155 166919 67 476 84 8 58 34 2500 118169 64 747 152 2 68 25 1003 102361 36 246 48 0 48 24 340 31970 15 101 40 0 5 21 2586 200413 107 901 135 3 53 19 1119 103381 58 334 80 1 36 12 1251 94940 61 404 60 2 62 28 1516 101560 65 442 89 1 46 21 2473 144176 60 627 89 0 67 34 1288 71921 37 345 79 2 2 32 1911 126905 54 538 111 1 64 27 2279 131184 87 741 67 0 59 26 816 60138 23 253 76 0 16 21 1234 84971 71 395 105 0 34 31 907 80420 64 211 49 0 54 26 1827 233569 57 670 57 0 39 26 841 56252 25 244 49 0 26 23 1309 97181 32 438 132 0 37 25 764 50800 41 255 49 0 17 22 1439 125941 45 434 71 0 32 26 2500 211032 210 613 100 0 55 33 974 71960 92 233 71 0 39 22 1152 90379 53 360 49 6 39 24 1261 125650 47 486 72 0 28 21 1508 115572 36 535 59 5 45 28 2005 136266 67 585 86 1 66 22 1191 146715 55 402 65 0 39 22 1265 124626 57 466 81 0 27 15 761 49176 33 291 30 0 22 13 2156 212926 102 691 166 0 43 36 1689 173884 55 515 89 0 88 24 223 19349 12 67 15 0 13 1 2074 181141 95 712 104 3 23 24 1879 145502 70 770 61 0 40 31 566 45448 26 247 11 0 8 4 802 58280 20 240 44 0 41 20 1131 115944 44 360 84 0 51 23 981 94341 52 249 66 1 24 23 591 59090 37 138 27 0 23 12 596 27676 22 194 59 0 2 16 1261 120586 41 285 126 0 78 28 861 88011 31 227 32 0 12 10 0 0 0 0 0 0 0 0 1030 85610 31 306 58 0 46 25 991 84193 58 328 52 0 22 21 1178 117769 39 397 49 0 49 21 1200 107653 56 369 64 0 52 21 849 71894 57 287 71 0 36 21 78 3616 5 14 5 0 0 0 0 0 0 0 0 0 0 0 924 154806 38 301 70 0 35 23 1480 136061 73 535 72 0 68 29 1870 141822 89 530 118 1 26 27 861 106515 37 272 56 0 32 23 778 43410 19 292 63 0 7 1 1533 146920 64 458 88 1 67 25 889 88874 38 241 46 0 30 17 1705 111924 49 497 60 8 55 29 700 60373 39 165 29 3 3 12 285 19764 12 75 19 1 10 2 1490 121665 46 461 58 2 46 18 981 108685 26 341 66 0 23 25 1368 124493 37 446 97 0 43 29 256 11796 9 79 22 0 1 2 98 10674 9 33 7 0 0 0 1317 131263 52 449 37 0 33 18 41 6836 3 11 5 0 0 1 1768 153278 55 606 48 5 48 21 42 5118 3 6 1 0 5 0 528 40248 16 183 34 1 8 4 0 0 0 0 0 0 0 0 938 100728 42 310 49 0 25 25 1245 84267 36 245 44 0 21 26 81 7131 4 27 0 1 0 0 257 8812 13 97 18 0 0 4 891 63952 22 247 48 1 15 17 1114 120111 47 273 54 0 47 21 1079 94127 18 386 50 1 17 22
Names of X columns:
pageviews timeRFC logins CCV CV Cauthors bloggedC reviewedC
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