R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(337 + ,74 + ,232 + ,31 + ,430 + ,35 + ,386 + ,9 + ,169 + ,44 + ,102 + ,23 + ,133 + ,53 + ,52 + ,28 + ,76 + ,42 + ,17 + ,17 + ,328 + ,128 + ,165 + ,35 + ,175 + ,50 + ,106 + ,19 + ,169 + ,97 + ,31 + ,42 + ,165 + ,76 + ,69 + ,20 + ,141 + ,36 + ,85 + ,21 + ,92 + ,48 + ,27 + ,17 + ,233 + ,22 + ,206 + ,5 + ,110 + ,42 + ,51 + ,17 + ,170 + ,113 + ,45 + ,12 + ,94 + ,49 + ,22 + ,23 + ,125 + ,78 + ,22 + ,25 + ,100 + ,65 + ,21 + ,14 + ,8434 + ,91 + ,8313 + ,29 + ,126 + ,37 + ,79 + ,10 + ,381 + ,111 + ,241 + ,30 + ,799 + ,155 + ,587 + ,57 + ,150 + ,81 + ,25 + ,44 + ,190 + ,87 + ,83 + ,19 + ,165 + ,65 + ,78 + ,22 + ,162 + ,102 + ,42 + ,18 + ,137 + ,70 + ,51 + ,17 + ,131 + ,74 + ,40 + ,17 + ,162 + ,80 + ,57 + ,26 + ,141 + ,80 + ,28 + ,34 + ,247 + ,101 + ,83 + ,63 + ,175 + ,65 + ,93 + ,17 + ,357 + ,160 + ,175 + ,21 + ,107 + ,62 + ,29 + ,16 + ,310 + ,68 + ,223 + ,20 + ,116 + ,58 + ,20 + ,37 + ,376 + ,70 + ,280 + ,25 + ,230 + ,115 + ,90 + ,25 + ,54 + ,33 + ,7 + ,14 + ,194 + ,44 + ,135 + ,15 + ,171 + ,73 + ,78 + ,21 + ,311 + ,46 + ,248 + ,17 + ,290 + ,81 + ,186 + ,22 + ,4435 + ,2053 + ,687 + ,1695 + ,440 + ,101 + ,307 + ,32 + ,1430 + ,341 + ,1048 + ,41 + ,820 + ,314 + ,477 + ,29 + ,223 + ,141 + ,43 + ,39 + ,426 + ,270 + ,122 + ,34 + ,1693 + ,320 + ,566 + ,807 + ,2068 + ,44 + ,2010 + ,13 + ,832 + ,589 + ,222 + ,20 + ,416 + ,149 + ,236 + ,30 + ,372 + ,79 + ,262 + ,31 + ,5266 + ,751 + ,3929 + ,586 + ,633 + ,155 + ,456 + ,22 + ,191 + ,107 + ,35 + ,48 + ,337 + ,172 + ,138 + ,26 + ,280 + ,106 + ,122 + ,52 + ,619 + ,149 + ,270 + ,200 + ,2423 + ,2125 + ,243 + ,55 + ,538 + ,297 + ,189 + ,52 + ,294 + ,93 + ,180 + ,20 + ,430 + ,293 + ,116 + ,21 + ,737 + ,325 + ,321 + ,92 + ,541 + ,169 + ,346 + ,26 + ,1214 + ,209 + ,878 + ,126 + ,929 + ,130 + ,760 + ,39 + ,1288 + ,67 + ,1201 + ,20 + ,321 + ,152 + ,148 + ,21 + ,1912 + ,388 + ,1498 + ,25 + ,146 + ,62 + ,59 + ,25 + ,357 + ,97 + ,225 + ,35 + ,473 + ,158 + ,280 + ,35 + ,153 + ,55 + ,87 + ,11 + ,681 + ,521 + ,142 + ,19 + ,337 + ,109 + ,208 + ,20 + ,433 + ,70 + ,332 + ,31 + ,751 + ,116 + ,610 + ,26 + ,655 + ,126 + ,475 + ,55 + ,233 + ,150 + ,36 + ,46 + ,118 + ,73 + ,20 + ,25 + ,146 + ,83 + ,42 + ,21 + ,365 + ,197 + ,153 + ,16 + ,653 + ,112 + ,519 + ,22 + ,434 + ,168 + ,168 + ,97 + ,231 + ,62 + ,156 + ,12 + ,123 + ,50 + ,57 + ,16 + ,259 + ,113 + ,104 + ,42 + ,98 + ,46 + ,28 + ,23 + ,2107 + ,222 + ,1839 + ,46 + ,715 + ,61 + ,622 + ,31 + ,136 + ,73 + ,31 + ,32 + ,180 + ,111 + ,45 + ,25 + ,172 + ,63 + ,79 + ,31 + ,170 + ,58 + ,79 + ,33 + ,380 + ,131 + ,205 + ,45 + ,813 + ,110 + ,674 + ,29 + ,708 + ,399 + ,295 + ,14 + ,193 + ,79 + ,93 + ,22 + ,248 + ,76 + ,149 + ,23 + ,725 + ,184 + ,524 + ,17 + ,13007 + ,326 + ,12645 + ,36 + ,976 + ,129 + ,824 + ,22 + ,185 + ,63 + ,98 + ,24 + ,234 + ,92 + ,68 + ,75 + ,185 + ,72 + ,89 + ,24 + ,217 + ,64 + ,130 + ,23 + ,802 + ,358 + ,404 + ,40 + ,705 + ,76 + ,571 + ,57 + ,304 + ,117 + ,156 + ,30 + ,395 + ,230 + ,129 + ,37 + ,439 + ,161 + ,254 + ,24 + ,321 + ,73 + ,228 + ,20 + ,1015 + ,231 + ,736 + ,48 + ,340 + ,57 + ,256 + ,27 + ,372 + ,133 + ,49 + ,190 + ,1772 + ,80 + ,1666 + ,26 + ,163 + ,101 + ,38 + ,24 + ,197 + ,118 + ,44 + ,35 + ,610 + ,79 + ,508 + ,23 + ,313 + ,86 + ,198 + ,29) + ,dim=c(4 + ,121) + ,dimnames=list(c('Totaal' + ,'InbrengInContanten' + ,'InbrengInNatura' + ,'TeStortenBedrag') + ,1:121)) > y <- array(NA,dim=c(4,121),dimnames=list(c('Totaal','InbrengInContanten','InbrengInNatura','TeStortenBedrag'),1:121)) > 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' > 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 Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, 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 Totaal InbrengInContanten InbrengInNatura TeStortenBedrag 1 337 74 232 31 2 430 35 386 9 3 169 44 102 23 4 133 53 52 28 5 76 42 17 17 6 328 128 165 35 7 175 50 106 19 8 169 97 31 42 9 165 76 69 20 10 141 36 85 21 11 92 48 27 17 12 233 22 206 5 13 110 42 51 17 14 170 113 45 12 15 94 49 22 23 16 125 78 22 25 17 100 65 21 14 18 8434 91 8313 29 19 126 37 79 10 20 381 111 241 30 21 799 155 587 57 22 150 81 25 44 23 190 87 83 19 24 165 65 78 22 25 162 102 42 18 26 137 70 51 17 27 131 74 40 17 28 162 80 57 26 29 141 80 28 34 30 247 101 83 63 31 175 65 93 17 32 357 160 175 21 33 107 62 29 16 34 310 68 223 20 35 116 58 20 37 36 376 70 280 25 37 230 115 90 25 38 54 33 7 14 39 194 44 135 15 40 171 73 78 21 41 311 46 248 17 42 290 81 186 22 43 4435 2053 687 1695 44 440 101 307 32 45 1430 341 1048 41 46 820 314 477 29 47 223 141 43 39 48 426 270 122 34 49 1693 320 566 807 50 2068 44 2010 13 51 832 589 222 20 52 416 149 236 30 53 372 79 262 31 54 5266 751 3929 586 55 633 155 456 22 56 191 107 35 48 57 337 172 138 26 58 280 106 122 52 59 619 149 270 200 60 2423 2125 243 55 61 538 297 189 52 62 294 93 180 20 63 430 293 116 21 64 737 325 321 92 65 541 169 346 26 66 1214 209 878 126 67 929 130 760 39 68 1288 67 1201 20 69 321 152 148 21 70 1912 388 1498 25 71 146 62 59 25 72 357 97 225 35 73 473 158 280 35 74 153 55 87 11 75 681 521 142 19 76 337 109 208 20 77 433 70 332 31 78 751 116 610 26 79 655 126 475 55 80 233 150 36 46 81 118 73 20 25 82 146 83 42 21 83 365 197 153 16 84 653 112 519 22 85 434 168 168 97 86 231 62 156 12 87 123 50 57 16 88 259 113 104 42 89 98 46 28 23 90 2107 222 1839 46 91 715 61 622 31 92 136 73 31 32 93 180 111 45 25 94 172 63 79 31 95 170 58 79 33 96 380 131 205 45 97 813 110 674 29 98 708 399 295 14 99 193 79 93 22 100 248 76 149 23 101 725 184 524 17 102 13007 326 12645 36 103 976 129 824 22 104 185 63 98 24 105 234 92 68 75 106 185 72 89 24 107 217 64 130 23 108 802 358 404 40 109 705 76 571 57 110 304 117 156 30 111 395 230 129 37 112 439 161 254 24 113 321 73 228 20 114 1015 231 736 48 115 340 57 256 27 116 372 133 49 190 117 1772 80 1666 26 118 163 101 38 24 119 197 118 44 35 120 610 79 508 23 121 313 86 198 29 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) InbrengInContanten InbrengInNatura TeStortenBedrag 0.004915 0.999983 1.000051 0.999970 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.03361 -0.02907 -0.00815 -0.00430 0.99712 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.0049151 0.0638073 0.077 0.939 InbrengInContanten 0.9999832 0.0002533 3948.401 <2e-16 *** InbrengInNatura 1.0000515 0.0000380 26319.552 <2e-16 *** TeStortenBedrag 0.9999702 0.0003966 2521.322 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.5868 on 117 degrees of freedom Multiple R-squared: 1, Adjusted R-squared: 1 F-statistic: 2.685e+08 on 3 and 117 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.500410e-40 3.000820e-40 1.000000e+00 [2,] 1.495184e-01 2.990369e-01 8.504816e-01 [3,] 7.288422e-02 1.457684e-01 9.271158e-01 [4,] 2.067923e-01 4.135846e-01 7.932077e-01 [5,] 1.266176e-01 2.532352e-01 8.733824e-01 [6,] 7.746255e-02 1.549251e-01 9.225374e-01 [7,] 4.453696e-02 8.907393e-02 9.554630e-01 [8,] 3.322556e-02 6.645112e-02 9.667744e-01 [9,] 2.100158e-02 4.200316e-02 9.789984e-01 [10,] 1.195607e-02 2.391213e-02 9.880439e-01 [11,] 5.999443e-03 1.199889e-02 9.940006e-01 [12,] 3.099587e-03 6.199175e-03 9.969004e-01 [13,] 1.456128e-03 2.912255e-03 9.985439e-01 [14,] 7.145802e-03 1.429160e-02 9.928542e-01 [15,] 8.512293e-03 1.702459e-02 9.914877e-01 [16,] 6.508993e-03 1.301799e-02 9.934910e-01 [17,] 3.677131e-02 7.354263e-02 9.632287e-01 [18,] 2.390844e-02 4.781688e-02 9.760916e-01 [19,] 1.508633e-02 3.017266e-02 9.849137e-01 [20,] 4.516285e-02 9.032571e-02 9.548371e-01 [21,] 3.058548e-02 6.117095e-02 9.694145e-01 [22,] 5.842983e-02 1.168597e-01 9.415702e-01 [23,] 8.221458e-02 1.644292e-01 9.177854e-01 [24,] 7.847846e-02 1.569569e-01 9.215215e-01 [25,] 5.773756e-02 1.154751e-01 9.422624e-01 [26,] 9.150886e-02 1.830177e-01 9.084911e-01 [27,] 6.824126e-02 1.364825e-01 9.317587e-01 [28,] 1.183504e-01 2.367009e-01 8.816496e-01 [29,] 2.855679e-01 5.711358e-01 7.144321e-01 [30,] 4.130184e-01 8.260368e-01 5.869816e-01 [31,] 3.561668e-01 7.123336e-01 6.438332e-01 [32,] 3.047397e-01 6.094795e-01 6.952603e-01 [33,] 2.561371e-01 5.122743e-01 7.438629e-01 [34,] 3.456694e-01 6.913389e-01 6.543306e-01 [35,] 2.953986e-01 5.907973e-01 7.046014e-01 [36,] 4.004323e-01 8.008647e-01 5.995677e-01 [37,] 3.561371e-01 7.122743e-01 6.438629e-01 [38,] 3.050845e-01 6.101691e-01 6.949155e-01 [39,] 2.715010e-01 5.430020e-01 7.284990e-01 [40,] 2.281133e-01 4.562266e-01 7.718867e-01 [41,] 1.885102e-01 3.770205e-01 8.114898e-01 [42,] 1.533108e-01 3.066216e-01 8.466892e-01 [43,] 1.245435e-01 2.490871e-01 8.754565e-01 [44,] 1.575056e-01 3.150112e-01 8.424944e-01 [45,] 2.048758e-01 4.097516e-01 7.951242e-01 [46,] 2.796586e-01 5.593172e-01 7.203414e-01 [47,] 2.358529e-01 4.717057e-01 7.641471e-01 [48,] 2.157198e-01 4.314396e-01 7.842802e-01 [49,] 1.785558e-01 3.571116e-01 8.214442e-01 [50,] 2.544749e-01 5.089497e-01 7.455251e-01 [51,] 3.316126e-01 6.632252e-01 6.683874e-01 [52,] 2.843836e-01 5.687673e-01 7.156164e-01 [53,] 2.420958e-01 4.841916e-01 7.579042e-01 [54,] 2.551730e-01 5.103461e-01 7.448270e-01 [55,] 2.153272e-01 4.306545e-01 7.846728e-01 [56,] 2.908402e-01 5.816804e-01 7.091598e-01 [57,] 2.495741e-01 4.991481e-01 7.504259e-01 [58,] 3.357436e-01 6.714872e-01 6.642564e-01 [59,] 2.886986e-01 5.773971e-01 7.113014e-01 [60,] 3.498616e-01 6.997232e-01 6.501384e-01 [61,] 3.022043e-01 6.044085e-01 6.977957e-01 [62,] 2.585990e-01 5.171979e-01 7.414010e-01 [63,] 2.171922e-01 4.343844e-01 7.828078e-01 [64,] 3.252178e-01 6.504355e-01 6.747822e-01 [65,] 2.780995e-01 5.561990e-01 7.219005e-01 [66,] 2.344830e-01 4.689661e-01 7.655170e-01 [67,] 1.954519e-01 3.909038e-01 8.045481e-01 [68,] 1.600407e-01 3.200813e-01 8.399593e-01 [69,] 1.835179e-01 3.670359e-01 8.164821e-01 [70,] 1.493167e-01 2.986335e-01 8.506833e-01 [71,] 1.195871e-01 2.391742e-01 8.804129e-01 [72,] 1.818974e-01 3.637948e-01 8.181026e-01 [73,] 2.630525e-01 5.261050e-01 7.369475e-01 [74,] 3.578495e-01 7.156989e-01 6.421505e-01 [75,] 3.062698e-01 6.125397e-01 6.937302e-01 [76,] 2.579745e-01 5.159490e-01 7.420255e-01 [77,] 3.314602e-01 6.629203e-01 6.685398e-01 [78,] 2.805990e-01 5.611979e-01 7.194010e-01 [79,] 3.943317e-01 7.886635e-01 6.056683e-01 [80,] 4.854483e-01 9.708967e-01 5.145517e-01 [81,] 4.257871e-01 8.515741e-01 5.742129e-01 [82,] 3.673757e-01 7.347514e-01 6.326243e-01 [83,] 4.740721e-01 9.481442e-01 5.259279e-01 [84,] 4.157158e-01 8.314316e-01 5.842842e-01 [85,] 5.398065e-01 9.203870e-01 4.601935e-01 [86,] 4.770990e-01 9.541981e-01 5.229010e-01 [87,] 5.758107e-01 8.483786e-01 4.241893e-01 [88,] 6.894582e-01 6.210836e-01 3.105418e-01 [89,] 6.265630e-01 7.468740e-01 3.734370e-01 [90,] 7.415202e-01 5.169596e-01 2.584798e-01 [91,] 6.805641e-01 6.388718e-01 3.194359e-01 [92,] 6.180933e-01 7.638133e-01 3.819067e-01 [93,] 7.764718e-01 4.470565e-01 2.235282e-01 [94,] 7.172477e-01 5.655046e-01 2.827523e-01 [95,] 6.473173e-01 7.053653e-01 3.526827e-01 [96,] 6.608742e-01 6.782517e-01 3.391258e-01 [97,] 7.461878e-01 5.076243e-01 2.538122e-01 [98,] 6.722892e-01 6.554216e-01 3.277108e-01 [99,] 8.455238e-01 3.089524e-01 1.544762e-01 [100,] 7.845599e-01 4.308803e-01 2.154401e-01 [101,] 7.115781e-01 5.768438e-01 2.884219e-01 [102,] 7.054787e-01 5.890426e-01 2.945213e-01 [103,] 8.032062e-01 3.935877e-01 1.967938e-01 [104,] 9.814181e-01 3.716378e-02 1.858189e-02 [105,] 1.000000e+00 1.492617e-81 7.463087e-82 [106,] 1.000000e+00 4.896853e-65 2.448427e-65 [107,] 1.000000e+00 4.283534e-53 2.141767e-53 [108,] 1.000000e+00 1.761769e-40 8.808847e-41 > postscript(file="/var/wessaorg/rcomp/tmp/1pqwi1353054559.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/2fyxk1353054559.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/376oz1353054559.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/4q5fc1353054559.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/5h34s1353054559.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 = 121 Frequency = 1 1 2 3 4 5 -0.0146971842 -0.0239376525 -0.0087441294 -0.0058692906 -0.0045794595 6 7 8 9 10 -0.0102225303 -0.0089688930 -1.0036327284 -0.0065979234 -1.0080624410 11 12 13 14 15 -0.0049938627 -0.0150055119 -0.0063303391 -0.0049805583 -0.0045406116 16 17 18 19 20 -0.0039948956 -0.0044894645 0.5693851859 -0.0080648844 -1.0145703589 21 22 23 24 25 -0.0308451450 -0.0035322437 0.9928356538 -0.0071860845 -0.0048314228 26 27 28 29 30 -1.0058610528 -0.0052275509 -1.0057339164 -1.0040018410 -0.0056169732 31 32 33 34 35 -0.0081077052 0.9893811455 -0.0048920473 -1.0146624599 0.9961309101 36 37 38 39 40 0.9825849362 -0.0068765265 -0.0043048412 -0.0106821907 -1.0070818375 41 42 43 44 45 -0.0164081006 0.9875204615 0.0446854646 -0.0180770578 -0.0519449673 46 47 48 49 50 -0.0233510325 -0.0036027404 -0.0056580656 -0.0046222060 0.8927022793 51 52 53 54 55 0.9941211130 0.9863240119 -0.0161582769 -0.1771746247 -0.0251433258 56 57 58 59 60 0.9965078966 0.9916368110 -0.0078697165 -0.0103549570 0.0198276077 61 62 63 64 65 -0.0081187765 0.9879708934 -0.0053514537 -1.0132536321 -0.0191247331 66 67 68 69 70 0.9571330366 -0.0407100638 -0.0650427569 -0.0093625319 0.9251920004 71 72 73 74 75 -0.0061684281 -0.0138318848 -0.0156418164 -0.0081453373 -1.0029287002 76 77 78 79 80 -0.0132028438 -0.0199138710 -1.0336080901 -1.0256232577 0.9971174202 81 82 83 84 85 -0.0039757038 -0.0050603627 -1.0090149780 -0.0291082923 0.9921431449 86 87 88 89 90 0.9884485634 -0.0065350708 -0.0071238063 0.9951001290 -0.0945239590 91 92 93 94 95 0.9650013139 -0.0043333214 -1.0046262268 -1.0070025885 -0.0070267201 96 97 98 99 100 -1.0119337603 -0.0369149205 -0.0130015795 -1.0077238882 -0.0106281358 101 102 103 104 105 -0.0283082124 -0.6495499781 0.9554702115 -0.0081898646 -1.0046373511 106 107 108 109 110 -0.0075755544 -0.0098508258 -0.0185261587 0.9686547407 0.9899074015 111 112 113 114 115 -1.0065994455 -0.0145808103 -0.0148361411 -0.0375128533 -0.0163373621 116 117 118 119 120 0.0004592492 -0.0885917188 -0.0044631885 -0.0041590610 -0.0290650839 121 -0.0128048515 > postscript(file="/var/wessaorg/rcomp/tmp/64xeq1353054559.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 = 121 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.0146971842 NA 1 -0.0239376525 -0.0146971842 2 -0.0087441294 -0.0239376525 3 -0.0058692906 -0.0087441294 4 -0.0045794595 -0.0058692906 5 -0.0102225303 -0.0045794595 6 -0.0089688930 -0.0102225303 7 -1.0036327284 -0.0089688930 8 -0.0065979234 -1.0036327284 9 -1.0080624410 -0.0065979234 10 -0.0049938627 -1.0080624410 11 -0.0150055119 -0.0049938627 12 -0.0063303391 -0.0150055119 13 -0.0049805583 -0.0063303391 14 -0.0045406116 -0.0049805583 15 -0.0039948956 -0.0045406116 16 -0.0044894645 -0.0039948956 17 0.5693851859 -0.0044894645 18 -0.0080648844 0.5693851859 19 -1.0145703589 -0.0080648844 20 -0.0308451450 -1.0145703589 21 -0.0035322437 -0.0308451450 22 0.9928356538 -0.0035322437 23 -0.0071860845 0.9928356538 24 -0.0048314228 -0.0071860845 25 -1.0058610528 -0.0048314228 26 -0.0052275509 -1.0058610528 27 -1.0057339164 -0.0052275509 28 -1.0040018410 -1.0057339164 29 -0.0056169732 -1.0040018410 30 -0.0081077052 -0.0056169732 31 0.9893811455 -0.0081077052 32 -0.0048920473 0.9893811455 33 -1.0146624599 -0.0048920473 34 0.9961309101 -1.0146624599 35 0.9825849362 0.9961309101 36 -0.0068765265 0.9825849362 37 -0.0043048412 -0.0068765265 38 -0.0106821907 -0.0043048412 39 -1.0070818375 -0.0106821907 40 -0.0164081006 -1.0070818375 41 0.9875204615 -0.0164081006 42 0.0446854646 0.9875204615 43 -0.0180770578 0.0446854646 44 -0.0519449673 -0.0180770578 45 -0.0233510325 -0.0519449673 46 -0.0036027404 -0.0233510325 47 -0.0056580656 -0.0036027404 48 -0.0046222060 -0.0056580656 49 0.8927022793 -0.0046222060 50 0.9941211130 0.8927022793 51 0.9863240119 0.9941211130 52 -0.0161582769 0.9863240119 53 -0.1771746247 -0.0161582769 54 -0.0251433258 -0.1771746247 55 0.9965078966 -0.0251433258 56 0.9916368110 0.9965078966 57 -0.0078697165 0.9916368110 58 -0.0103549570 -0.0078697165 59 0.0198276077 -0.0103549570 60 -0.0081187765 0.0198276077 61 0.9879708934 -0.0081187765 62 -0.0053514537 0.9879708934 63 -1.0132536321 -0.0053514537 64 -0.0191247331 -1.0132536321 65 0.9571330366 -0.0191247331 66 -0.0407100638 0.9571330366 67 -0.0650427569 -0.0407100638 68 -0.0093625319 -0.0650427569 69 0.9251920004 -0.0093625319 70 -0.0061684281 0.9251920004 71 -0.0138318848 -0.0061684281 72 -0.0156418164 -0.0138318848 73 -0.0081453373 -0.0156418164 74 -1.0029287002 -0.0081453373 75 -0.0132028438 -1.0029287002 76 -0.0199138710 -0.0132028438 77 -1.0336080901 -0.0199138710 78 -1.0256232577 -1.0336080901 79 0.9971174202 -1.0256232577 80 -0.0039757038 0.9971174202 81 -0.0050603627 -0.0039757038 82 -1.0090149780 -0.0050603627 83 -0.0291082923 -1.0090149780 84 0.9921431449 -0.0291082923 85 0.9884485634 0.9921431449 86 -0.0065350708 0.9884485634 87 -0.0071238063 -0.0065350708 88 0.9951001290 -0.0071238063 89 -0.0945239590 0.9951001290 90 0.9650013139 -0.0945239590 91 -0.0043333214 0.9650013139 92 -1.0046262268 -0.0043333214 93 -1.0070025885 -1.0046262268 94 -0.0070267201 -1.0070025885 95 -1.0119337603 -0.0070267201 96 -0.0369149205 -1.0119337603 97 -0.0130015795 -0.0369149205 98 -1.0077238882 -0.0130015795 99 -0.0106281358 -1.0077238882 100 -0.0283082124 -0.0106281358 101 -0.6495499781 -0.0283082124 102 0.9554702115 -0.6495499781 103 -0.0081898646 0.9554702115 104 -1.0046373511 -0.0081898646 105 -0.0075755544 -1.0046373511 106 -0.0098508258 -0.0075755544 107 -0.0185261587 -0.0098508258 108 0.9686547407 -0.0185261587 109 0.9899074015 0.9686547407 110 -1.0065994455 0.9899074015 111 -0.0145808103 -1.0065994455 112 -0.0148361411 -0.0145808103 113 -0.0375128533 -0.0148361411 114 -0.0163373621 -0.0375128533 115 0.0004592492 -0.0163373621 116 -0.0885917188 0.0004592492 117 -0.0044631885 -0.0885917188 118 -0.0041590610 -0.0044631885 119 -0.0290650839 -0.0041590610 120 -0.0128048515 -0.0290650839 121 NA -0.0128048515 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.0239376525 -0.0146971842 [2,] -0.0087441294 -0.0239376525 [3,] -0.0058692906 -0.0087441294 [4,] -0.0045794595 -0.0058692906 [5,] -0.0102225303 -0.0045794595 [6,] -0.0089688930 -0.0102225303 [7,] -1.0036327284 -0.0089688930 [8,] -0.0065979234 -1.0036327284 [9,] -1.0080624410 -0.0065979234 [10,] -0.0049938627 -1.0080624410 [11,] -0.0150055119 -0.0049938627 [12,] -0.0063303391 -0.0150055119 [13,] -0.0049805583 -0.0063303391 [14,] -0.0045406116 -0.0049805583 [15,] -0.0039948956 -0.0045406116 [16,] -0.0044894645 -0.0039948956 [17,] 0.5693851859 -0.0044894645 [18,] -0.0080648844 0.5693851859 [19,] -1.0145703589 -0.0080648844 [20,] -0.0308451450 -1.0145703589 [21,] -0.0035322437 -0.0308451450 [22,] 0.9928356538 -0.0035322437 [23,] -0.0071860845 0.9928356538 [24,] -0.0048314228 -0.0071860845 [25,] -1.0058610528 -0.0048314228 [26,] -0.0052275509 -1.0058610528 [27,] -1.0057339164 -0.0052275509 [28,] -1.0040018410 -1.0057339164 [29,] -0.0056169732 -1.0040018410 [30,] -0.0081077052 -0.0056169732 [31,] 0.9893811455 -0.0081077052 [32,] -0.0048920473 0.9893811455 [33,] -1.0146624599 -0.0048920473 [34,] 0.9961309101 -1.0146624599 [35,] 0.9825849362 0.9961309101 [36,] -0.0068765265 0.9825849362 [37,] -0.0043048412 -0.0068765265 [38,] -0.0106821907 -0.0043048412 [39,] -1.0070818375 -0.0106821907 [40,] -0.0164081006 -1.0070818375 [41,] 0.9875204615 -0.0164081006 [42,] 0.0446854646 0.9875204615 [43,] -0.0180770578 0.0446854646 [44,] -0.0519449673 -0.0180770578 [45,] -0.0233510325 -0.0519449673 [46,] -0.0036027404 -0.0233510325 [47,] -0.0056580656 -0.0036027404 [48,] -0.0046222060 -0.0056580656 [49,] 0.8927022793 -0.0046222060 [50,] 0.9941211130 0.8927022793 [51,] 0.9863240119 0.9941211130 [52,] -0.0161582769 0.9863240119 [53,] -0.1771746247 -0.0161582769 [54,] -0.0251433258 -0.1771746247 [55,] 0.9965078966 -0.0251433258 [56,] 0.9916368110 0.9965078966 [57,] -0.0078697165 0.9916368110 [58,] -0.0103549570 -0.0078697165 [59,] 0.0198276077 -0.0103549570 [60,] -0.0081187765 0.0198276077 [61,] 0.9879708934 -0.0081187765 [62,] -0.0053514537 0.9879708934 [63,] -1.0132536321 -0.0053514537 [64,] -0.0191247331 -1.0132536321 [65,] 0.9571330366 -0.0191247331 [66,] -0.0407100638 0.9571330366 [67,] -0.0650427569 -0.0407100638 [68,] -0.0093625319 -0.0650427569 [69,] 0.9251920004 -0.0093625319 [70,] -0.0061684281 0.9251920004 [71,] -0.0138318848 -0.0061684281 [72,] -0.0156418164 -0.0138318848 [73,] -0.0081453373 -0.0156418164 [74,] -1.0029287002 -0.0081453373 [75,] -0.0132028438 -1.0029287002 [76,] -0.0199138710 -0.0132028438 [77,] -1.0336080901 -0.0199138710 [78,] -1.0256232577 -1.0336080901 [79,] 0.9971174202 -1.0256232577 [80,] -0.0039757038 0.9971174202 [81,] -0.0050603627 -0.0039757038 [82,] -1.0090149780 -0.0050603627 [83,] -0.0291082923 -1.0090149780 [84,] 0.9921431449 -0.0291082923 [85,] 0.9884485634 0.9921431449 [86,] -0.0065350708 0.9884485634 [87,] -0.0071238063 -0.0065350708 [88,] 0.9951001290 -0.0071238063 [89,] -0.0945239590 0.9951001290 [90,] 0.9650013139 -0.0945239590 [91,] -0.0043333214 0.9650013139 [92,] -1.0046262268 -0.0043333214 [93,] -1.0070025885 -1.0046262268 [94,] -0.0070267201 -1.0070025885 [95,] -1.0119337603 -0.0070267201 [96,] -0.0369149205 -1.0119337603 [97,] -0.0130015795 -0.0369149205 [98,] -1.0077238882 -0.0130015795 [99,] -0.0106281358 -1.0077238882 [100,] -0.0283082124 -0.0106281358 [101,] -0.6495499781 -0.0283082124 [102,] 0.9554702115 -0.6495499781 [103,] -0.0081898646 0.9554702115 [104,] -1.0046373511 -0.0081898646 [105,] -0.0075755544 -1.0046373511 [106,] -0.0098508258 -0.0075755544 [107,] -0.0185261587 -0.0098508258 [108,] 0.9686547407 -0.0185261587 [109,] 0.9899074015 0.9686547407 [110,] -1.0065994455 0.9899074015 [111,] -0.0145808103 -1.0065994455 [112,] -0.0148361411 -0.0145808103 [113,] -0.0375128533 -0.0148361411 [114,] -0.0163373621 -0.0375128533 [115,] 0.0004592492 -0.0163373621 [116,] -0.0885917188 0.0004592492 [117,] -0.0044631885 -0.0885917188 [118,] -0.0041590610 -0.0044631885 [119,] -0.0290650839 -0.0041590610 [120,] -0.0128048515 -0.0290650839 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.0239376525 -0.0146971842 2 -0.0087441294 -0.0239376525 3 -0.0058692906 -0.0087441294 4 -0.0045794595 -0.0058692906 5 -0.0102225303 -0.0045794595 6 -0.0089688930 -0.0102225303 7 -1.0036327284 -0.0089688930 8 -0.0065979234 -1.0036327284 9 -1.0080624410 -0.0065979234 10 -0.0049938627 -1.0080624410 11 -0.0150055119 -0.0049938627 12 -0.0063303391 -0.0150055119 13 -0.0049805583 -0.0063303391 14 -0.0045406116 -0.0049805583 15 -0.0039948956 -0.0045406116 16 -0.0044894645 -0.0039948956 17 0.5693851859 -0.0044894645 18 -0.0080648844 0.5693851859 19 -1.0145703589 -0.0080648844 20 -0.0308451450 -1.0145703589 21 -0.0035322437 -0.0308451450 22 0.9928356538 -0.0035322437 23 -0.0071860845 0.9928356538 24 -0.0048314228 -0.0071860845 25 -1.0058610528 -0.0048314228 26 -0.0052275509 -1.0058610528 27 -1.0057339164 -0.0052275509 28 -1.0040018410 -1.0057339164 29 -0.0056169732 -1.0040018410 30 -0.0081077052 -0.0056169732 31 0.9893811455 -0.0081077052 32 -0.0048920473 0.9893811455 33 -1.0146624599 -0.0048920473 34 0.9961309101 -1.0146624599 35 0.9825849362 0.9961309101 36 -0.0068765265 0.9825849362 37 -0.0043048412 -0.0068765265 38 -0.0106821907 -0.0043048412 39 -1.0070818375 -0.0106821907 40 -0.0164081006 -1.0070818375 41 0.9875204615 -0.0164081006 42 0.0446854646 0.9875204615 43 -0.0180770578 0.0446854646 44 -0.0519449673 -0.0180770578 45 -0.0233510325 -0.0519449673 46 -0.0036027404 -0.0233510325 47 -0.0056580656 -0.0036027404 48 -0.0046222060 -0.0056580656 49 0.8927022793 -0.0046222060 50 0.9941211130 0.8927022793 51 0.9863240119 0.9941211130 52 -0.0161582769 0.9863240119 53 -0.1771746247 -0.0161582769 54 -0.0251433258 -0.1771746247 55 0.9965078966 -0.0251433258 56 0.9916368110 0.9965078966 57 -0.0078697165 0.9916368110 58 -0.0103549570 -0.0078697165 59 0.0198276077 -0.0103549570 60 -0.0081187765 0.0198276077 61 0.9879708934 -0.0081187765 62 -0.0053514537 0.9879708934 63 -1.0132536321 -0.0053514537 64 -0.0191247331 -1.0132536321 65 0.9571330366 -0.0191247331 66 -0.0407100638 0.9571330366 67 -0.0650427569 -0.0407100638 68 -0.0093625319 -0.0650427569 69 0.9251920004 -0.0093625319 70 -0.0061684281 0.9251920004 71 -0.0138318848 -0.0061684281 72 -0.0156418164 -0.0138318848 73 -0.0081453373 -0.0156418164 74 -1.0029287002 -0.0081453373 75 -0.0132028438 -1.0029287002 76 -0.0199138710 -0.0132028438 77 -1.0336080901 -0.0199138710 78 -1.0256232577 -1.0336080901 79 0.9971174202 -1.0256232577 80 -0.0039757038 0.9971174202 81 -0.0050603627 -0.0039757038 82 -1.0090149780 -0.0050603627 83 -0.0291082923 -1.0090149780 84 0.9921431449 -0.0291082923 85 0.9884485634 0.9921431449 86 -0.0065350708 0.9884485634 87 -0.0071238063 -0.0065350708 88 0.9951001290 -0.0071238063 89 -0.0945239590 0.9951001290 90 0.9650013139 -0.0945239590 91 -0.0043333214 0.9650013139 92 -1.0046262268 -0.0043333214 93 -1.0070025885 -1.0046262268 94 -0.0070267201 -1.0070025885 95 -1.0119337603 -0.0070267201 96 -0.0369149205 -1.0119337603 97 -0.0130015795 -0.0369149205 98 -1.0077238882 -0.0130015795 99 -0.0106281358 -1.0077238882 100 -0.0283082124 -0.0106281358 101 -0.6495499781 -0.0283082124 102 0.9554702115 -0.6495499781 103 -0.0081898646 0.9554702115 104 -1.0046373511 -0.0081898646 105 -0.0075755544 -1.0046373511 106 -0.0098508258 -0.0075755544 107 -0.0185261587 -0.0098508258 108 0.9686547407 -0.0185261587 109 0.9899074015 0.9686547407 110 -1.0065994455 0.9899074015 111 -0.0145808103 -1.0065994455 112 -0.0148361411 -0.0145808103 113 -0.0375128533 -0.0148361411 114 -0.0163373621 -0.0375128533 115 0.0004592492 -0.0163373621 116 -0.0885917188 0.0004592492 117 -0.0044631885 -0.0885917188 118 -0.0041590610 -0.0044631885 119 -0.0290650839 -0.0041590610 120 -0.0128048515 -0.0290650839 > 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/7dcgi1353054559.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/81sj51353054559.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/9br3t1353054559.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/10otdn1353054559.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/11i8e41353054559.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/12qvuo1353054559.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/138nw51353054559.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/14fj141353054560.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/1594ek1353054560.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/16y9aw1353054560.tab") + } > > try(system("convert tmp/1pqwi1353054559.ps tmp/1pqwi1353054559.png",intern=TRUE)) character(0) > try(system("convert tmp/2fyxk1353054559.ps tmp/2fyxk1353054559.png",intern=TRUE)) character(0) > try(system("convert tmp/376oz1353054559.ps tmp/376oz1353054559.png",intern=TRUE)) character(0) > try(system("convert tmp/4q5fc1353054559.ps tmp/4q5fc1353054559.png",intern=TRUE)) character(0) > try(system("convert tmp/5h34s1353054559.ps tmp/5h34s1353054559.png",intern=TRUE)) character(0) > try(system("convert tmp/64xeq1353054559.ps tmp/64xeq1353054559.png",intern=TRUE)) character(0) > try(system("convert tmp/7dcgi1353054559.ps tmp/7dcgi1353054559.png",intern=TRUE)) character(0) > try(system("convert tmp/81sj51353054559.ps tmp/81sj51353054559.png",intern=TRUE)) character(0) > try(system("convert tmp/9br3t1353054559.ps tmp/9br3t1353054559.png",intern=TRUE)) character(0) > try(system("convert tmp/10otdn1353054559.ps tmp/10otdn1353054559.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.667 0.890 7.591