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. Natural language support but running in an English locale 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(14.458,13.594,17.814,20.235,21.811,21.439,21.393,19.831,20.468,21.080,21.600,17.390,17848,19592,21092,20889,25890,24965,22225,20977,22897,22785,22769,19637,20203,20450,23083,21738,26766,25280,22574,22729,21378,22902,24989,21116,15169,15846,20927,18273,22538,15596,14034,11366,14861,15149,13577,13026,13190,13196,15826,14733,16307,15703,14589,12043,15057,14053,12698,10888,10045,11549,13767,12424,13116,14211,12266,12602,15714,13742,12745,10491,10057,10900,11771,11992,11993,14504,11727,11477,13578,11555,11846,11397,10066,10269,14279,13870,13695,14420,11424,9704,12464,14301,13464,9893,11572,12380,16692,16052,16459,14761,13654,13480,18068,16560,14530,10650,11651,13735,13360,17818,20613,16231,13862,12004,17734,15034,12609,12320,10833,11350,13648,14890,16325,18045,15616,11926,16855,15083,12520,12355),dim=c(1,132),dimnames=list(c('Pas'),1:132)) > y <- array(NA,dim=c(1,132),dimnames=list(c('Pas'),1:132)) > 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 Pas M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 14.458 1 0 0 0 0 0 0 0 0 0 0 1 2 13.594 0 1 0 0 0 0 0 0 0 0 0 2 3 17.814 0 0 1 0 0 0 0 0 0 0 0 3 4 20.235 0 0 0 1 0 0 0 0 0 0 0 4 5 21.811 0 0 0 0 1 0 0 0 0 0 0 5 6 21.439 0 0 0 0 0 1 0 0 0 0 0 6 7 21.393 0 0 0 0 0 0 1 0 0 0 0 7 8 19.831 0 0 0 0 0 0 0 1 0 0 0 8 9 20.468 0 0 0 0 0 0 0 0 1 0 0 9 10 21.080 0 0 0 0 0 0 0 0 0 1 0 10 11 21.600 0 0 0 0 0 0 0 0 0 0 1 11 12 17.390 0 0 0 0 0 0 0 0 0 0 0 12 13 17848.000 1 0 0 0 0 0 0 0 0 0 0 13 14 19592.000 0 1 0 0 0 0 0 0 0 0 0 14 15 21092.000 0 0 1 0 0 0 0 0 0 0 0 15 16 20889.000 0 0 0 1 0 0 0 0 0 0 0 16 17 25890.000 0 0 0 0 1 0 0 0 0 0 0 17 18 24965.000 0 0 0 0 0 1 0 0 0 0 0 18 19 22225.000 0 0 0 0 0 0 1 0 0 0 0 19 20 20977.000 0 0 0 0 0 0 0 1 0 0 0 20 21 22897.000 0 0 0 0 0 0 0 0 1 0 0 21 22 22785.000 0 0 0 0 0 0 0 0 0 1 0 22 23 22769.000 0 0 0 0 0 0 0 0 0 0 1 23 24 19637.000 0 0 0 0 0 0 0 0 0 0 0 24 25 20203.000 1 0 0 0 0 0 0 0 0 0 0 25 26 20450.000 0 1 0 0 0 0 0 0 0 0 0 26 27 23083.000 0 0 1 0 0 0 0 0 0 0 0 27 28 21738.000 0 0 0 1 0 0 0 0 0 0 0 28 29 26766.000 0 0 0 0 1 0 0 0 0 0 0 29 30 25280.000 0 0 0 0 0 1 0 0 0 0 0 30 31 22574.000 0 0 0 0 0 0 1 0 0 0 0 31 32 22729.000 0 0 0 0 0 0 0 1 0 0 0 32 33 21378.000 0 0 0 0 0 0 0 0 1 0 0 33 34 22902.000 0 0 0 0 0 0 0 0 0 1 0 34 35 24989.000 0 0 0 0 0 0 0 0 0 0 1 35 36 21116.000 0 0 0 0 0 0 0 0 0 0 0 36 37 15169.000 1 0 0 0 0 0 0 0 0 0 0 37 38 15846.000 0 1 0 0 0 0 0 0 0 0 0 38 39 20927.000 0 0 1 0 0 0 0 0 0 0 0 39 40 18273.000 0 0 0 1 0 0 0 0 0 0 0 40 41 22538.000 0 0 0 0 1 0 0 0 0 0 0 41 42 15596.000 0 0 0 0 0 1 0 0 0 0 0 42 43 14034.000 0 0 0 0 0 0 1 0 0 0 0 43 44 11366.000 0 0 0 0 0 0 0 1 0 0 0 44 45 14861.000 0 0 0 0 0 0 0 0 1 0 0 45 46 15149.000 0 0 0 0 0 0 0 0 0 1 0 46 47 13577.000 0 0 0 0 0 0 0 0 0 0 1 47 48 13026.000 0 0 0 0 0 0 0 0 0 0 0 48 49 13190.000 1 0 0 0 0 0 0 0 0 0 0 49 50 13196.000 0 1 0 0 0 0 0 0 0 0 0 50 51 15826.000 0 0 1 0 0 0 0 0 0 0 0 51 52 14733.000 0 0 0 1 0 0 0 0 0 0 0 52 53 16307.000 0 0 0 0 1 0 0 0 0 0 0 53 54 15703.000 0 0 0 0 0 1 0 0 0 0 0 54 55 14589.000 0 0 0 0 0 0 1 0 0 0 0 55 56 12043.000 0 0 0 0 0 0 0 1 0 0 0 56 57 15057.000 0 0 0 0 0 0 0 0 1 0 0 57 58 14053.000 0 0 0 0 0 0 0 0 0 1 0 58 59 12698.000 0 0 0 0 0 0 0 0 0 0 1 59 60 10888.000 0 0 0 0 0 0 0 0 0 0 0 60 61 10045.000 1 0 0 0 0 0 0 0 0 0 0 61 62 11549.000 0 1 0 0 0 0 0 0 0 0 0 62 63 13767.000 0 0 1 0 0 0 0 0 0 0 0 63 64 12424.000 0 0 0 1 0 0 0 0 0 0 0 64 65 13116.000 0 0 0 0 1 0 0 0 0 0 0 65 66 14211.000 0 0 0 0 0 1 0 0 0 0 0 66 67 12266.000 0 0 0 0 0 0 1 0 0 0 0 67 68 12602.000 0 0 0 0 0 0 0 1 0 0 0 68 69 15714.000 0 0 0 0 0 0 0 0 1 0 0 69 70 13742.000 0 0 0 0 0 0 0 0 0 1 0 70 71 12745.000 0 0 0 0 0 0 0 0 0 0 1 71 72 10491.000 0 0 0 0 0 0 0 0 0 0 0 72 73 10057.000 1 0 0 0 0 0 0 0 0 0 0 73 74 10900.000 0 1 0 0 0 0 0 0 0 0 0 74 75 11771.000 0 0 1 0 0 0 0 0 0 0 0 75 76 11992.000 0 0 0 1 0 0 0 0 0 0 0 76 77 11993.000 0 0 0 0 1 0 0 0 0 0 0 77 78 14504.000 0 0 0 0 0 1 0 0 0 0 0 78 79 11727.000 0 0 0 0 0 0 1 0 0 0 0 79 80 11477.000 0 0 0 0 0 0 0 1 0 0 0 80 81 13578.000 0 0 0 0 0 0 0 0 1 0 0 81 82 11555.000 0 0 0 0 0 0 0 0 0 1 0 82 83 11846.000 0 0 0 0 0 0 0 0 0 0 1 83 84 11397.000 0 0 0 0 0 0 0 0 0 0 0 84 85 10066.000 1 0 0 0 0 0 0 0 0 0 0 85 86 10269.000 0 1 0 0 0 0 0 0 0 0 0 86 87 14279.000 0 0 1 0 0 0 0 0 0 0 0 87 88 13870.000 0 0 0 1 0 0 0 0 0 0 0 88 89 13695.000 0 0 0 0 1 0 0 0 0 0 0 89 90 14420.000 0 0 0 0 0 1 0 0 0 0 0 90 91 11424.000 0 0 0 0 0 0 1 0 0 0 0 91 92 9704.000 0 0 0 0 0 0 0 1 0 0 0 92 93 12464.000 0 0 0 0 0 0 0 0 1 0 0 93 94 14301.000 0 0 0 0 0 0 0 0 0 1 0 94 95 13464.000 0 0 0 0 0 0 0 0 0 0 1 95 96 9893.000 0 0 0 0 0 0 0 0 0 0 0 96 97 11572.000 1 0 0 0 0 0 0 0 0 0 0 97 98 12380.000 0 1 0 0 0 0 0 0 0 0 0 98 99 16692.000 0 0 1 0 0 0 0 0 0 0 0 99 100 16052.000 0 0 0 1 0 0 0 0 0 0 0 100 101 16459.000 0 0 0 0 1 0 0 0 0 0 0 101 102 14761.000 0 0 0 0 0 1 0 0 0 0 0 102 103 13654.000 0 0 0 0 0 0 1 0 0 0 0 103 104 13480.000 0 0 0 0 0 0 0 1 0 0 0 104 105 18068.000 0 0 0 0 0 0 0 0 1 0 0 105 106 16560.000 0 0 0 0 0 0 0 0 0 1 0 106 107 14530.000 0 0 0 0 0 0 0 0 0 0 1 107 108 10650.000 0 0 0 0 0 0 0 0 0 0 0 108 109 11651.000 1 0 0 0 0 0 0 0 0 0 0 109 110 13735.000 0 1 0 0 0 0 0 0 0 0 0 110 111 13360.000 0 0 1 0 0 0 0 0 0 0 0 111 112 17818.000 0 0 0 1 0 0 0 0 0 0 0 112 113 20613.000 0 0 0 0 1 0 0 0 0 0 0 113 114 16231.000 0 0 0 0 0 1 0 0 0 0 0 114 115 13862.000 0 0 0 0 0 0 1 0 0 0 0 115 116 12004.000 0 0 0 0 0 0 0 1 0 0 0 116 117 17734.000 0 0 0 0 0 0 0 0 1 0 0 117 118 15034.000 0 0 0 0 0 0 0 0 0 1 0 118 119 12609.000 0 0 0 0 0 0 0 0 0 0 1 119 120 12320.000 0 0 0 0 0 0 0 0 0 0 0 120 121 10833.000 1 0 0 0 0 0 0 0 0 0 0 121 122 11350.000 0 1 0 0 0 0 0 0 0 0 0 122 123 13648.000 0 0 1 0 0 0 0 0 0 0 0 123 124 14890.000 0 0 0 1 0 0 0 0 0 0 0 124 125 16325.000 0 0 0 0 1 0 0 0 0 0 0 125 126 18045.000 0 0 0 0 0 1 0 0 0 0 0 126 127 15616.000 0 0 0 0 0 0 1 0 0 0 0 127 128 11926.000 0 0 0 0 0 0 0 1 0 0 0 128 129 16855.000 0 0 0 0 0 0 0 0 1 0 0 129 130 15083.000 0 0 0 0 0 0 0 0 0 1 0 130 131 12520.000 0 0 0 0 0 0 0 0 0 0 1 131 132 12355.000 0 0 0 0 0 0 0 0 0 0 0 132 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) M1 M2 M3 M4 M5 11516.706 -32.887 745.405 3028.250 2861.477 4766.354 M6 M7 M8 M9 M10 M11 3852.055 1868.785 620.104 3368.078 2685.140 1822.649 t 6.448 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -16293.5 -1692.2 -425.2 1921.6 11424.0 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 11516.706 2087.765 5.516 2.05e-07 *** M1 -32.887 2594.083 -0.013 0.9899 M2 745.405 2593.298 0.287 0.7743 M3 3028.250 2592.587 1.168 0.2451 M4 2861.477 2591.950 1.104 0.2718 M5 4766.354 2591.389 1.839 0.0684 . M6 3852.055 2590.902 1.487 0.1397 M7 1868.785 2590.490 0.721 0.4721 M8 620.104 2590.153 0.239 0.8112 M9 3368.078 2589.891 1.300 0.1960 M10 2685.140 2589.704 1.037 0.3019 M11 1822.649 2589.591 0.704 0.4829 t 6.448 13.930 0.463 0.6443 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 6073 on 119 degrees of freedom Multiple R-squared: 0.06419, Adjusted R-squared: -0.03017 F-statistic: 0.6803 on 12 and 119 DF, p-value: 0.7675 > 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.044669470 8.933894e-02 9.553305e-01 [2,] 0.217795139 4.355903e-01 7.822049e-01 [3,] 0.206948425 4.138968e-01 7.930516e-01 [4,] 0.123002156 2.460043e-01 8.769978e-01 [5,] 0.071342655 1.426853e-01 9.286573e-01 [6,] 0.040840691 8.168138e-02 9.591593e-01 [7,] 0.022519168 4.503834e-02 9.774808e-01 [8,] 0.012456264 2.491253e-02 9.875437e-01 [9,] 0.009208815 1.841763e-02 9.907912e-01 [10,] 0.989571375 2.085725e-02 1.042862e-02 [11,] 0.999887004 2.259923e-04 1.129962e-04 [12,] 0.999988355 2.329065e-05 1.164533e-05 [13,] 0.999998133 3.734852e-06 1.867426e-06 [14,] 0.999999574 8.510633e-07 4.255317e-07 [15,] 0.999999914 1.717023e-07 8.585116e-08 [16,] 0.999999985 2.939966e-08 1.469983e-08 [17,] 0.999999999 2.146057e-09 1.073028e-09 [18,] 1.000000000 7.091809e-10 3.545905e-10 [19,] 1.000000000 1.092651e-10 5.463256e-11 [20,] 1.000000000 4.765389e-13 2.382695e-13 [21,] 1.000000000 1.913292e-15 9.566459e-16 [22,] 1.000000000 7.806620e-19 3.903310e-19 [23,] 1.000000000 3.695563e-21 1.847782e-21 [24,] 1.000000000 9.860938e-24 4.930469e-24 [25,] 1.000000000 4.368211e-25 2.184106e-25 [26,] 1.000000000 1.059926e-28 5.299631e-29 [27,] 1.000000000 1.301346e-29 6.506731e-30 [28,] 1.000000000 3.134129e-30 1.567064e-30 [29,] 1.000000000 8.668410e-31 4.334205e-31 [30,] 1.000000000 1.068221e-30 5.341104e-31 [31,] 1.000000000 1.057866e-30 5.289332e-31 [32,] 1.000000000 8.139121e-31 4.069561e-31 [33,] 1.000000000 4.524874e-31 2.262437e-31 [34,] 1.000000000 1.019848e-31 5.099242e-32 [35,] 1.000000000 6.086507e-32 3.043253e-32 [36,] 1.000000000 2.805630e-32 1.402815e-32 [37,] 1.000000000 5.374366e-32 2.687183e-32 [38,] 1.000000000 5.046705e-32 2.523352e-32 [39,] 1.000000000 1.022148e-31 5.110741e-32 [40,] 1.000000000 8.053888e-32 4.026944e-32 [41,] 1.000000000 1.636077e-31 8.180385e-32 [42,] 1.000000000 6.505645e-31 3.252823e-31 [43,] 1.000000000 1.968411e-30 9.842055e-31 [44,] 1.000000000 4.968320e-30 2.484160e-30 [45,] 1.000000000 1.314156e-29 6.570779e-30 [46,] 1.000000000 3.997811e-29 1.998906e-29 [47,] 1.000000000 1.123344e-28 5.616721e-29 [48,] 1.000000000 3.189406e-28 1.594703e-28 [49,] 1.000000000 1.182402e-27 5.912011e-28 [50,] 1.000000000 3.314362e-27 1.657181e-27 [51,] 1.000000000 1.562233e-26 7.811165e-27 [52,] 1.000000000 6.876571e-26 3.438285e-26 [53,] 1.000000000 1.131906e-25 5.659528e-26 [54,] 1.000000000 3.632008e-25 1.816004e-25 [55,] 1.000000000 1.512930e-24 7.564650e-25 [56,] 1.000000000 4.540388e-24 2.270194e-24 [57,] 1.000000000 1.735696e-23 8.678478e-24 [58,] 1.000000000 7.460379e-23 3.730190e-23 [59,] 1.000000000 3.275167e-22 1.637583e-22 [60,] 1.000000000 1.256882e-21 6.284410e-22 [61,] 1.000000000 3.240292e-21 1.620146e-21 [62,] 1.000000000 2.475378e-21 1.237689e-21 [63,] 1.000000000 1.296414e-20 6.482072e-21 [64,] 1.000000000 6.297274e-20 3.148637e-20 [65,] 1.000000000 2.542596e-19 1.271298e-19 [66,] 1.000000000 1.022082e-18 5.110409e-19 [67,] 1.000000000 2.082153e-18 1.041077e-18 [68,] 1.000000000 1.024845e-17 5.124224e-18 [69,] 1.000000000 3.739445e-17 1.869723e-17 [70,] 1.000000000 1.804955e-16 9.024777e-17 [71,] 1.000000000 7.094194e-16 3.547097e-16 [72,] 1.000000000 3.151412e-15 1.575706e-15 [73,] 1.000000000 1.183300e-14 5.916501e-15 [74,] 1.000000000 1.320855e-14 6.604277e-15 [75,] 1.000000000 5.241926e-14 2.620963e-14 [76,] 1.000000000 1.148480e-13 5.742398e-14 [77,] 1.000000000 2.471224e-13 1.235612e-13 [78,] 1.000000000 1.903604e-14 9.518021e-15 [79,] 1.000000000 7.258318e-14 3.629159e-14 [80,] 1.000000000 4.001303e-13 2.000652e-13 [81,] 1.000000000 8.347818e-13 4.173909e-13 [82,] 1.000000000 4.563017e-12 2.281508e-12 [83,] 1.000000000 2.323417e-11 1.161708e-11 [84,] 1.000000000 2.870066e-11 1.435033e-11 [85,] 1.000000000 1.489919e-10 7.449597e-11 [86,] 1.000000000 3.138523e-10 1.569261e-10 [87,] 1.000000000 3.365374e-10 1.682687e-10 [88,] 1.000000000 9.454252e-10 4.727126e-10 [89,] 0.999999998 4.988764e-09 2.494382e-09 [90,] 0.999999986 2.773341e-08 1.386670e-08 [91,] 0.999999933 1.349649e-07 6.748245e-08 [92,] 0.999999749 5.025880e-07 2.512940e-07 [93,] 0.999999517 9.658973e-07 4.829486e-07 [94,] 0.999997388 5.224562e-06 2.612281e-06 [95,] 0.999991301 1.739741e-05 8.698704e-06 [96,] 0.999958301 8.339701e-05 4.169850e-05 [97,] 0.999906803 1.863936e-04 9.319679e-05 [98,] 0.999992312 1.537563e-05 7.687813e-06 [99,] 0.999978453 4.309441e-05 2.154721e-05 [100,] 0.999993622 1.275572e-05 6.377861e-06 [101,] 0.999844893 3.102133e-04 1.551067e-04 > postscript(file="/var/www/html/freestat/rcomp/tmp/1fc491290769236.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/freestat/rcomp/tmp/2fc491290769236.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/freestat/rcomp/tmp/3q3lu1290769236.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/freestat/rcomp/tmp/4q3lu1290769236.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/freestat/rcomp/tmp/5q3lu1290769236.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 = 132 Frequency = 1 1 2 3 4 5 6 -11475.80926 -12261.41290 -14546.48563 -14383.73926 -16293.48835 -15386.00835 7 8 9 10 11 12 -13409.23199 -12168.56108 -14922.34562 -14245.24381 -13388.68017 -11576.68926 13 14 15 16 17 18 6280.35968 7239.62005 6450.32732 6407.65268 9497.32759 9480.17959 19 20 21 22 23 24 8717.00195 8711.23486 7876.81332 8441.30314 9281.34677 7965.54768 25 26 27 28 29 30 8557.98662 8020.24699 8363.95426 7179.27962 10295.95453 9717.80653 31 32 33 34 35 36 8988.62890 10385.86181 6280.44026 8480.93008 11423.97372 9367.17462 37 38 39 40 41 42 3446.61357 3338.87393 6130.58120 3636.90657 5990.58148 -43.56652 43 44 45 46 47 48 371.25584 -1054.51125 -313.93280 650.55702 -65.39934 1199.80157 49 50 51 52 53 54 1390.24051 611.50087 952.20815 19.53351 -317.79158 -13.93958 55 56 57 58 59 60 848.88278 -454.88431 -195.30585 -522.81603 -1021.77240 -1015.57149 61 62 63 64 65 66 -1832.13255 -1112.87218 -1184.16491 -2366.83955 -3586.16464 -1583.31264 67 68 69 70 71 72 -1551.49027 26.74264 384.32109 -911.18909 -1052.14545 -1489.94455 73 74 75 76 77 78 -1897.50560 -1839.24524 -3257.53797 -2876.21260 -4786.53769 -1367.68569 79 80 81 82 83 84 -2167.86333 -1175.63042 -1829.05197 -3175.56215 -2028.51851 -661.31760 85 86 87 88 89 90 -1965.87866 -2547.61830 -826.91102 -1075.58566 -3161.91075 -1529.05875 91 92 93 94 95 96 -2548.23639 -3026.00348 -3020.42502 -506.93520 -487.89157 -2242.69066 97 98 99 100 101 102 -537.25172 -513.99135 1508.71592 1029.04128 -475.28381 -1265.43181 103 104 105 106 107 108 -395.60944 672.62347 2506.20192 1674.69174 500.73538 -1563.06372 109 110 111 112 113 114 -535.62477 763.63559 -1900.65714 2717.66823 3601.34314 127.19514 115 116 117 118 119 120 -264.98250 -880.74959 2094.82886 71.31868 -1497.63768 29.56323 121 122 123 124 125 126 -1430.99783 -1698.73747 -1690.03019 -287.70483 -764.02992 1863.82208 127 128 129 130 131 132 1411.64444 -1036.12265 1138.45581 42.94563 -1664.01074 -12.80983 > postscript(file="/var/www/html/freestat/rcomp/tmp/61c3x1290769236.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 = 132 Frequency = 1 lag(myerror, k = 1) myerror 0 -11475.80926 NA 1 -12261.41290 -11475.80926 2 -14546.48563 -12261.41290 3 -14383.73926 -14546.48563 4 -16293.48835 -14383.73926 5 -15386.00835 -16293.48835 6 -13409.23199 -15386.00835 7 -12168.56108 -13409.23199 8 -14922.34562 -12168.56108 9 -14245.24381 -14922.34562 10 -13388.68017 -14245.24381 11 -11576.68926 -13388.68017 12 6280.35968 -11576.68926 13 7239.62005 6280.35968 14 6450.32732 7239.62005 15 6407.65268 6450.32732 16 9497.32759 6407.65268 17 9480.17959 9497.32759 18 8717.00195 9480.17959 19 8711.23486 8717.00195 20 7876.81332 8711.23486 21 8441.30314 7876.81332 22 9281.34677 8441.30314 23 7965.54768 9281.34677 24 8557.98662 7965.54768 25 8020.24699 8557.98662 26 8363.95426 8020.24699 27 7179.27962 8363.95426 28 10295.95453 7179.27962 29 9717.80653 10295.95453 30 8988.62890 9717.80653 31 10385.86181 8988.62890 32 6280.44026 10385.86181 33 8480.93008 6280.44026 34 11423.97372 8480.93008 35 9367.17462 11423.97372 36 3446.61357 9367.17462 37 3338.87393 3446.61357 38 6130.58120 3338.87393 39 3636.90657 6130.58120 40 5990.58148 3636.90657 41 -43.56652 5990.58148 42 371.25584 -43.56652 43 -1054.51125 371.25584 44 -313.93280 -1054.51125 45 650.55702 -313.93280 46 -65.39934 650.55702 47 1199.80157 -65.39934 48 1390.24051 1199.80157 49 611.50087 1390.24051 50 952.20815 611.50087 51 19.53351 952.20815 52 -317.79158 19.53351 53 -13.93958 -317.79158 54 848.88278 -13.93958 55 -454.88431 848.88278 56 -195.30585 -454.88431 57 -522.81603 -195.30585 58 -1021.77240 -522.81603 59 -1015.57149 -1021.77240 60 -1832.13255 -1015.57149 61 -1112.87218 -1832.13255 62 -1184.16491 -1112.87218 63 -2366.83955 -1184.16491 64 -3586.16464 -2366.83955 65 -1583.31264 -3586.16464 66 -1551.49027 -1583.31264 67 26.74264 -1551.49027 68 384.32109 26.74264 69 -911.18909 384.32109 70 -1052.14545 -911.18909 71 -1489.94455 -1052.14545 72 -1897.50560 -1489.94455 73 -1839.24524 -1897.50560 74 -3257.53797 -1839.24524 75 -2876.21260 -3257.53797 76 -4786.53769 -2876.21260 77 -1367.68569 -4786.53769 78 -2167.86333 -1367.68569 79 -1175.63042 -2167.86333 80 -1829.05197 -1175.63042 81 -3175.56215 -1829.05197 82 -2028.51851 -3175.56215 83 -661.31760 -2028.51851 84 -1965.87866 -661.31760 85 -2547.61830 -1965.87866 86 -826.91102 -2547.61830 87 -1075.58566 -826.91102 88 -3161.91075 -1075.58566 89 -1529.05875 -3161.91075 90 -2548.23639 -1529.05875 91 -3026.00348 -2548.23639 92 -3020.42502 -3026.00348 93 -506.93520 -3020.42502 94 -487.89157 -506.93520 95 -2242.69066 -487.89157 96 -537.25172 -2242.69066 97 -513.99135 -537.25172 98 1508.71592 -513.99135 99 1029.04128 1508.71592 100 -475.28381 1029.04128 101 -1265.43181 -475.28381 102 -395.60944 -1265.43181 103 672.62347 -395.60944 104 2506.20192 672.62347 105 1674.69174 2506.20192 106 500.73538 1674.69174 107 -1563.06372 500.73538 108 -535.62477 -1563.06372 109 763.63559 -535.62477 110 -1900.65714 763.63559 111 2717.66823 -1900.65714 112 3601.34314 2717.66823 113 127.19514 3601.34314 114 -264.98250 127.19514 115 -880.74959 -264.98250 116 2094.82886 -880.74959 117 71.31868 2094.82886 118 -1497.63768 71.31868 119 29.56323 -1497.63768 120 -1430.99783 29.56323 121 -1698.73747 -1430.99783 122 -1690.03019 -1698.73747 123 -287.70483 -1690.03019 124 -764.02992 -287.70483 125 1863.82208 -764.02992 126 1411.64444 1863.82208 127 -1036.12265 1411.64444 128 1138.45581 -1036.12265 129 42.94563 1138.45581 130 -1664.01074 42.94563 131 -12.80983 -1664.01074 132 NA -12.80983 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -12261.41290 -11475.80926 [2,] -14546.48563 -12261.41290 [3,] -14383.73926 -14546.48563 [4,] -16293.48835 -14383.73926 [5,] -15386.00835 -16293.48835 [6,] -13409.23199 -15386.00835 [7,] -12168.56108 -13409.23199 [8,] -14922.34562 -12168.56108 [9,] -14245.24381 -14922.34562 [10,] -13388.68017 -14245.24381 [11,] -11576.68926 -13388.68017 [12,] 6280.35968 -11576.68926 [13,] 7239.62005 6280.35968 [14,] 6450.32732 7239.62005 [15,] 6407.65268 6450.32732 [16,] 9497.32759 6407.65268 [17,] 9480.17959 9497.32759 [18,] 8717.00195 9480.17959 [19,] 8711.23486 8717.00195 [20,] 7876.81332 8711.23486 [21,] 8441.30314 7876.81332 [22,] 9281.34677 8441.30314 [23,] 7965.54768 9281.34677 [24,] 8557.98662 7965.54768 [25,] 8020.24699 8557.98662 [26,] 8363.95426 8020.24699 [27,] 7179.27962 8363.95426 [28,] 10295.95453 7179.27962 [29,] 9717.80653 10295.95453 [30,] 8988.62890 9717.80653 [31,] 10385.86181 8988.62890 [32,] 6280.44026 10385.86181 [33,] 8480.93008 6280.44026 [34,] 11423.97372 8480.93008 [35,] 9367.17462 11423.97372 [36,] 3446.61357 9367.17462 [37,] 3338.87393 3446.61357 [38,] 6130.58120 3338.87393 [39,] 3636.90657 6130.58120 [40,] 5990.58148 3636.90657 [41,] -43.56652 5990.58148 [42,] 371.25584 -43.56652 [43,] -1054.51125 371.25584 [44,] -313.93280 -1054.51125 [45,] 650.55702 -313.93280 [46,] -65.39934 650.55702 [47,] 1199.80157 -65.39934 [48,] 1390.24051 1199.80157 [49,] 611.50087 1390.24051 [50,] 952.20815 611.50087 [51,] 19.53351 952.20815 [52,] -317.79158 19.53351 [53,] -13.93958 -317.79158 [54,] 848.88278 -13.93958 [55,] -454.88431 848.88278 [56,] -195.30585 -454.88431 [57,] -522.81603 -195.30585 [58,] -1021.77240 -522.81603 [59,] -1015.57149 -1021.77240 [60,] -1832.13255 -1015.57149 [61,] -1112.87218 -1832.13255 [62,] -1184.16491 -1112.87218 [63,] -2366.83955 -1184.16491 [64,] -3586.16464 -2366.83955 [65,] -1583.31264 -3586.16464 [66,] -1551.49027 -1583.31264 [67,] 26.74264 -1551.49027 [68,] 384.32109 26.74264 [69,] -911.18909 384.32109 [70,] -1052.14545 -911.18909 [71,] -1489.94455 -1052.14545 [72,] -1897.50560 -1489.94455 [73,] -1839.24524 -1897.50560 [74,] -3257.53797 -1839.24524 [75,] -2876.21260 -3257.53797 [76,] -4786.53769 -2876.21260 [77,] -1367.68569 -4786.53769 [78,] -2167.86333 -1367.68569 [79,] -1175.63042 -2167.86333 [80,] -1829.05197 -1175.63042 [81,] -3175.56215 -1829.05197 [82,] -2028.51851 -3175.56215 [83,] -661.31760 -2028.51851 [84,] -1965.87866 -661.31760 [85,] -2547.61830 -1965.87866 [86,] -826.91102 -2547.61830 [87,] -1075.58566 -826.91102 [88,] -3161.91075 -1075.58566 [89,] -1529.05875 -3161.91075 [90,] -2548.23639 -1529.05875 [91,] -3026.00348 -2548.23639 [92,] -3020.42502 -3026.00348 [93,] -506.93520 -3020.42502 [94,] -487.89157 -506.93520 [95,] -2242.69066 -487.89157 [96,] -537.25172 -2242.69066 [97,] -513.99135 -537.25172 [98,] 1508.71592 -513.99135 [99,] 1029.04128 1508.71592 [100,] -475.28381 1029.04128 [101,] -1265.43181 -475.28381 [102,] -395.60944 -1265.43181 [103,] 672.62347 -395.60944 [104,] 2506.20192 672.62347 [105,] 1674.69174 2506.20192 [106,] 500.73538 1674.69174 [107,] -1563.06372 500.73538 [108,] -535.62477 -1563.06372 [109,] 763.63559 -535.62477 [110,] -1900.65714 763.63559 [111,] 2717.66823 -1900.65714 [112,] 3601.34314 2717.66823 [113,] 127.19514 3601.34314 [114,] -264.98250 127.19514 [115,] -880.74959 -264.98250 [116,] 2094.82886 -880.74959 [117,] 71.31868 2094.82886 [118,] -1497.63768 71.31868 [119,] 29.56323 -1497.63768 [120,] -1430.99783 29.56323 [121,] -1698.73747 -1430.99783 [122,] -1690.03019 -1698.73747 [123,] -287.70483 -1690.03019 [124,] -764.02992 -287.70483 [125,] 1863.82208 -764.02992 [126,] 1411.64444 1863.82208 [127,] -1036.12265 1411.64444 [128,] 1138.45581 -1036.12265 [129,] 42.94563 1138.45581 [130,] -1664.01074 42.94563 [131,] -12.80983 -1664.01074 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -12261.41290 -11475.80926 2 -14546.48563 -12261.41290 3 -14383.73926 -14546.48563 4 -16293.48835 -14383.73926 5 -15386.00835 -16293.48835 6 -13409.23199 -15386.00835 7 -12168.56108 -13409.23199 8 -14922.34562 -12168.56108 9 -14245.24381 -14922.34562 10 -13388.68017 -14245.24381 11 -11576.68926 -13388.68017 12 6280.35968 -11576.68926 13 7239.62005 6280.35968 14 6450.32732 7239.62005 15 6407.65268 6450.32732 16 9497.32759 6407.65268 17 9480.17959 9497.32759 18 8717.00195 9480.17959 19 8711.23486 8717.00195 20 7876.81332 8711.23486 21 8441.30314 7876.81332 22 9281.34677 8441.30314 23 7965.54768 9281.34677 24 8557.98662 7965.54768 25 8020.24699 8557.98662 26 8363.95426 8020.24699 27 7179.27962 8363.95426 28 10295.95453 7179.27962 29 9717.80653 10295.95453 30 8988.62890 9717.80653 31 10385.86181 8988.62890 32 6280.44026 10385.86181 33 8480.93008 6280.44026 34 11423.97372 8480.93008 35 9367.17462 11423.97372 36 3446.61357 9367.17462 37 3338.87393 3446.61357 38 6130.58120 3338.87393 39 3636.90657 6130.58120 40 5990.58148 3636.90657 41 -43.56652 5990.58148 42 371.25584 -43.56652 43 -1054.51125 371.25584 44 -313.93280 -1054.51125 45 650.55702 -313.93280 46 -65.39934 650.55702 47 1199.80157 -65.39934 48 1390.24051 1199.80157 49 611.50087 1390.24051 50 952.20815 611.50087 51 19.53351 952.20815 52 -317.79158 19.53351 53 -13.93958 -317.79158 54 848.88278 -13.93958 55 -454.88431 848.88278 56 -195.30585 -454.88431 57 -522.81603 -195.30585 58 -1021.77240 -522.81603 59 -1015.57149 -1021.77240 60 -1832.13255 -1015.57149 61 -1112.87218 -1832.13255 62 -1184.16491 -1112.87218 63 -2366.83955 -1184.16491 64 -3586.16464 -2366.83955 65 -1583.31264 -3586.16464 66 -1551.49027 -1583.31264 67 26.74264 -1551.49027 68 384.32109 26.74264 69 -911.18909 384.32109 70 -1052.14545 -911.18909 71 -1489.94455 -1052.14545 72 -1897.50560 -1489.94455 73 -1839.24524 -1897.50560 74 -3257.53797 -1839.24524 75 -2876.21260 -3257.53797 76 -4786.53769 -2876.21260 77 -1367.68569 -4786.53769 78 -2167.86333 -1367.68569 79 -1175.63042 -2167.86333 80 -1829.05197 -1175.63042 81 -3175.56215 -1829.05197 82 -2028.51851 -3175.56215 83 -661.31760 -2028.51851 84 -1965.87866 -661.31760 85 -2547.61830 -1965.87866 86 -826.91102 -2547.61830 87 -1075.58566 -826.91102 88 -3161.91075 -1075.58566 89 -1529.05875 -3161.91075 90 -2548.23639 -1529.05875 91 -3026.00348 -2548.23639 92 -3020.42502 -3026.00348 93 -506.93520 -3020.42502 94 -487.89157 -506.93520 95 -2242.69066 -487.89157 96 -537.25172 -2242.69066 97 -513.99135 -537.25172 98 1508.71592 -513.99135 99 1029.04128 1508.71592 100 -475.28381 1029.04128 101 -1265.43181 -475.28381 102 -395.60944 -1265.43181 103 672.62347 -395.60944 104 2506.20192 672.62347 105 1674.69174 2506.20192 106 500.73538 1674.69174 107 -1563.06372 500.73538 108 -535.62477 -1563.06372 109 763.63559 -535.62477 110 -1900.65714 763.63559 111 2717.66823 -1900.65714 112 3601.34314 2717.66823 113 127.19514 3601.34314 114 -264.98250 127.19514 115 -880.74959 -264.98250 116 2094.82886 -880.74959 117 71.31868 2094.82886 118 -1497.63768 71.31868 119 29.56323 -1497.63768 120 -1430.99783 29.56323 121 -1698.73747 -1430.99783 122 -1690.03019 -1698.73747 123 -287.70483 -1690.03019 124 -764.02992 -287.70483 125 1863.82208 -764.02992 126 1411.64444 1863.82208 127 -1036.12265 1411.64444 128 1138.45581 -1036.12265 129 42.94563 1138.45581 130 -1664.01074 42.94563 131 -12.80983 -1664.01074 > 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/freestat/rcomp/tmp/7b3k01290769236.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/freestat/rcomp/tmp/8b3k01290769236.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/freestat/rcomp/tmp/9b3k01290769236.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/freestat/rcomp/tmp/104dj31290769236.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/11pvi91290769236.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/freestat/rcomp/tmp/12tegx1290769236.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/freestat/rcomp/tmp/1376wo1290769236.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/freestat/rcomp/tmp/14s6ut1290769236.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/freestat/rcomp/tmp/15e7bz1290769236.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/freestat/rcomp/tmp/16hp951290769236.tab") + } > > try(system("convert tmp/1fc491290769236.ps tmp/1fc491290769236.png",intern=TRUE)) character(0) > try(system("convert tmp/2fc491290769236.ps tmp/2fc491290769236.png",intern=TRUE)) character(0) > try(system("convert tmp/3q3lu1290769236.ps tmp/3q3lu1290769236.png",intern=TRUE)) character(0) > try(system("convert tmp/4q3lu1290769236.ps tmp/4q3lu1290769236.png",intern=TRUE)) character(0) > try(system("convert tmp/5q3lu1290769236.ps tmp/5q3lu1290769236.png",intern=TRUE)) character(0) > try(system("convert tmp/61c3x1290769236.ps tmp/61c3x1290769236.png",intern=TRUE)) character(0) > try(system("convert tmp/7b3k01290769236.ps tmp/7b3k01290769236.png",intern=TRUE)) character(0) > try(system("convert tmp/8b3k01290769236.ps tmp/8b3k01290769236.png",intern=TRUE)) character(0) > try(system("convert tmp/9b3k01290769236.ps tmp/9b3k01290769236.png",intern=TRUE)) character(0) > try(system("convert tmp/104dj31290769236.ps tmp/104dj31290769236.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.112 2.705 5.460