R version 2.13.0 (2011-04-13) Copyright (C) 2011 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(13 + ,15 + ,-13 + ,11 + ,13 + ,8 + ,3 + ,-2 + ,11 + ,17 + ,7 + ,2 + ,-1 + ,9 + ,17 + ,3 + ,-2 + ,5 + ,8 + ,13 + ,3 + ,1 + ,8 + ,6 + ,14 + ,4 + ,1 + ,6 + ,7 + ,13 + ,4 + ,-1 + ,7 + ,8 + ,17 + ,0 + ,-6 + ,15 + ,6 + ,17 + ,-4 + ,-13 + ,23 + ,5 + ,15 + ,-14 + ,-25 + ,43 + ,2 + ,9 + ,-18 + ,-26 + ,60 + ,3 + ,10 + ,-8 + ,-9 + ,36 + ,3 + ,9 + ,-1 + ,1 + ,28 + ,7 + ,14 + ,1 + ,3 + ,23 + ,8 + ,18 + ,2 + ,6 + ,23 + ,7 + ,18 + ,0 + ,2 + ,22 + ,7 + ,12 + ,1 + ,5 + ,22 + ,6 + ,16 + ,0 + ,5 + ,24 + ,6 + ,12 + ,-1 + ,0 + ,32 + ,7 + ,19 + ,-3 + ,-5 + ,27 + ,5 + ,13 + ,-3 + ,-4 + ,27 + ,5 + ,12 + ,-3 + ,-2 + ,27 + ,5 + ,13 + ,-4 + ,-1 + ,29 + ,4 + ,11 + ,-8 + ,-8 + ,38 + ,4 + ,10 + ,-9 + ,-16 + ,40 + ,4 + ,16 + ,-13 + ,-19 + ,45 + ,1 + ,12 + ,-18 + ,-28 + ,50 + ,-1 + ,6 + ,-11 + ,-11 + ,43 + ,3 + ,8 + ,-9 + ,-4 + ,44 + ,4 + ,6 + ,-10 + ,-9 + ,44 + ,3 + ,8 + ,-13 + ,-12 + ,49 + ,2 + ,8 + ,-11 + ,-10 + ,42 + ,1 + ,9 + ,-5 + ,-2 + ,36 + ,4 + ,13 + ,-15 + ,-13 + ,57 + ,3 + ,8 + ,-6 + ,0 + ,42 + ,5 + ,11 + ,-6 + ,0 + ,39 + ,6 + ,8 + ,-3 + ,4 + ,33 + ,6 + ,10 + ,-1 + ,7 + ,32 + ,6 + ,15 + ,-3 + ,5 + ,34 + ,6 + ,12 + ,-4 + ,2 + ,37 + ,6 + ,13 + ,-6 + ,-2 + ,38 + ,5 + ,12 + ,0 + ,6 + ,28 + ,6 + ,15 + ,-4 + ,-3 + ,31 + ,5 + ,13 + ,-2 + ,1 + ,28 + ,6 + ,13 + ,-2 + ,0 + ,30 + ,5 + ,16 + ,-6 + ,-7 + ,39 + ,7 + ,14 + ,-7 + ,-6 + ,38 + ,4 + ,12 + ,-6 + ,-4 + ,39 + ,5 + ,15 + ,-6 + ,-4 + ,38 + ,6 + ,14 + ,-3 + ,-2 + ,37 + ,6 + ,19 + ,-2 + ,2 + ,32 + ,5 + ,16 + ,-5 + ,-5 + ,32 + ,3 + ,16 + ,-11 + ,-15 + ,44 + ,2 + ,11 + ,-11 + ,-16 + ,43 + ,3 + ,13 + ,-11 + ,-18 + ,42 + ,3 + ,12 + ,-10 + ,-13 + ,38 + ,2 + ,11 + ,-14 + ,-23 + ,37 + ,0 + ,6 + ,-8 + ,-10 + ,35 + ,4 + ,9 + ,-9 + ,-10 + ,37 + ,4 + ,6 + ,-5 + ,-6 + ,33 + ,5 + ,15 + ,-1 + ,-3 + ,24 + ,6 + ,17 + ,-2 + ,-4 + ,24 + ,6 + ,13 + ,-5 + ,-7 + ,31 + ,5 + ,12 + ,-4 + ,-7 + ,25 + ,5 + ,13 + ,-6 + ,-7 + ,28 + ,3 + ,10 + ,-2 + ,-3 + ,24 + ,5 + ,14 + ,-2 + ,0 + ,25 + ,5 + ,13 + ,-2 + ,-5 + ,16 + ,5 + ,10 + ,-2 + ,-3 + ,17 + ,3 + ,11 + ,2 + ,3 + ,11 + ,6 + ,12 + ,1 + ,2 + ,12 + ,6 + ,7 + ,-8 + ,-7 + ,39 + ,4 + ,11 + ,-1 + ,-1 + ,19 + ,6 + ,9 + ,1 + ,0 + ,14 + ,5 + ,13 + ,-1 + ,-3 + ,15 + ,4 + ,12 + ,2 + ,4 + ,7 + ,5 + ,5 + ,2 + ,2 + ,12 + ,5 + ,13 + ,1 + ,3 + ,12 + ,4 + ,11 + ,-1 + ,0 + ,14 + ,3 + ,8 + ,-2 + ,-10 + ,9 + ,2 + ,8 + ,-2 + ,-10 + ,8 + ,3 + ,8 + ,-1 + ,-9 + ,4 + ,2 + ,8 + ,-8 + ,-22 + ,7 + ,-1 + ,0 + ,-4 + ,-16 + ,3 + ,0 + ,3 + ,-6 + ,-18 + ,5 + ,-2 + ,0 + ,-3 + ,-14 + ,0 + ,1 + ,-1 + ,-3 + ,-12 + ,-2 + ,-2 + ,-1 + ,-7 + ,-17 + ,6 + ,-2 + ,-4 + ,-9 + ,-23 + ,11 + ,-2 + ,1 + ,-11 + ,-28 + ,9 + ,-6 + ,-1 + ,-13 + ,-31 + ,17 + ,-4 + ,0 + ,-11 + ,-21 + ,21 + ,-2 + ,-1 + ,-9 + ,-19 + ,21 + ,0 + ,6 + ,-17 + ,-22 + ,41 + ,-5 + ,0 + ,-22 + ,-22 + ,57 + ,-4 + ,-3 + ,-25 + ,-25 + ,65 + ,-5 + ,-3 + ,-20 + ,-16 + ,68 + ,-1 + ,4 + ,-24 + ,-22 + ,73 + ,-2 + ,1 + ,-24 + ,-21 + ,71 + ,-4 + ,0 + ,-22 + ,-10 + ,71 + ,-1 + ,-4 + ,-19 + ,-7 + ,70 + ,1 + ,-2 + ,-18 + ,-5 + ,69 + ,1 + ,3 + ,-17 + ,-4 + ,65 + ,-2 + ,2 + ,-11 + ,7 + ,57 + ,1 + ,5 + ,-11 + ,6 + ,57 + ,1 + ,6 + ,-12 + ,3 + ,57 + ,3 + ,6 + ,-10 + ,10 + ,55 + ,3 + ,3 + ,-15 + ,0 + ,65 + ,1 + ,4 + ,-15 + ,-2 + ,65 + ,1 + ,7 + ,-15 + ,-1 + ,64 + ,0 + ,5 + ,-13 + ,2 + ,60 + ,2 + ,6 + ,-8 + ,8 + ,43 + ,2 + ,1 + ,-13 + ,-6 + ,47 + ,-1 + ,3 + ,-9 + ,-4 + ,40 + ,1 + ,6 + ,-7 + ,4 + ,31 + ,0 + ,0 + ,-4 + ,7 + ,27 + ,1 + ,3 + ,-4 + ,3 + ,24 + ,1 + ,4 + ,-2 + ,3 + ,23 + ,3 + ,7 + ,0 + ,8 + ,17 + ,2 + ,6 + ,-2 + ,3 + ,16 + ,0 + ,6) + ,dim=c(5 + ,120) + ,dimnames=list(c('IndicatorConsumerConfidence' + ,'EconomicSituation' + ,'UnemploymentBelgium' + ,'FinancialSituationFam' + ,'SavingsFam') + ,1:120)) > y <- array(NA,dim=c(5,120),dimnames=list(c('IndicatorConsumerConfidence','EconomicSituation','UnemploymentBelgium','FinancialSituationFam','SavingsFam'),1:120)) > 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 = '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 IndicatorConsumerConfidence EconomicSituation UnemploymentBelgium 1 13 15 -13 2 8 3 -2 3 7 2 -1 4 3 -2 5 5 3 1 8 6 4 1 6 7 4 -1 7 8 0 -6 15 9 -4 -13 23 10 -14 -25 43 11 -18 -26 60 12 -8 -9 36 13 -1 1 28 14 1 3 23 15 2 6 23 16 0 2 22 17 1 5 22 18 0 5 24 19 -1 0 32 20 -3 -5 27 21 -3 -4 27 22 -3 -2 27 23 -4 -1 29 24 -8 -8 38 25 -9 -16 40 26 -13 -19 45 27 -18 -28 50 28 -11 -11 43 29 -9 -4 44 30 -10 -9 44 31 -13 -12 49 32 -11 -10 42 33 -5 -2 36 34 -15 -13 57 35 -6 0 42 36 -6 0 39 37 -3 4 33 38 -1 7 32 39 -3 5 34 40 -4 2 37 41 -6 -2 38 42 0 6 28 43 -4 -3 31 44 -2 1 28 45 -2 0 30 46 -6 -7 39 47 -7 -6 38 48 -6 -4 39 49 -6 -4 38 50 -3 -2 37 51 -2 2 32 52 -5 -5 32 53 -11 -15 44 54 -11 -16 43 55 -11 -18 42 56 -10 -13 38 57 -14 -23 37 58 -8 -10 35 59 -9 -10 37 60 -5 -6 33 61 -1 -3 24 62 -2 -4 24 63 -5 -7 31 64 -4 -7 25 65 -6 -7 28 66 -2 -3 24 67 -2 0 25 68 -2 -5 16 69 -2 -3 17 70 2 3 11 71 1 2 12 72 -8 -7 39 73 -1 -1 19 74 1 0 14 75 -1 -3 15 76 2 4 7 77 2 2 12 78 1 3 12 79 -1 0 14 80 -2 -10 9 81 -2 -10 8 82 -1 -9 4 83 -8 -22 7 84 -4 -16 3 85 -6 -18 5 86 -3 -14 0 87 -3 -12 -2 88 -7 -17 6 89 -9 -23 11 90 -11 -28 9 91 -13 -31 17 92 -11 -21 21 93 -9 -19 21 94 -17 -22 41 95 -22 -22 57 96 -25 -25 65 97 -20 -16 68 98 -24 -22 73 99 -24 -21 71 100 -22 -10 71 101 -19 -7 70 102 -18 -5 69 103 -17 -4 65 104 -11 7 57 105 -11 6 57 106 -12 3 57 107 -10 10 55 108 -15 0 65 109 -15 -2 65 110 -15 -1 64 111 -13 2 60 112 -8 8 43 113 -13 -6 47 114 -9 -4 40 115 -7 4 31 116 -4 7 27 117 -4 3 24 118 -2 3 23 119 0 8 17 120 -2 3 16 FinancialSituationFam SavingsFam t 1 11 13 1 2 11 17 2 3 9 17 3 4 8 13 4 5 6 14 5 6 7 13 6 7 8 17 7 8 6 17 8 9 5 15 9 10 2 9 10 11 3 10 11 12 3 9 12 13 7 14 13 14 8 18 14 15 7 18 15 16 7 12 16 17 6 16 17 18 6 12 18 19 7 19 19 20 5 13 20 21 5 12 21 22 5 13 22 23 4 11 23 24 4 10 24 25 4 16 25 26 1 12 26 27 -1 6 27 28 3 8 28 29 4 6 29 30 3 8 30 31 2 8 31 32 1 9 32 33 4 13 33 34 3 8 34 35 5 11 35 36 6 8 36 37 6 10 37 38 6 15 38 39 6 12 39 40 6 13 40 41 5 12 41 42 6 15 42 43 5 13 43 44 6 13 44 45 5 16 45 46 7 14 46 47 4 12 47 48 5 15 48 49 6 14 49 50 6 19 50 51 5 16 51 52 3 16 52 53 2 11 53 54 3 13 54 55 3 12 55 56 2 11 56 57 0 6 57 58 4 9 58 59 4 6 59 60 5 15 60 61 6 17 61 62 6 13 62 63 5 12 63 64 5 13 64 65 3 10 65 66 5 14 66 67 5 13 67 68 5 10 68 69 3 11 69 70 6 12 70 71 6 7 71 72 4 11 72 73 6 9 73 74 5 13 74 75 4 12 75 76 5 5 76 77 5 13 77 78 4 11 78 79 3 8 79 80 2 8 80 81 3 8 81 82 2 8 82 83 -1 0 83 84 0 3 84 85 -2 0 85 86 1 -1 86 87 -2 -1 87 88 -2 -4 88 89 -2 1 89 90 -6 -1 90 91 -4 0 91 92 -2 -1 92 93 0 6 93 94 -5 0 94 95 -4 -3 95 96 -5 -3 96 97 -1 4 97 98 -2 1 98 99 -4 0 99 100 -1 -4 100 101 1 -2 101 102 1 3 102 103 -2 2 103 104 1 5 104 105 1 6 105 106 3 6 106 107 3 3 107 108 1 4 108 109 1 7 109 110 0 5 110 111 2 6 111 112 2 1 112 113 -1 3 113 114 1 6 114 115 0 0 115 116 1 3 116 117 1 4 117 118 3 7 118 119 2 6 119 120 0 6 120 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) EconomicSituation UnemploymentBelgium 0.191400 0.250867 -0.249339 FinancialSituationFam SavingsFam t 0.270905 0.229549 -0.002174 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.6912 -0.2647 0.0491 0.2288 0.6577 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.191400 0.204307 0.937 0.351 EconomicSituation 0.250867 0.005537 45.305 <2e-16 *** UnemploymentBelgium -0.249339 0.001682 -148.276 <2e-16 *** FinancialSituationFam 0.270905 0.026761 10.123 <2e-16 *** SavingsFam 0.229549 0.010666 21.522 <2e-16 *** t -0.002174 0.001574 -1.382 0.170 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.3225 on 114 degrees of freedom Multiple R-squared: 0.998, Adjusted R-squared: 0.9979 F-statistic: 1.133e+04 on 5 and 114 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.6212761 0.75744783 0.37872392 [2,] 0.4613061 0.92261216 0.53869392 [3,] 0.3465808 0.69316165 0.65341918 [4,] 0.2560106 0.51202119 0.74398940 [5,] 0.1832917 0.36658342 0.81670829 [6,] 0.3920442 0.78408833 0.60795583 [7,] 0.3092006 0.61840114 0.69079943 [8,] 0.2281012 0.45620232 0.77189884 [9,] 0.2013622 0.40272443 0.79863778 [10,] 0.1406907 0.28138135 0.85930933 [11,] 0.3162326 0.63246522 0.68376739 [12,] 0.2872685 0.57453702 0.71273149 [13,] 0.2356217 0.47124338 0.76437831 [14,] 0.4085439 0.81708780 0.59145610 [15,] 0.5173568 0.96528636 0.48264318 [16,] 0.5037889 0.99242222 0.49621111 [17,] 0.4321147 0.86422932 0.56788534 [18,] 0.3963490 0.79269794 0.60365103 [19,] 0.3508103 0.70162063 0.64918968 [20,] 0.4467076 0.89341523 0.55329239 [21,] 0.3996924 0.79938484 0.60030758 [22,] 0.3926092 0.78521834 0.60739083 [23,] 0.4634657 0.92693146 0.53653427 [24,] 0.5374399 0.92512010 0.46256005 [25,] 0.5219320 0.95613593 0.47806797 [26,] 0.6102812 0.77943769 0.38971884 [27,] 0.6278736 0.74425274 0.37212637 [28,] 0.5730196 0.85396084 0.42698042 [29,] 0.5232814 0.95343722 0.47671861 [30,] 0.4639068 0.92781355 0.53609323 [31,] 0.4618013 0.92360259 0.53819870 [32,] 0.4036868 0.80737364 0.59631318 [33,] 0.3718858 0.74377157 0.62811422 [34,] 0.3912231 0.78244618 0.60877691 [35,] 0.3455053 0.69101061 0.65449469 [36,] 0.2967312 0.59346245 0.70326877 [37,] 0.3224331 0.64486628 0.67756686 [38,] 0.2961448 0.59228960 0.70385520 [39,] 0.2515047 0.50300934 0.74849533 [40,] 0.2263433 0.45268656 0.77365672 [41,] 0.2765527 0.55310547 0.72344726 [42,] 0.4300904 0.86018089 0.56990956 [43,] 0.4593636 0.91872723 0.54063638 [44,] 0.4403348 0.88066966 0.55966517 [45,] 0.6215470 0.75690608 0.37845304 [46,] 0.5804707 0.83905850 0.41952925 [47,] 0.6204772 0.75904550 0.37952275 [48,] 0.6177531 0.76449379 0.38224689 [49,] 0.5995526 0.80089490 0.40044745 [50,] 0.5530495 0.89390091 0.44695045 [51,] 0.5455225 0.90895507 0.45447754 [52,] 0.4974359 0.99487189 0.50256405 [53,] 0.4769803 0.95396057 0.52301972 [54,] 0.5175073 0.96498543 0.48249272 [55,] 0.5708431 0.85831386 0.42915693 [56,] 0.5632237 0.87355256 0.43677628 [57,] 0.5447519 0.91049617 0.45524808 [58,] 0.5321221 0.93575581 0.46787790 [59,] 0.4813599 0.96271971 0.51864015 [60,] 0.4746310 0.94926194 0.52536903 [61,] 0.4414147 0.88282937 0.55858532 [62,] 0.4436718 0.88734361 0.55632819 [63,] 0.4554578 0.91091554 0.54454223 [64,] 0.4116663 0.82333258 0.58833371 [65,] 0.4257169 0.85143390 0.57428305 [66,] 0.4107553 0.82151053 0.58924473 [67,] 0.3876247 0.77524932 0.61237534 [68,] 0.3965828 0.79316553 0.60341724 [69,] 0.3794326 0.75886526 0.62056737 [70,] 0.3656373 0.73127459 0.63436271 [71,] 0.3228615 0.64572304 0.67713848 [72,] 0.3986724 0.79734471 0.60132765 [73,] 0.3485716 0.69714326 0.65142837 [74,] 0.3121668 0.62433359 0.68783321 [75,] 0.3836654 0.76733081 0.61633459 [76,] 0.3613127 0.72262546 0.63868727 [77,] 0.3633690 0.72673790 0.63663105 [78,] 0.4067617 0.81352343 0.59323828 [79,] 0.3860698 0.77213959 0.61393021 [80,] 0.3680473 0.73609455 0.63195273 [81,] 0.3232455 0.64649094 0.67675453 [82,] 0.2738645 0.54772909 0.72613545 [83,] 0.2249145 0.44982898 0.77508551 [84,] 0.2456101 0.49122020 0.75438990 [85,] 0.2695739 0.53914779 0.73042611 [86,] 0.2185283 0.43705667 0.78147166 [87,] 0.2762026 0.55240510 0.72379745 [88,] 0.3869089 0.77381782 0.61309109 [89,] 0.3390081 0.67801616 0.66099192 [90,] 0.2734525 0.54690509 0.72654746 [91,] 0.2134573 0.42691455 0.78654272 [92,] 0.3250555 0.65011110 0.67494445 [93,] 0.4874738 0.97494766 0.51252617 [94,] 0.4801269 0.96025388 0.51987306 [95,] 0.5069439 0.98611224 0.49305612 [96,] 0.4608082 0.92161646 0.53919177 [97,] 0.6425560 0.71488793 0.35744397 [98,] 0.8112976 0.37740480 0.18870240 [99,] 0.8290962 0.34180758 0.17090379 [100,] 0.7406137 0.51877254 0.25938627 [101,] 0.7616674 0.47666522 0.23833261 [102,] 0.9643730 0.07125402 0.03562701 [103,] 0.9704912 0.05901758 0.02950879 > postscript(file="/var/wessaorg/rcomp/tmp/1ewgp1322080773.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/wessaorg/rcomp/tmp/227ik1322080773.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/wessaorg/rcomp/tmp/31o1n1322080773.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/wessaorg/rcomp/tmp/4zxzq1322080773.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/wessaorg/rcomp/tmp/5zszd1322080773.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 = 120 Frequency = 1 1 2 3 4 5 6 -0.157711401 -0.320605814 -0.276416709 -0.585644635 -0.275793288 0.186347594 7 8 9 10 11 12 -0.249504932 -0.456478368 0.026473925 0.215827398 0.207173028 0.190034280 13 14 15 16 17 18 0.457471119 -0.477880171 0.042598965 0.176192605 -0.221522491 0.197523530 19 20 21 22 23 24 0.570996141 0.499911010 0.480767318 -0.248340138 -0.268353200 -0.036515451 25 26 27 28 29 30 0.093978170 -0.173645734 0.252122681 -0.298522644 0.385116349 0.453431550 31 32 33 34 35 36 -0.274195950 -0.477769593 0.290531172 -0.293001228 0.477371279 0.149270581 37 38 39 40 41 42 0.192849098 0.045342067 -0.263427175 0.009814693 -0.234752384 0.307551521 43 44 45 46 47 48 0.045543631 0.025330669 0.359308113 0.278885056 0.052665271 -0.157105287 49 50 51 52 53 54 -0.445625709 0.657733907 0.369298592 -0.330651114 0.590901578 -0.135397871 55 56 57 58 59 60 0.348719684 -0.400340699 -0.449286368 0.020679817 0.210177280 -0.125311400 61 62 63 64 65 66 0.150212997 0.321448273 0.322046722 -0.401359612 -0.420714091 0.120635338 67 68 69 70 71 72 -0.150902954 -0.449797905 -0.387757302 -0.429077567 0.221044963 -0.163220899 73 74 75 76 77 78 0.264267453 0.121592175 -0.373841550 0.213491973 0.127704680 -0.390985773 79 80 81 82 83 84 -0.177983686 0.357068391 -0.161000589 -0.136142940 -0.475583528 0.064485846 85 86 87 88 89 90 0.297525967 0.466374808 0.280852564 0.220715438 -0.172959591 0.127586496 91 92 93 94 95 96 0.105712479 0.284314377 -0.363893791 0.109469218 -0.481196264 -0.460807678 97 98 99 100 101 102 0.341124344 0.054742461 0.078730741 -0.573147800 0.426181479 -0.470458904 103 104 105 106 107 108 0.325756667 0.072328656 0.095821143 -0.691213881 -0.255137734 0.061350900 109 110 111 112 113 114 -0.123387081 0.108583770 -0.410554479 -0.004595003 -0.139315827 0.385299368 115 116 117 118 119 120 -0.215311646 0.077357670 0.105434013 0.627814677 0.380076903 -0.070944794 > postscript(file="/var/wessaorg/rcomp/tmp/6m4731322080773.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 = 120 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.157711401 NA 1 -0.320605814 -0.157711401 2 -0.276416709 -0.320605814 3 -0.585644635 -0.276416709 4 -0.275793288 -0.585644635 5 0.186347594 -0.275793288 6 -0.249504932 0.186347594 7 -0.456478368 -0.249504932 8 0.026473925 -0.456478368 9 0.215827398 0.026473925 10 0.207173028 0.215827398 11 0.190034280 0.207173028 12 0.457471119 0.190034280 13 -0.477880171 0.457471119 14 0.042598965 -0.477880171 15 0.176192605 0.042598965 16 -0.221522491 0.176192605 17 0.197523530 -0.221522491 18 0.570996141 0.197523530 19 0.499911010 0.570996141 20 0.480767318 0.499911010 21 -0.248340138 0.480767318 22 -0.268353200 -0.248340138 23 -0.036515451 -0.268353200 24 0.093978170 -0.036515451 25 -0.173645734 0.093978170 26 0.252122681 -0.173645734 27 -0.298522644 0.252122681 28 0.385116349 -0.298522644 29 0.453431550 0.385116349 30 -0.274195950 0.453431550 31 -0.477769593 -0.274195950 32 0.290531172 -0.477769593 33 -0.293001228 0.290531172 34 0.477371279 -0.293001228 35 0.149270581 0.477371279 36 0.192849098 0.149270581 37 0.045342067 0.192849098 38 -0.263427175 0.045342067 39 0.009814693 -0.263427175 40 -0.234752384 0.009814693 41 0.307551521 -0.234752384 42 0.045543631 0.307551521 43 0.025330669 0.045543631 44 0.359308113 0.025330669 45 0.278885056 0.359308113 46 0.052665271 0.278885056 47 -0.157105287 0.052665271 48 -0.445625709 -0.157105287 49 0.657733907 -0.445625709 50 0.369298592 0.657733907 51 -0.330651114 0.369298592 52 0.590901578 -0.330651114 53 -0.135397871 0.590901578 54 0.348719684 -0.135397871 55 -0.400340699 0.348719684 56 -0.449286368 -0.400340699 57 0.020679817 -0.449286368 58 0.210177280 0.020679817 59 -0.125311400 0.210177280 60 0.150212997 -0.125311400 61 0.321448273 0.150212997 62 0.322046722 0.321448273 63 -0.401359612 0.322046722 64 -0.420714091 -0.401359612 65 0.120635338 -0.420714091 66 -0.150902954 0.120635338 67 -0.449797905 -0.150902954 68 -0.387757302 -0.449797905 69 -0.429077567 -0.387757302 70 0.221044963 -0.429077567 71 -0.163220899 0.221044963 72 0.264267453 -0.163220899 73 0.121592175 0.264267453 74 -0.373841550 0.121592175 75 0.213491973 -0.373841550 76 0.127704680 0.213491973 77 -0.390985773 0.127704680 78 -0.177983686 -0.390985773 79 0.357068391 -0.177983686 80 -0.161000589 0.357068391 81 -0.136142940 -0.161000589 82 -0.475583528 -0.136142940 83 0.064485846 -0.475583528 84 0.297525967 0.064485846 85 0.466374808 0.297525967 86 0.280852564 0.466374808 87 0.220715438 0.280852564 88 -0.172959591 0.220715438 89 0.127586496 -0.172959591 90 0.105712479 0.127586496 91 0.284314377 0.105712479 92 -0.363893791 0.284314377 93 0.109469218 -0.363893791 94 -0.481196264 0.109469218 95 -0.460807678 -0.481196264 96 0.341124344 -0.460807678 97 0.054742461 0.341124344 98 0.078730741 0.054742461 99 -0.573147800 0.078730741 100 0.426181479 -0.573147800 101 -0.470458904 0.426181479 102 0.325756667 -0.470458904 103 0.072328656 0.325756667 104 0.095821143 0.072328656 105 -0.691213881 0.095821143 106 -0.255137734 -0.691213881 107 0.061350900 -0.255137734 108 -0.123387081 0.061350900 109 0.108583770 -0.123387081 110 -0.410554479 0.108583770 111 -0.004595003 -0.410554479 112 -0.139315827 -0.004595003 113 0.385299368 -0.139315827 114 -0.215311646 0.385299368 115 0.077357670 -0.215311646 116 0.105434013 0.077357670 117 0.627814677 0.105434013 118 0.380076903 0.627814677 119 -0.070944794 0.380076903 120 NA -0.070944794 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.320605814 -0.157711401 [2,] -0.276416709 -0.320605814 [3,] -0.585644635 -0.276416709 [4,] -0.275793288 -0.585644635 [5,] 0.186347594 -0.275793288 [6,] -0.249504932 0.186347594 [7,] -0.456478368 -0.249504932 [8,] 0.026473925 -0.456478368 [9,] 0.215827398 0.026473925 [10,] 0.207173028 0.215827398 [11,] 0.190034280 0.207173028 [12,] 0.457471119 0.190034280 [13,] -0.477880171 0.457471119 [14,] 0.042598965 -0.477880171 [15,] 0.176192605 0.042598965 [16,] -0.221522491 0.176192605 [17,] 0.197523530 -0.221522491 [18,] 0.570996141 0.197523530 [19,] 0.499911010 0.570996141 [20,] 0.480767318 0.499911010 [21,] -0.248340138 0.480767318 [22,] -0.268353200 -0.248340138 [23,] -0.036515451 -0.268353200 [24,] 0.093978170 -0.036515451 [25,] -0.173645734 0.093978170 [26,] 0.252122681 -0.173645734 [27,] -0.298522644 0.252122681 [28,] 0.385116349 -0.298522644 [29,] 0.453431550 0.385116349 [30,] -0.274195950 0.453431550 [31,] -0.477769593 -0.274195950 [32,] 0.290531172 -0.477769593 [33,] -0.293001228 0.290531172 [34,] 0.477371279 -0.293001228 [35,] 0.149270581 0.477371279 [36,] 0.192849098 0.149270581 [37,] 0.045342067 0.192849098 [38,] -0.263427175 0.045342067 [39,] 0.009814693 -0.263427175 [40,] -0.234752384 0.009814693 [41,] 0.307551521 -0.234752384 [42,] 0.045543631 0.307551521 [43,] 0.025330669 0.045543631 [44,] 0.359308113 0.025330669 [45,] 0.278885056 0.359308113 [46,] 0.052665271 0.278885056 [47,] -0.157105287 0.052665271 [48,] -0.445625709 -0.157105287 [49,] 0.657733907 -0.445625709 [50,] 0.369298592 0.657733907 [51,] -0.330651114 0.369298592 [52,] 0.590901578 -0.330651114 [53,] -0.135397871 0.590901578 [54,] 0.348719684 -0.135397871 [55,] -0.400340699 0.348719684 [56,] -0.449286368 -0.400340699 [57,] 0.020679817 -0.449286368 [58,] 0.210177280 0.020679817 [59,] -0.125311400 0.210177280 [60,] 0.150212997 -0.125311400 [61,] 0.321448273 0.150212997 [62,] 0.322046722 0.321448273 [63,] -0.401359612 0.322046722 [64,] -0.420714091 -0.401359612 [65,] 0.120635338 -0.420714091 [66,] -0.150902954 0.120635338 [67,] -0.449797905 -0.150902954 [68,] -0.387757302 -0.449797905 [69,] -0.429077567 -0.387757302 [70,] 0.221044963 -0.429077567 [71,] -0.163220899 0.221044963 [72,] 0.264267453 -0.163220899 [73,] 0.121592175 0.264267453 [74,] -0.373841550 0.121592175 [75,] 0.213491973 -0.373841550 [76,] 0.127704680 0.213491973 [77,] -0.390985773 0.127704680 [78,] -0.177983686 -0.390985773 [79,] 0.357068391 -0.177983686 [80,] -0.161000589 0.357068391 [81,] -0.136142940 -0.161000589 [82,] -0.475583528 -0.136142940 [83,] 0.064485846 -0.475583528 [84,] 0.297525967 0.064485846 [85,] 0.466374808 0.297525967 [86,] 0.280852564 0.466374808 [87,] 0.220715438 0.280852564 [88,] -0.172959591 0.220715438 [89,] 0.127586496 -0.172959591 [90,] 0.105712479 0.127586496 [91,] 0.284314377 0.105712479 [92,] -0.363893791 0.284314377 [93,] 0.109469218 -0.363893791 [94,] -0.481196264 0.109469218 [95,] -0.460807678 -0.481196264 [96,] 0.341124344 -0.460807678 [97,] 0.054742461 0.341124344 [98,] 0.078730741 0.054742461 [99,] -0.573147800 0.078730741 [100,] 0.426181479 -0.573147800 [101,] -0.470458904 0.426181479 [102,] 0.325756667 -0.470458904 [103,] 0.072328656 0.325756667 [104,] 0.095821143 0.072328656 [105,] -0.691213881 0.095821143 [106,] -0.255137734 -0.691213881 [107,] 0.061350900 -0.255137734 [108,] -0.123387081 0.061350900 [109,] 0.108583770 -0.123387081 [110,] -0.410554479 0.108583770 [111,] -0.004595003 -0.410554479 [112,] -0.139315827 -0.004595003 [113,] 0.385299368 -0.139315827 [114,] -0.215311646 0.385299368 [115,] 0.077357670 -0.215311646 [116,] 0.105434013 0.077357670 [117,] 0.627814677 0.105434013 [118,] 0.380076903 0.627814677 [119,] -0.070944794 0.380076903 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.320605814 -0.157711401 2 -0.276416709 -0.320605814 3 -0.585644635 -0.276416709 4 -0.275793288 -0.585644635 5 0.186347594 -0.275793288 6 -0.249504932 0.186347594 7 -0.456478368 -0.249504932 8 0.026473925 -0.456478368 9 0.215827398 0.026473925 10 0.207173028 0.215827398 11 0.190034280 0.207173028 12 0.457471119 0.190034280 13 -0.477880171 0.457471119 14 0.042598965 -0.477880171 15 0.176192605 0.042598965 16 -0.221522491 0.176192605 17 0.197523530 -0.221522491 18 0.570996141 0.197523530 19 0.499911010 0.570996141 20 0.480767318 0.499911010 21 -0.248340138 0.480767318 22 -0.268353200 -0.248340138 23 -0.036515451 -0.268353200 24 0.093978170 -0.036515451 25 -0.173645734 0.093978170 26 0.252122681 -0.173645734 27 -0.298522644 0.252122681 28 0.385116349 -0.298522644 29 0.453431550 0.385116349 30 -0.274195950 0.453431550 31 -0.477769593 -0.274195950 32 0.290531172 -0.477769593 33 -0.293001228 0.290531172 34 0.477371279 -0.293001228 35 0.149270581 0.477371279 36 0.192849098 0.149270581 37 0.045342067 0.192849098 38 -0.263427175 0.045342067 39 0.009814693 -0.263427175 40 -0.234752384 0.009814693 41 0.307551521 -0.234752384 42 0.045543631 0.307551521 43 0.025330669 0.045543631 44 0.359308113 0.025330669 45 0.278885056 0.359308113 46 0.052665271 0.278885056 47 -0.157105287 0.052665271 48 -0.445625709 -0.157105287 49 0.657733907 -0.445625709 50 0.369298592 0.657733907 51 -0.330651114 0.369298592 52 0.590901578 -0.330651114 53 -0.135397871 0.590901578 54 0.348719684 -0.135397871 55 -0.400340699 0.348719684 56 -0.449286368 -0.400340699 57 0.020679817 -0.449286368 58 0.210177280 0.020679817 59 -0.125311400 0.210177280 60 0.150212997 -0.125311400 61 0.321448273 0.150212997 62 0.322046722 0.321448273 63 -0.401359612 0.322046722 64 -0.420714091 -0.401359612 65 0.120635338 -0.420714091 66 -0.150902954 0.120635338 67 -0.449797905 -0.150902954 68 -0.387757302 -0.449797905 69 -0.429077567 -0.387757302 70 0.221044963 -0.429077567 71 -0.163220899 0.221044963 72 0.264267453 -0.163220899 73 0.121592175 0.264267453 74 -0.373841550 0.121592175 75 0.213491973 -0.373841550 76 0.127704680 0.213491973 77 -0.390985773 0.127704680 78 -0.177983686 -0.390985773 79 0.357068391 -0.177983686 80 -0.161000589 0.357068391 81 -0.136142940 -0.161000589 82 -0.475583528 -0.136142940 83 0.064485846 -0.475583528 84 0.297525967 0.064485846 85 0.466374808 0.297525967 86 0.280852564 0.466374808 87 0.220715438 0.280852564 88 -0.172959591 0.220715438 89 0.127586496 -0.172959591 90 0.105712479 0.127586496 91 0.284314377 0.105712479 92 -0.363893791 0.284314377 93 0.109469218 -0.363893791 94 -0.481196264 0.109469218 95 -0.460807678 -0.481196264 96 0.341124344 -0.460807678 97 0.054742461 0.341124344 98 0.078730741 0.054742461 99 -0.573147800 0.078730741 100 0.426181479 -0.573147800 101 -0.470458904 0.426181479 102 0.325756667 -0.470458904 103 0.072328656 0.325756667 104 0.095821143 0.072328656 105 -0.691213881 0.095821143 106 -0.255137734 -0.691213881 107 0.061350900 -0.255137734 108 -0.123387081 0.061350900 109 0.108583770 -0.123387081 110 -0.410554479 0.108583770 111 -0.004595003 -0.410554479 112 -0.139315827 -0.004595003 113 0.385299368 -0.139315827 114 -0.215311646 0.385299368 115 0.077357670 -0.215311646 116 0.105434013 0.077357670 117 0.627814677 0.105434013 118 0.380076903 0.627814677 119 -0.070944794 0.380076903 > 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/wessaorg/rcomp/tmp/7u3in1322080773.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/wessaorg/rcomp/tmp/8ap0p1322080773.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/wessaorg/rcomp/tmp/9mhfo1322080773.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/wessaorg/rcomp/tmp/10ox8q1322080773.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/11m9dl1322080773.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/wessaorg/rcomp/tmp/126dc61322080773.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/wessaorg/rcomp/tmp/135cks1322080773.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/wessaorg/rcomp/tmp/14grva1322080773.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/wessaorg/rcomp/tmp/15uey51322080773.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/wessaorg/rcomp/tmp/163yvq1322080773.tab") + } > > try(system("convert tmp/1ewgp1322080773.ps tmp/1ewgp1322080773.png",intern=TRUE)) character(0) > try(system("convert tmp/227ik1322080773.ps tmp/227ik1322080773.png",intern=TRUE)) character(0) > try(system("convert tmp/31o1n1322080773.ps tmp/31o1n1322080773.png",intern=TRUE)) character(0) > try(system("convert tmp/4zxzq1322080773.ps tmp/4zxzq1322080773.png",intern=TRUE)) character(0) > try(system("convert tmp/5zszd1322080773.ps tmp/5zszd1322080773.png",intern=TRUE)) character(0) > try(system("convert tmp/6m4731322080773.ps tmp/6m4731322080773.png",intern=TRUE)) character(0) > try(system("convert tmp/7u3in1322080773.ps tmp/7u3in1322080773.png",intern=TRUE)) character(0) > try(system("convert tmp/8ap0p1322080773.ps tmp/8ap0p1322080773.png",intern=TRUE)) character(0) > try(system("convert tmp/9mhfo1322080773.ps tmp/9mhfo1322080773.png",intern=TRUE)) character(0) > try(system("convert tmp/10ox8q1322080773.ps tmp/10ox8q1322080773.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.082 0.506 4.605