R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,1,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,1,0,-1,0,0,0,0,-1,0,0,1,0,-1,0,0,0,0,-1,0,0,1,0,-1,0,0,0,0,-1,0,0,1,0,-1,0,0,0,1,0,0,0,0,1,0,0,0,1,1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,1,0,-1,0,0,0,0,-1,1,0,0,0,-1,1,0,0,0,-1,1,-1,0,0,-1,1,-1,0,0,-1,1,-1,0,0,-1,1,0,0,0,-1,1,-1,0,0,-1,1,-1,0,0,-1,1,0,0,0,-1,1,0,0,0,-1,1,0,0,0,-1,1,0,0,0,-1,1,0,0,0,-1,1,0,0,0,-1,1,0,0,0,-1,1,0,0,0,-1),dim=c(5,60),dimnames=list(c('crisis','ECBinterestRateDaalt','ECBinterestRateStijgt','GDPGermanystijgt','GDPGermanyDaalt'),1:60)) > y <- array(NA,dim=c(5,60),dimnames=list(c('crisis','ECBinterestRateDaalt','ECBinterestRateStijgt','GDPGermanystijgt','GDPGermanyDaalt'),1:60)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Linear Trend' > par2 = 'Include Monthly Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > 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 crisis ECBinterestRateDaalt ECBinterestRateStijgt GDPGermanystij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0 49 50 -1 0 1 0 0 0 0 0 0 0 0 0 50 51 -1 0 0 1 0 0 0 0 0 0 0 0 51 52 -1 0 0 0 1 0 0 0 0 0 0 0 52 53 -1 0 0 0 0 1 0 0 0 0 0 0 53 54 -1 0 0 0 0 0 1 0 0 0 0 0 54 55 -1 0 0 0 0 0 0 1 0 0 0 0 55 56 -1 0 0 0 0 0 0 0 1 0 0 0 56 57 -1 0 0 0 0 0 0 0 0 1 0 0 57 58 -1 0 0 0 0 0 0 0 0 0 1 0 58 59 -1 0 0 0 0 0 0 0 0 0 0 1 59 60 -1 0 0 0 0 0 0 0 0 0 0 0 60 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) ECBinterestRateDaalt ECBinterestRateStijgt -0.10981 -0.46713 -0.18904 GDPGermanystijgt GDPGermanyDaalt M1 -0.11496 NA -0.09527 M2 M3 M4 -0.01615 -0.04826 -0.13818 M5 M6 M7 -0.05906 0.00225 -0.04986 M8 M9 M10 -0.06417 0.08372 0.10722 M11 t -0.03832 0.01431 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.49326 -0.16883 0.01047 0.18354 0.41069 Coefficients: (1 not defined because of singularities) Estimate Std. Error t value Pr(>|t|) (Intercept) -0.109806 0.187834 -0.585 0.56181 ECBinterestRateDaalt -0.467133 0.154181 -3.030 0.00409 ** ECBinterestRateStijgt -0.189044 0.126059 -1.500 0.14085 GDPGermanystijgt -0.114959 0.095098 -1.209 0.23318 GDPGermanyDaalt NA NA NA NA M1 -0.095268 0.189849 -0.502 0.61830 M2 -0.016147 0.191391 -0.084 0.93315 M3 -0.048261 0.181435 -0.266 0.79149 M4 -0.138184 0.188408 -0.733 0.46719 M5 -0.059062 0.190412 -0.310 0.75789 M6 0.002250 0.182580 0.012 0.99022 M7 -0.049864 0.184613 -0.270 0.78835 M8 -0.064169 0.184568 -0.348 0.72974 M9 0.083717 0.189688 0.441 0.66113 M10 0.107220 0.184609 0.581 0.56434 M11 -0.038321 0.186502 -0.205 0.83815 t 0.014305 0.002823 5.068 7.7e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.2848 on 44 degrees of freedom Multiple R-squared: 0.6959, Adjusted R-squared: 0.5922 F-statistic: 6.712 on 15 and 44 DF, p-value: 3.545e-07 > 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 + } [,1] [,2] [,3] [1,] 0 0 1 [2,] 0 0 1 [3,] 0 0 1 [4,] 0 0 1 [5,] 0 0 1 [6,] 0 0 1 [7,] 0 0 1 [8,] 0 0 1 [9,] 0 0 1 [10,] 0 0 1 [11,] 0 0 1 [12,] 0 0 1 [13,] 0 0 1 [14,] 0 0 1 [15,] 0 0 1 [16,] 0 0 1 [17,] 0 0 1 [18,] 0 0 1 [19,] 0 0 1 [20,] 0 0 1 [21,] 0 0 1 > postscript(file="/var/www/html/rcomp/tmp/1qnb71292607423.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > 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() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2jess1292607423.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3jess1292607423.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4tnru1292607423.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5tnru1292607423.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 60 Frequency = 1 1 2 3 4 5 6 0.305728222 0.212301530 0.230110529 0.305728222 0.212301530 0.136683836 7 8 9 10 11 12 0.174492683 0.174492683 0.012301530 -0.025507317 0.105728222 0.127187626 13 14 15 16 17 18 0.019106212 -0.074320480 0.132532753 0.019106212 -0.074320480 0.039106060 19 20 21 22 23 24 -0.112129327 0.076914907 -0.274320480 -0.123085093 -0.180893788 -0.044475463 25 26 27 28 29 30 -0.037597955 -0.131024647 0.075828586 -0.037597955 -0.131024647 -0.017598107 31 32 33 34 35 36 -0.168833494 -0.168833494 -0.331024647 -0.368833494 -0.237597955 -0.290223864 37 38 39 40 41 42 -0.324219965 -0.417646657 -0.399837659 -0.324219965 -0.417646657 -0.493264351 43 44 45 46 47 48 -0.266411270 -0.455455504 0.382353343 0.344544496 0.008646574 -0.043979336 49 50 51 52 53 54 0.036983485 0.410690254 -0.038634209 0.036983485 0.410690254 0.335072561 55 56 57 58 59 60 0.372881407 0.372881407 0.210690254 0.172881407 0.304116946 0.251491037 > postscript(file="/var/www/html/rcomp/tmp/6tnru1292607423.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 0.305728222 NA 1 0.212301530 0.305728222 2 0.230110529 0.212301530 3 0.305728222 0.230110529 4 0.212301530 0.305728222 5 0.136683836 0.212301530 6 0.174492683 0.136683836 7 0.174492683 0.174492683 8 0.012301530 0.174492683 9 -0.025507317 0.012301530 10 0.105728222 -0.025507317 11 0.127187626 0.105728222 12 0.019106212 0.127187626 13 -0.074320480 0.019106212 14 0.132532753 -0.074320480 15 0.019106212 0.132532753 16 -0.074320480 0.019106212 17 0.039106060 -0.074320480 18 -0.112129327 0.039106060 19 0.076914907 -0.112129327 20 -0.274320480 0.076914907 21 -0.123085093 -0.274320480 22 -0.180893788 -0.123085093 23 -0.044475463 -0.180893788 24 -0.037597955 -0.044475463 25 -0.131024647 -0.037597955 26 0.075828586 -0.131024647 27 -0.037597955 0.075828586 28 -0.131024647 -0.037597955 29 -0.017598107 -0.131024647 30 -0.168833494 -0.017598107 31 -0.168833494 -0.168833494 32 -0.331024647 -0.168833494 33 -0.368833494 -0.331024647 34 -0.237597955 -0.368833494 35 -0.290223864 -0.237597955 36 -0.324219965 -0.290223864 37 -0.417646657 -0.324219965 38 -0.399837659 -0.417646657 39 -0.324219965 -0.399837659 40 -0.417646657 -0.324219965 41 -0.493264351 -0.417646657 42 -0.266411270 -0.493264351 43 -0.455455504 -0.266411270 44 0.382353343 -0.455455504 45 0.344544496 0.382353343 46 0.008646574 0.344544496 47 -0.043979336 0.008646574 48 0.036983485 -0.043979336 49 0.410690254 0.036983485 50 -0.038634209 0.410690254 51 0.036983485 -0.038634209 52 0.410690254 0.036983485 53 0.335072561 0.410690254 54 0.372881407 0.335072561 55 0.372881407 0.372881407 56 0.210690254 0.372881407 57 0.172881407 0.210690254 58 0.304116946 0.172881407 59 0.251491037 0.304116946 60 NA 0.251491037 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.212301530 0.305728222 [2,] 0.230110529 0.212301530 [3,] 0.305728222 0.230110529 [4,] 0.212301530 0.305728222 [5,] 0.136683836 0.212301530 [6,] 0.174492683 0.136683836 [7,] 0.174492683 0.174492683 [8,] 0.012301530 0.174492683 [9,] -0.025507317 0.012301530 [10,] 0.105728222 -0.025507317 [11,] 0.127187626 0.105728222 [12,] 0.019106212 0.127187626 [13,] -0.074320480 0.019106212 [14,] 0.132532753 -0.074320480 [15,] 0.019106212 0.132532753 [16,] -0.074320480 0.019106212 [17,] 0.039106060 -0.074320480 [18,] -0.112129327 0.039106060 [19,] 0.076914907 -0.112129327 [20,] -0.274320480 0.076914907 [21,] -0.123085093 -0.274320480 [22,] -0.180893788 -0.123085093 [23,] -0.044475463 -0.180893788 [24,] -0.037597955 -0.044475463 [25,] -0.131024647 -0.037597955 [26,] 0.075828586 -0.131024647 [27,] -0.037597955 0.075828586 [28,] -0.131024647 -0.037597955 [29,] -0.017598107 -0.131024647 [30,] -0.168833494 -0.017598107 [31,] -0.168833494 -0.168833494 [32,] -0.331024647 -0.168833494 [33,] -0.368833494 -0.331024647 [34,] -0.237597955 -0.368833494 [35,] -0.290223864 -0.237597955 [36,] -0.324219965 -0.290223864 [37,] -0.417646657 -0.324219965 [38,] -0.399837659 -0.417646657 [39,] -0.324219965 -0.399837659 [40,] -0.417646657 -0.324219965 [41,] -0.493264351 -0.417646657 [42,] -0.266411270 -0.493264351 [43,] -0.455455504 -0.266411270 [44,] 0.382353343 -0.455455504 [45,] 0.344544496 0.382353343 [46,] 0.008646574 0.344544496 [47,] -0.043979336 0.008646574 [48,] 0.036983485 -0.043979336 [49,] 0.410690254 0.036983485 [50,] -0.038634209 0.410690254 [51,] 0.036983485 -0.038634209 [52,] 0.410690254 0.036983485 [53,] 0.335072561 0.410690254 [54,] 0.372881407 0.335072561 [55,] 0.372881407 0.372881407 [56,] 0.210690254 0.372881407 [57,] 0.172881407 0.210690254 [58,] 0.304116946 0.172881407 [59,] 0.251491037 0.304116946 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.212301530 0.305728222 2 0.230110529 0.212301530 3 0.305728222 0.230110529 4 0.212301530 0.305728222 5 0.136683836 0.212301530 6 0.174492683 0.136683836 7 0.174492683 0.174492683 8 0.012301530 0.174492683 9 -0.025507317 0.012301530 10 0.105728222 -0.025507317 11 0.127187626 0.105728222 12 0.019106212 0.127187626 13 -0.074320480 0.019106212 14 0.132532753 -0.074320480 15 0.019106212 0.132532753 16 -0.074320480 0.019106212 17 0.039106060 -0.074320480 18 -0.112129327 0.039106060 19 0.076914907 -0.112129327 20 -0.274320480 0.076914907 21 -0.123085093 -0.274320480 22 -0.180893788 -0.123085093 23 -0.044475463 -0.180893788 24 -0.037597955 -0.044475463 25 -0.131024647 -0.037597955 26 0.075828586 -0.131024647 27 -0.037597955 0.075828586 28 -0.131024647 -0.037597955 29 -0.017598107 -0.131024647 30 -0.168833494 -0.017598107 31 -0.168833494 -0.168833494 32 -0.331024647 -0.168833494 33 -0.368833494 -0.331024647 34 -0.237597955 -0.368833494 35 -0.290223864 -0.237597955 36 -0.324219965 -0.290223864 37 -0.417646657 -0.324219965 38 -0.399837659 -0.417646657 39 -0.324219965 -0.399837659 40 -0.417646657 -0.324219965 41 -0.493264351 -0.417646657 42 -0.266411270 -0.493264351 43 -0.455455504 -0.266411270 44 0.382353343 -0.455455504 45 0.344544496 0.382353343 46 0.008646574 0.344544496 47 -0.043979336 0.008646574 48 0.036983485 -0.043979336 49 0.410690254 0.036983485 50 -0.038634209 0.410690254 51 0.036983485 -0.038634209 52 0.410690254 0.036983485 53 0.335072561 0.410690254 54 0.372881407 0.335072561 55 0.372881407 0.372881407 56 0.210690254 0.372881407 57 0.172881407 0.210690254 58 0.304116946 0.172881407 59 0.251491037 0.304116946 > 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() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7mx9f1292607423.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/8f6801292607423.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/9f6801292607423.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/10f6801292607423.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/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='') + } + } Error: subscript out of bounds Execution halted