R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(9.4 + ,0.5 + ,5.1 + ,-1.0 + ,2504.7 + ,9.4 + ,0.8 + ,5.0 + ,3.0 + ,2661.4 + ,9.5 + ,1.0 + ,5.0 + ,2.0 + ,2880.4 + ,9.5 + ,1.3 + ,5.1 + ,3.0 + ,3064.4 + ,9.4 + ,1.3 + ,5.0 + ,5.0 + ,3141.1 + ,9.4 + ,1.2 + ,4.9 + ,5.0 + ,3327.7 + ,9.3 + ,1.2 + ,4.8 + ,3.0 + ,3565.0 + ,9.4 + ,1.0 + ,4.5 + ,2.0 + ,3403.1 + ,9.4 + ,0.8 + ,4.3 + ,1.0 + ,3149.9 + ,9.2 + ,0.7 + ,4.3 + ,-4.0 + ,3006.8 + ,9.1 + ,0.6 + ,4.2 + ,1.0 + ,3230.7 + ,9.1 + ,0.7 + ,4.0 + ,1.0 + ,3361.1 + ,9.1 + ,1.0 + ,3.8 + ,6.0 + ,3484.7 + ,9.0 + ,1.0 + ,4.1 + ,3.0 + ,3411.1 + ,9.0 + ,1.3 + ,4.2 + ,2.0 + ,3288.2 + ,8.9 + ,1.1 + ,4.0 + ,2.0 + ,3280.4 + ,8.8 + ,0.8 + ,4.3 + ,2.0 + ,3174.0 + ,8.7 + ,0.7 + ,4.7 + ,-8.0 + ,3165.3 + ,8.5 + ,0.7 + ,5.0 + ,0.0 + ,3092.7 + ,8.3 + ,0.9 + ,5.1 + ,-2.0 + ,3053.1 + ,8.1 + ,1.3 + ,5.4 + ,3.0 + ,3182.0 + ,7.9 + ,1.4 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,7.6 + ,1.9 + ,4.2 + ,-24.0 + ,1811.0 + ,7.7 + ,0.6 + ,3.9 + ,-24.0 + ,1670.1 + ,7.7 + ,0.7 + ,3.9 + ,-22.0 + ,1864.4 + ,7.7 + ,-0.2 + ,4.2 + ,-19.0 + ,2052.0 + ,7.8 + ,-1.0 + ,4.0 + ,-18.0 + ,2029.6 + ,8.0 + ,-1.7 + ,3.8 + ,-17.0 + ,2070.8 + ,8.1 + ,-0.7 + ,3.7 + ,-11.0 + ,2293.4 + ,8.1 + ,-1.0 + ,3.7 + ,-11.0 + ,2443.3 + ,8.0 + ,-0.9 + ,3.7 + ,-12.0 + ,2513.2 + ,8.1 + ,0.0 + ,3.7 + ,-10.0 + ,2466.9 + ,8.2 + ,0.3 + ,3.7 + ,-15.0 + ,2502.7 + ,8.3 + ,0.8 + ,3.8 + ,-15.0 + ,2539.9 + ,8.4 + ,0.8 + ,3.7 + ,-15.0 + ,2482.6 + ,8.4 + ,1.9 + ,3.5 + ,-13.0 + ,2626.2 + ,8.4 + ,2.1 + ,3.5 + ,-8.0 + ,2656.3 + ,8.5 + ,2.5 + ,3.1 + ,-13.0 + ,2446.7 + ,8.5 + ,2.7 + ,3.4 + ,-9.0 + ,2467.4 + ,8.6 + ,2.4 + ,3.3 + ,-7.0 + ,2462.3 + ,8.6 + ,2.4 + ,2.8 + ,-4.0 + ,2504.6 + ,8.5 + ,2.9 + ,3.2 + ,-4.0 + ,2579.4 + ,8.5 + ,3.1 + ,3.4 + ,-2.0 + ,2649.2) + ,dim=c(5 + ,154) + ,dimnames=list(c('werkloosheid' + ,'hicp' + ,'rente' + ,'consumer' + ,'bel20') + ,1:154)) > y <- array(NA,dim=c(5,154),dimnames=list(c('werkloosheid','hicp','rente','consumer','bel20'),1:154)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal 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 > 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 hicp rente consumer bel20 1 9.4 0.5 5.1 -1 2504.7 2 9.4 0.8 5.0 3 2661.4 3 9.5 1.0 5.0 2 2880.4 4 9.5 1.3 5.1 3 3064.4 5 9.4 1.3 5.0 5 3141.1 6 9.4 1.2 4.9 5 3327.7 7 9.3 1.2 4.8 3 3565.0 8 9.4 1.0 4.5 2 3403.1 9 9.4 0.8 4.3 1 3149.9 10 9.2 0.7 4.3 -4 3006.8 11 9.1 0.6 4.2 1 3230.7 12 9.1 0.7 4.0 1 3361.1 13 9.1 1.0 3.8 6 3484.7 14 9.0 1.0 4.1 3 3411.1 15 9.0 1.3 4.2 2 3288.2 16 8.9 1.1 4.0 2 3280.4 17 8.8 0.8 4.3 2 3174.0 18 8.7 0.7 4.7 -8 3165.3 19 8.5 0.7 5.0 0 3092.7 20 8.3 0.9 5.1 -2 3053.1 21 8.1 1.3 5.4 3 3182.0 22 7.9 1.4 5.4 5 2999.9 23 7.8 1.6 5.4 8 3249.6 24 7.6 2.1 5.5 8 3210.5 25 7.4 0.3 5.8 9 3030.3 26 7.2 2.1 5.7 11 2803.5 27 7.0 2.5 5.5 13 2767.6 28 7.0 2.3 5.6 12 2882.6 29 6.8 2.4 5.6 13 2863.4 30 6.8 3.0 5.5 15 2897.1 31 6.7 1.7 5.5 13 3012.6 32 6.8 3.5 5.7 16 3143.0 33 6.7 4.0 5.6 10 3032.9 34 6.7 3.7 5.6 14 3045.8 35 6.7 3.7 5.4 14 3110.5 36 6.5 3.0 5.2 15 3013.2 37 6.3 2.7 5.1 13 2987.1 38 6.3 2.5 5.1 8 2995.6 39 6.3 2.2 5.0 7 2833.2 40 6.5 2.9 5.3 3 2849.0 41 6.6 3.1 5.4 3 2794.8 42 6.5 3.0 5.3 4 2845.3 43 6.3 2.8 5.1 4 2915.0 44 6.3 2.5 5.0 0 2892.6 45 6.5 1.9 5.0 -4 2604.4 46 7.0 1.9 4.6 -14 2641.7 47 7.1 1.8 4.8 -18 2659.8 48 7.3 2.0 5.1 -8 2638.5 49 7.3 2.6 5.1 -1 2720.3 50 7.4 2.5 5.1 1 2745.9 51 7.4 2.5 5.4 2 2735.7 52 7.3 1.6 5.3 0 2811.7 53 7.4 1.4 5.3 1 2799.4 54 7.5 0.8 5.1 0 2555.3 55 7.7 1.1 4.9 -1 2305.0 56 7.7 1.3 4.7 -3 2215.0 57 7.7 1.2 4.4 -3 2065.8 58 7.7 1.3 4.6 -3 1940.5 59 7.7 1.1 4.5 -4 2042.0 60 7.8 1.3 4.2 -8 1995.4 61 8.0 1.2 4.0 -9 1946.8 62 8.1 1.6 3.9 -13 1765.9 63 8.1 1.7 4.1 -18 1635.3 64 8.2 1.5 4.1 -11 1833.4 65 8.2 0.9 3.7 -9 1910.4 66 8.2 1.5 3.8 -10 1959.7 67 8.1 1.4 4.1 -13 1969.6 68 8.1 1.6 4.1 -11 2061.4 69 8.2 1.7 4.0 -5 2093.5 70 8.3 1.4 4.3 -15 2120.9 71 8.3 1.8 4.4 -6 2174.6 72 8.4 1.7 4.2 -6 2196.7 73 8.5 1.4 4.2 -3 2350.4 74 8.5 1.2 4.0 -1 2440.3 75 8.4 1.0 4.0 -3 2408.6 76 8.0 1.7 4.3 -4 2472.8 77 7.9 2.4 4.4 -6 2407.6 78 8.1 2.0 4.4 0 2454.6 79 8.5 2.1 4.3 -4 2448.1 80 8.8 2.0 4.1 -2 2497.8 81 8.8 1.8 4.1 -2 2645.6 82 8.6 2.7 3.9 -6 2756.8 83 8.3 2.3 3.8 -7 2849.3 84 8.3 1.9 3.7 -6 2921.4 85 8.3 2.0 3.5 -6 2981.9 86 8.4 2.3 3.7 -3 3080.6 87 8.4 2.8 3.7 -2 3106.2 88 8.5 2.4 3.5 -5 3119.3 89 8.6 2.3 3.3 -11 3061.3 90 8.6 2.7 3.2 -11 3097.3 91 8.6 2.7 3.3 -11 3161.7 92 8.6 2.9 3.1 -10 3257.2 93 8.6 3.0 3.2 -14 3277.0 94 8.5 2.2 3.4 -8 3295.3 95 8.4 2.3 3.5 -9 3364.0 96 8.4 2.8 3.3 -5 3494.2 97 8.4 2.8 3.5 -1 3667.0 98 8.5 2.8 3.5 -2 3813.1 99 8.5 2.2 3.8 -5 3918.0 100 8.6 2.6 4.0 -4 3895.5 101 8.6 2.8 4.0 -6 3801.1 102 8.4 2.5 4.1 -2 3570.1 103 8.2 2.4 4.0 -2 3701.6 104 8.0 2.3 3.8 -2 3862.3 105 8.0 1.9 3.7 -2 3970.1 106 8.0 1.7 3.8 2 4138.5 107 8.0 2.0 3.7 1 4199.8 108 7.9 2.1 4.0 -8 4290.9 109 7.9 1.7 4.2 -1 4443.9 110 7.8 1.8 4.0 1 4502.6 111 7.8 1.8 4.1 -1 4357.0 112 8.0 1.8 4.2 2 4591.3 113 7.8 1.3 4.5 2 4697.0 114 7.4 1.3 4.6 1 4621.4 115 7.2 1.3 4.5 -1 4562.8 116 7.0 1.2 4.5 -2 4202.5 117 7.0 1.4 4.5 -2 4296.5 118 7.2 2.2 4.4 -1 4435.2 119 7.2 2.9 4.3 -8 4105.2 120 7.2 3.1 4.5 -4 4116.7 121 7.0 3.5 4.1 -6 3844.5 122 6.9 3.6 4.1 -3 3721.0 123 6.8 4.4 4.3 -3 3674.4 124 6.8 4.1 4.4 -7 3857.6 125 6.8 5.1 4.7 -9 3801.1 126 6.9 5.8 5.0 -11 3504.4 127 7.2 5.9 4.7 -13 3032.6 128 7.2 5.4 4.5 -11 3047.0 129 7.2 5.5 4.5 -9 2962.3 130 7.1 4.8 4.5 -17 2197.8 131 7.2 3.2 5.5 -22 2014.5 132 7.3 2.7 4.5 -25 1862.8 133 7.5 2.1 4.4 -20 1905.4 134 7.6 1.9 4.2 -24 1811.0 135 7.7 0.6 3.9 -24 1670.1 136 7.7 0.7 3.9 -22 1864.4 137 7.7 -0.2 4.2 -19 2052.0 138 7.8 -1.0 4.0 -18 2029.6 139 8.0 -1.7 3.8 -17 2070.8 140 8.1 -0.7 3.7 -11 2293.4 141 8.1 -1.0 3.7 -11 2443.3 142 8.0 -0.9 3.7 -12 2513.2 143 8.1 0.0 3.7 -10 2466.9 144 8.2 0.3 3.7 -15 2502.7 145 8.3 0.8 3.8 -15 2539.9 146 8.4 0.8 3.7 -15 2482.6 147 8.4 1.9 3.5 -13 2626.2 148 8.4 2.1 3.5 -8 2656.3 149 8.5 2.5 3.1 -13 2446.7 150 8.5 2.7 3.4 -9 2467.4 151 8.6 2.4 3.3 -7 2462.3 152 8.6 2.4 2.8 -4 2504.6 153 8.5 2.9 3.2 -4 2579.4 154 8.5 3.1 3.4 -2 2649.2 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) hicp rente consumer bel20 1.164e+01 -2.419e-01 -6.992e-01 2.044e-02 -4.544e-05 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.32994 -0.37399 -0.02126 0.31995 1.81450 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.164e+01 5.391e-01 21.598 < 2e-16 *** hicp -2.419e-01 4.209e-02 -5.749 4.91e-08 *** rente -6.992e-01 9.157e-02 -7.636 2.49e-12 *** consumer 2.044e-02 8.003e-03 2.554 0.0116 * bel20 -4.544e-05 8.208e-05 -0.554 0.5807 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.6088 on 149 degrees of freedom Multiple R-squared: 0.4399, Adjusted R-squared: 0.4248 F-statistic: 29.25 on 4 and 149 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,] 1.512818e-03 3.025635e-03 9.984872e-01 [2,] 1.854057e-04 3.708114e-04 9.998146e-01 [3,] 4.247456e-04 8.494913e-04 9.995753e-01 [4,] 3.042006e-04 6.084012e-04 9.996958e-01 [5,] 7.900818e-05 1.580164e-04 9.999210e-01 [6,] 1.800616e-05 3.601233e-05 9.999820e-01 [7,] 2.500703e-05 5.001405e-05 9.999750e-01 [8,] 2.207374e-05 4.414749e-05 9.999779e-01 [9,] 1.163396e-05 2.326792e-05 9.999884e-01 [10,] 1.434343e-04 2.868687e-04 9.998566e-01 [11,] 5.935817e-04 1.187163e-03 9.994064e-01 [12,] 2.400014e-02 4.800029e-02 9.759999e-01 [13,] 1.325299e-01 2.650599e-01 8.674701e-01 [14,] 5.067135e-01 9.865730e-01 4.932865e-01 [15,] 8.610832e-01 2.778336e-01 1.389168e-01 [16,] 9.428605e-01 1.142789e-01 5.713946e-02 [17,] 9.566545e-01 8.669108e-02 4.334554e-02 [18,] 9.883116e-01 2.337683e-02 1.168842e-02 [19,] 9.960299e-01 7.940163e-03 3.970081e-03 [20,] 9.972686e-01 5.462769e-03 2.731384e-03 [21,] 9.971275e-01 5.744998e-03 2.872499e-03 [22,] 9.968525e-01 6.294950e-03 3.147475e-03 [23,] 9.952490e-01 9.502014e-03 4.751007e-03 [24,] 9.969889e-01 6.022298e-03 3.011149e-03 [25,] 9.960196e-01 7.960748e-03 3.980374e-03 [26,] 9.942302e-01 1.153960e-02 5.769798e-03 [27,] 9.915633e-01 1.687345e-02 8.436726e-03 [28,] 9.878939e-01 2.421214e-02 1.210607e-02 [29,] 9.896001e-01 2.079972e-02 1.039986e-02 [30,] 9.970454e-01 5.909150e-03 2.954575e-03 [31,] 9.997482e-01 5.036367e-04 2.518183e-04 [32,] 9.999923e-01 1.531990e-05 7.659948e-06 [33,] 9.999966e-01 6.879492e-06 3.439746e-06 [34,] 9.999959e-01 8.106396e-06 4.053198e-06 [35,] 9.999971e-01 5.810220e-06 2.905110e-06 [36,] 9.999997e-01 5.976033e-07 2.988016e-07 [37,] 1.000000e+00 1.815920e-08 9.079600e-09 [38,] 1.000000e+00 1.198596e-09 5.992980e-10 [39,] 1.000000e+00 1.154203e-09 5.771014e-10 [40,] 1.000000e+00 2.196256e-09 1.098128e-09 [41,] 1.000000e+00 4.326089e-09 2.163044e-09 [42,] 1.000000e+00 5.983615e-09 2.991808e-09 [43,] 1.000000e+00 9.005405e-09 4.502703e-09 [44,] 1.000000e+00 1.149889e-08 5.749443e-09 [45,] 1.000000e+00 1.913477e-08 9.567383e-09 [46,] 1.000000e+00 2.995853e-08 1.497927e-08 [47,] 1.000000e+00 3.965113e-08 1.982557e-08 [48,] 1.000000e+00 7.682536e-08 3.841268e-08 [49,] 9.999999e-01 1.350866e-07 6.754330e-08 [50,] 9.999999e-01 1.761858e-07 8.809290e-08 [51,] 9.999999e-01 2.351638e-07 1.175819e-07 [52,] 9.999998e-01 3.350164e-07 1.675082e-07 [53,] 9.999998e-01 4.495636e-07 2.247818e-07 [54,] 9.999997e-01 6.436666e-07 3.218333e-07 [55,] 9.999997e-01 6.832966e-07 3.416483e-07 [56,] 9.999997e-01 5.901143e-07 2.950572e-07 [57,] 9.999996e-01 8.441506e-07 4.220753e-07 [58,] 9.999995e-01 1.092120e-06 5.460600e-07 [59,] 9.999991e-01 1.708382e-06 8.541911e-07 [60,] 9.999985e-01 2.949713e-06 1.474856e-06 [61,] 9.999976e-01 4.894786e-06 2.447393e-06 [62,] 9.999965e-01 7.056769e-06 3.528384e-06 [63,] 9.999968e-01 6.324502e-06 3.162251e-06 [64,] 9.999968e-01 6.493269e-06 3.246634e-06 [65,] 9.999960e-01 7.961413e-06 3.980706e-06 [66,] 9.999945e-01 1.095536e-05 5.477680e-06 [67,] 9.999907e-01 1.861978e-05 9.309891e-06 [68,] 9.999850e-01 2.999865e-05 1.499933e-05 [69,] 9.999748e-01 5.037133e-05 2.518566e-05 [70,] 9.999651e-01 6.976601e-05 3.488300e-05 [71,] 9.999476e-01 1.047130e-04 5.235648e-05 [72,] 9.999650e-01 6.997414e-05 3.498707e-05 [73,] 9.999856e-01 2.884240e-05 1.442120e-05 [74,] 9.999958e-01 8.419941e-06 4.209971e-06 [75,] 9.999980e-01 3.990062e-06 1.995031e-06 [76,] 9.999970e-01 6.092593e-06 3.046297e-06 [77,] 9.999955e-01 9.085524e-06 4.542762e-06 [78,] 9.999933e-01 1.348319e-05 6.741596e-06 [79,] 9.999900e-01 2.000906e-05 1.000453e-05 [80,] 9.999862e-01 2.752130e-05 1.376065e-05 [81,] 9.999788e-01 4.238712e-05 2.119356e-05 [82,] 9.999659e-01 6.824620e-05 3.412310e-05 [83,] 9.999431e-01 1.138242e-04 5.691210e-05 [84,] 9.999116e-01 1.768789e-04 8.843944e-05 [85,] 9.998545e-01 2.909834e-04 1.454917e-04 [86,] 9.997745e-01 4.510271e-04 2.255135e-04 [87,] 9.996833e-01 6.333501e-04 3.166751e-04 [88,] 9.995581e-01 8.838793e-04 4.419397e-04 [89,] 9.993237e-01 1.352629e-03 6.763144e-04 [90,] 9.990114e-01 1.977133e-03 9.885665e-04 [91,] 9.987135e-01 2.573066e-03 1.286533e-03 [92,] 9.990186e-01 1.962802e-03 9.814009e-04 [93,] 9.997103e-01 5.794491e-04 2.897245e-04 [94,] 9.999608e-01 7.835621e-05 3.917810e-05 [95,] 9.999856e-01 2.880536e-05 1.440268e-05 [96,] 9.999883e-01 2.342334e-05 1.171167e-05 [97,] 9.999853e-01 2.936924e-05 1.468462e-05 [98,] 9.999856e-01 2.871644e-05 1.435822e-05 [99,] 9.999868e-01 2.644647e-05 1.322323e-05 [100,] 9.999845e-01 3.101398e-05 1.550699e-05 [101,] 9.999870e-01 2.593659e-05 1.296830e-05 [102,] 9.999915e-01 1.705977e-05 8.529884e-06 [103,] 9.999908e-01 1.843241e-05 9.216203e-06 [104,] 9.999904e-01 1.928777e-05 9.643885e-06 [105,] 9.999964e-01 7.140986e-06 3.570493e-06 [106,] 9.999995e-01 1.089698e-06 5.448488e-07 [107,] 9.999997e-01 5.233503e-07 2.616751e-07 [108,] 9.999998e-01 4.821214e-07 2.410607e-07 [109,] 9.999997e-01 6.096181e-07 3.048090e-07 [110,] 9.999995e-01 9.450831e-07 4.725416e-07 [111,] 9.999992e-01 1.576166e-06 7.880831e-07 [112,] 9.999986e-01 2.804472e-06 1.402236e-06 [113,] 9.999983e-01 3.300173e-06 1.650087e-06 [114,] 9.999970e-01 5.978901e-06 2.989451e-06 [115,] 9.999985e-01 3.038409e-06 1.519204e-06 [116,] 9.999996e-01 7.755762e-07 3.877881e-07 [117,] 9.999998e-01 3.406913e-07 1.703456e-07 [118,] 9.999999e-01 2.196614e-07 1.098307e-07 [119,] 9.999998e-01 3.148763e-07 1.574382e-07 [120,] 9.999997e-01 6.134230e-07 3.067115e-07 [121,] 9.999997e-01 5.322535e-07 2.661268e-07 [122,] 1.000000e+00 1.908812e-08 9.544060e-09 [123,] 1.000000e+00 3.967859e-11 1.983929e-11 [124,] 1.000000e+00 9.738317e-11 4.869159e-11 [125,] 1.000000e+00 1.218348e-10 6.091738e-11 [126,] 1.000000e+00 4.622329e-10 2.311164e-10 [127,] 1.000000e+00 1.784814e-09 8.924070e-10 [128,] 1.000000e+00 9.139214e-09 4.569607e-09 [129,] 1.000000e+00 1.067895e-08 5.339473e-09 [130,] 1.000000e+00 8.656976e-09 4.328488e-09 [131,] 1.000000e+00 2.009169e-09 1.004584e-09 [132,] 1.000000e+00 1.332202e-08 6.661008e-09 [133,] 9.999999e-01 1.010109e-07 5.050545e-08 [134,] 9.999997e-01 6.831750e-07 3.415875e-07 [135,] 9.999976e-01 4.802186e-06 2.401093e-06 [136,] 9.999964e-01 7.101824e-06 3.550912e-06 [137,] 9.999971e-01 5.757241e-06 2.878621e-06 [138,] 9.999824e-01 3.518430e-05 1.759215e-05 [139,] 9.998281e-01 3.437576e-04 1.718788e-04 > postscript(file="/var/www/rcomp/tmp/1n2l81292886715.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/rcomp/tmp/2ft2t1292886715.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/rcomp/tmp/3ft2t1292886715.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/rcomp/tmp/48ljv1292886715.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/rcomp/tmp/58ljv1292886715.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 = 154 Frequency = 1 1 2 3 4 5 6 1.577269285 1.505286785 1.684069115 1.814495152 1.607175538 1.521537471 7 8 9 10 11 12 1.403280906 1.258210174 1.078912834 0.950422696 0.664272430 0.554548714 13 14 15 16 17 18 0.390698874 0.558444595 0.715808408 0.427220242 0.459566489 0.819078000 19 20 21 22 23 24 0.662013645 0.619408933 0.629604465 0.404642265 0.303053912 0.292173960 25 26 27 28 29 30 -0.162198871 -0.047799863 -0.333377943 -0.286179106 -0.483297980 -0.447401719 31 32 33 34 35 36 -0.815805169 -0.195851217 -0.127152670 -0.280917019 -0.417820992 -0.951892077 37 38 39 40 41 42 -1.254701980 -1.200498610 -1.329943178 -0.668329174 -0.452480108 -0.664743752 43 44 45 46 47 48 -1.049810441 -1.111569402 -0.988068834 -0.561647552 -0.263410592 -0.010636869 49 50 51 52 53 54 -0.004840155 0.031245293 0.220106167 -0.123234201 -0.092624412 -0.268288079 55 56 57 58 59 60 -0.126478876 -0.181139440 -0.421879561 -0.263534201 -0.356792620 -0.338520256 61 62 63 64 65 66 -0.284325944 -0.083922211 0.176389378 0.093910944 -0.368330521 -0.130557353 67 68 69 70 71 72 0.016787521 0.028465854 -0.038451000 0.404389010 0.389558094 0.326523491 73 74 75 76 77 78 0.299598280 0.074566625 -0.034380860 -0.031891868 0.145314968 0.128022293 79 80 81 82 83 84 0.563765621 0.661102297 0.619428184 0.584157327 0.142100054 -0.041766984 85 86 87 88 89 90 -0.154666844 0.100922396 0.202618980 0.127914800 0.183889043 0.212382724 91 92 93 94 95 96 0.285230876 0.177674904 0.354457099 0.078924363 0.096604264 0.001885637 97 98 99 100 101 102 0.067815589 0.194895550 0.325582300 0.640742181 0.725725525 0.430800668 103 104 105 106 107 108 0.142658945 -0.214077896 -0.375881372 -0.428463176 -0.402573448 -0.080500605 109 110 111 112 113 114 -0.173574381 -0.427438851 -0.323249943 -0.104006038 -0.210412214 -0.523484028 115 116 117 118 119 120 -0.755185816 -0.975310817 -0.922649698 -0.613151086 -0.385613125 -0.278622479 121 122 123 124 125 126 -0.633015850 -0.775756769 -0.544470727 -0.457043714 0.032987137 0.539518820 127 128 129 130 131 132 0.673393000 0.372345883 0.351809384 0.211238328 0.717216440 0.051453705 133 134 135 136 137 138 -0.063909315 -0.074666805 -0.505369238 -0.513228423 -0.574017242 -0.828879945 139 140 141 142 143 144 -0.956657811 -0.797164061 -0.862937707 -0.915125198 -0.640357228 -0.363938618 145 146 147 148 149 150 -0.071351619 -0.043877159 0.048065635 -0.004383812 0.005391492 0.182722091 151 152 153 154 0.099100752 -0.309911029 -0.005849789 0.144672737 > postscript(file="/var/www/rcomp/tmp/68ljv1292886715.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 = 154 Frequency = 1 lag(myerror, k = 1) myerror 0 1.577269285 NA 1 1.505286785 1.577269285 2 1.684069115 1.505286785 3 1.814495152 1.684069115 4 1.607175538 1.814495152 5 1.521537471 1.607175538 6 1.403280906 1.521537471 7 1.258210174 1.403280906 8 1.078912834 1.258210174 9 0.950422696 1.078912834 10 0.664272430 0.950422696 11 0.554548714 0.664272430 12 0.390698874 0.554548714 13 0.558444595 0.390698874 14 0.715808408 0.558444595 15 0.427220242 0.715808408 16 0.459566489 0.427220242 17 0.819078000 0.459566489 18 0.662013645 0.819078000 19 0.619408933 0.662013645 20 0.629604465 0.619408933 21 0.404642265 0.629604465 22 0.303053912 0.404642265 23 0.292173960 0.303053912 24 -0.162198871 0.292173960 25 -0.047799863 -0.162198871 26 -0.333377943 -0.047799863 27 -0.286179106 -0.333377943 28 -0.483297980 -0.286179106 29 -0.447401719 -0.483297980 30 -0.815805169 -0.447401719 31 -0.195851217 -0.815805169 32 -0.127152670 -0.195851217 33 -0.280917019 -0.127152670 34 -0.417820992 -0.280917019 35 -0.951892077 -0.417820992 36 -1.254701980 -0.951892077 37 -1.200498610 -1.254701980 38 -1.329943178 -1.200498610 39 -0.668329174 -1.329943178 40 -0.452480108 -0.668329174 41 -0.664743752 -0.452480108 42 -1.049810441 -0.664743752 43 -1.111569402 -1.049810441 44 -0.988068834 -1.111569402 45 -0.561647552 -0.988068834 46 -0.263410592 -0.561647552 47 -0.010636869 -0.263410592 48 -0.004840155 -0.010636869 49 0.031245293 -0.004840155 50 0.220106167 0.031245293 51 -0.123234201 0.220106167 52 -0.092624412 -0.123234201 53 -0.268288079 -0.092624412 54 -0.126478876 -0.268288079 55 -0.181139440 -0.126478876 56 -0.421879561 -0.181139440 57 -0.263534201 -0.421879561 58 -0.356792620 -0.263534201 59 -0.338520256 -0.356792620 60 -0.284325944 -0.338520256 61 -0.083922211 -0.284325944 62 0.176389378 -0.083922211 63 0.093910944 0.176389378 64 -0.368330521 0.093910944 65 -0.130557353 -0.368330521 66 0.016787521 -0.130557353 67 0.028465854 0.016787521 68 -0.038451000 0.028465854 69 0.404389010 -0.038451000 70 0.389558094 0.404389010 71 0.326523491 0.389558094 72 0.299598280 0.326523491 73 0.074566625 0.299598280 74 -0.034380860 0.074566625 75 -0.031891868 -0.034380860 76 0.145314968 -0.031891868 77 0.128022293 0.145314968 78 0.563765621 0.128022293 79 0.661102297 0.563765621 80 0.619428184 0.661102297 81 0.584157327 0.619428184 82 0.142100054 0.584157327 83 -0.041766984 0.142100054 84 -0.154666844 -0.041766984 85 0.100922396 -0.154666844 86 0.202618980 0.100922396 87 0.127914800 0.202618980 88 0.183889043 0.127914800 89 0.212382724 0.183889043 90 0.285230876 0.212382724 91 0.177674904 0.285230876 92 0.354457099 0.177674904 93 0.078924363 0.354457099 94 0.096604264 0.078924363 95 0.001885637 0.096604264 96 0.067815589 0.001885637 97 0.194895550 0.067815589 98 0.325582300 0.194895550 99 0.640742181 0.325582300 100 0.725725525 0.640742181 101 0.430800668 0.725725525 102 0.142658945 0.430800668 103 -0.214077896 0.142658945 104 -0.375881372 -0.214077896 105 -0.428463176 -0.375881372 106 -0.402573448 -0.428463176 107 -0.080500605 -0.402573448 108 -0.173574381 -0.080500605 109 -0.427438851 -0.173574381 110 -0.323249943 -0.427438851 111 -0.104006038 -0.323249943 112 -0.210412214 -0.104006038 113 -0.523484028 -0.210412214 114 -0.755185816 -0.523484028 115 -0.975310817 -0.755185816 116 -0.922649698 -0.975310817 117 -0.613151086 -0.922649698 118 -0.385613125 -0.613151086 119 -0.278622479 -0.385613125 120 -0.633015850 -0.278622479 121 -0.775756769 -0.633015850 122 -0.544470727 -0.775756769 123 -0.457043714 -0.544470727 124 0.032987137 -0.457043714 125 0.539518820 0.032987137 126 0.673393000 0.539518820 127 0.372345883 0.673393000 128 0.351809384 0.372345883 129 0.211238328 0.351809384 130 0.717216440 0.211238328 131 0.051453705 0.717216440 132 -0.063909315 0.051453705 133 -0.074666805 -0.063909315 134 -0.505369238 -0.074666805 135 -0.513228423 -0.505369238 136 -0.574017242 -0.513228423 137 -0.828879945 -0.574017242 138 -0.956657811 -0.828879945 139 -0.797164061 -0.956657811 140 -0.862937707 -0.797164061 141 -0.915125198 -0.862937707 142 -0.640357228 -0.915125198 143 -0.363938618 -0.640357228 144 -0.071351619 -0.363938618 145 -0.043877159 -0.071351619 146 0.048065635 -0.043877159 147 -0.004383812 0.048065635 148 0.005391492 -0.004383812 149 0.182722091 0.005391492 150 0.099100752 0.182722091 151 -0.309911029 0.099100752 152 -0.005849789 -0.309911029 153 0.144672737 -0.005849789 154 NA 0.144672737 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.505286785 1.577269285 [2,] 1.684069115 1.505286785 [3,] 1.814495152 1.684069115 [4,] 1.607175538 1.814495152 [5,] 1.521537471 1.607175538 [6,] 1.403280906 1.521537471 [7,] 1.258210174 1.403280906 [8,] 1.078912834 1.258210174 [9,] 0.950422696 1.078912834 [10,] 0.664272430 0.950422696 [11,] 0.554548714 0.664272430 [12,] 0.390698874 0.554548714 [13,] 0.558444595 0.390698874 [14,] 0.715808408 0.558444595 [15,] 0.427220242 0.715808408 [16,] 0.459566489 0.427220242 [17,] 0.819078000 0.459566489 [18,] 0.662013645 0.819078000 [19,] 0.619408933 0.662013645 [20,] 0.629604465 0.619408933 [21,] 0.404642265 0.629604465 [22,] 0.303053912 0.404642265 [23,] 0.292173960 0.303053912 [24,] -0.162198871 0.292173960 [25,] -0.047799863 -0.162198871 [26,] -0.333377943 -0.047799863 [27,] -0.286179106 -0.333377943 [28,] -0.483297980 -0.286179106 [29,] -0.447401719 -0.483297980 [30,] -0.815805169 -0.447401719 [31,] -0.195851217 -0.815805169 [32,] -0.127152670 -0.195851217 [33,] -0.280917019 -0.127152670 [34,] -0.417820992 -0.280917019 [35,] -0.951892077 -0.417820992 [36,] -1.254701980 -0.951892077 [37,] -1.200498610 -1.254701980 [38,] -1.329943178 -1.200498610 [39,] -0.668329174 -1.329943178 [40,] -0.452480108 -0.668329174 [41,] -0.664743752 -0.452480108 [42,] -1.049810441 -0.664743752 [43,] -1.111569402 -1.049810441 [44,] -0.988068834 -1.111569402 [45,] -0.561647552 -0.988068834 [46,] -0.263410592 -0.561647552 [47,] -0.010636869 -0.263410592 [48,] -0.004840155 -0.010636869 [49,] 0.031245293 -0.004840155 [50,] 0.220106167 0.031245293 [51,] -0.123234201 0.220106167 [52,] -0.092624412 -0.123234201 [53,] -0.268288079 -0.092624412 [54,] -0.126478876 -0.268288079 [55,] -0.181139440 -0.126478876 [56,] -0.421879561 -0.181139440 [57,] -0.263534201 -0.421879561 [58,] -0.356792620 -0.263534201 [59,] -0.338520256 -0.356792620 [60,] -0.284325944 -0.338520256 [61,] -0.083922211 -0.284325944 [62,] 0.176389378 -0.083922211 [63,] 0.093910944 0.176389378 [64,] -0.368330521 0.093910944 [65,] -0.130557353 -0.368330521 [66,] 0.016787521 -0.130557353 [67,] 0.028465854 0.016787521 [68,] -0.038451000 0.028465854 [69,] 0.404389010 -0.038451000 [70,] 0.389558094 0.404389010 [71,] 0.326523491 0.389558094 [72,] 0.299598280 0.326523491 [73,] 0.074566625 0.299598280 [74,] -0.034380860 0.074566625 [75,] -0.031891868 -0.034380860 [76,] 0.145314968 -0.031891868 [77,] 0.128022293 0.145314968 [78,] 0.563765621 0.128022293 [79,] 0.661102297 0.563765621 [80,] 0.619428184 0.661102297 [81,] 0.584157327 0.619428184 [82,] 0.142100054 0.584157327 [83,] -0.041766984 0.142100054 [84,] -0.154666844 -0.041766984 [85,] 0.100922396 -0.154666844 [86,] 0.202618980 0.100922396 [87,] 0.127914800 0.202618980 [88,] 0.183889043 0.127914800 [89,] 0.212382724 0.183889043 [90,] 0.285230876 0.212382724 [91,] 0.177674904 0.285230876 [92,] 0.354457099 0.177674904 [93,] 0.078924363 0.354457099 [94,] 0.096604264 0.078924363 [95,] 0.001885637 0.096604264 [96,] 0.067815589 0.001885637 [97,] 0.194895550 0.067815589 [98,] 0.325582300 0.194895550 [99,] 0.640742181 0.325582300 [100,] 0.725725525 0.640742181 [101,] 0.430800668 0.725725525 [102,] 0.142658945 0.430800668 [103,] -0.214077896 0.142658945 [104,] -0.375881372 -0.214077896 [105,] -0.428463176 -0.375881372 [106,] -0.402573448 -0.428463176 [107,] -0.080500605 -0.402573448 [108,] -0.173574381 -0.080500605 [109,] -0.427438851 -0.173574381 [110,] -0.323249943 -0.427438851 [111,] -0.104006038 -0.323249943 [112,] -0.210412214 -0.104006038 [113,] -0.523484028 -0.210412214 [114,] -0.755185816 -0.523484028 [115,] -0.975310817 -0.755185816 [116,] -0.922649698 -0.975310817 [117,] -0.613151086 -0.922649698 [118,] -0.385613125 -0.613151086 [119,] -0.278622479 -0.385613125 [120,] -0.633015850 -0.278622479 [121,] -0.775756769 -0.633015850 [122,] -0.544470727 -0.775756769 [123,] -0.457043714 -0.544470727 [124,] 0.032987137 -0.457043714 [125,] 0.539518820 0.032987137 [126,] 0.673393000 0.539518820 [127,] 0.372345883 0.673393000 [128,] 0.351809384 0.372345883 [129,] 0.211238328 0.351809384 [130,] 0.717216440 0.211238328 [131,] 0.051453705 0.717216440 [132,] -0.063909315 0.051453705 [133,] -0.074666805 -0.063909315 [134,] -0.505369238 -0.074666805 [135,] -0.513228423 -0.505369238 [136,] -0.574017242 -0.513228423 [137,] -0.828879945 -0.574017242 [138,] -0.956657811 -0.828879945 [139,] -0.797164061 -0.956657811 [140,] -0.862937707 -0.797164061 [141,] -0.915125198 -0.862937707 [142,] -0.640357228 -0.915125198 [143,] -0.363938618 -0.640357228 [144,] -0.071351619 -0.363938618 [145,] -0.043877159 -0.071351619 [146,] 0.048065635 -0.043877159 [147,] -0.004383812 0.048065635 [148,] 0.005391492 -0.004383812 [149,] 0.182722091 0.005391492 [150,] 0.099100752 0.182722091 [151,] -0.309911029 0.099100752 [152,] -0.005849789 -0.309911029 [153,] 0.144672737 -0.005849789 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.505286785 1.577269285 2 1.684069115 1.505286785 3 1.814495152 1.684069115 4 1.607175538 1.814495152 5 1.521537471 1.607175538 6 1.403280906 1.521537471 7 1.258210174 1.403280906 8 1.078912834 1.258210174 9 0.950422696 1.078912834 10 0.664272430 0.950422696 11 0.554548714 0.664272430 12 0.390698874 0.554548714 13 0.558444595 0.390698874 14 0.715808408 0.558444595 15 0.427220242 0.715808408 16 0.459566489 0.427220242 17 0.819078000 0.459566489 18 0.662013645 0.819078000 19 0.619408933 0.662013645 20 0.629604465 0.619408933 21 0.404642265 0.629604465 22 0.303053912 0.404642265 23 0.292173960 0.303053912 24 -0.162198871 0.292173960 25 -0.047799863 -0.162198871 26 -0.333377943 -0.047799863 27 -0.286179106 -0.333377943 28 -0.483297980 -0.286179106 29 -0.447401719 -0.483297980 30 -0.815805169 -0.447401719 31 -0.195851217 -0.815805169 32 -0.127152670 -0.195851217 33 -0.280917019 -0.127152670 34 -0.417820992 -0.280917019 35 -0.951892077 -0.417820992 36 -1.254701980 -0.951892077 37 -1.200498610 -1.254701980 38 -1.329943178 -1.200498610 39 -0.668329174 -1.329943178 40 -0.452480108 -0.668329174 41 -0.664743752 -0.452480108 42 -1.049810441 -0.664743752 43 -1.111569402 -1.049810441 44 -0.988068834 -1.111569402 45 -0.561647552 -0.988068834 46 -0.263410592 -0.561647552 47 -0.010636869 -0.263410592 48 -0.004840155 -0.010636869 49 0.031245293 -0.004840155 50 0.220106167 0.031245293 51 -0.123234201 0.220106167 52 -0.092624412 -0.123234201 53 -0.268288079 -0.092624412 54 -0.126478876 -0.268288079 55 -0.181139440 -0.126478876 56 -0.421879561 -0.181139440 57 -0.263534201 -0.421879561 58 -0.356792620 -0.263534201 59 -0.338520256 -0.356792620 60 -0.284325944 -0.338520256 61 -0.083922211 -0.284325944 62 0.176389378 -0.083922211 63 0.093910944 0.176389378 64 -0.368330521 0.093910944 65 -0.130557353 -0.368330521 66 0.016787521 -0.130557353 67 0.028465854 0.016787521 68 -0.038451000 0.028465854 69 0.404389010 -0.038451000 70 0.389558094 0.404389010 71 0.326523491 0.389558094 72 0.299598280 0.326523491 73 0.074566625 0.299598280 74 -0.034380860 0.074566625 75 -0.031891868 -0.034380860 76 0.145314968 -0.031891868 77 0.128022293 0.145314968 78 0.563765621 0.128022293 79 0.661102297 0.563765621 80 0.619428184 0.661102297 81 0.584157327 0.619428184 82 0.142100054 0.584157327 83 -0.041766984 0.142100054 84 -0.154666844 -0.041766984 85 0.100922396 -0.154666844 86 0.202618980 0.100922396 87 0.127914800 0.202618980 88 0.183889043 0.127914800 89 0.212382724 0.183889043 90 0.285230876 0.212382724 91 0.177674904 0.285230876 92 0.354457099 0.177674904 93 0.078924363 0.354457099 94 0.096604264 0.078924363 95 0.001885637 0.096604264 96 0.067815589 0.001885637 97 0.194895550 0.067815589 98 0.325582300 0.194895550 99 0.640742181 0.325582300 100 0.725725525 0.640742181 101 0.430800668 0.725725525 102 0.142658945 0.430800668 103 -0.214077896 0.142658945 104 -0.375881372 -0.214077896 105 -0.428463176 -0.375881372 106 -0.402573448 -0.428463176 107 -0.080500605 -0.402573448 108 -0.173574381 -0.080500605 109 -0.427438851 -0.173574381 110 -0.323249943 -0.427438851 111 -0.104006038 -0.323249943 112 -0.210412214 -0.104006038 113 -0.523484028 -0.210412214 114 -0.755185816 -0.523484028 115 -0.975310817 -0.755185816 116 -0.922649698 -0.975310817 117 -0.613151086 -0.922649698 118 -0.385613125 -0.613151086 119 -0.278622479 -0.385613125 120 -0.633015850 -0.278622479 121 -0.775756769 -0.633015850 122 -0.544470727 -0.775756769 123 -0.457043714 -0.544470727 124 0.032987137 -0.457043714 125 0.539518820 0.032987137 126 0.673393000 0.539518820 127 0.372345883 0.673393000 128 0.351809384 0.372345883 129 0.211238328 0.351809384 130 0.717216440 0.211238328 131 0.051453705 0.717216440 132 -0.063909315 0.051453705 133 -0.074666805 -0.063909315 134 -0.505369238 -0.074666805 135 -0.513228423 -0.505369238 136 -0.574017242 -0.513228423 137 -0.828879945 -0.574017242 138 -0.956657811 -0.828879945 139 -0.797164061 -0.956657811 140 -0.862937707 -0.797164061 141 -0.915125198 -0.862937707 142 -0.640357228 -0.915125198 143 -0.363938618 -0.640357228 144 -0.071351619 -0.363938618 145 -0.043877159 -0.071351619 146 0.048065635 -0.043877159 147 -0.004383812 0.048065635 148 0.005391492 -0.004383812 149 0.182722091 0.005391492 150 0.099100752 0.182722091 151 -0.309911029 0.099100752 152 -0.005849789 -0.309911029 153 0.144672737 -0.005849789 > 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/rcomp/tmp/71ciy1292886715.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/rcomp/tmp/81ciy1292886715.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/rcomp/tmp/9blij1292886715.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/rcomp/tmp/10blij1292886715.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/11xmyp1292886715.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/rcomp/tmp/12imfv1292886715.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/rcomp/tmp/1375u71292886715.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/rcomp/tmp/14aosv1292886715.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/rcomp/tmp/15wo911292886715.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/rcomp/tmp/16szsj1292886716.tab") + } > > try(system("convert tmp/1n2l81292886715.ps tmp/1n2l81292886715.png",intern=TRUE)) character(0) > try(system("convert tmp/2ft2t1292886715.ps tmp/2ft2t1292886715.png",intern=TRUE)) character(0) > try(system("convert tmp/3ft2t1292886715.ps tmp/3ft2t1292886715.png",intern=TRUE)) character(0) > try(system("convert tmp/48ljv1292886715.ps tmp/48ljv1292886715.png",intern=TRUE)) character(0) > try(system("convert tmp/58ljv1292886715.ps tmp/58ljv1292886715.png",intern=TRUE)) character(0) > try(system("convert tmp/68ljv1292886715.ps tmp/68ljv1292886715.png",intern=TRUE)) character(0) > try(system("convert tmp/71ciy1292886715.ps tmp/71ciy1292886715.png",intern=TRUE)) character(0) > try(system("convert tmp/81ciy1292886715.ps tmp/81ciy1292886715.png",intern=TRUE)) character(0) > try(system("convert tmp/9blij1292886715.ps tmp/9blij1292886715.png",intern=TRUE)) character(0) > try(system("convert tmp/10blij1292886715.ps tmp/10blij1292886715.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.480 1.440 5.926