Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
2 1418 210907 56 396 81 3 79 30 115 94 112285 24188 146283 144 145 4 2172 179321 89 967 125 2 108 30 116 103 101193 32287 96933 135 132 0 1583 149061 44 656 66 5 43 26 100 93 116174 27101 95757 84 84 0 1764 237213 84 655 74 0 78 38 140 123 66198 19716 143983 130 127 -4 1495 173326 88 465 49 7 86 44 166 148 71701 17753 75851 82 78 4 1373 133131 55 525 52 7 44 30 99 90 57793 9028 59238 60 60 4 2187 258873 60 885 88 3 104 40 139 124 80444 18653 93163 131 131 0 4041 324799 154 1436 108 0 158 47 181 168 97668 29498 151511 140 133 -1 1706 230964 53 612 43 4 102 30 116 115 133824 27563 136368 151 150 0 2152 236785 119 865 75 3 77 31 116 71 101481 18293 112642 91 91 1 2242 344297 75 963 86 1 80 30 108 108 67654 16116 127766 119 118 0 2515 174724 92 966 135 0 123 34 129 120 69112 26569 85646 123 119 3 2147 174415 100 801 63 0 73 31 118 114 82753 24785 98579 90 89 -1 1638 223632 73 513 52 0 105 33 125 120 72654 23825 131741 113 108 4 2452 294424 77 992 59 2 107 33 127 124 101494 34461 171975 175 162 3 2662 325107 99 937 64 0 84 36 136 126 79215 24919 159676 96 92 1 865 106408 30 260 32 1 33 14 46 37 31081 12558 58391 41 41 0 1793 96560 76 503 129 0 42 17 54 38 22996 7784 31580 47 47 -2 2527 265769 146 927 37 2 96 32 124 120 83122 28522 136815 126 120 -3 2747 269651 67 1269 31 10 106 30 115 93 70106 22265 120642 105 105 -4 1324 149112 56 537 65 6 56 35 128 95 60578 14459 69107 80 79 2 1383 152871 58 532 74 5 59 28 97 90 79892 22240 108016 73 70 2 4308 362301 119 1635 715 2 76 34 125 110 100708 11912 79336 68 67 -4 1831 183167 66 557 66 0 91 39 149 138 82875 18220 93176 127 127 3 3373 277965 89 1178 106 8 115 39 149 133 139077 19199 161632 154 152 2 2352 218946 41 866 112 1 76 29 108 96 80670 25239 102996 112 109 2 2144 244052 68 574 66 5 101 44 166 164 143558 29801 160604 137 133 0 4691 341570 168 1276 190 1 94 21 80 78 117105 18450 158051 135 123 5 2694 233328 132 825 165 5 92 28 107 102 120733 34861 162647 230 230 -2 1769 206161 71 663 61 12 75 28 107 99 73107 16688 60622 71 68 0 3148 311473 112 1069 53 8 128 38 146 129 132068 24683 179566 147 147 -2 1954 207176 70 711 38 8 56 32 123 114 87011 21436 96144 105 101 -3 1226 196553 57 503 50 2 41 29 111 99 95260 30546 129847 107 108 2 1496 143246 103 464 42 5 67 27 105 104 106671 15977 71180 116 114 2 1943 182192 52 657 53 12 77 40 155 138 70054 14251 86767 89 88 2 1762 194979 62 577 50 7 66 40 155 151 74011 16851 93487 84 83 0 1403 167488 45 619 77 2 69 28 104 72 83737 21113 82981 113 113 4 1425 143756 46 479 57 0 105 34 132 120 69094 17401 73815 120 118 4 1857 275541 63 817 73 4 116 33 127 115 93133 23958 94552 110 110 2 1420 152299 53 537 63 0 62 33 122 98 61370 14587 67808 78 76 2 1644 193339 78 465 47 2 100 35 87 71 84651 20537 106175 145 141 -4 1054 130585 46 299 57 5 67 29 109 107 95364 30495 76669 91 91 3 937 112611 41 248 36 0 46 20 78 73 26706 7117 57283 48 48 3 2547 148446 91 905 63 1 135 37 141 129 126846 33473 72413 150 144 2 1626 182079 63 512 63 2 124 33 124 118 102860 21115 96971 181 168 -1 1964 243060 63 786 110 4 58 29 112 104 111813 32902 120336 121 117 -3 1381 162765 32 489 56 2 68 28 108 107 120293 25131 93913 99 100 0 1290 85574 34 351 71 0 37 21 78 36 24266 6943 32036 40 37 1 1982 225060 93 669 56 7 93 41 158 139 109825 31808 102255 87 87 -3 1590 133328 55 506 79 0 56 20 78 56 40909 17014 63506 66 64 3 1281 100750 72 407 67 0 83 30 119 93 140867 6440 68370 58 58 0 1272 101523 42 316 76 0 59 22 88 87 61056 18647 50517 77 76 0 1944 243511 71 603 65 0 133 42 155 110 101338 20556 103950 130 129 0 1605 152474 65 577 45 0 106 32 123 83 65567 22392 84396 101 101 3 1386 132487 41 411 97 0 71 36 136 98 40735 8388 55515 120 89 -3 2395 317394 86 975 53 1 116 31 117 82 91413 22120 209056 195 193 0 2699 244749 95 964 144 2 98 33 124 115 76643 20923 142775 106 101 -4 1606 184510 49 537 60 7 64 40 151 140 110681 20237 68847 83 82 2 1204 128423 64 369 89 8 32 38 145 120 92696 3769 20112 37 36 -1 1138 97839 38 417 42 2 25 24 87 66 94785 12252 61023 77 75 3 1111 172494 52 389 52 0 46 43 165 139 86687 21721 112494 144 131 2 2186 229242 247 719 128 4 63 31 120 119 91721 17939 78876 95 90 5 3604 351619 139 1277 142 4 95 40 150 141 115168 23436 170745 169 166 2 3261 324598 110 1402 128 0 113 37 136 133 135777 34538 122037 134 133 -2 1641 195838 67 564 50 1 111 31 116 98 102372 25515 112283 197 196 0 2312 254488 83 747 50 10 120 39 150 117 103772 29402 120691 140 136 3 2201 199476 70 861 46 2 87 32 118 105 135400 28732 122422 125 123 -2 961 92499 32 319 57 0 25 18 71 55 21399 5250 25899 21 21 0 1900 224330 83 612 52 1 131 39 144 132 130115 28608 139296 167 163 6 1645 181633 70 564 48 2 47 30 110 73 64466 14817 89455 96 96 -3 2429 271856 103 824 91 1 109 37 147 86 54990 16714 147866 151 151 3 872 95227 34 239 70 0 37 32 111 48 34777 1669 14336 23 23 0 1018 98146 40 459 37 0 15 17 68 48 27114 7768 30059 21 14 -2 1403 118612 46 454 72 2 54 12 48 43 30080 7936 41907 90 87 1 616 65475 18 225 24 2 16 13 51 46 69008 7294 35885 60 56 0 1232 108446 60 389 90 1 22 17 68 65 46300 13275 55764 26 25 2 1255 121848 39 339 45 0 37 17 64 52 30594 5401 35619 41 41 2 995 76302 31 333 26 0 29 20 76 68 30976 8702 40557 35 33 -3 2048 98104 54 636 132 2 55 17 66 47 25568 8030 44197 68 68 -2 301 30989 14 93 35 0 5 17 68 41 4154 1278 4103 6 6 1 628 31774 23 170 48 1 0 17 66 47 4143 1574 4694 0 0 -4 1597 150580 77 530 124 0 27 22 83 71 45588 9653 62991 41 39 0 717 54157 19 201 35 0 37 15 55 30 18625 7067 24261 38 37 1 652 59382 49 227 49 0 29 12 41 24 26263 1514 21425 47 47 0 733 84105 20 261 45 0 17 17 66 63 20055 5432 27184 34 34
Names of X columns:
Som_TEST pageviews time_in_rfc logins compendium_views_info compendium_views_pr shared_compendiums blogged_computations compendiums_reviewed feedback_messages_p1 feedback_messages_p120 totsize totrevisions totseconds tothyperlinks totblogs
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