R version 2.9.0 (2009-04-17) Copyright (C) 2009 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. 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(24 + ,26 + ,38 + ,23 + ,10 + ,11 + ,25 + ,23 + ,36 + ,15 + ,10 + ,11 + ,30 + ,25 + ,23 + ,25 + ,10 + ,11 + ,19 + ,23 + ,30 + ,18 + ,10 + ,11 + ,22 + ,19 + ,26 + ,21 + ,10 + ,11 + ,22 + ,29 + ,26 + ,19 + ,10 + ,11 + ,25 + ,25 + ,30 + ,15 + ,13 + ,12 + ,23 + ,21 + ,27 + ,22 + ,10 + ,11 + ,17 + ,22 + ,34 + ,19 + ,10 + ,11 + ,21 + ,25 + ,28 + ,20 + ,13 + ,9 + ,19 + ,24 + ,36 + ,26 + ,10 + ,11 + ,19 + ,18 + ,42 + ,26 + ,10 + ,11 + ,15 + ,22 + ,31 + ,21 + ,10 + ,11 + ,23 + ,22 + ,26 + ,19 + ,10 + ,11 + ,27 + ,28 + ,16 + ,19 + ,13 + ,12 + ,14 + ,12 + ,23 + ,19 + ,10 + ,11 + ,23 + ,20 + ,45 + ,28 + ,10 + ,11 + ,19 + ,21 + ,30 + ,27 + ,10 + ,11 + ,18 + ,23 + ,45 + ,18 + ,10 + ,11 + ,20 + ,28 + ,30 + ,19 + ,10 + ,11 + ,23 + ,24 + ,24 + ,24 + ,10 + ,11 + ,25 + ,24 + ,29 + ,21 + ,13 + ,12 + ,19 + ,24 + ,30 + ,22 + ,13 + ,9 + ,24 + ,23 + ,31 + ,25 + ,10 + ,11 + ,25 + ,29 + ,34 + ,15 + ,10 + ,11 + ,26 + ,24 + ,41 + ,34 + ,10 + ,11 + ,29 + ,18 + ,37 + ,23 + ,10 + ,11 + ,32 + ,25 + ,33 + ,19 + ,10 + ,11 + ,29 + ,26 + ,48 + ,15 + ,10 + ,11 + ,28 + ,22 + ,44 + ,15 + ,10 + ,11 + ,17 + ,22 + ,29 + ,17 + ,10 + ,11 + ,28 + ,22 + ,44 + ,30 + ,13 + ,9 + ,26 + ,30 + ,43 + ,28 + ,10 + ,11 + ,25 + ,23 + ,31 + ,23 + ,10 + ,11 + ,14 + ,17 + ,28 + ,23 + ,10 + ,11 + ,25 + ,23 + ,26 + ,21 + ,10 + ,11 + ,26 + ,23 + ,30 + ,18 + ,10 + ,11 + ,20 + ,25 + ,27 + ,19 + ,15 + ,11 + ,18 + ,24 + ,34 + ,24 + ,10 + ,11 + ,32 + ,24 + ,47 + ,15 + ,10 + ,11 + ,25 + ,21 + ,37 + ,24 + ,13 + ,16 + ,21 + ,24 + ,27 + ,20 + ,10 + ,11 + ,20 + ,28 + ,30 + ,20 + ,10 + ,11 + ,30 + ,20 + ,36 + ,44 + ,10 + ,11 + ,24 + ,29 + ,39 + ,20 + ,10 + ,11 + ,26 + ,27 + ,32 + ,20 + ,10 + ,11 + ,24 + ,22 + ,25 + ,20 + ,10 + ,11 + ,22 + ,28 + ,19 + ,11 + ,10 + ,11 + ,14 + ,16 + ,29 + ,21 + ,10 + ,11 + ,24 + ,25 + ,26 + ,21 + ,13 + ,9 + ,24 + ,24 + ,31 + ,19 + ,13 + ,12 + ,24 + ,28 + ,31 + ,21 + ,10 + ,11 + ,24 + ,24 + ,31 + ,17 + ,10 + ,11 + ,22 + ,24 + ,39 + ,19 + ,10 + ,11 + ,27 + ,21 + ,28 + ,21 + ,10 + ,11 + ,19 + ,25 + ,22 + ,16 + ,10 + ,11 + ,25 + ,25 + ,31 + ,19 + ,10 + ,11 + ,20 + ,22 + ,36 + ,19 + ,10 + ,11 + ,21 + ,23 + ,28 + ,16 + ,10 + ,11 + ,27 + ,26 + ,39 + ,24 + ,10 + ,11 + ,25 + ,25 + ,35 + ,21 + ,10 + ,11 + ,20 + ,21 + ,33 + ,20 + ,10 + ,11 + ,21 + ,25 + ,27 + ,19 + ,10 + ,11 + ,22 + ,24 + ,33 + ,23 + ,10 + ,11 + ,23 + ,29 + ,31 + ,18 + ,10 + ,11 + ,25 + ,22 + ,39 + ,19 + ,10 + ,11 + ,25 + ,27 + ,37 + ,23 + ,10 + ,11 + ,17 + ,26 + ,24 + ,19 + ,10 + ,11 + ,25 + ,24 + ,28 + ,26 + ,13 + ,12 + ,19 + ,27 + ,37 + ,13 + ,13 + ,12 + ,20 + ,24 + ,32 + ,23 + ,10 + ,11 + ,26 + ,24 + ,31 + ,16 + ,13 + ,12 + ,23 + ,29 + ,29 + ,17 + ,13 + ,12 + ,27 + ,22 + ,40 + ,30 + ,10 + ,11 + ,17 + ,24 + ,40 + ,22 + ,10 + ,11 + ,19 + ,24 + ,15 + ,14 + ,10 + ,11 + ,17 + ,23 + ,27 + ,14 + ,13 + ,9 + ,22 + ,20 + ,32 + ,21 + ,13 + ,9 + ,21 + ,27 + ,28 + ,21 + ,10 + ,11 + ,32 + ,26 + ,41 + ,33 + ,10 + ,11 + ,21 + ,25 + ,47 + ,23 + ,10 + ,11 + ,21 + ,21 + ,42 + ,30 + ,10 + ,11 + ,18 + ,19 + ,32 + ,21 + ,11 + ,17 + ,23 + ,21 + ,33 + ,25 + ,10 + ,11 + ,20 + ,16 + ,29 + ,29 + ,10 + ,11 + ,20 + ,29 + ,37 + ,21 + ,10 + ,11 + ,17 + ,15 + ,39 + ,16 + ,10 + ,11 + ,18 + ,17 + ,29 + ,17 + ,10 + ,11 + ,19 + ,15 + ,33 + ,23 + ,10 + ,11 + ,15 + ,21 + ,31 + ,18 + ,13 + ,9 + ,14 + ,19 + ,21 + ,19 + ,10 + ,11 + ,18 + ,24 + ,36 + ,28 + ,10 + ,11 + ,35 + ,17 + ,32 + ,29 + ,10 + ,11 + ,29 + ,23 + ,15 + ,19 + ,10 + ,11 + ,25 + ,14 + ,25 + ,25 + ,13 + ,9 + ,20 + ,19 + ,28 + ,15 + ,10 + ,11 + ,22 + ,24 + ,39 + ,24 + ,10 + ,11 + ,13 + ,13 + ,31 + ,12 + ,13 + ,9 + ,26 + ,22 + ,40 + ,11 + ,10 + ,11 + ,17 + ,16 + ,25 + ,19 + ,10 + ,11 + ,25 + ,19 + ,36 + ,25 + ,10 + ,11 + ,20 + ,25 + ,23 + ,12 + ,10 + ,11 + ,19 + ,25 + ,39 + ,15 + ,10 + ,11 + ,21 + ,23 + ,31 + ,25 + ,10 + ,11 + ,22 + ,24 + ,23 + ,14 + ,10 + ,11 + ,24 + ,26 + ,31 + ,19 + ,10 + ,11 + ,21 + ,26 + ,28 + ,23 + ,13 + ,9 + ,26 + ,25 + ,47 + ,19 + ,13 + ,9 + ,16 + ,21 + ,25 + ,20 + ,10 + ,11 + ,23 + ,26 + ,26 + ,16 + ,13 + ,9 + ,18 + ,23 + ,24 + ,13 + ,12 + ,18 + ,21 + ,13 + ,30 + ,22 + ,10 + ,11 + ,21 + ,24 + ,25 + ,21 + ,13 + ,16 + ,23 + ,14 + ,44 + ,18 + ,15 + ,13 + ,21 + ,10 + ,38 + ,44 + ,10 + ,11 + ,21 + ,24 + ,36 + ,12 + ,10 + ,11 + ,23 + ,22 + ,34 + ,28 + ,13 + ,12 + ,27 + ,24 + ,45 + ,17 + ,13 + ,16 + ,21 + ,20 + ,29 + ,18 + ,10 + ,11 + ,10 + ,13 + ,25 + ,21 + ,10 + ,11 + ,20 + ,20 + ,30 + ,24 + ,10 + ,11 + ,26 + ,22 + ,27 + ,20 + ,10 + ,11 + ,24 + ,24 + ,44 + ,24 + ,10 + ,11 + ,24 + ,20 + ,31 + ,33 + ,10 + ,11 + ,22 + ,22 + ,35 + ,25 + ,10 + ,11 + ,17 + ,20 + ,47 + ,35 + ,10 + ,11) + ,dim=c(6 + ,126) + ,dimnames=list(c('PS' + ,'O' + ,'CMD' + ,'PEC' + ,'happiness' + ,'depression') + ,1:126)) > y <- array(NA,dim=c(6,126),dimnames=list(c('PS','O','CMD','PEC','happiness','depression'),1:126)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo 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 PS O CMD PEC happiness depression 1 24 26 38 23 10 11 2 25 23 36 15 10 11 3 30 25 23 25 10 11 4 19 23 30 18 10 11 5 22 19 26 21 10 11 6 22 29 26 19 10 11 7 25 25 30 15 13 12 8 23 21 27 22 10 11 9 17 22 34 19 10 11 10 21 25 28 20 13 9 11 19 24 36 26 10 11 12 19 18 42 26 10 11 13 15 22 31 21 10 11 14 23 22 26 19 10 11 15 27 28 16 19 13 12 16 14 12 23 19 10 11 17 23 20 45 28 10 11 18 19 21 30 27 10 11 19 18 23 45 18 10 11 20 20 28 30 19 10 11 21 23 24 24 24 10 11 22 25 24 29 21 13 12 23 19 24 30 22 13 9 24 24 23 31 25 10 11 25 25 29 34 15 10 11 26 26 24 41 34 10 11 27 29 18 37 23 10 11 28 32 25 33 19 10 11 29 29 26 48 15 10 11 30 28 22 44 15 10 11 31 17 22 29 17 10 11 32 28 22 44 30 13 9 33 26 30 43 28 10 11 34 25 23 31 23 10 11 35 14 17 28 23 10 11 36 25 23 26 21 10 11 37 26 23 30 18 10 11 38 20 25 27 19 15 11 39 18 24 34 24 10 11 40 32 24 47 15 10 11 41 25 21 37 24 13 16 42 21 24 27 20 10 11 43 20 28 30 20 10 11 44 30 20 36 44 10 11 45 24 29 39 20 10 11 46 26 27 32 20 10 11 47 24 22 25 20 10 11 48 22 28 19 11 10 11 49 14 16 29 21 10 11 50 24 25 26 21 13 9 51 24 24 31 19 13 12 52 24 28 31 21 10 11 53 24 24 31 17 10 11 54 22 24 39 19 10 11 55 27 21 28 21 10 11 56 19 25 22 16 10 11 57 25 25 31 19 10 11 58 20 22 36 19 10 11 59 21 23 28 16 10 11 60 27 26 39 24 10 11 61 25 25 35 21 10 11 62 20 21 33 20 10 11 63 21 25 27 19 10 11 64 22 24 33 23 10 11 65 23 29 31 18 10 11 66 25 22 39 19 10 11 67 25 27 37 23 10 11 68 17 26 24 19 10 11 69 25 24 28 26 13 12 70 19 27 37 13 13 12 71 20 24 32 23 10 11 72 26 24 31 16 13 12 73 23 29 29 17 13 12 74 27 22 40 30 10 11 75 17 24 40 22 10 11 76 19 24 15 14 10 11 77 17 23 27 14 13 9 78 22 20 32 21 13 9 79 21 27 28 21 10 11 80 32 26 41 33 10 11 81 21 25 47 23 10 11 82 21 21 42 30 10 11 83 18 19 32 21 11 17 84 23 21 33 25 10 11 85 20 16 29 29 10 11 86 20 29 37 21 10 11 87 17 15 39 16 10 11 88 18 17 29 17 10 11 89 19 15 33 23 10 11 90 15 21 31 18 13 9 91 14 19 21 19 10 11 92 18 24 36 28 10 11 93 35 17 32 29 10 11 94 29 23 15 19 10 11 95 25 14 25 25 13 9 96 20 19 28 15 10 11 97 22 24 39 24 10 11 98 13 13 31 12 13 9 99 26 22 40 11 10 11 100 17 16 25 19 10 11 101 25 19 36 25 10 11 102 20 25 23 12 10 11 103 19 25 39 15 10 11 104 21 23 31 25 10 11 105 22 24 23 14 10 11 106 24 26 31 19 10 11 107 21 26 28 23 13 9 108 26 25 47 19 13 9 109 16 21 25 20 10 11 110 23 26 26 16 13 9 111 18 23 24 13 12 18 112 21 13 30 22 10 11 113 21 24 25 21 13 16 114 23 14 44 18 15 13 115 21 10 38 44 10 11 116 21 24 36 12 10 11 117 23 22 34 28 13 12 118 27 24 45 17 13 16 119 21 20 29 18 10 11 120 10 13 25 21 10 11 121 20 20 30 24 10 11 122 26 22 27 20 10 11 123 24 24 44 24 10 11 124 24 20 31 33 10 11 125 22 22 35 25 10 11 126 17 20 47 35 10 11 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) O CMD PEC happiness depression 2.5618 0.4012 0.1046 0.1864 0.1836 0.1132 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -8.1064 -2.8330 -0.3734 2.3591 13.7844 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2.56179 5.07120 0.505 0.61437 O 0.40122 0.09102 4.408 2.29e-05 *** CMD 0.10459 0.05173 2.022 0.04541 * PEC 0.18639 0.06747 2.763 0.00664 ** happiness 0.18360 0.27042 0.679 0.49847 depression 0.11318 0.26489 0.427 0.66996 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.897 on 120 degrees of freedom Multiple R-squared: 0.2092, Adjusted R-squared: 0.1762 F-statistic: 6.347 on 5 and 120 DF, p-value: 2.903e-05 > 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.81020034 0.37959931 0.18979966 [2,] 0.68612876 0.62774248 0.31387124 [3,] 0.68557499 0.62885001 0.31442501 [4,] 0.56949411 0.86101177 0.43050589 [5,] 0.72508945 0.54982110 0.27491055 [6,] 0.63598767 0.72802466 0.36401233 [7,] 0.56910534 0.86178933 0.43089466 [8,] 0.53296170 0.93407660 0.46703830 [9,] 0.48944929 0.97889858 0.51055071 [10,] 0.44877005 0.89754011 0.55122995 [11,] 0.39549239 0.79098479 0.60450761 [12,] 0.37558745 0.75117489 0.62441255 [13,] 0.30032054 0.60064108 0.69967946 [14,] 0.23717348 0.47434696 0.76282652 [15,] 0.19170075 0.38340149 0.80829925 [16,] 0.15407729 0.30815457 0.84592271 [17,] 0.12971318 0.25942637 0.87028682 [18,] 0.10027236 0.20054471 0.89972764 [19,] 0.37324116 0.74648232 0.62675884 [20,] 0.69711955 0.60576089 0.30288045 [21,] 0.74428665 0.51142670 0.25571335 [22,] 0.78683492 0.42633017 0.21316508 [23,] 0.79148549 0.41702902 0.20851451 [24,] 0.80319608 0.39360784 0.19680392 [25,] 0.76590727 0.46818546 0.23409273 [26,] 0.73698592 0.52602816 0.26301408 [27,] 0.77247981 0.45504039 0.22752019 [28,] 0.76238126 0.47523748 0.23761874 [29,] 0.76949769 0.46100462 0.23050231 [30,] 0.76912589 0.46174821 0.23087411 [31,] 0.80182003 0.39635994 0.19817997 [32,] 0.89998490 0.20003020 0.10001510 [33,] 0.87760164 0.24479672 0.12239836 [34,] 0.84881842 0.30236316 0.15118158 [35,] 0.85142364 0.29715271 0.14857636 [36,] 0.87958134 0.24083731 0.12041866 [37,] 0.85534241 0.28931519 0.14465759 [38,] 0.83345847 0.33308307 0.16654153 [39,] 0.82012580 0.35974840 0.17987420 [40,] 0.78436981 0.43126038 0.21563019 [41,] 0.80441785 0.39116431 0.19558215 [42,] 0.77274599 0.45450802 0.22725401 [43,] 0.73313079 0.53373842 0.26686921 [44,] 0.68842817 0.62314367 0.31157183 [45,] 0.65560940 0.68878120 0.34439060 [46,] 0.61115707 0.77768585 0.38884293 [47,] 0.68048003 0.63903994 0.31951997 [48,] 0.64427674 0.71144652 0.35572326 [49,] 0.61552521 0.76894958 0.38447479 [50,] 0.57613804 0.84772393 0.42386196 [51,] 0.52444136 0.95111728 0.47555864 [52,] 0.49336693 0.98673386 0.50663307 [53,] 0.45400398 0.90800795 0.54599602 [54,] 0.40694345 0.81388690 0.59305655 [55,] 0.36001737 0.72003474 0.63998263 [56,] 0.31501967 0.63003933 0.68498033 [57,] 0.27438761 0.54877523 0.72561239 [58,] 0.25890517 0.51781034 0.74109483 [59,] 0.22177523 0.44355045 0.77822477 [60,] 0.24359893 0.48719787 0.75640107 [61,] 0.20620683 0.41241365 0.79379317 [62,] 0.22351010 0.44702020 0.77648990 [63,] 0.20326911 0.40653822 0.79673089 [64,] 0.20008141 0.40016282 0.79991859 [65,] 0.16834943 0.33669885 0.83165057 [66,] 0.15406839 0.30813678 0.84593161 [67,] 0.20713021 0.41426041 0.79286979 [68,] 0.17086844 0.34173688 0.82913156 [69,] 0.16057979 0.32115959 0.83942021 [70,] 0.13168508 0.26337016 0.86831492 [71,] 0.11180307 0.22360614 0.88819693 [72,] 0.14826140 0.29652280 0.85173860 [73,] 0.14017525 0.28035050 0.85982475 [74,] 0.12393177 0.24786353 0.87606823 [75,] 0.11865019 0.23730038 0.88134981 [76,] 0.09483323 0.18966645 0.90516677 [77,] 0.07338434 0.14676868 0.92661566 [78,] 0.07856709 0.15713419 0.92143291 [79,] 0.06249128 0.12498255 0.93750872 [80,] 0.04728758 0.09457516 0.95271242 [81,] 0.03483564 0.06967128 0.96516436 [82,] 0.05026702 0.10053404 0.94973298 [83,] 0.06198370 0.12396740 0.93801630 [84,] 0.08548351 0.17096702 0.91451649 [85,] 0.61621712 0.76756576 0.38378288 [86,] 0.84256902 0.31486195 0.15743098 [87,] 0.91356495 0.17287009 0.08643505 [88,] 0.88667795 0.22664409 0.11332205 [89,] 0.85799209 0.28401581 0.14200791 [90,] 0.87956477 0.24087045 0.12043523 [91,] 0.89227869 0.21544263 0.10772131 [92,] 0.85715062 0.28569876 0.14284938 [93,] 0.86809390 0.26381221 0.13190610 [94,] 0.82280063 0.35439873 0.17719937 [95,] 0.82267255 0.35465491 0.17732745 [96,] 0.76914140 0.46171719 0.23085860 [97,] 0.72199307 0.55601386 0.27800693 [98,] 0.66810362 0.66379276 0.33189638 [99,] 0.62655025 0.74689950 0.37344975 [100,] 0.54521060 0.90957879 0.45478940 [101,] 0.53565368 0.92869264 0.46434632 [102,] 0.46410910 0.92821821 0.53589090 [103,] 0.39382889 0.78765779 0.60617111 [104,] 0.39039063 0.78078126 0.60960937 [105,] 0.40890992 0.81781984 0.59109008 [106,] 0.54178234 0.91643531 0.45821766 [107,] 0.98762972 0.02474056 0.01237028 [108,] 0.98229828 0.03540344 0.01770172 [109,] 0.93947148 0.12105703 0.06052852 > postscript(file="/var/www/html/rcomp/tmp/1nm3n1292778568.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/rcomp/tmp/2nm3n1292778568.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/rcomp/tmp/3nm3n1292778568.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/rcomp/tmp/4gdkp1292778568.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/rcomp/tmp/5gdkp1292778568.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 = 126 Frequency = 1 1 2 3 4 5 6 -0.33584762 3.56809007 7.26145273 -2.36352790 2.10057200 -1.53890051 7 8 9 10 11 12 2.72920345 2.00714782 -4.56704840 -1.65401413 -4.88337609 -3.10356873 13 14 15 16 17 18 -6.62605019 2.26967011 4.24424525 -2.40431670 -0.59255816 -3.23854971 19 20 21 22 23 24 -4.93237510 -3.55603539 0.74447290 2.11670393 -3.83474062 1.22718297 25 26 27 28 29 30 1.36992345 0.10258990 7.97853719 9.33386829 5.10933918 6.13259594 31 32 33 34 35 36 -3.67132809 3.01236580 -1.39562227 2.59995420 -5.67893011 3.49567450 37 38 39 40 41 42 4.63647210 -2.95659249 -5.30142523 9.01637775 1.47179385 -0.82375407 43 44 45 46 47 48 -3.74242101 4.36658029 -1.08495370 2.44962374 3.18787431 1.08553750 49 50 51 52 53 54 -5.00952432 1.36877988 1.28029554 -0.03339644 2.31704353 -0.89244621 55 56 57 58 59 60 6.08894362 -1.95648690 2.54304792 -1.77622802 0.21842296 2.37317695 61 62 63 64 65 66 1.75191743 -1.24761983 -1.03859282 -1.01044980 -0.87546396 2.91000253 67 68 69 70 71 72 0.36751782 -5.12604776 1.28936566 -4.43260276 -2.90585999 3.83945239 73 74 75 76 77 78 -1.14387547 2.75517093 -6.55619288 -0.45036260 -3.62866187 0.74736286 79 80 81 82 83 84 -2.31840262 5.48652677 -3.87593157 -3.05278432 -3.38962857 0.82045209 85 86 87 88 89 90 -0.50060926 -5.06215969 -1.72226999 -0.66520622 -0.39943043 -5.99011484 91 92 93 94 95 96 -5.00370770 -6.25614733 13.78439693 9.01893369 6.14129534 1.00970608 97 98 99 100 101 102 -1.82437430 -3.66200615 5.29649766 -1.21839383 3.30913139 -0.31553425 103 104 105 106 107 108 -3.54812812 -1.77281703 1.71291889 1.14182355 -2.61439536 1.54516502 109 110 111 112 113 114 -4.41090132 0.89948359 -2.96349951 2.90317337 -1.91764465 2.63888050 115 116 117 118 119 120 -0.83035560 -0.27397745 -0.90849571 2.73610154 0.94473504 -7.38749194 121 122 123 124 125 126 -1.27816848 4.97869468 -0.34732337 0.93977115 -0.78995192 -8.10643711 > postscript(file="/var/www/html/rcomp/tmp/6gdkp1292778568.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 = 126 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.33584762 NA 1 3.56809007 -0.33584762 2 7.26145273 3.56809007 3 -2.36352790 7.26145273 4 2.10057200 -2.36352790 5 -1.53890051 2.10057200 6 2.72920345 -1.53890051 7 2.00714782 2.72920345 8 -4.56704840 2.00714782 9 -1.65401413 -4.56704840 10 -4.88337609 -1.65401413 11 -3.10356873 -4.88337609 12 -6.62605019 -3.10356873 13 2.26967011 -6.62605019 14 4.24424525 2.26967011 15 -2.40431670 4.24424525 16 -0.59255816 -2.40431670 17 -3.23854971 -0.59255816 18 -4.93237510 -3.23854971 19 -3.55603539 -4.93237510 20 0.74447290 -3.55603539 21 2.11670393 0.74447290 22 -3.83474062 2.11670393 23 1.22718297 -3.83474062 24 1.36992345 1.22718297 25 0.10258990 1.36992345 26 7.97853719 0.10258990 27 9.33386829 7.97853719 28 5.10933918 9.33386829 29 6.13259594 5.10933918 30 -3.67132809 6.13259594 31 3.01236580 -3.67132809 32 -1.39562227 3.01236580 33 2.59995420 -1.39562227 34 -5.67893011 2.59995420 35 3.49567450 -5.67893011 36 4.63647210 3.49567450 37 -2.95659249 4.63647210 38 -5.30142523 -2.95659249 39 9.01637775 -5.30142523 40 1.47179385 9.01637775 41 -0.82375407 1.47179385 42 -3.74242101 -0.82375407 43 4.36658029 -3.74242101 44 -1.08495370 4.36658029 45 2.44962374 -1.08495370 46 3.18787431 2.44962374 47 1.08553750 3.18787431 48 -5.00952432 1.08553750 49 1.36877988 -5.00952432 50 1.28029554 1.36877988 51 -0.03339644 1.28029554 52 2.31704353 -0.03339644 53 -0.89244621 2.31704353 54 6.08894362 -0.89244621 55 -1.95648690 6.08894362 56 2.54304792 -1.95648690 57 -1.77622802 2.54304792 58 0.21842296 -1.77622802 59 2.37317695 0.21842296 60 1.75191743 2.37317695 61 -1.24761983 1.75191743 62 -1.03859282 -1.24761983 63 -1.01044980 -1.03859282 64 -0.87546396 -1.01044980 65 2.91000253 -0.87546396 66 0.36751782 2.91000253 67 -5.12604776 0.36751782 68 1.28936566 -5.12604776 69 -4.43260276 1.28936566 70 -2.90585999 -4.43260276 71 3.83945239 -2.90585999 72 -1.14387547 3.83945239 73 2.75517093 -1.14387547 74 -6.55619288 2.75517093 75 -0.45036260 -6.55619288 76 -3.62866187 -0.45036260 77 0.74736286 -3.62866187 78 -2.31840262 0.74736286 79 5.48652677 -2.31840262 80 -3.87593157 5.48652677 81 -3.05278432 -3.87593157 82 -3.38962857 -3.05278432 83 0.82045209 -3.38962857 84 -0.50060926 0.82045209 85 -5.06215969 -0.50060926 86 -1.72226999 -5.06215969 87 -0.66520622 -1.72226999 88 -0.39943043 -0.66520622 89 -5.99011484 -0.39943043 90 -5.00370770 -5.99011484 91 -6.25614733 -5.00370770 92 13.78439693 -6.25614733 93 9.01893369 13.78439693 94 6.14129534 9.01893369 95 1.00970608 6.14129534 96 -1.82437430 1.00970608 97 -3.66200615 -1.82437430 98 5.29649766 -3.66200615 99 -1.21839383 5.29649766 100 3.30913139 -1.21839383 101 -0.31553425 3.30913139 102 -3.54812812 -0.31553425 103 -1.77281703 -3.54812812 104 1.71291889 -1.77281703 105 1.14182355 1.71291889 106 -2.61439536 1.14182355 107 1.54516502 -2.61439536 108 -4.41090132 1.54516502 109 0.89948359 -4.41090132 110 -2.96349951 0.89948359 111 2.90317337 -2.96349951 112 -1.91764465 2.90317337 113 2.63888050 -1.91764465 114 -0.83035560 2.63888050 115 -0.27397745 -0.83035560 116 -0.90849571 -0.27397745 117 2.73610154 -0.90849571 118 0.94473504 2.73610154 119 -7.38749194 0.94473504 120 -1.27816848 -7.38749194 121 4.97869468 -1.27816848 122 -0.34732337 4.97869468 123 0.93977115 -0.34732337 124 -0.78995192 0.93977115 125 -8.10643711 -0.78995192 126 NA -8.10643711 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 3.56809007 -0.33584762 [2,] 7.26145273 3.56809007 [3,] -2.36352790 7.26145273 [4,] 2.10057200 -2.36352790 [5,] -1.53890051 2.10057200 [6,] 2.72920345 -1.53890051 [7,] 2.00714782 2.72920345 [8,] -4.56704840 2.00714782 [9,] -1.65401413 -4.56704840 [10,] -4.88337609 -1.65401413 [11,] -3.10356873 -4.88337609 [12,] -6.62605019 -3.10356873 [13,] 2.26967011 -6.62605019 [14,] 4.24424525 2.26967011 [15,] -2.40431670 4.24424525 [16,] -0.59255816 -2.40431670 [17,] -3.23854971 -0.59255816 [18,] -4.93237510 -3.23854971 [19,] -3.55603539 -4.93237510 [20,] 0.74447290 -3.55603539 [21,] 2.11670393 0.74447290 [22,] -3.83474062 2.11670393 [23,] 1.22718297 -3.83474062 [24,] 1.36992345 1.22718297 [25,] 0.10258990 1.36992345 [26,] 7.97853719 0.10258990 [27,] 9.33386829 7.97853719 [28,] 5.10933918 9.33386829 [29,] 6.13259594 5.10933918 [30,] -3.67132809 6.13259594 [31,] 3.01236580 -3.67132809 [32,] -1.39562227 3.01236580 [33,] 2.59995420 -1.39562227 [34,] -5.67893011 2.59995420 [35,] 3.49567450 -5.67893011 [36,] 4.63647210 3.49567450 [37,] -2.95659249 4.63647210 [38,] -5.30142523 -2.95659249 [39,] 9.01637775 -5.30142523 [40,] 1.47179385 9.01637775 [41,] -0.82375407 1.47179385 [42,] -3.74242101 -0.82375407 [43,] 4.36658029 -3.74242101 [44,] -1.08495370 4.36658029 [45,] 2.44962374 -1.08495370 [46,] 3.18787431 2.44962374 [47,] 1.08553750 3.18787431 [48,] -5.00952432 1.08553750 [49,] 1.36877988 -5.00952432 [50,] 1.28029554 1.36877988 [51,] -0.03339644 1.28029554 [52,] 2.31704353 -0.03339644 [53,] -0.89244621 2.31704353 [54,] 6.08894362 -0.89244621 [55,] -1.95648690 6.08894362 [56,] 2.54304792 -1.95648690 [57,] -1.77622802 2.54304792 [58,] 0.21842296 -1.77622802 [59,] 2.37317695 0.21842296 [60,] 1.75191743 2.37317695 [61,] -1.24761983 1.75191743 [62,] -1.03859282 -1.24761983 [63,] -1.01044980 -1.03859282 [64,] -0.87546396 -1.01044980 [65,] 2.91000253 -0.87546396 [66,] 0.36751782 2.91000253 [67,] -5.12604776 0.36751782 [68,] 1.28936566 -5.12604776 [69,] -4.43260276 1.28936566 [70,] -2.90585999 -4.43260276 [71,] 3.83945239 -2.90585999 [72,] -1.14387547 3.83945239 [73,] 2.75517093 -1.14387547 [74,] -6.55619288 2.75517093 [75,] -0.45036260 -6.55619288 [76,] -3.62866187 -0.45036260 [77,] 0.74736286 -3.62866187 [78,] -2.31840262 0.74736286 [79,] 5.48652677 -2.31840262 [80,] -3.87593157 5.48652677 [81,] -3.05278432 -3.87593157 [82,] -3.38962857 -3.05278432 [83,] 0.82045209 -3.38962857 [84,] -0.50060926 0.82045209 [85,] -5.06215969 -0.50060926 [86,] -1.72226999 -5.06215969 [87,] -0.66520622 -1.72226999 [88,] -0.39943043 -0.66520622 [89,] -5.99011484 -0.39943043 [90,] -5.00370770 -5.99011484 [91,] -6.25614733 -5.00370770 [92,] 13.78439693 -6.25614733 [93,] 9.01893369 13.78439693 [94,] 6.14129534 9.01893369 [95,] 1.00970608 6.14129534 [96,] -1.82437430 1.00970608 [97,] -3.66200615 -1.82437430 [98,] 5.29649766 -3.66200615 [99,] -1.21839383 5.29649766 [100,] 3.30913139 -1.21839383 [101,] -0.31553425 3.30913139 [102,] -3.54812812 -0.31553425 [103,] -1.77281703 -3.54812812 [104,] 1.71291889 -1.77281703 [105,] 1.14182355 1.71291889 [106,] -2.61439536 1.14182355 [107,] 1.54516502 -2.61439536 [108,] -4.41090132 1.54516502 [109,] 0.89948359 -4.41090132 [110,] -2.96349951 0.89948359 [111,] 2.90317337 -2.96349951 [112,] -1.91764465 2.90317337 [113,] 2.63888050 -1.91764465 [114,] -0.83035560 2.63888050 [115,] -0.27397745 -0.83035560 [116,] -0.90849571 -0.27397745 [117,] 2.73610154 -0.90849571 [118,] 0.94473504 2.73610154 [119,] -7.38749194 0.94473504 [120,] -1.27816848 -7.38749194 [121,] 4.97869468 -1.27816848 [122,] -0.34732337 4.97869468 [123,] 0.93977115 -0.34732337 [124,] -0.78995192 0.93977115 [125,] -8.10643711 -0.78995192 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 3.56809007 -0.33584762 2 7.26145273 3.56809007 3 -2.36352790 7.26145273 4 2.10057200 -2.36352790 5 -1.53890051 2.10057200 6 2.72920345 -1.53890051 7 2.00714782 2.72920345 8 -4.56704840 2.00714782 9 -1.65401413 -4.56704840 10 -4.88337609 -1.65401413 11 -3.10356873 -4.88337609 12 -6.62605019 -3.10356873 13 2.26967011 -6.62605019 14 4.24424525 2.26967011 15 -2.40431670 4.24424525 16 -0.59255816 -2.40431670 17 -3.23854971 -0.59255816 18 -4.93237510 -3.23854971 19 -3.55603539 -4.93237510 20 0.74447290 -3.55603539 21 2.11670393 0.74447290 22 -3.83474062 2.11670393 23 1.22718297 -3.83474062 24 1.36992345 1.22718297 25 0.10258990 1.36992345 26 7.97853719 0.10258990 27 9.33386829 7.97853719 28 5.10933918 9.33386829 29 6.13259594 5.10933918 30 -3.67132809 6.13259594 31 3.01236580 -3.67132809 32 -1.39562227 3.01236580 33 2.59995420 -1.39562227 34 -5.67893011 2.59995420 35 3.49567450 -5.67893011 36 4.63647210 3.49567450 37 -2.95659249 4.63647210 38 -5.30142523 -2.95659249 39 9.01637775 -5.30142523 40 1.47179385 9.01637775 41 -0.82375407 1.47179385 42 -3.74242101 -0.82375407 43 4.36658029 -3.74242101 44 -1.08495370 4.36658029 45 2.44962374 -1.08495370 46 3.18787431 2.44962374 47 1.08553750 3.18787431 48 -5.00952432 1.08553750 49 1.36877988 -5.00952432 50 1.28029554 1.36877988 51 -0.03339644 1.28029554 52 2.31704353 -0.03339644 53 -0.89244621 2.31704353 54 6.08894362 -0.89244621 55 -1.95648690 6.08894362 56 2.54304792 -1.95648690 57 -1.77622802 2.54304792 58 0.21842296 -1.77622802 59 2.37317695 0.21842296 60 1.75191743 2.37317695 61 -1.24761983 1.75191743 62 -1.03859282 -1.24761983 63 -1.01044980 -1.03859282 64 -0.87546396 -1.01044980 65 2.91000253 -0.87546396 66 0.36751782 2.91000253 67 -5.12604776 0.36751782 68 1.28936566 -5.12604776 69 -4.43260276 1.28936566 70 -2.90585999 -4.43260276 71 3.83945239 -2.90585999 72 -1.14387547 3.83945239 73 2.75517093 -1.14387547 74 -6.55619288 2.75517093 75 -0.45036260 -6.55619288 76 -3.62866187 -0.45036260 77 0.74736286 -3.62866187 78 -2.31840262 0.74736286 79 5.48652677 -2.31840262 80 -3.87593157 5.48652677 81 -3.05278432 -3.87593157 82 -3.38962857 -3.05278432 83 0.82045209 -3.38962857 84 -0.50060926 0.82045209 85 -5.06215969 -0.50060926 86 -1.72226999 -5.06215969 87 -0.66520622 -1.72226999 88 -0.39943043 -0.66520622 89 -5.99011484 -0.39943043 90 -5.00370770 -5.99011484 91 -6.25614733 -5.00370770 92 13.78439693 -6.25614733 93 9.01893369 13.78439693 94 6.14129534 9.01893369 95 1.00970608 6.14129534 96 -1.82437430 1.00970608 97 -3.66200615 -1.82437430 98 5.29649766 -3.66200615 99 -1.21839383 5.29649766 100 3.30913139 -1.21839383 101 -0.31553425 3.30913139 102 -3.54812812 -0.31553425 103 -1.77281703 -3.54812812 104 1.71291889 -1.77281703 105 1.14182355 1.71291889 106 -2.61439536 1.14182355 107 1.54516502 -2.61439536 108 -4.41090132 1.54516502 109 0.89948359 -4.41090132 110 -2.96349951 0.89948359 111 2.90317337 -2.96349951 112 -1.91764465 2.90317337 113 2.63888050 -1.91764465 114 -0.83035560 2.63888050 115 -0.27397745 -0.83035560 116 -0.90849571 -0.27397745 117 2.73610154 -0.90849571 118 0.94473504 2.73610154 119 -7.38749194 0.94473504 120 -1.27816848 -7.38749194 121 4.97869468 -1.27816848 122 -0.34732337 4.97869468 123 0.93977115 -0.34732337 124 -0.78995192 0.93977115 125 -8.10643711 -0.78995192 > 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/rcomp/tmp/7q4kb1292778568.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/rcomp/tmp/81wje1292778568.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/rcomp/tmp/91wje1292778568.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/rcomp/tmp/101wje1292778568.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/rcomp/tmp/11xnz41292778568.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/rcomp/tmp/1216fa1292778568.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/rcomp/tmp/13fyv11292778568.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/rcomp/tmp/14iycp1292778568.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/rcomp/tmp/153zad1292778568.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/rcomp/tmp/16pzr11292778568.tab") + } > > try(system("convert tmp/1nm3n1292778568.ps tmp/1nm3n1292778568.png",intern=TRUE)) character(0) > try(system("convert tmp/2nm3n1292778568.ps tmp/2nm3n1292778568.png",intern=TRUE)) character(0) > try(system("convert tmp/3nm3n1292778568.ps tmp/3nm3n1292778568.png",intern=TRUE)) character(0) > try(system("convert tmp/4gdkp1292778568.ps tmp/4gdkp1292778568.png",intern=TRUE)) character(0) > try(system("convert tmp/5gdkp1292778568.ps tmp/5gdkp1292778568.png",intern=TRUE)) character(0) > try(system("convert tmp/6gdkp1292778568.ps tmp/6gdkp1292778568.png",intern=TRUE)) character(0) > try(system("convert tmp/7q4kb1292778568.ps tmp/7q4kb1292778568.png",intern=TRUE)) character(0) > try(system("convert tmp/81wje1292778568.ps tmp/81wje1292778568.png",intern=TRUE)) character(0) > try(system("convert tmp/91wje1292778568.ps tmp/91wje1292778568.png",intern=TRUE)) character(0) > try(system("convert tmp/101wje1292778568.ps tmp/101wje1292778568.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.507 1.835 8.114