Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
11 65 146455 1 95556 114468 127 11 54 84944 4 54565 88594 90 10 58 113337 9 63016 74151 68 9 75 128655 2 79774 77921 111 9 41 74398 1 31258 53212 51 10 0 35523 2 52491 34956 33 10 111 293403 0 91256 149703 123 10 1 32750 0 22807 6853 5 9 36 106539 5 77411 58907 63 9 60 130539 0 48821 67067 66 11 63 154991 0 52295 110563 99 11 71 126683 7 63262 58126 72 9 38 100672 6 50466 57113 55 9 76 179562 3 62932 77993 116 9 61 125971 4 38439 68091 71 9 125 234509 0 70817 124676 125 9 84 158980 4 105965 109522 123 9 69 184217 3 73795 75865 74 11 77 107342 0 82043 79746 116 9 95 141371 5 74349 77844 117 9 78 154730 0 82204 98681 98 9 76 264020 1 55709 105531 101 9 40 90938 3 37137 51428 43 9 81 101324 5 70780 65703 103 10 102 130232 0 55027 72562 107 9 70 137793 0 56699 81728 77 9 75 161678 4 65911 95580 87 10 93 151503 0 56316 98278 99 10 42 105324 0 26982 46629 46 10 95 175914 0 54628 115189 96 10 87 181853 3 96750 124865 92 11 44 114928 4 53009 59392 96 11 84 190410 1 64664 127818 96 11 28 61499 4 36990 17821 15 9 87 223004 1 85224 154076 147 9 71 167131 0 37048 64881 56 9 68 233482 0 59635 136506 81 10 50 121185 2 42051 66524 69 9 30 78776 1 26998 45988 34 10 86 188967 2 63717 107445 98 10 75 199512 8 55071 102772 82 9 46 102531 5 40001 46657 64 10 52 118958 3 54506 97563 61 10 31 68948 4 35838 36663 45 10 30 93125 1 50838 55369 37 11 70 277108 2 86997 77921 64 11 20 78800 2 33032 56968 21 10 84 157250 0 61704 77519 104 11 81 210554 6 117986 129805 126 11 79 127324 3 56733 72761 104 10 70 114397 0 55064 81278 87 9 8 24188 0 5950 15049 7 9 67 246209 6 84607 113935 130 10 21 65029 5 32551 25109 21 10 30 98030 3 31701 45824 35 9 70 173587 1 71170 89644 97 9 87 172684 5 101773 109011 103 9 87 191381 5 101653 134245 210 9 112 191276 0 81493 136692 151 11 54 134043 9 55901 50741 57 11 96 233406 6 109104 149510 117 11 93 195304 6 114425 147888 152 11 49 127619 5 36311 54987 52 9 49 162810 6 70027 74467 83 9 38 129100 2 73713 100033 87 9 64 108715 0 40671 85505 80 9 62 106469 3 89041 62426 88 9 66 142069 8 57231 82932 83 10 98 143937 2 78792 79169 140 10 97 84256 5 59155 65469 76 10 56 118807 11 55827 63572 70 10 22 69471 6 22618 23824 26 9 51 122433 5 58425 73831 66 10 56 131122 1 65724 63551 89 10 94 94763 0 56979 56756 100 10 98 188780 3 72369 81399 98 10 76 191467 3 79194 117881 109 10 57 105615 6 202316 70711 51 10 75 89318 1 44970 50495 82 11 48 107335 0 49319 53845 65 11 48 98599 1 36252 51390 46 11 109 260646 0 75741 104953 104 11 27 131876 5 38417 65983 36 11 83 119291 2 64102 76839 123 11 49 80953 0 56622 55792 59 11 24 99768 0 15430 25155 27 10 43 84572 5 72571 55291 84 10 44 202373 1 67271 84279 61 10 49 166790 0 43460 99692 46 10 106 99946 1 99501 59633 125 10 42 116900 1 28340 63249 58 9 108 142146 2 76013 82928 152 9 27 99246 4 37361 50000 52 11 79 156833 1 48204 69455 85 11 49 175078 4 76168 84068 95 10 64 130533 0 85168 76195 78 9 75 142339 2 125410 114634 144 9 115 176789 0 123328 139357 149 9 92 181379 7 83038 110044 101 9 106 228548 7 120087 155118 205 11 73 142141 6 91939 83061 61 10 105 167845 0 103646 127122 145 10 30 103012 0 29467 45653 28 10 13 43287 4 43750 19630 49 11 69 125366 4 34497 67229 68 10 72 118372 0 66477 86060 142 10 80 135171 0 71181 88003 82 10 106 175568 0 74482 95815 105 10 28 74112 0 174949 85499 52 11 70 88817 0 46765 27220 56 9 51 164767 4 90257 109882 81 9 90 141933 0 51370 72579 100 9 12 22938 0 1168 5841 11 9 84 115199 0 51360 68369 87 10 23 61857 4 25162 24610 31 10 57 91185 0 21067 30995 67 10 84 213765 1 58233 150662 150 11 4 21054 0 855 6622 4 10 56 167105 5 85903 93694 75 11 18 31414 0 14116 13155 39 11 86 178863 1 57637 111908 88 11 39 126681 7 94137 57550 67 10 16 64320 5 62147 16356 24 9 18 67746 2 62832 40174 58 9 16 38214 0 8773 13983 16 9 42 90961 1 63785 52316 49 9 75 181510 0 65196 99585 109 10 30 116775 0 73087 86271 124 10 104 223914 2 72631 131012 115 10 121 185139 0 86281 130274 128 10 106 242879 2 162365 159051 159 9 57 139144 0 56530 76506 75 10 28 75812 0 35606 49145 30 10 56 178218 4 70111 66398 83 10 81 246834 4 92046 127546 135 9 2 50999 8 63989 6802 8 11 88 223842 0 104911 99509 115 11 41 93577 4 43448 43106 60 11 83 155383 0 60029 108303 99 11 55 111664 1 38650 64167 98 11 3 75426 0 47261 8579 36 11 54 243551 9 73586 97811 93 10 89 136548 0 83042 84365 158 9 41 173260 3 37238 10901 16 9 94 185039 7 63958 91346 100 9 101 67507 5 78956 33660 49 10 70 139350 2 99518 93634 89 10 111 172964 1 111436 109348 153 11 0 0 9 0 0 0 11 4 14688 0 6023 7953 5 11 0 98 0 0 0 0 10 0 455 0 0 0 0 9 0 0 1 0 0 0 11 0 0 0 0 0 0 10 42 128066 2 42564 63538 80 9 97 176460 1 38885 108281 122 9 0 0 0 0 0 0 9 0 203 0 0 0 0 10 7 7199 0 1644 4245 6 9 12 46660 0 6179 21509 13 11 0 17547 0 3926 7670 3 11 37 73567 0 23238 10641 18 10 0 969 0 0 0 0 9 39 101060 2 49288 41243 49
Names of X columns:
Month BloggedComputations TotalTime Shared Characters Writing hyperlinks
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