Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
112285 59 56 30 84786 34 56 28 83123 49 54 38 101193 50 89 30 38361 34 40 22 68504 15 25 26 119182 107 92 25 22807 9 18 18 17140 28 63 11 116174 41 44 26 57635 46 33 25 66198 66 84 38 71701 48 88 44 57793 37 55 30 80444 72 60 40 53855 50 66 34 97668 90 154 47 133824 64 53 30 101481 66 119 31 99645 38 41 23 114789 56 61 36 99052 60 58 36 67654 96 75 30 65553 43 33 25 97500 37 40 39 69112 49 92 34 82753 48 100 31 85323 63 112 31 72654 62 73 33 30727 35 40 25 77873 62 45 33 117478 59 60 35 74007 47 62 42 90183 72 75 43 61542 24 31 30 101494 82 77 33 27570 28 34 13 55813 60 46 32 79215 90 99 36 1423 2 17 0 55461 47 66 28 31081 30 30 14 22996 27 76 17 83122 74 146 32 70106 75 67 30 60578 41 56 35 39992 49 107 20 79892 42 58 28 49810 31 34 28 71570 32 61 39 100708 101 119 34 33032 22 42 26 82875 51 66 39 139077 77 89 39 71595 42 44 33 72260 47 66 28 5950 7 24 4 115762 91 259 39 32551 18 17 18 31701 28 64 14 80670 61 41 29 143558 68 68 44 117105 95 168 21 23789 29 43 16 120733 65 132 28 105195 71 105 35 73107 57 71 28 132068 87 112 38 149193 66 94 23 46821 49 82 36 87011 58 70 32 95260 55 57 29 55183 48 53 25 106671 40 103 27 73511 52 121 36 92945 52 62 28 78664 33 52 23 70054 51 52 40 22618 20 32 23 74011 54 62 40 83737 47 45 28 69094 40 46 34 93133 77 63 33 95536 68 75 28 225920 51 88 34 62133 38 46 30 61370 42 53 33 43836 33 37 22 106117 96 90 38 38692 40 63 26 84651 54 78 35 56622 22 25 8 15986 34 45 24 95364 36 46 29 26706 31 41 20 89691 80 144 29 67267 67 82 45 126846 41 91 37 41140 57 71 33 102860 51 63 33 51715 39 53 25 55801 61 62 32 111813 68 63 29 120293 45 32 28 138599 51 39 28 161647 64 62 31 115929 74 117 52 24266 24 34 21 162901 86 92 24 109825 63 93 41 129838 65 54 33 37510 40 144 32 43750 12 14 19 40652 43 61 20 87771 46 109 31 85872 56 38 31 89275 65 73 32 44418 61 75 18 192565 28 50 23 35232 26 61 17 40909 37 55 20 13294 17 77 12 32387 35 75 17 140867 28 72 30 120662 62 50 31 21233 23 32 10 44332 28 53 13 61056 28 42 22 101338 68 71 42 1168 6 10 1 13497 12 35 9 65567 42 65 32 25162 17 25 11 32334 28 66 25 40735 37 41 36 91413 88 86 31 855 6 16 0 97068 58 42 24 44339 6 19 13 14116 9 19 8 10288 13 45 13 65622 37 65 19 16563 25 35 18 76643 68 95 33 110681 51 49 40 29011 22 37 22 92696 36 64 38 94785 27 38 24 8773 11 34 8 83209 42 32 35 93815 76 65 43 86687 48 52 43 34553 30 62 14 105547 91 65 41 103487 70 83 38 213688 98 95 45 71220 44 29 31 23517 27 18 13 56926 24 33 28 91721 64 247 31 115168 98 139 40 111194 23 29 30 51009 33 118 16 135777 90 110 37 51513 36 67 30 74163 57 42 35 51633 46 65 32 75345 39 94 27 33416 32 64 20 83305 69 81 18 98952 83 95 31 102372 54 67 31 37238 48 63 21 103772 71 83 39 123969 29 45 41 27142 38 30 13 135400 55 70 32 21399 26 32 18 130115 62 83 39 24874 38 31 14 34988 21 67 7 45549 23 66 17 6023 4 10 0 64466 50 70 30 54990 76 103 37 1644 2 5 0 6179 13 20 5 3926 5 5 1 32755 37 36 16 34777 26 34 32 73224 42 48 24 27114 27 40 17 20760 22 43 11 37636 16 31 24 65461 39 42 22 30080 33 46 12 24094 20 33 19 69008 18 18 13 54968 28 55 17 46090 20 35 15 27507 21 59 16 10672 14 19 24 34029 38 66 15 46300 30 60 17 24760 25 36 18 18779 12 25 20 21280 22 47 16 40662 50 54 16 28987 37 53 18 22827 34 40 22 18513 26 40 8 30594 34 39 17 24006 15 14 18 27913 23 45 16 42744 16 36 23 12934 15 28 22 22574 17 44 13 41385 16 30 13 18653 18 22 16 18472 22 17 16 30976 21 31 20 63339 29 55 22 25568 27 54 17 33747 19 21 18 4154 9 14 17 19474 38 81 12 35130 20 35 7 39067 18 43 17 13310 17 46 14 65892 21 30 23 4143 9 23 17 28579 23 38 14 51776 24 54 15 21152 14 20 17 38084 18 53 21 27717 16 45 18 32928 44 39 18 11342 13 20 17 19499 20 24 17 16380 11 31 16 36874 26 35 15 48259 39 151 21 16734 14 52 16 28207 14 30 14 30143 20 31 15 41369 24 29 17 45833 28 57 15 29156 24 40 15 35944 24 44 10 36278 10 25 6 45588 42 77 22 45097 28 35 21 3895 5 11 1 28394 28 63 18 18632 24 44 17 2325 9 19 4 25139 9 13 10 27975 25 42 16 14483 17 38 16 13127 11 29 9 5839 8 20 16 24069 21 27 17 3738 10 20 7 18625 15 19 15 36341 14 37 14 24548 23 26 14 21792 18 42 18 26263 16 49 12 23686 33 30 16 49303 21 49 21 25659 29 67 19 28904 20 28 16 2781 12 19 1 29236 29 49 16 19546 17 27 10 22818 19 30 19 32689 15 22 12 5752 5 12 2 22197 24 31 14 20055 23 20 17 25272 22 20 19 82206 25 39 14 32073 25 29 11 5444 11 16 4 20154 18 27 16 36944 14 21 20 8019 16 19 12 30884 17 35 15 19540 20 14 16
Names of X columns:
TotSize TimeInRfc Logins CompReviewed
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