R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(95.2,0,95.00,0,94.00,0,92.2,0,91.00,0,91.2,0,103.4,1,105.00,1,104.6,1,103.8,0,101.8,0,102.4,0,103.8,0,103.4,0,102.00,0,101.8,0,100.2,0,101.4,0,113.8,1,116.00,1,115.6,1,113.00,0,109.4,0,111.00,0,112.4,0,112.2,0,111.00,0,108.8,0,107.4,0,108.6,0,118.8,1,122.2,1,122.6,1,122.2,0,118.8,0,119.00,0,118.2,0,117.8,0,116.8,0,114.6,0,113.4,0,113.8,0,124.2,1,125.8,1,125.6,1,122.4,0,119.00,0,119.4,0,118.6,0,118.00,0,116.00,0,114.8,0,114.6,0,114.6,0,124.00,1,125.2,1,124.00,1,117.6,0,113.2,0,111.4,0,112.2,0,109.8,0,106.4,0,105.2,0,102.2,0,99.8,0,111.00,1,113.00,1,108.4,1,105.4,0,102.00,0,102.8,0),dim=c(2,72),dimnames=list(c('Werkloosheid','Dummy'),1:72)) > y <- array(NA,dim=c(2,72),dimnames=list(c('Werkloosheid','Dummy'),1:72)) > 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 Werkloosheid Dummy M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 95.2 0 1 0 0 0 0 0 0 0 0 0 0 1 2 95.0 0 0 1 0 0 0 0 0 0 0 0 0 2 3 94.0 0 0 0 1 0 0 0 0 0 0 0 0 3 4 92.2 0 0 0 0 1 0 0 0 0 0 0 0 4 5 91.0 0 0 0 0 0 1 0 0 0 0 0 0 5 6 91.2 0 0 0 0 0 0 1 0 0 0 0 0 6 7 103.4 1 0 0 0 0 0 0 1 0 0 0 0 7 8 105.0 1 0 0 0 0 0 0 0 1 0 0 0 8 9 104.6 1 0 0 0 0 0 0 0 0 1 0 0 9 10 103.8 0 0 0 0 0 0 0 0 0 0 1 0 10 11 101.8 0 0 0 0 0 0 0 0 0 0 0 1 11 12 102.4 0 0 0 0 0 0 0 0 0 0 0 0 12 13 103.8 0 1 0 0 0 0 0 0 0 0 0 0 13 14 103.4 0 0 1 0 0 0 0 0 0 0 0 0 14 15 102.0 0 0 0 1 0 0 0 0 0 0 0 0 15 16 101.8 0 0 0 0 1 0 0 0 0 0 0 0 16 17 100.2 0 0 0 0 0 1 0 0 0 0 0 0 17 18 101.4 0 0 0 0 0 0 1 0 0 0 0 0 18 19 113.8 1 0 0 0 0 0 0 1 0 0 0 0 19 20 116.0 1 0 0 0 0 0 0 0 1 0 0 0 20 21 115.6 1 0 0 0 0 0 0 0 0 1 0 0 21 22 113.0 0 0 0 0 0 0 0 0 0 0 1 0 22 23 109.4 0 0 0 0 0 0 0 0 0 0 0 1 23 24 111.0 0 0 0 0 0 0 0 0 0 0 0 0 24 25 112.4 0 1 0 0 0 0 0 0 0 0 0 0 25 26 112.2 0 0 1 0 0 0 0 0 0 0 0 0 26 27 111.0 0 0 0 1 0 0 0 0 0 0 0 0 27 28 108.8 0 0 0 0 1 0 0 0 0 0 0 0 28 29 107.4 0 0 0 0 0 1 0 0 0 0 0 0 29 30 108.6 0 0 0 0 0 0 1 0 0 0 0 0 30 31 118.8 1 0 0 0 0 0 0 1 0 0 0 0 31 32 122.2 1 0 0 0 0 0 0 0 1 0 0 0 32 33 122.6 1 0 0 0 0 0 0 0 0 1 0 0 33 34 122.2 0 0 0 0 0 0 0 0 0 0 1 0 34 35 118.8 0 0 0 0 0 0 0 0 0 0 0 1 35 36 119.0 0 0 0 0 0 0 0 0 0 0 0 0 36 37 118.2 0 1 0 0 0 0 0 0 0 0 0 0 37 38 117.8 0 0 1 0 0 0 0 0 0 0 0 0 38 39 116.8 0 0 0 1 0 0 0 0 0 0 0 0 39 40 114.6 0 0 0 0 1 0 0 0 0 0 0 0 40 41 113.4 0 0 0 0 0 1 0 0 0 0 0 0 41 42 113.8 0 0 0 0 0 0 1 0 0 0 0 0 42 43 124.2 1 0 0 0 0 0 0 1 0 0 0 0 43 44 125.8 1 0 0 0 0 0 0 0 1 0 0 0 44 45 125.6 1 0 0 0 0 0 0 0 0 1 0 0 45 46 122.4 0 0 0 0 0 0 0 0 0 0 1 0 46 47 119.0 0 0 0 0 0 0 0 0 0 0 0 1 47 48 119.4 0 0 0 0 0 0 0 0 0 0 0 0 48 49 118.6 0 1 0 0 0 0 0 0 0 0 0 0 49 50 118.0 0 0 1 0 0 0 0 0 0 0 0 0 50 51 116.0 0 0 0 1 0 0 0 0 0 0 0 0 51 52 114.8 0 0 0 0 1 0 0 0 0 0 0 0 52 53 114.6 0 0 0 0 0 1 0 0 0 0 0 0 53 54 114.6 0 0 0 0 0 0 1 0 0 0 0 0 54 55 124.0 1 0 0 0 0 0 0 1 0 0 0 0 55 56 125.2 1 0 0 0 0 0 0 0 1 0 0 0 56 57 124.0 1 0 0 0 0 0 0 0 0 1 0 0 57 58 117.6 0 0 0 0 0 0 0 0 0 0 1 0 58 59 113.2 0 0 0 0 0 0 0 0 0 0 0 1 59 60 111.4 0 0 0 0 0 0 0 0 0 0 0 0 60 61 112.2 0 1 0 0 0 0 0 0 0 0 0 0 61 62 109.8 0 0 1 0 0 0 0 0 0 0 0 0 62 63 106.4 0 0 0 1 0 0 0 0 0 0 0 0 63 64 105.2 0 0 0 0 1 0 0 0 0 0 0 0 64 65 102.2 0 0 0 0 0 1 0 0 0 0 0 0 65 66 99.8 0 0 0 0 0 0 1 0 0 0 0 0 66 67 111.0 1 0 0 0 0 0 0 1 0 0 0 0 67 68 113.0 1 0 0 0 0 0 0 0 1 0 0 0 68 69 108.4 1 0 0 0 0 0 0 0 0 1 0 0 69 70 105.4 0 0 0 0 0 0 0 0 0 0 1 0 70 71 102.0 0 0 0 0 0 0 0 0 0 0 0 1 71 72 102.8 0 0 0 0 0 0 0 0 0 0 0 0 72 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Dummy M1 M2 M3 M4 103.4850 6.3368 1.0349 0.1560 -1.6896 -3.3352 M5 M6 M7 M8 M9 M10 -4.9475 -5.0264 -0.5755 1.2456 NA 3.4245 M11 t -0.1211 0.1789 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -14.068 -6.468 1.971 5.679 9.207 Coefficients: (1 not defined because of singularities) Estimate Std. Error t value Pr(>|t|) (Intercept) 103.48500 3.56876 28.997 < 2e-16 *** Dummy 6.33679 4.34569 1.458 0.150095 M1 1.03488 4.36975 0.237 0.813610 M2 0.15595 4.36525 0.036 0.971622 M3 -1.68964 4.36117 -0.387 0.699833 M4 -3.33524 4.35752 -0.765 0.447086 M5 -4.94750 4.35430 -1.136 0.260453 M6 -5.02643 4.35151 -1.155 0.252706 M7 -0.57548 4.34462 -0.132 0.895073 M8 1.24560 4.34397 0.287 0.775315 M9 NA NA NA NA M10 3.42452 4.34462 0.788 0.433722 M11 -0.12107 4.34397 -0.028 0.977859 t 0.17893 0.04326 4.136 0.000114 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 7.524 on 59 degrees of freedom Multiple R-squared: 0.4105, Adjusted R-squared: 0.2906 F-statistic: 3.423 on 12 and 59 DF, p-value: 0.0007643 > 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,] 9.219799e-04 1.843960e-03 0.9990780 [2,] 3.063367e-04 6.126735e-04 0.9996937 [3,] 8.718292e-05 1.743658e-04 0.9999128 [4,] 4.070552e-05 8.141103e-05 0.9999593 [5,] 1.431444e-05 2.862889e-05 0.9999857 [6,] 2.552287e-06 5.104573e-06 0.9999974 [7,] 1.652625e-06 3.305250e-06 0.9999983 [8,] 3.962887e-07 7.925774e-07 0.9999996 [9,] 1.348665e-07 2.697329e-07 0.9999999 [10,] 3.939205e-08 7.878411e-08 1.0000000 [11,] 1.119448e-08 2.238897e-08 1.0000000 [12,] 1.259860e-08 2.519721e-08 1.0000000 [13,] 1.358837e-08 2.717674e-08 1.0000000 [14,] 8.050608e-09 1.610122e-08 1.0000000 [15,] 8.861611e-08 1.772322e-07 0.9999999 [16,] 1.041369e-07 2.082739e-07 0.9999999 [17,] 7.130709e-08 1.426142e-07 0.9999999 [18,] 3.713047e-08 7.426094e-08 1.0000000 [19,] 1.492786e-08 2.985573e-08 1.0000000 [20,] 6.508224e-09 1.301645e-08 1.0000000 [21,] 4.559119e-08 9.118238e-08 1.0000000 [22,] 1.846443e-07 3.692885e-07 0.9999998 [23,] 3.041921e-07 6.083842e-07 0.9999997 [24,] 1.628849e-06 3.257699e-06 0.9999984 [25,] 6.971371e-06 1.394274e-05 0.9999930 [26,] 2.623331e-05 5.246661e-05 0.9999738 [27,] 2.922421e-04 5.844841e-04 0.9997078 [28,] 5.979687e-03 1.195937e-02 0.9940203 [29,] 2.586711e-02 5.173422e-02 0.9741329 [30,] 1.053465e-01 2.106929e-01 0.8946535 [31,] 2.676389e-01 5.352779e-01 0.7323611 [32,] 4.780915e-01 9.561830e-01 0.5219085 [33,] 7.469618e-01 5.060764e-01 0.2530382 [34,] 8.439880e-01 3.120240e-01 0.1560120 [35,] 8.677496e-01 2.645009e-01 0.1322504 [36,] 8.807042e-01 2.385915e-01 0.1192958 [37,] 8.062328e-01 3.875344e-01 0.1937672 [38,] 7.745235e-01 4.509530e-01 0.2254765 [39,] 6.629785e-01 6.740430e-01 0.3370215 > postscript(file="/var/www/html/rcomp/tmp/1oyaa1228772544.ps",horizontal=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/28dbs1228772544.ps",horizontal=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/35wbg1228772544.ps",horizontal=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/48wys1228772544.ps",horizontal=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/5gbiy1228772544.ps",horizontal=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 = 72 Frequency = 1 1 2 3 4 5 6 -9.4988095 -8.9988095 -8.3321429 -8.6654762 -8.4321429 -8.3321429 7 8 9 10 11 12 -7.0988095 -7.4988095 -6.8321429 -4.8988095 -3.5321429 -3.2321429 13 14 15 16 17 18 -3.0459524 -2.7459524 -2.4792857 -1.2126190 -1.3792857 -0.2792857 19 20 21 22 23 24 1.1540476 1.3540476 2.0207143 2.1540476 1.9207143 3.2207143 25 26 27 28 29 30 3.4069048 3.9069048 4.3735714 3.6402381 3.6735714 4.7735714 31 32 33 34 35 36 4.0069048 5.4069048 6.8735714 9.2069048 9.1735714 9.0735714 37 38 39 40 41 42 7.0597619 7.3597619 8.0264286 7.2930952 7.5264286 7.8264286 43 44 45 46 47 48 7.2597619 6.8597619 7.7264286 7.2597619 7.2264286 7.3264286 49 50 51 52 53 54 5.3126190 5.4126190 5.0792857 5.3459524 6.5792857 6.4792857 55 56 57 58 59 60 4.9126190 4.1126190 3.9792857 0.3126190 -0.7207143 -2.8207143 61 62 63 64 65 66 -3.2345238 -4.9345238 -6.6678571 -6.4011905 -7.9678571 -10.4678571 67 68 69 70 71 72 -10.2345238 -10.2345238 -13.7678571 -14.0345238 -14.0678571 -13.5678571 > postscript(file="/var/www/html/rcomp/tmp/6n1831228772544.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 72 Frequency = 1 lag(myerror, k = 1) myerror 0 -9.4988095 NA 1 -8.9988095 -9.4988095 2 -8.3321429 -8.9988095 3 -8.6654762 -8.3321429 4 -8.4321429 -8.6654762 5 -8.3321429 -8.4321429 6 -7.0988095 -8.3321429 7 -7.4988095 -7.0988095 8 -6.8321429 -7.4988095 9 -4.8988095 -6.8321429 10 -3.5321429 -4.8988095 11 -3.2321429 -3.5321429 12 -3.0459524 -3.2321429 13 -2.7459524 -3.0459524 14 -2.4792857 -2.7459524 15 -1.2126190 -2.4792857 16 -1.3792857 -1.2126190 17 -0.2792857 -1.3792857 18 1.1540476 -0.2792857 19 1.3540476 1.1540476 20 2.0207143 1.3540476 21 2.1540476 2.0207143 22 1.9207143 2.1540476 23 3.2207143 1.9207143 24 3.4069048 3.2207143 25 3.9069048 3.4069048 26 4.3735714 3.9069048 27 3.6402381 4.3735714 28 3.6735714 3.6402381 29 4.7735714 3.6735714 30 4.0069048 4.7735714 31 5.4069048 4.0069048 32 6.8735714 5.4069048 33 9.2069048 6.8735714 34 9.1735714 9.2069048 35 9.0735714 9.1735714 36 7.0597619 9.0735714 37 7.3597619 7.0597619 38 8.0264286 7.3597619 39 7.2930952 8.0264286 40 7.5264286 7.2930952 41 7.8264286 7.5264286 42 7.2597619 7.8264286 43 6.8597619 7.2597619 44 7.7264286 6.8597619 45 7.2597619 7.7264286 46 7.2264286 7.2597619 47 7.3264286 7.2264286 48 5.3126190 7.3264286 49 5.4126190 5.3126190 50 5.0792857 5.4126190 51 5.3459524 5.0792857 52 6.5792857 5.3459524 53 6.4792857 6.5792857 54 4.9126190 6.4792857 55 4.1126190 4.9126190 56 3.9792857 4.1126190 57 0.3126190 3.9792857 58 -0.7207143 0.3126190 59 -2.8207143 -0.7207143 60 -3.2345238 -2.8207143 61 -4.9345238 -3.2345238 62 -6.6678571 -4.9345238 63 -6.4011905 -6.6678571 64 -7.9678571 -6.4011905 65 -10.4678571 -7.9678571 66 -10.2345238 -10.4678571 67 -10.2345238 -10.2345238 68 -13.7678571 -10.2345238 69 -14.0345238 -13.7678571 70 -14.0678571 -14.0345238 71 -13.5678571 -14.0678571 72 NA -13.5678571 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -8.9988095 -9.4988095 [2,] -8.3321429 -8.9988095 [3,] -8.6654762 -8.3321429 [4,] -8.4321429 -8.6654762 [5,] -8.3321429 -8.4321429 [6,] -7.0988095 -8.3321429 [7,] -7.4988095 -7.0988095 [8,] -6.8321429 -7.4988095 [9,] -4.8988095 -6.8321429 [10,] -3.5321429 -4.8988095 [11,] -3.2321429 -3.5321429 [12,] -3.0459524 -3.2321429 [13,] -2.7459524 -3.0459524 [14,] -2.4792857 -2.7459524 [15,] -1.2126190 -2.4792857 [16,] -1.3792857 -1.2126190 [17,] -0.2792857 -1.3792857 [18,] 1.1540476 -0.2792857 [19,] 1.3540476 1.1540476 [20,] 2.0207143 1.3540476 [21,] 2.1540476 2.0207143 [22,] 1.9207143 2.1540476 [23,] 3.2207143 1.9207143 [24,] 3.4069048 3.2207143 [25,] 3.9069048 3.4069048 [26,] 4.3735714 3.9069048 [27,] 3.6402381 4.3735714 [28,] 3.6735714 3.6402381 [29,] 4.7735714 3.6735714 [30,] 4.0069048 4.7735714 [31,] 5.4069048 4.0069048 [32,] 6.8735714 5.4069048 [33,] 9.2069048 6.8735714 [34,] 9.1735714 9.2069048 [35,] 9.0735714 9.1735714 [36,] 7.0597619 9.0735714 [37,] 7.3597619 7.0597619 [38,] 8.0264286 7.3597619 [39,] 7.2930952 8.0264286 [40,] 7.5264286 7.2930952 [41,] 7.8264286 7.5264286 [42,] 7.2597619 7.8264286 [43,] 6.8597619 7.2597619 [44,] 7.7264286 6.8597619 [45,] 7.2597619 7.7264286 [46,] 7.2264286 7.2597619 [47,] 7.3264286 7.2264286 [48,] 5.3126190 7.3264286 [49,] 5.4126190 5.3126190 [50,] 5.0792857 5.4126190 [51,] 5.3459524 5.0792857 [52,] 6.5792857 5.3459524 [53,] 6.4792857 6.5792857 [54,] 4.9126190 6.4792857 [55,] 4.1126190 4.9126190 [56,] 3.9792857 4.1126190 [57,] 0.3126190 3.9792857 [58,] -0.7207143 0.3126190 [59,] -2.8207143 -0.7207143 [60,] -3.2345238 -2.8207143 [61,] -4.9345238 -3.2345238 [62,] -6.6678571 -4.9345238 [63,] -6.4011905 -6.6678571 [64,] -7.9678571 -6.4011905 [65,] -10.4678571 -7.9678571 [66,] -10.2345238 -10.4678571 [67,] -10.2345238 -10.2345238 [68,] -13.7678571 -10.2345238 [69,] -14.0345238 -13.7678571 [70,] -14.0678571 -14.0345238 [71,] -13.5678571 -14.0678571 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -8.9988095 -9.4988095 2 -8.3321429 -8.9988095 3 -8.6654762 -8.3321429 4 -8.4321429 -8.6654762 5 -8.3321429 -8.4321429 6 -7.0988095 -8.3321429 7 -7.4988095 -7.0988095 8 -6.8321429 -7.4988095 9 -4.8988095 -6.8321429 10 -3.5321429 -4.8988095 11 -3.2321429 -3.5321429 12 -3.0459524 -3.2321429 13 -2.7459524 -3.0459524 14 -2.4792857 -2.7459524 15 -1.2126190 -2.4792857 16 -1.3792857 -1.2126190 17 -0.2792857 -1.3792857 18 1.1540476 -0.2792857 19 1.3540476 1.1540476 20 2.0207143 1.3540476 21 2.1540476 2.0207143 22 1.9207143 2.1540476 23 3.2207143 1.9207143 24 3.4069048 3.2207143 25 3.9069048 3.4069048 26 4.3735714 3.9069048 27 3.6402381 4.3735714 28 3.6735714 3.6402381 29 4.7735714 3.6735714 30 4.0069048 4.7735714 31 5.4069048 4.0069048 32 6.8735714 5.4069048 33 9.2069048 6.8735714 34 9.1735714 9.2069048 35 9.0735714 9.1735714 36 7.0597619 9.0735714 37 7.3597619 7.0597619 38 8.0264286 7.3597619 39 7.2930952 8.0264286 40 7.5264286 7.2930952 41 7.8264286 7.5264286 42 7.2597619 7.8264286 43 6.8597619 7.2597619 44 7.7264286 6.8597619 45 7.2597619 7.7264286 46 7.2264286 7.2597619 47 7.3264286 7.2264286 48 5.3126190 7.3264286 49 5.4126190 5.3126190 50 5.0792857 5.4126190 51 5.3459524 5.0792857 52 6.5792857 5.3459524 53 6.4792857 6.5792857 54 4.9126190 6.4792857 55 4.1126190 4.9126190 56 3.9792857 4.1126190 57 0.3126190 3.9792857 58 -0.7207143 0.3126190 59 -2.8207143 -0.7207143 60 -3.2345238 -2.8207143 61 -4.9345238 -3.2345238 62 -6.6678571 -4.9345238 63 -6.4011905 -6.6678571 64 -7.9678571 -6.4011905 65 -10.4678571 -7.9678571 66 -10.2345238 -10.4678571 67 -10.2345238 -10.2345238 68 -13.7678571 -10.2345238 69 -14.0345238 -13.7678571 70 -14.0678571 -14.0345238 71 -13.5678571 -14.0678571 > 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/7u9kj1228772544.ps",horizontal=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/841kv1228772544.ps",horizontal=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/9bfy21228772544.ps",horizontal=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/10z1cr1228772544.ps",horizontal=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