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(377,370,358,357,349,348,369,381,368,361,351,351,358,354,347,345,343,340,362,370,373,371,354,357,363,364,363,358,357,357,380,378,376,380,379,384,392,394,392,396,392,396,419,421,420,418,410,418,426,428,430,424,423,427,441,449,452,462,455,461,461,463,462,456,455,456,472,472,471,465,459,465,468,467,463,460,462,461,476,476,471,453,443,442,444,438,427,424,416,406,431,434,418,412,404,409,412,406,398,397,385,390,413,413,401,397,397,409,419,424,428,430,424,433,456,459,446,441,439,454,460,457,451,444,437,443,471,469,454,444,436),dim=c(1,131),dimnames=list(c('Werkloosheid'),1:131)) > y <- array(NA,dim=c(1,131),dimnames=list(c('Werkloosheid'),1:131)) > 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 Werkloosheid M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 377 1 0 0 0 0 0 0 0 0 0 0 1 2 370 0 1 0 0 0 0 0 0 0 0 0 2 3 358 0 0 1 0 0 0 0 0 0 0 0 3 4 357 0 0 0 1 0 0 0 0 0 0 0 4 5 349 0 0 0 0 1 0 0 0 0 0 0 5 6 348 0 0 0 0 0 1 0 0 0 0 0 6 7 369 0 0 0 0 0 0 1 0 0 0 0 7 8 381 0 0 0 0 0 0 0 1 0 0 0 8 9 368 0 0 0 0 0 0 0 0 1 0 0 9 10 361 0 0 0 0 0 0 0 0 0 1 0 10 11 351 0 0 0 0 0 0 0 0 0 0 1 11 12 351 0 0 0 0 0 0 0 0 0 0 0 12 13 358 1 0 0 0 0 0 0 0 0 0 0 13 14 354 0 1 0 0 0 0 0 0 0 0 0 14 15 347 0 0 1 0 0 0 0 0 0 0 0 15 16 345 0 0 0 1 0 0 0 0 0 0 0 16 17 343 0 0 0 0 1 0 0 0 0 0 0 17 18 340 0 0 0 0 0 1 0 0 0 0 0 18 19 362 0 0 0 0 0 0 1 0 0 0 0 19 20 370 0 0 0 0 0 0 0 1 0 0 0 20 21 373 0 0 0 0 0 0 0 0 1 0 0 21 22 371 0 0 0 0 0 0 0 0 0 1 0 22 23 354 0 0 0 0 0 0 0 0 0 0 1 23 24 357 0 0 0 0 0 0 0 0 0 0 0 24 25 363 1 0 0 0 0 0 0 0 0 0 0 25 26 364 0 1 0 0 0 0 0 0 0 0 0 26 27 363 0 0 1 0 0 0 0 0 0 0 0 27 28 358 0 0 0 1 0 0 0 0 0 0 0 28 29 357 0 0 0 0 1 0 0 0 0 0 0 29 30 357 0 0 0 0 0 1 0 0 0 0 0 30 31 380 0 0 0 0 0 0 1 0 0 0 0 31 32 378 0 0 0 0 0 0 0 1 0 0 0 32 33 376 0 0 0 0 0 0 0 0 1 0 0 33 34 380 0 0 0 0 0 0 0 0 0 1 0 34 35 379 0 0 0 0 0 0 0 0 0 0 1 35 36 384 0 0 0 0 0 0 0 0 0 0 0 36 37 392 1 0 0 0 0 0 0 0 0 0 0 37 38 394 0 1 0 0 0 0 0 0 0 0 0 38 39 392 0 0 1 0 0 0 0 0 0 0 0 39 40 396 0 0 0 1 0 0 0 0 0 0 0 40 41 392 0 0 0 0 1 0 0 0 0 0 0 41 42 396 0 0 0 0 0 1 0 0 0 0 0 42 43 419 0 0 0 0 0 0 1 0 0 0 0 43 44 421 0 0 0 0 0 0 0 1 0 0 0 44 45 420 0 0 0 0 0 0 0 0 1 0 0 45 46 418 0 0 0 0 0 0 0 0 0 1 0 46 47 410 0 0 0 0 0 0 0 0 0 0 1 47 48 418 0 0 0 0 0 0 0 0 0 0 0 48 49 426 1 0 0 0 0 0 0 0 0 0 0 49 50 428 0 1 0 0 0 0 0 0 0 0 0 50 51 430 0 0 1 0 0 0 0 0 0 0 0 51 52 424 0 0 0 1 0 0 0 0 0 0 0 52 53 423 0 0 0 0 1 0 0 0 0 0 0 53 54 427 0 0 0 0 0 1 0 0 0 0 0 54 55 441 0 0 0 0 0 0 1 0 0 0 0 55 56 449 0 0 0 0 0 0 0 1 0 0 0 56 57 452 0 0 0 0 0 0 0 0 1 0 0 57 58 462 0 0 0 0 0 0 0 0 0 1 0 58 59 455 0 0 0 0 0 0 0 0 0 0 1 59 60 461 0 0 0 0 0 0 0 0 0 0 0 60 61 461 1 0 0 0 0 0 0 0 0 0 0 61 62 463 0 1 0 0 0 0 0 0 0 0 0 62 63 462 0 0 1 0 0 0 0 0 0 0 0 63 64 456 0 0 0 1 0 0 0 0 0 0 0 64 65 455 0 0 0 0 1 0 0 0 0 0 0 65 66 456 0 0 0 0 0 1 0 0 0 0 0 66 67 472 0 0 0 0 0 0 1 0 0 0 0 67 68 472 0 0 0 0 0 0 0 1 0 0 0 68 69 471 0 0 0 0 0 0 0 0 1 0 0 69 70 465 0 0 0 0 0 0 0 0 0 1 0 70 71 459 0 0 0 0 0 0 0 0 0 0 1 71 72 465 0 0 0 0 0 0 0 0 0 0 0 72 73 468 1 0 0 0 0 0 0 0 0 0 0 73 74 467 0 1 0 0 0 0 0 0 0 0 0 74 75 463 0 0 1 0 0 0 0 0 0 0 0 75 76 460 0 0 0 1 0 0 0 0 0 0 0 76 77 462 0 0 0 0 1 0 0 0 0 0 0 77 78 461 0 0 0 0 0 1 0 0 0 0 0 78 79 476 0 0 0 0 0 0 1 0 0 0 0 79 80 476 0 0 0 0 0 0 0 1 0 0 0 80 81 471 0 0 0 0 0 0 0 0 1 0 0 81 82 453 0 0 0 0 0 0 0 0 0 1 0 82 83 443 0 0 0 0 0 0 0 0 0 0 1 83 84 442 0 0 0 0 0 0 0 0 0 0 0 84 85 444 1 0 0 0 0 0 0 0 0 0 0 85 86 438 0 1 0 0 0 0 0 0 0 0 0 86 87 427 0 0 1 0 0 0 0 0 0 0 0 87 88 424 0 0 0 1 0 0 0 0 0 0 0 88 89 416 0 0 0 0 1 0 0 0 0 0 0 89 90 406 0 0 0 0 0 1 0 0 0 0 0 90 91 431 0 0 0 0 0 0 1 0 0 0 0 91 92 434 0 0 0 0 0 0 0 1 0 0 0 92 93 418 0 0 0 0 0 0 0 0 1 0 0 93 94 412 0 0 0 0 0 0 0 0 0 1 0 94 95 404 0 0 0 0 0 0 0 0 0 0 1 95 96 409 0 0 0 0 0 0 0 0 0 0 0 96 97 412 1 0 0 0 0 0 0 0 0 0 0 97 98 406 0 1 0 0 0 0 0 0 0 0 0 98 99 398 0 0 1 0 0 0 0 0 0 0 0 99 100 397 0 0 0 1 0 0 0 0 0 0 0 100 101 385 0 0 0 0 1 0 0 0 0 0 0 101 102 390 0 0 0 0 0 1 0 0 0 0 0 102 103 413 0 0 0 0 0 0 1 0 0 0 0 103 104 413 0 0 0 0 0 0 0 1 0 0 0 104 105 401 0 0 0 0 0 0 0 0 1 0 0 105 106 397 0 0 0 0 0 0 0 0 0 1 0 106 107 397 0 0 0 0 0 0 0 0 0 0 1 107 108 409 0 0 0 0 0 0 0 0 0 0 0 108 109 419 1 0 0 0 0 0 0 0 0 0 0 109 110 424 0 1 0 0 0 0 0 0 0 0 0 110 111 428 0 0 1 0 0 0 0 0 0 0 0 111 112 430 0 0 0 1 0 0 0 0 0 0 0 112 113 424 0 0 0 0 1 0 0 0 0 0 0 113 114 433 0 0 0 0 0 1 0 0 0 0 0 114 115 456 0 0 0 0 0 0 1 0 0 0 0 115 116 459 0 0 0 0 0 0 0 1 0 0 0 116 117 446 0 0 0 0 0 0 0 0 1 0 0 117 118 441 0 0 0 0 0 0 0 0 0 1 0 118 119 439 0 0 0 0 0 0 0 0 0 0 1 119 120 454 0 0 0 0 0 0 0 0 0 0 0 120 121 460 1 0 0 0 0 0 0 0 0 0 0 121 122 457 0 1 0 0 0 0 0 0 0 0 0 122 123 451 0 0 1 0 0 0 0 0 0 0 0 123 124 444 0 0 0 1 0 0 0 0 0 0 0 124 125 437 0 0 0 0 1 0 0 0 0 0 0 125 126 443 0 0 0 0 0 1 0 0 0 0 0 126 127 471 0 0 0 0 0 0 1 0 0 0 0 127 128 469 0 0 0 0 0 0 0 1 0 0 0 128 129 454 0 0 0 0 0 0 0 0 1 0 0 129 130 444 0 0 0 0 0 0 0 0 0 1 0 130 131 436 0 0 0 0 0 0 0 0 0 0 1 131 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) M1 M2 M3 M4 M5 368.5660 4.8814 2.8142 -2.0712 -5.3202 -10.3874 M6 M7 M8 M9 M10 M11 -9.8182 10.6601 12.8656 5.6166 0.7313 -6.9723 t 0.7035 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -47.055 -22.672 -6.316 22.227 51.897 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 368.56596 10.36499 35.559 <2e-16 *** M1 4.88137 12.89644 0.379 0.706 M2 2.81418 12.89480 0.218 0.828 M3 -2.07118 12.89353 -0.161 0.873 M4 -5.32018 12.89263 -0.413 0.681 M5 -10.38736 12.89208 -0.806 0.422 M6 -9.81818 12.89190 -0.762 0.448 M7 10.66009 12.89208 0.827 0.410 M8 12.86564 12.89263 0.998 0.320 M9 5.61663 12.89353 0.436 0.664 M10 0.73127 12.89480 0.057 0.955 M11 -6.97228 12.89644 -0.541 0.590 t 0.70355 0.06839 10.287 <2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 29.51 on 118 degrees of freedom Multiple R-squared: 0.4928, Adjusted R-squared: 0.4413 F-statistic: 9.556 on 12 and 118 DF, p-value: 9.713e-13 > 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,] 8.741514e-04 1.748303e-03 9.991258e-01 [2,] 3.585845e-04 7.171691e-04 9.996414e-01 [3,] 5.716350e-05 1.143270e-04 9.999428e-01 [4,] 9.864857e-06 1.972971e-05 9.999901e-01 [5,] 1.052225e-06 2.104451e-06 9.999989e-01 [6,] 5.084617e-06 1.016923e-05 9.999949e-01 [7,] 1.313622e-05 2.627245e-05 9.999869e-01 [8,] 5.220771e-06 1.044154e-05 9.999948e-01 [9,] 2.792278e-06 5.584556e-06 9.999972e-01 [10,] 7.387533e-07 1.477507e-06 9.999993e-01 [11,] 3.264073e-07 6.528147e-07 9.999997e-01 [12,] 4.320553e-07 8.641107e-07 9.999996e-01 [13,] 2.357272e-07 4.714544e-07 9.999998e-01 [14,] 1.834942e-07 3.669885e-07 9.999998e-01 [15,] 1.615351e-07 3.230701e-07 9.999998e-01 [16,] 1.462077e-07 2.924155e-07 9.999999e-01 [17,] 6.013603e-08 1.202721e-07 9.999999e-01 [18,] 2.589588e-08 5.179176e-08 1.000000e+00 [19,] 1.993360e-08 3.986720e-08 1.000000e+00 [20,] 9.134888e-08 1.826978e-07 9.999999e-01 [21,] 4.267992e-07 8.535985e-07 9.999996e-01 [22,] 5.998612e-07 1.199722e-06 9.999994e-01 [23,] 1.200269e-06 2.400537e-06 9.999988e-01 [24,] 3.037678e-06 6.075356e-06 9.999970e-01 [25,] 1.051277e-05 2.102554e-05 9.999895e-01 [26,] 2.305636e-05 4.611272e-05 9.999769e-01 [27,] 6.232470e-05 1.246494e-04 9.999377e-01 [28,] 1.334797e-04 2.669595e-04 9.998665e-01 [29,] 1.830900e-04 3.661800e-04 9.998169e-01 [30,] 2.508891e-04 5.017782e-04 9.997491e-01 [31,] 2.980787e-04 5.961575e-04 9.997019e-01 [32,] 3.718873e-04 7.437745e-04 9.996281e-01 [33,] 5.603544e-04 1.120709e-03 9.994396e-01 [34,] 5.325611e-04 1.065122e-03 9.994674e-01 [35,] 5.480280e-04 1.096056e-03 9.994520e-01 [36,] 7.035337e-04 1.407067e-03 9.992965e-01 [37,] 6.874369e-04 1.374874e-03 9.993126e-01 [38,] 6.858545e-04 1.371709e-03 9.993141e-01 [39,] 7.524504e-04 1.504901e-03 9.992475e-01 [40,] 6.579847e-04 1.315969e-03 9.993420e-01 [41,] 5.661169e-04 1.132234e-03 9.994339e-01 [42,] 5.278939e-04 1.055788e-03 9.994721e-01 [43,] 8.024730e-04 1.604946e-03 9.991975e-01 [44,] 1.172733e-03 2.345465e-03 9.988273e-01 [45,] 1.685577e-03 3.371154e-03 9.983144e-01 [46,] 1.280191e-03 2.560381e-03 9.987198e-01 [47,] 1.043676e-03 2.087353e-03 9.989563e-01 [48,] 9.249743e-04 1.849949e-03 9.990750e-01 [49,] 7.012710e-04 1.402542e-03 9.992987e-01 [50,] 5.768651e-04 1.153730e-03 9.994231e-01 [51,] 4.669582e-04 9.339164e-04 9.995330e-01 [52,] 3.198080e-04 6.396161e-04 9.996802e-01 [53,] 2.016910e-04 4.033820e-04 9.997983e-01 [54,] 1.470119e-04 2.940238e-04 9.998530e-01 [55,] 1.128332e-04 2.256663e-04 9.998872e-01 [56,] 8.937843e-05 1.787569e-04 9.999106e-01 [57,] 7.695866e-05 1.539173e-04 9.999230e-01 [58,] 6.854701e-05 1.370940e-04 9.999315e-01 [59,] 6.720150e-05 1.344030e-04 9.999328e-01 [60,] 7.398428e-05 1.479686e-04 9.999260e-01 [61,] 8.742079e-05 1.748416e-04 9.999126e-01 [62,] 1.746642e-04 3.493284e-04 9.998253e-01 [63,] 3.734238e-04 7.468476e-04 9.996266e-01 [64,] 6.524586e-04 1.304917e-03 9.993475e-01 [65,] 1.411657e-03 2.823313e-03 9.985883e-01 [66,] 6.811956e-03 1.362391e-02 9.931880e-01 [67,] 3.186876e-02 6.373751e-02 9.681312e-01 [68,] 1.150135e-01 2.300270e-01 8.849865e-01 [69,] 2.533385e-01 5.066771e-01 7.466615e-01 [70,] 4.782028e-01 9.564056e-01 5.217972e-01 [71,] 7.058455e-01 5.883090e-01 2.941545e-01 [72,] 8.568525e-01 2.862950e-01 1.431475e-01 [73,] 9.412218e-01 1.175564e-01 5.877818e-02 [74,] 9.846168e-01 3.076632e-02 1.538316e-02 [75,] 9.936232e-01 1.275350e-02 6.376751e-03 [76,] 9.969882e-01 6.023585e-03 3.011793e-03 [77,] 9.989671e-01 2.065779e-03 1.032890e-03 [78,] 9.997506e-01 4.988230e-04 2.494115e-04 [79,] 9.999652e-01 6.952426e-05 3.476213e-05 [80,] 9.999956e-01 8.762608e-06 4.381304e-06 [81,] 9.999969e-01 6.144579e-06 3.072290e-06 [82,] 9.999970e-01 6.071836e-06 3.035918e-06 [83,] 9.999957e-01 8.552970e-06 4.276485e-06 [84,] 9.999932e-01 1.357126e-05 6.785631e-06 [85,] 9.999878e-01 2.434236e-05 1.217118e-05 [86,] 9.999809e-01 3.815943e-05 1.907972e-05 [87,] 9.999693e-01 6.131197e-05 3.065598e-05 [88,] 9.999560e-01 8.800921e-05 4.400461e-05 [89,] 9.999451e-01 1.097468e-04 5.487340e-05 [90,] 9.999338e-01 1.323991e-04 6.619957e-05 [91,] 9.999095e-01 1.809273e-04 9.046364e-05 [92,] 9.998389e-01 3.221402e-04 1.610701e-04 [93,] 9.999274e-01 1.452445e-04 7.262226e-05 [94,] 9.999799e-01 4.010247e-05 2.005124e-05 [95,] 9.999944e-01 1.126120e-05 5.630599e-06 [96,] 9.999943e-01 1.146641e-05 5.733204e-06 [97,] 9.999700e-01 5.993871e-05 2.996935e-05 [98,] 9.998377e-01 3.246978e-04 1.623489e-04 [99,] 9.988946e-01 2.210708e-03 1.105354e-03 [100,] 9.969621e-01 6.075710e-03 3.037855e-03 > postscript(file="/var/www/html/freestat/rcomp/tmp/1lu421293012842.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/2el3n1293012842.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/3el3n1293012842.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/4el3n1293012842.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5el3n1293012842.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 = 131 Frequency = 1 1 2 3 4 5 6 2.8491296 -2.7872340 -10.6054159 -9.0599613 -12.6963250 -14.9690522 7 8 9 10 11 12 -15.1508704 -6.0599613 -12.5145068 -15.3326886 -18.3326886 -26.0085106 13 14 15 16 17 18 -24.5934236 -27.2297872 -30.0479691 -29.5025145 -27.1388781 -31.4116054 19 20 21 22 23 24 -30.5934236 -25.5025145 -15.9570600 -13.7752418 -23.7752418 -28.4510638 25 26 27 28 29 30 -28.0359768 -25.6723404 -22.4905222 -24.9450677 -21.5814313 -22.8541586 31 32 33 34 35 36 -21.0359768 -25.9450677 -21.3996132 -13.2177950 -7.2177950 -9.8936170 37 38 39 40 41 42 -7.4785300 -4.1148936 -1.9330754 4.6123791 4.9760155 7.7032882 43 44 45 46 47 48 9.5214700 8.6123791 14.1578337 16.3396518 15.3396518 15.6638298 49 50 51 52 53 54 18.0789168 21.4425532 27.6243714 24.1698259 27.5334623 30.2607350 55 56 57 58 59 60 23.0789168 28.1698259 37.7152805 51.8970986 51.8970986 50.2212766 61 62 63 64 65 66 44.6363636 48.0000000 51.1818182 47.7272727 51.0909091 50.8181818 67 68 69 70 71 72 45.6363636 42.7272727 48.2727273 46.4545455 47.4545455 45.7787234 73 74 75 76 77 78 43.1938104 43.5574468 43.7392650 43.2847195 49.6483559 47.3756286 79 80 81 82 83 84 41.1938104 38.2847195 39.8301741 26.0119923 23.0119923 14.3361702 85 86 87 88 89 90 10.7512573 6.1148936 -0.7032882 -1.1578337 -4.7941973 -16.0669246 91 92 93 94 95 96 -12.2487427 -12.1578337 -21.6123791 -23.4305609 -24.4305609 -27.1063830 97 98 99 100 101 102 -29.6912959 -34.3276596 -38.1458414 -36.6003868 -44.2367505 -40.5094778 103 104 105 106 107 108 -38.6912959 -41.6003868 -47.0549323 -46.8731141 -39.8731141 -35.5489362 109 110 111 112 113 114 -31.1338491 -24.7702128 -16.5883946 -12.0429400 -13.6793037 -5.9520309 115 116 117 118 119 120 -4.1338491 -4.0429400 -10.4974855 -11.3156673 -6.3156673 1.0085106 121 122 123 124 125 126 1.4235977 -0.2127660 -2.0309478 -6.4854932 -9.1218569 -4.3945841 127 128 129 130 131 2.4235977 -2.4854932 -10.9400387 -16.7582205 -17.7582205 > postscript(file="/var/www/html/freestat/rcomp/tmp/6pd381293012842.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 = 131 Frequency = 1 lag(myerror, k = 1) myerror 0 2.8491296 NA 1 -2.7872340 2.8491296 2 -10.6054159 -2.7872340 3 -9.0599613 -10.6054159 4 -12.6963250 -9.0599613 5 -14.9690522 -12.6963250 6 -15.1508704 -14.9690522 7 -6.0599613 -15.1508704 8 -12.5145068 -6.0599613 9 -15.3326886 -12.5145068 10 -18.3326886 -15.3326886 11 -26.0085106 -18.3326886 12 -24.5934236 -26.0085106 13 -27.2297872 -24.5934236 14 -30.0479691 -27.2297872 15 -29.5025145 -30.0479691 16 -27.1388781 -29.5025145 17 -31.4116054 -27.1388781 18 -30.5934236 -31.4116054 19 -25.5025145 -30.5934236 20 -15.9570600 -25.5025145 21 -13.7752418 -15.9570600 22 -23.7752418 -13.7752418 23 -28.4510638 -23.7752418 24 -28.0359768 -28.4510638 25 -25.6723404 -28.0359768 26 -22.4905222 -25.6723404 27 -24.9450677 -22.4905222 28 -21.5814313 -24.9450677 29 -22.8541586 -21.5814313 30 -21.0359768 -22.8541586 31 -25.9450677 -21.0359768 32 -21.3996132 -25.9450677 33 -13.2177950 -21.3996132 34 -7.2177950 -13.2177950 35 -9.8936170 -7.2177950 36 -7.4785300 -9.8936170 37 -4.1148936 -7.4785300 38 -1.9330754 -4.1148936 39 4.6123791 -1.9330754 40 4.9760155 4.6123791 41 7.7032882 4.9760155 42 9.5214700 7.7032882 43 8.6123791 9.5214700 44 14.1578337 8.6123791 45 16.3396518 14.1578337 46 15.3396518 16.3396518 47 15.6638298 15.3396518 48 18.0789168 15.6638298 49 21.4425532 18.0789168 50 27.6243714 21.4425532 51 24.1698259 27.6243714 52 27.5334623 24.1698259 53 30.2607350 27.5334623 54 23.0789168 30.2607350 55 28.1698259 23.0789168 56 37.7152805 28.1698259 57 51.8970986 37.7152805 58 51.8970986 51.8970986 59 50.2212766 51.8970986 60 44.6363636 50.2212766 61 48.0000000 44.6363636 62 51.1818182 48.0000000 63 47.7272727 51.1818182 64 51.0909091 47.7272727 65 50.8181818 51.0909091 66 45.6363636 50.8181818 67 42.7272727 45.6363636 68 48.2727273 42.7272727 69 46.4545455 48.2727273 70 47.4545455 46.4545455 71 45.7787234 47.4545455 72 43.1938104 45.7787234 73 43.5574468 43.1938104 74 43.7392650 43.5574468 75 43.2847195 43.7392650 76 49.6483559 43.2847195 77 47.3756286 49.6483559 78 41.1938104 47.3756286 79 38.2847195 41.1938104 80 39.8301741 38.2847195 81 26.0119923 39.8301741 82 23.0119923 26.0119923 83 14.3361702 23.0119923 84 10.7512573 14.3361702 85 6.1148936 10.7512573 86 -0.7032882 6.1148936 87 -1.1578337 -0.7032882 88 -4.7941973 -1.1578337 89 -16.0669246 -4.7941973 90 -12.2487427 -16.0669246 91 -12.1578337 -12.2487427 92 -21.6123791 -12.1578337 93 -23.4305609 -21.6123791 94 -24.4305609 -23.4305609 95 -27.1063830 -24.4305609 96 -29.6912959 -27.1063830 97 -34.3276596 -29.6912959 98 -38.1458414 -34.3276596 99 -36.6003868 -38.1458414 100 -44.2367505 -36.6003868 101 -40.5094778 -44.2367505 102 -38.6912959 -40.5094778 103 -41.6003868 -38.6912959 104 -47.0549323 -41.6003868 105 -46.8731141 -47.0549323 106 -39.8731141 -46.8731141 107 -35.5489362 -39.8731141 108 -31.1338491 -35.5489362 109 -24.7702128 -31.1338491 110 -16.5883946 -24.7702128 111 -12.0429400 -16.5883946 112 -13.6793037 -12.0429400 113 -5.9520309 -13.6793037 114 -4.1338491 -5.9520309 115 -4.0429400 -4.1338491 116 -10.4974855 -4.0429400 117 -11.3156673 -10.4974855 118 -6.3156673 -11.3156673 119 1.0085106 -6.3156673 120 1.4235977 1.0085106 121 -0.2127660 1.4235977 122 -2.0309478 -0.2127660 123 -6.4854932 -2.0309478 124 -9.1218569 -6.4854932 125 -4.3945841 -9.1218569 126 2.4235977 -4.3945841 127 -2.4854932 2.4235977 128 -10.9400387 -2.4854932 129 -16.7582205 -10.9400387 130 -17.7582205 -16.7582205 131 NA -17.7582205 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -2.7872340 2.8491296 [2,] -10.6054159 -2.7872340 [3,] -9.0599613 -10.6054159 [4,] -12.6963250 -9.0599613 [5,] -14.9690522 -12.6963250 [6,] -15.1508704 -14.9690522 [7,] -6.0599613 -15.1508704 [8,] -12.5145068 -6.0599613 [9,] -15.3326886 -12.5145068 [10,] -18.3326886 -15.3326886 [11,] -26.0085106 -18.3326886 [12,] -24.5934236 -26.0085106 [13,] -27.2297872 -24.5934236 [14,] -30.0479691 -27.2297872 [15,] -29.5025145 -30.0479691 [16,] -27.1388781 -29.5025145 [17,] -31.4116054 -27.1388781 [18,] -30.5934236 -31.4116054 [19,] -25.5025145 -30.5934236 [20,] -15.9570600 -25.5025145 [21,] -13.7752418 -15.9570600 [22,] -23.7752418 -13.7752418 [23,] -28.4510638 -23.7752418 [24,] -28.0359768 -28.4510638 [25,] -25.6723404 -28.0359768 [26,] -22.4905222 -25.6723404 [27,] -24.9450677 -22.4905222 [28,] -21.5814313 -24.9450677 [29,] -22.8541586 -21.5814313 [30,] -21.0359768 -22.8541586 [31,] -25.9450677 -21.0359768 [32,] -21.3996132 -25.9450677 [33,] -13.2177950 -21.3996132 [34,] -7.2177950 -13.2177950 [35,] -9.8936170 -7.2177950 [36,] -7.4785300 -9.8936170 [37,] -4.1148936 -7.4785300 [38,] -1.9330754 -4.1148936 [39,] 4.6123791 -1.9330754 [40,] 4.9760155 4.6123791 [41,] 7.7032882 4.9760155 [42,] 9.5214700 7.7032882 [43,] 8.6123791 9.5214700 [44,] 14.1578337 8.6123791 [45,] 16.3396518 14.1578337 [46,] 15.3396518 16.3396518 [47,] 15.6638298 15.3396518 [48,] 18.0789168 15.6638298 [49,] 21.4425532 18.0789168 [50,] 27.6243714 21.4425532 [51,] 24.1698259 27.6243714 [52,] 27.5334623 24.1698259 [53,] 30.2607350 27.5334623 [54,] 23.0789168 30.2607350 [55,] 28.1698259 23.0789168 [56,] 37.7152805 28.1698259 [57,] 51.8970986 37.7152805 [58,] 51.8970986 51.8970986 [59,] 50.2212766 51.8970986 [60,] 44.6363636 50.2212766 [61,] 48.0000000 44.6363636 [62,] 51.1818182 48.0000000 [63,] 47.7272727 51.1818182 [64,] 51.0909091 47.7272727 [65,] 50.8181818 51.0909091 [66,] 45.6363636 50.8181818 [67,] 42.7272727 45.6363636 [68,] 48.2727273 42.7272727 [69,] 46.4545455 48.2727273 [70,] 47.4545455 46.4545455 [71,] 45.7787234 47.4545455 [72,] 43.1938104 45.7787234 [73,] 43.5574468 43.1938104 [74,] 43.7392650 43.5574468 [75,] 43.2847195 43.7392650 [76,] 49.6483559 43.2847195 [77,] 47.3756286 49.6483559 [78,] 41.1938104 47.3756286 [79,] 38.2847195 41.1938104 [80,] 39.8301741 38.2847195 [81,] 26.0119923 39.8301741 [82,] 23.0119923 26.0119923 [83,] 14.3361702 23.0119923 [84,] 10.7512573 14.3361702 [85,] 6.1148936 10.7512573 [86,] -0.7032882 6.1148936 [87,] -1.1578337 -0.7032882 [88,] -4.7941973 -1.1578337 [89,] -16.0669246 -4.7941973 [90,] -12.2487427 -16.0669246 [91,] -12.1578337 -12.2487427 [92,] -21.6123791 -12.1578337 [93,] -23.4305609 -21.6123791 [94,] -24.4305609 -23.4305609 [95,] -27.1063830 -24.4305609 [96,] -29.6912959 -27.1063830 [97,] -34.3276596 -29.6912959 [98,] -38.1458414 -34.3276596 [99,] -36.6003868 -38.1458414 [100,] -44.2367505 -36.6003868 [101,] -40.5094778 -44.2367505 [102,] -38.6912959 -40.5094778 [103,] -41.6003868 -38.6912959 [104,] -47.0549323 -41.6003868 [105,] -46.8731141 -47.0549323 [106,] -39.8731141 -46.8731141 [107,] -35.5489362 -39.8731141 [108,] -31.1338491 -35.5489362 [109,] -24.7702128 -31.1338491 [110,] -16.5883946 -24.7702128 [111,] -12.0429400 -16.5883946 [112,] -13.6793037 -12.0429400 [113,] -5.9520309 -13.6793037 [114,] -4.1338491 -5.9520309 [115,] -4.0429400 -4.1338491 [116,] -10.4974855 -4.0429400 [117,] -11.3156673 -10.4974855 [118,] -6.3156673 -11.3156673 [119,] 1.0085106 -6.3156673 [120,] 1.4235977 1.0085106 [121,] -0.2127660 1.4235977 [122,] -2.0309478 -0.2127660 [123,] -6.4854932 -2.0309478 [124,] -9.1218569 -6.4854932 [125,] -4.3945841 -9.1218569 [126,] 2.4235977 -4.3945841 [127,] -2.4854932 2.4235977 [128,] -10.9400387 -2.4854932 [129,] -16.7582205 -10.9400387 [130,] -17.7582205 -16.7582205 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -2.7872340 2.8491296 2 -10.6054159 -2.7872340 3 -9.0599613 -10.6054159 4 -12.6963250 -9.0599613 5 -14.9690522 -12.6963250 6 -15.1508704 -14.9690522 7 -6.0599613 -15.1508704 8 -12.5145068 -6.0599613 9 -15.3326886 -12.5145068 10 -18.3326886 -15.3326886 11 -26.0085106 -18.3326886 12 -24.5934236 -26.0085106 13 -27.2297872 -24.5934236 14 -30.0479691 -27.2297872 15 -29.5025145 -30.0479691 16 -27.1388781 -29.5025145 17 -31.4116054 -27.1388781 18 -30.5934236 -31.4116054 19 -25.5025145 -30.5934236 20 -15.9570600 -25.5025145 21 -13.7752418 -15.9570600 22 -23.7752418 -13.7752418 23 -28.4510638 -23.7752418 24 -28.0359768 -28.4510638 25 -25.6723404 -28.0359768 26 -22.4905222 -25.6723404 27 -24.9450677 -22.4905222 28 -21.5814313 -24.9450677 29 -22.8541586 -21.5814313 30 -21.0359768 -22.8541586 31 -25.9450677 -21.0359768 32 -21.3996132 -25.9450677 33 -13.2177950 -21.3996132 34 -7.2177950 -13.2177950 35 -9.8936170 -7.2177950 36 -7.4785300 -9.8936170 37 -4.1148936 -7.4785300 38 -1.9330754 -4.1148936 39 4.6123791 -1.9330754 40 4.9760155 4.6123791 41 7.7032882 4.9760155 42 9.5214700 7.7032882 43 8.6123791 9.5214700 44 14.1578337 8.6123791 45 16.3396518 14.1578337 46 15.3396518 16.3396518 47 15.6638298 15.3396518 48 18.0789168 15.6638298 49 21.4425532 18.0789168 50 27.6243714 21.4425532 51 24.1698259 27.6243714 52 27.5334623 24.1698259 53 30.2607350 27.5334623 54 23.0789168 30.2607350 55 28.1698259 23.0789168 56 37.7152805 28.1698259 57 51.8970986 37.7152805 58 51.8970986 51.8970986 59 50.2212766 51.8970986 60 44.6363636 50.2212766 61 48.0000000 44.6363636 62 51.1818182 48.0000000 63 47.7272727 51.1818182 64 51.0909091 47.7272727 65 50.8181818 51.0909091 66 45.6363636 50.8181818 67 42.7272727 45.6363636 68 48.2727273 42.7272727 69 46.4545455 48.2727273 70 47.4545455 46.4545455 71 45.7787234 47.4545455 72 43.1938104 45.7787234 73 43.5574468 43.1938104 74 43.7392650 43.5574468 75 43.2847195 43.7392650 76 49.6483559 43.2847195 77 47.3756286 49.6483559 78 41.1938104 47.3756286 79 38.2847195 41.1938104 80 39.8301741 38.2847195 81 26.0119923 39.8301741 82 23.0119923 26.0119923 83 14.3361702 23.0119923 84 10.7512573 14.3361702 85 6.1148936 10.7512573 86 -0.7032882 6.1148936 87 -1.1578337 -0.7032882 88 -4.7941973 -1.1578337 89 -16.0669246 -4.7941973 90 -12.2487427 -16.0669246 91 -12.1578337 -12.2487427 92 -21.6123791 -12.1578337 93 -23.4305609 -21.6123791 94 -24.4305609 -23.4305609 95 -27.1063830 -24.4305609 96 -29.6912959 -27.1063830 97 -34.3276596 -29.6912959 98 -38.1458414 -34.3276596 99 -36.6003868 -38.1458414 100 -44.2367505 -36.6003868 101 -40.5094778 -44.2367505 102 -38.6912959 -40.5094778 103 -41.6003868 -38.6912959 104 -47.0549323 -41.6003868 105 -46.8731141 -47.0549323 106 -39.8731141 -46.8731141 107 -35.5489362 -39.8731141 108 -31.1338491 -35.5489362 109 -24.7702128 -31.1338491 110 -16.5883946 -24.7702128 111 -12.0429400 -16.5883946 112 -13.6793037 -12.0429400 113 -5.9520309 -13.6793037 114 -4.1338491 -5.9520309 115 -4.0429400 -4.1338491 116 -10.4974855 -4.0429400 117 -11.3156673 -10.4974855 118 -6.3156673 -11.3156673 119 1.0085106 -6.3156673 120 1.4235977 1.0085106 121 -0.2127660 1.4235977 122 -2.0309478 -0.2127660 123 -6.4854932 -2.0309478 124 -9.1218569 -6.4854932 125 -4.3945841 -9.1218569 126 2.4235977 -4.3945841 127 -2.4854932 2.4235977 128 -10.9400387 -2.4854932 129 -16.7582205 -10.9400387 130 -17.7582205 -16.7582205 > 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/7hmkb1293012842.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/8hmkb1293012842.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/9hmkb1293012842.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/freestat/rcomp/tmp/10sd1e1293012842.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/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/11vwik1293012842.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/12zwyq1293012842.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/13dowz1293012842.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/14g6vm1293012842.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/152pba1293012842.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/16yz911293012842.tab") + } > > try(system("convert tmp/1lu421293012842.ps tmp/1lu421293012842.png",intern=TRUE)) character(0) > try(system("convert tmp/2el3n1293012842.ps tmp/2el3n1293012842.png",intern=TRUE)) character(0) > try(system("convert tmp/3el3n1293012842.ps tmp/3el3n1293012842.png",intern=TRUE)) character(0) > try(system("convert tmp/4el3n1293012842.ps tmp/4el3n1293012842.png",intern=TRUE)) character(0) > try(system("convert tmp/5el3n1293012842.ps tmp/5el3n1293012842.png",intern=TRUE)) character(0) > try(system("convert tmp/6pd381293012842.ps tmp/6pd381293012842.png",intern=TRUE)) character(0) > try(system("convert tmp/7hmkb1293012842.ps tmp/7hmkb1293012842.png",intern=TRUE)) character(0) > try(system("convert tmp/8hmkb1293012842.ps tmp/8hmkb1293012842.png",intern=TRUE)) character(0) > try(system("convert tmp/9hmkb1293012842.ps tmp/9hmkb1293012842.png",intern=TRUE)) character(0) > try(system("convert tmp/10sd1e1293012842.ps tmp/10sd1e1293012842.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.971 2.558 5.323