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(6.3 + ,101.9 + ,1.7 + ,1 + ,1.2 + ,1.4 + ,6 + ,106.2 + ,6.3 + ,1.7 + ,1 + ,1.2 + ,6.2 + ,81 + ,6 + ,6.3 + ,1.7 + ,1 + ,6.4 + ,94.7 + ,6.2 + ,6 + ,6.3 + ,1.7 + ,6.8 + ,101 + ,6.4 + ,6.2 + ,6 + ,6.3 + ,7.5 + ,109.4 + ,6.8 + ,6.4 + ,6.2 + ,6 + ,7.5 + ,102.3 + ,7.5 + ,6.8 + ,6.4 + ,6.2 + ,7.6 + ,90.7 + ,7.5 + ,7.5 + ,6.8 + ,6.4 + ,7.6 + ,96.2 + ,7.6 + ,7.5 + ,7.5 + ,6.8 + ,7.4 + ,96.1 + ,7.6 + ,7.6 + ,7.5 + ,7.5 + ,7.3 + ,106 + ,7.4 + ,7.6 + ,7.6 + ,7.5 + ,7.1 + ,103.1 + ,7.3 + ,7.4 + ,7.6 + ,7.6 + ,6.9 + ,102 + ,7.1 + ,7.3 + ,7.4 + ,7.6 + ,6.8 + ,104.7 + ,6.9 + ,7.1 + ,7.3 + ,7.4 + ,7.5 + ,86 + ,6.8 + ,6.9 + ,7.1 + ,7.3 + ,7.6 + ,92.1 + ,7.5 + ,6.8 + ,6.9 + ,7.1 + ,7.8 + ,106.9 + ,7.6 + ,7.5 + ,6.8 + ,6.9 + ,8 + ,112.6 + ,7.8 + ,7.6 + ,7.5 + ,6.8 + ,8.1 + ,101.7 + ,8 + ,7.8 + ,7.6 + ,7.5 + ,8.2 + ,92 + ,8.1 + ,8 + ,7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X','Y1','Y2','Y3','Y4'),1:93)) > 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 Y X Y1 Y2 Y3 Y4 M1 M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.2 7.0 7.0 0 0 0 0 0 0 0 0 0 1 0 82 83 6.8 109.8 7.1 7.3 7.2 7.0 0 0 0 0 0 0 0 0 0 0 1 83 84 6.4 117.3 6.8 7.1 7.3 7.2 0 0 0 0 0 0 0 0 0 0 0 84 85 6.1 109.1 6.4 6.8 7.1 7.3 1 0 0 0 0 0 0 0 0 0 0 85 86 6.5 115.9 6.1 6.4 6.8 7.1 0 1 0 0 0 0 0 0 0 0 0 86 87 7.7 96.0 6.5 6.1 6.4 6.8 0 0 1 0 0 0 0 0 0 0 0 87 88 7.9 99.8 7.7 6.5 6.1 6.4 0 0 0 1 0 0 0 0 0 0 0 88 89 7.5 116.8 7.9 7.7 6.5 6.1 0 0 0 0 1 0 0 0 0 0 0 89 90 6.9 115.7 7.5 7.9 7.7 6.5 0 0 0 0 0 1 0 0 0 0 0 90 91 6.6 99.4 6.9 7.5 7.9 7.7 0 0 0 0 0 0 1 0 0 0 0 91 92 6.9 94.3 6.6 6.9 7.5 7.9 0 0 0 0 0 0 0 1 0 0 0 92 93 7.7 91.0 6.9 6.6 6.9 7.5 0 0 0 0 0 0 0 0 1 0 0 93 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X Y1 Y2 Y3 Y4 2.808717 0.002191 0.687299 -0.239085 -0.040973 0.210960 M1 M2 M3 M4 M5 M6 0.141197 -0.242649 0.681888 0.334352 0.298794 0.308872 M7 M8 M9 M10 M11 t 0.129615 0.324046 0.429470 0.248536 0.138288 -0.005054 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.92435 -0.23155 0.01784 0.20965 1.95639 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2.808717 1.173255 2.394 0.0192 * X 0.002191 0.010836 0.202 0.8403 Y1 0.687299 0.104841 6.556 6.24e-09 *** Y2 -0.239085 0.131833 -1.814 0.0737 . Y3 -0.040973 0.131618 -0.311 0.7564 Y4 0.210960 0.085342 2.472 0.0157 * M1 0.141197 0.215567 0.655 0.5145 M2 -0.242649 0.225890 -1.074 0.2862 M3 0.681888 0.288252 2.366 0.0206 * M4 0.334352 0.243105 1.375 0.1731 M5 0.298794 0.229515 1.302 0.1970 M6 0.308872 0.228625 1.351 0.1808 M7 0.129615 0.208424 0.622 0.5359 M8 0.324046 0.225254 1.439 0.1544 M9 0.429470 0.222787 1.928 0.0577 . M10 0.248536 0.222361 1.118 0.2673 M11 0.138288 0.224110 0.617 0.5391 t -0.005054 0.002206 -2.291 0.0247 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.4021 on 75 degrees of freedom Multiple R-squared: 0.7601, Adjusted R-squared: 0.7058 F-statistic: 13.98 on 17 and 75 DF, p-value: < 2.2e-16 > 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.18377871 3.675574e-01 8.162213e-01 [2,] 0.27649518 5.529904e-01 7.235048e-01 [3,] 0.23128256 4.625651e-01 7.687174e-01 [4,] 0.22827655 4.565531e-01 7.717235e-01 [5,] 0.21218695 4.243739e-01 7.878131e-01 [6,] 0.15324404 3.064881e-01 8.467560e-01 [7,] 0.10717570 2.143514e-01 8.928243e-01 [8,] 0.08141971 1.628394e-01 9.185803e-01 [9,] 0.05090792 1.018158e-01 9.490921e-01 [10,] 0.22789864 4.557973e-01 7.721014e-01 [11,] 0.32102583 6.420517e-01 6.789742e-01 [12,] 0.59146158 8.170768e-01 4.085384e-01 [13,] 0.51073883 9.785223e-01 4.892612e-01 [14,] 0.45158122 9.031624e-01 5.484188e-01 [15,] 0.53515497 9.296901e-01 4.648450e-01 [16,] 0.96892348 6.215304e-02 3.107652e-02 [17,] 0.99629234 7.415316e-03 3.707658e-03 [18,] 0.99881410 2.371808e-03 1.185904e-03 [19,] 0.99862189 2.756221e-03 1.378110e-03 [20,] 0.99866627 2.667457e-03 1.333729e-03 [21,] 0.99906707 1.865855e-03 9.329273e-04 [22,] 0.99845112 3.097753e-03 1.548877e-03 [23,] 0.99939592 1.208163e-03 6.040816e-04 [24,] 0.99990064 1.987288e-04 9.936440e-05 [25,] 0.99997157 5.685113e-05 2.842556e-05 [26,] 0.99994976 1.004861e-04 5.024307e-05 [27,] 0.99991238 1.752489e-04 8.762446e-05 [28,] 0.99988516 2.296765e-04 1.148382e-04 [29,] 0.99981572 3.685651e-04 1.842825e-04 [30,] 0.99984669 3.066152e-04 1.533076e-04 [31,] 0.99968860 6.228000e-04 3.114000e-04 [32,] 0.99955515 8.896924e-04 4.448462e-04 [33,] 0.99941727 1.165467e-03 5.827336e-04 [34,] 0.99938905 1.221905e-03 6.109523e-04 [35,] 0.99936336 1.273281e-03 6.366405e-04 [36,] 0.99906277 1.874465e-03 9.372326e-04 [37,] 0.99833630 3.327390e-03 1.663695e-03 [38,] 0.99686439 6.271217e-03 3.135608e-03 [39,] 0.99517039 9.659220e-03 4.829610e-03 [40,] 0.99133850 1.732301e-02 8.661504e-03 [41,] 0.99045042 1.909915e-02 9.549576e-03 [42,] 0.98519489 2.961022e-02 1.480511e-02 [43,] 0.99013646 1.972708e-02 9.863538e-03 [44,] 0.99256917 1.486165e-02 7.430826e-03 [45,] 0.98983016 2.033968e-02 1.016984e-02 [46,] 0.99078926 1.842148e-02 9.210742e-03 [47,] 0.98798902 2.402196e-02 1.201098e-02 [48,] 0.97570954 4.858092e-02 2.429046e-02 [49,] 0.95343803 9.312394e-02 4.656197e-02 [50,] 0.90554425 1.889115e-01 9.445575e-02 [51,] 0.93061516 1.387697e-01 6.938484e-02 [52,] 0.90273690 1.945262e-01 9.726310e-02 > postscript(file="/var/www/html/rcomp/tmp/1zloc1258718185.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/2klq71258718185.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/31ce51258718185.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/4q43b1258718185.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/5lf7p1258718185.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 = 93 Frequency = 1 1 2 3 4 5 6 1.956391196 -0.924348989 -0.211765514 0.142430278 -0.503109261 0.017843397 7 8 9 10 11 12 -0.201761925 -0.124167909 -0.361019999 -0.498575340 -0.363406543 -0.413893512 13 14 15 16 17 18 -0.642269372 -0.231547868 -0.376247145 -0.408041956 -0.063130359 0.055583759 19 20 21 22 23 24 0.130559101 0.028619081 -0.062400168 -0.058450987 -0.085913199 0.059897457 25 26 27 28 29 30 -0.370447389 0.199612994 -0.016036844 -0.041229240 0.117702161 0.161105496 31 32 33 34 35 36 0.230543520 0.223794569 0.289908465 0.213361918 -0.057083346 -0.402428955 37 38 39 40 41 42 -0.463610176 0.110147650 0.506761567 0.580831527 0.646094070 0.184109099 43 44 45 46 47 48 0.019965304 0.030345323 -0.067545061 0.208133360 0.292819304 0.220061772 49 50 51 52 53 54 0.138403108 0.264497686 0.239669156 0.190098424 0.303901326 0.209652721 55 56 57 58 59 60 0.281496435 0.206176549 0.212203450 0.319011035 0.374897730 0.506494051 61 62 63 64 65 66 0.152824936 0.340881287 -0.139256542 -0.116032793 0.039696663 -0.021477739 67 68 69 70 71 72 0.093161942 -0.006417582 -0.043556873 0.092234236 0.122963191 0.466957278 73 74 75 76 77 78 -0.089930397 0.007662128 -0.260588707 -0.492752229 -0.518337738 -0.268906915 79 80 81 82 83 84 -0.207866230 -0.138205071 -0.236189324 -0.275714221 -0.284277138 -0.437088091 85 86 87 88 89 90 -0.681361905 0.233095113 0.257464028 0.144695990 -0.022816862 -0.337909818 91 92 93 -0.346098146 -0.220144961 0.268599509 > postscript(file="/var/www/html/rcomp/tmp/6lgf31258718185.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 = 93 Frequency = 1 lag(myerror, k = 1) myerror 0 1.956391196 NA 1 -0.924348989 1.956391196 2 -0.211765514 -0.924348989 3 0.142430278 -0.211765514 4 -0.503109261 0.142430278 5 0.017843397 -0.503109261 6 -0.201761925 0.017843397 7 -0.124167909 -0.201761925 8 -0.361019999 -0.124167909 9 -0.498575340 -0.361019999 10 -0.363406543 -0.498575340 11 -0.413893512 -0.363406543 12 -0.642269372 -0.413893512 13 -0.231547868 -0.642269372 14 -0.376247145 -0.231547868 15 -0.408041956 -0.376247145 16 -0.063130359 -0.408041956 17 0.055583759 -0.063130359 18 0.130559101 0.055583759 19 0.028619081 0.130559101 20 -0.062400168 0.028619081 21 -0.058450987 -0.062400168 22 -0.085913199 -0.058450987 23 0.059897457 -0.085913199 24 -0.370447389 0.059897457 25 0.199612994 -0.370447389 26 -0.016036844 0.199612994 27 -0.041229240 -0.016036844 28 0.117702161 -0.041229240 29 0.161105496 0.117702161 30 0.230543520 0.161105496 31 0.223794569 0.230543520 32 0.289908465 0.223794569 33 0.213361918 0.289908465 34 -0.057083346 0.213361918 35 -0.402428955 -0.057083346 36 -0.463610176 -0.402428955 37 0.110147650 -0.463610176 38 0.506761567 0.110147650 39 0.580831527 0.506761567 40 0.646094070 0.580831527 41 0.184109099 0.646094070 42 0.019965304 0.184109099 43 0.030345323 0.019965304 44 -0.067545061 0.030345323 45 0.208133360 -0.067545061 46 0.292819304 0.208133360 47 0.220061772 0.292819304 48 0.138403108 0.220061772 49 0.264497686 0.138403108 50 0.239669156 0.264497686 51 0.190098424 0.239669156 52 0.303901326 0.190098424 53 0.209652721 0.303901326 54 0.281496435 0.209652721 55 0.206176549 0.281496435 56 0.212203450 0.206176549 57 0.319011035 0.212203450 58 0.374897730 0.319011035 59 0.506494051 0.374897730 60 0.152824936 0.506494051 61 0.340881287 0.152824936 62 -0.139256542 0.340881287 63 -0.116032793 -0.139256542 64 0.039696663 -0.116032793 65 -0.021477739 0.039696663 66 0.093161942 -0.021477739 67 -0.006417582 0.093161942 68 -0.043556873 -0.006417582 69 0.092234236 -0.043556873 70 0.122963191 0.092234236 71 0.466957278 0.122963191 72 -0.089930397 0.466957278 73 0.007662128 -0.089930397 74 -0.260588707 0.007662128 75 -0.492752229 -0.260588707 76 -0.518337738 -0.492752229 77 -0.268906915 -0.518337738 78 -0.207866230 -0.268906915 79 -0.138205071 -0.207866230 80 -0.236189324 -0.138205071 81 -0.275714221 -0.236189324 82 -0.284277138 -0.275714221 83 -0.437088091 -0.284277138 84 -0.681361905 -0.437088091 85 0.233095113 -0.681361905 86 0.257464028 0.233095113 87 0.144695990 0.257464028 88 -0.022816862 0.144695990 89 -0.337909818 -0.022816862 90 -0.346098146 -0.337909818 91 -0.220144961 -0.346098146 92 0.268599509 -0.220144961 93 NA 0.268599509 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.924348989 1.956391196 [2,] -0.211765514 -0.924348989 [3,] 0.142430278 -0.211765514 [4,] -0.503109261 0.142430278 [5,] 0.017843397 -0.503109261 [6,] -0.201761925 0.017843397 [7,] -0.124167909 -0.201761925 [8,] -0.361019999 -0.124167909 [9,] -0.498575340 -0.361019999 [10,] -0.363406543 -0.498575340 [11,] -0.413893512 -0.363406543 [12,] -0.642269372 -0.413893512 [13,] -0.231547868 -0.642269372 [14,] -0.376247145 -0.231547868 [15,] -0.408041956 -0.376247145 [16,] -0.063130359 -0.408041956 [17,] 0.055583759 -0.063130359 [18,] 0.130559101 0.055583759 [19,] 0.028619081 0.130559101 [20,] -0.062400168 0.028619081 [21,] -0.058450987 -0.062400168 [22,] -0.085913199 -0.058450987 [23,] 0.059897457 -0.085913199 [24,] -0.370447389 0.059897457 [25,] 0.199612994 -0.370447389 [26,] -0.016036844 0.199612994 [27,] -0.041229240 -0.016036844 [28,] 0.117702161 -0.041229240 [29,] 0.161105496 0.117702161 [30,] 0.230543520 0.161105496 [31,] 0.223794569 0.230543520 [32,] 0.289908465 0.223794569 [33,] 0.213361918 0.289908465 [34,] -0.057083346 0.213361918 [35,] -0.402428955 -0.057083346 [36,] -0.463610176 -0.402428955 [37,] 0.110147650 -0.463610176 [38,] 0.506761567 0.110147650 [39,] 0.580831527 0.506761567 [40,] 0.646094070 0.580831527 [41,] 0.184109099 0.646094070 [42,] 0.019965304 0.184109099 [43,] 0.030345323 0.019965304 [44,] -0.067545061 0.030345323 [45,] 0.208133360 -0.067545061 [46,] 0.292819304 0.208133360 [47,] 0.220061772 0.292819304 [48,] 0.138403108 0.220061772 [49,] 0.264497686 0.138403108 [50,] 0.239669156 0.264497686 [51,] 0.190098424 0.239669156 [52,] 0.303901326 0.190098424 [53,] 0.209652721 0.303901326 [54,] 0.281496435 0.209652721 [55,] 0.206176549 0.281496435 [56,] 0.212203450 0.206176549 [57,] 0.319011035 0.212203450 [58,] 0.374897730 0.319011035 [59,] 0.506494051 0.374897730 [60,] 0.152824936 0.506494051 [61,] 0.340881287 0.152824936 [62,] -0.139256542 0.340881287 [63,] -0.116032793 -0.139256542 [64,] 0.039696663 -0.116032793 [65,] -0.021477739 0.039696663 [66,] 0.093161942 -0.021477739 [67,] -0.006417582 0.093161942 [68,] -0.043556873 -0.006417582 [69,] 0.092234236 -0.043556873 [70,] 0.122963191 0.092234236 [71,] 0.466957278 0.122963191 [72,] -0.089930397 0.466957278 [73,] 0.007662128 -0.089930397 [74,] -0.260588707 0.007662128 [75,] -0.492752229 -0.260588707 [76,] -0.518337738 -0.492752229 [77,] -0.268906915 -0.518337738 [78,] -0.207866230 -0.268906915 [79,] -0.138205071 -0.207866230 [80,] -0.236189324 -0.138205071 [81,] -0.275714221 -0.236189324 [82,] -0.284277138 -0.275714221 [83,] -0.437088091 -0.284277138 [84,] -0.681361905 -0.437088091 [85,] 0.233095113 -0.681361905 [86,] 0.257464028 0.233095113 [87,] 0.144695990 0.257464028 [88,] -0.022816862 0.144695990 [89,] -0.337909818 -0.022816862 [90,] -0.346098146 -0.337909818 [91,] -0.220144961 -0.346098146 [92,] 0.268599509 -0.220144961 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.924348989 1.956391196 2 -0.211765514 -0.924348989 3 0.142430278 -0.211765514 4 -0.503109261 0.142430278 5 0.017843397 -0.503109261 6 -0.201761925 0.017843397 7 -0.124167909 -0.201761925 8 -0.361019999 -0.124167909 9 -0.498575340 -0.361019999 10 -0.363406543 -0.498575340 11 -0.413893512 -0.363406543 12 -0.642269372 -0.413893512 13 -0.231547868 -0.642269372 14 -0.376247145 -0.231547868 15 -0.408041956 -0.376247145 16 -0.063130359 -0.408041956 17 0.055583759 -0.063130359 18 0.130559101 0.055583759 19 0.028619081 0.130559101 20 -0.062400168 0.028619081 21 -0.058450987 -0.062400168 22 -0.085913199 -0.058450987 23 0.059897457 -0.085913199 24 -0.370447389 0.059897457 25 0.199612994 -0.370447389 26 -0.016036844 0.199612994 27 -0.041229240 -0.016036844 28 0.117702161 -0.041229240 29 0.161105496 0.117702161 30 0.230543520 0.161105496 31 0.223794569 0.230543520 32 0.289908465 0.223794569 33 0.213361918 0.289908465 34 -0.057083346 0.213361918 35 -0.402428955 -0.057083346 36 -0.463610176 -0.402428955 37 0.110147650 -0.463610176 38 0.506761567 0.110147650 39 0.580831527 0.506761567 40 0.646094070 0.580831527 41 0.184109099 0.646094070 42 0.019965304 0.184109099 43 0.030345323 0.019965304 44 -0.067545061 0.030345323 45 0.208133360 -0.067545061 46 0.292819304 0.208133360 47 0.220061772 0.292819304 48 0.138403108 0.220061772 49 0.264497686 0.138403108 50 0.239669156 0.264497686 51 0.190098424 0.239669156 52 0.303901326 0.190098424 53 0.209652721 0.303901326 54 0.281496435 0.209652721 55 0.206176549 0.281496435 56 0.212203450 0.206176549 57 0.319011035 0.212203450 58 0.374897730 0.319011035 59 0.506494051 0.374897730 60 0.152824936 0.506494051 61 0.340881287 0.152824936 62 -0.139256542 0.340881287 63 -0.116032793 -0.139256542 64 0.039696663 -0.116032793 65 -0.021477739 0.039696663 66 0.093161942 -0.021477739 67 -0.006417582 0.093161942 68 -0.043556873 -0.006417582 69 0.092234236 -0.043556873 70 0.122963191 0.092234236 71 0.466957278 0.122963191 72 -0.089930397 0.466957278 73 0.007662128 -0.089930397 74 -0.260588707 0.007662128 75 -0.492752229 -0.260588707 76 -0.518337738 -0.492752229 77 -0.268906915 -0.518337738 78 -0.207866230 -0.268906915 79 -0.138205071 -0.207866230 80 -0.236189324 -0.138205071 81 -0.275714221 -0.236189324 82 -0.284277138 -0.275714221 83 -0.437088091 -0.284277138 84 -0.681361905 -0.437088091 85 0.233095113 -0.681361905 86 0.257464028 0.233095113 87 0.144695990 0.257464028 88 -0.022816862 0.144695990 89 -0.337909818 -0.022816862 90 -0.346098146 -0.337909818 91 -0.220144961 -0.346098146 92 0.268599509 -0.220144961 > 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/7iyyt1258718185.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/8k37o1258718185.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/9e8i51258718185.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/10czb01258718185.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='') + } + } > 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="/var/www/html/rcomp/tmp/11fc9h1258718185.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
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="/var/www/html/rcomp/tmp/12di7p1258718185.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="/var/www/html/rcomp/tmp/13hm1l1258718186.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
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
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="/var/www/html/rcomp/tmp/14p7ql1258718186.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="/var/www/html/rcomp/tmp/152kn21258718186.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="/var/www/html/rcomp/tmp/16f6t11258718186.tab") + } > > system("convert tmp/1zloc1258718185.ps tmp/1zloc1258718185.png") > system("convert tmp/2klq71258718185.ps tmp/2klq71258718185.png") > system("convert tmp/31ce51258718185.ps tmp/31ce51258718185.png") > system("convert tmp/4q43b1258718185.ps tmp/4q43b1258718185.png") > system("convert tmp/5lf7p1258718185.ps tmp/5lf7p1258718185.png") > system("convert tmp/6lgf31258718185.ps tmp/6lgf31258718185.png") > system("convert tmp/7iyyt1258718185.ps tmp/7iyyt1258718185.png") > system("convert tmp/8k37o1258718185.ps tmp/8k37o1258718185.png") > system("convert tmp/9e8i51258718185.ps tmp/9e8i51258718185.png") > system("convert tmp/10czb01258718185.ps tmp/10czb01258718185.png") > > > proc.time() user system elapsed 2.938 1.610 3.330