Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
9/06/2002 169498 1.21 0.97 0.80 5.06 16/06/2002 125451 1.22 0.95 0.80 5.07 23/06/2002 140449 1.22 0.96 0.80 5.04 30/06/2002 141653 1.22 0.97 0.81 5.08 7/07/2002 136394 1.21 0.96 0.81 5.15 14/07/2002 167588 1.23 0.96 0.83 5.16 21/07/2002 191807 1.22 0.94 0.79 5.09 28/07/2002 149736 1.22 0.95 0.80 5.14 4/08/2002 196066 1.22 0.95 0.81 5.17 11/08/2002 239155 1.22 0.95 0.80 5.13 18/08/2002 178421 1.23 0.95 0.81 5.19 25/08/2002 139871 1.22 0.97 0.81 5.17 1/09/2002 118159 1.21 0.97 0.82 5.17 8/09/2002 109763 1.22 0.95 0.81 5.21 15/09/2002 97415 1.21 0.96 0.82 5.21 22/09/2002 119190 1.22 0.96 0.82 5.23 29/09/2002 97903 1.21 0.94 0.80 5.17 6/10/2002 96953 1.20 0.96 0.79 5.16 13/10/2002 87888 1.18 0.98 0.79 5.15 20/10/2002 84637 1.19 0.97 0.80 5.12 27/10/2002 90549 1.20 0.96 0.80 5.12 3/11/2002 95680 1.19 0.95 0.80 5.10 10/11/2002 99371 1.19 0.96 0.80 5.13 17/11/2002 79984 1.20 0.96 0.80 5.14 24/11/2002 86752 1.21 0.97 0.80 5.16 1/12/2002 85733 1.20 0.96 0.80 5.17 8/12/2002 84906 1.20 0.95 0.78 5.15 15/12/2002 78356 1.20 0.95 0.78 5.12 22/12/2002 108895 1.21 0.94 0.76 5.08 29/12/2002 101768 1.21 0.94 0.77 5.07 5/01/2003 73285 1.21 0.98 0.82 5.16 12/01/2003 65724 1.20 0.93 0.81 5.14 19/01/2003 67457 1.21 0.93 0.81 5.13 26/01/2003 67203 1.21 0.96 0.80 5.11 2/02/2003 69273 1.21 0.97 0.79 5.12 9/02/2003 80807 1.20 0.97 0.81 5.09 16/02/2003 75129 1.19 0.95 0.81 5.10 23/02/2003 74991 1.20 0.95 0.81 4.95 2/03/2003 68157 1.20 0.96 0.81 5.11 9/03/2003 73858 1.20 0.98 0.82 5.11 16/03/2003 71349 1.22 0.98 0.81 5.10 23/03/2003 85634 1.22 0.97 0.80 5.11 30/03/2003 91624 1.21 0.98 0.83 5.12 6/04/2003 116014 1.25 0.98 0.81 5.09 13/04/2003 120033 1.25 0.99 0.83 5.10 20/04/2003 108651 1.27 0.99 0.84 5.06 27/04/2003 105378 1.28 0.97 0.84 5.03 4/05/2003 138939 1.27 0.98 0.85 5.05 11/05/2003 132974 1.28 0.97 0.85 5.04 18/05/2003 135277 1.29 0.97 0.86 5.02 25/05/2003 152741 1.26 0.97 0.85 4.97 1/06/2003 158417 1.27 0.98 0.87 4.91 8/06/2003 157460 1.25 0.97 0.86 4.91 15/06/2003 193997 1.27 0.97 0.87 4.98 22/06/2003 154089 1.27 0.98 0.87 4.98 29/06/2003 147570 1.27 0.98 0.86 4.97 6/07/2003 162924 1.29 0.95 0.87 4.97 13/07/2003 153629 1.26 0.97 0.88 4.90 20/07/2003 155907 1.27 0.97 0.87 4.91 27/07/2003 197675 1.27 0.97 0.87 4.88 3/08/2003 250708 1.28 0.97 0.86 4.86 10/08/2003 266652 1.28 0.98 0.86 4.87 17/08/2003 209842 1.28 0.98 0.88 4.86 24/08/2003 165826 1.27 0.98 0.88 4.89 31/08/2003 137152 1.24 0.96 0.87 4.90 7/09/2003 150581 1.25 0.98 0.88 4.88 14/09/2003 145973 1.25 1.00 0.89 4.85 21/09/2003 126532 1.24 1.01 0.89 4.85 28/09/2003 115437 1.24 1.02 0.88 4.84 5/10/2003 119526 1.23 1.01 0.88 4.91 12/10/2003 110856 1.24 1.01 0.88 4.94 19/10/2003 97243 1.23 1.02 0.88 4.92 26/10/2003 103876 1.24 1.01 0.87 4.93 2/11/2003 116370 1.24 1.01 0.87 4.97 9/11/2003 109616 1.24 1.01 0.86 4.89 16/11/2003 98365 1.25 1.02 0.88 4.88 23/11/2003 90440 1.26 1.02 0.87 4.93 30/11/2003 88899 1.26 1.02 0.86 4.94 7/12/2003 92358 1.27 1.01 0.85 4.99 14/12/2003 88394 1.26 1.01 0.86 5.00 21/12/2003 98219 1.28 0.99 0.84 5.02 28/12/2003 113546 1.29 1.00 0.85 5.06 4/01/2004 107168 1.28 1.01 0.88 5.01 11/01/2004 77540 1.27 0.99 0.88 5.02 18/01/2004 74944 1.30 1.00 0.89 4.97 25/01/2004 75641 1.30 1.02 0.88 4.96 1/02/2004 75910 1.28 1.01 0.88 4.95 8/02/2004 87384 1.29 1.01 0.88 4.92 15/02/2004 84615 1.27 1.01 0.89 4.88 22/02/2004 80420 1.26 1.03 0.89 4.86 29/02/2004 80784 1.27 1.02 0.89 4.94 7/03/2004 79933 1.27 1.02 0.88 4.83 14/03/2004 82118 1.27 1.03 0.89 4.95 21/03/2004 91420 1.28 1.03 0.89 4.95 28/03/2004 112426 1.29 1.02 0.89 4.94 4/04/2004 114528 1.28 1.02 0.89 4.93 11/04/2004 131025 1.30 1.02 0.90 4.97 18/04/2004 116460 1.30 1.02 0.88 4.95 25/04/2004 111258 1.30 1.03 0.90 4.92 2/05/2004 155318 1.29 1.02 0.88 4.82 9/05/2004 155078 1.30 1.02 0.90 4.82 16/05/2004 134794 1.29 1.02 0.89 4.84 23/05/2004 139985 1.28 1.03 0.89 4.83 30/05/2004 198778 1.30 1.02 0.88 4.79 6/06/2004 172436 1.30 1.02 0.89 4.81 13/06/2004 169585 1.31 1.02 0.91 4.85 20/06/2004 203702 1.32 1.02 0.91 4.84 27/06/2004 282392 1.33 1.02 0.90 4.82 4/07/2004 220658 1.32 1.00 0.93 4.92 11/07/2004 194472 1.30 1.04 0.94 4.92 18/07/2004 269246 1.31 1.04 0.95 4.90 25/07/2004 215340 1.30 1.03 0.95 4.91 1/08/2004 218319 1.30 1.02 0.93 4.85 8/08/2004 195724 1.30 1.04 0.95 4.86 15/08/2004 174614 1.29 1.05 0.95 4.88 22/08/2004 172085 1.29 1.03 0.94 4.85 29/08/2004 152347 1.30 0.99 0.92 4.91 5/09/2004 189615 1.30 1.03 0.94 4.89 12/09/2004 173804 1.29 1.08 0.95 4.92 19/09/2004 145683 1.27 1.09 0.97 4.82 26/09/2004 133550 1.26 1.08 0.96 4.82 3/10/2004 121156 1.25 1.05 0.92 4.87 10/10/2004 112040 1.26 1.06 0.94 4.88 17/10/2004 120767 1.27 1.04 0.94 4.90 24/10/2004 127019 1.26 1.06 0.92 4.88 31/10/2004 136295 1.25 1.06 0.91 4.89 7/11/2004 113425 1.25 1.07 0.93 4.88 14/11/2004 107815 1.25 1.08 0.93 4.87 21/11/2004 100298 1.26 1.08 0.94 4.85 28/11/2004 97048 1.26 1.05 0.92 4.87 5/12/2004 98750 1.26 1.04 0.91 4.88 12/12/2004 98235 1.27 1.04 0.91 4.87 19/12/2004 101254 1.28 1.04 0.90 4.93 26/12/2004 139589 1.29 1.04 0.89 4.93 2/01/2005 134921 1.30 1.06 0.91 4.74 9/01/2005 80355 1.26 1.08 0.93 4.77 16/01/2005 80396 1.25 1.08 0.94 4.81 23/01/2005 82183 1.26 1.08 0.93 4.82 30/01/2005 79709 1.25 1.07 0.91 4.79 6/02/2005 90781 1.24 1.06 0.92 4.75
Names of X columns:
PERIODE QBEFRU PPIL PCOLA PORA PSTIM
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