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(46 + ,11 + ,52 + ,26 + ,23 + ,44 + ,8 + ,39 + ,25 + ,15 + ,42 + ,10 + ,42 + ,28 + ,25 + ,41 + ,12 + ,35 + ,30 + ,18 + ,48 + ,12 + ,32 + ,28 + ,21 + ,49 + ,10 + ,49 + ,40 + ,19 + ,51 + ,8 + ,33 + ,28 + ,15 + ,47 + ,10 + ,47 + ,27 + ,22 + ,49 + ,11 + ,46 + ,25 + ,19 + ,46 + ,7 + ,40 + ,27 + ,20 + ,51 + ,10 + ,33 + ,32 + ,26 + ,54 + ,9 + ,39 + ,28 + ,26 + ,52 + ,9 + ,37 + ,21 + ,21 + ,52 + ,11 + ,56 + ,40 + ,18 + ,45 + ,12 + ,36 + ,29 + ,19 + ,52 + ,5 + ,24 + ,27 + ,19 + ,56 + ,10 + ,56 + ,31 + ,18 + ,54 + ,11 + ,32 + ,33 + ,19 + ,50 + ,12 + ,41 + ,28 + ,24 + ,35 + ,9 + ,24 + ,26 + ,28 + ,48 + ,3 + ,42 + ,25 + ,20 + ,37 + ,10 + ,47 + ,37 + ,27 + ,47 + ,7 + ,25 + ,13 + ,18 + ,31 + ,9 + ,33 + ,32 + ,19 + ,45 + ,9 + ,43 + ,32 + ,24 + ,47 + ,10 + ,45 + ,38 + ,21 + ,44 + ,9 + ,44 + ,30 + ,22 + ,30 + ,19 + ,46 + ,33 + ,25 + ,40 + ,14 + ,31 + ,22 + ,19 + ,44 + ,5 + ,31 + ,29 + ,15 + ,43 + ,13 + ,42 + ,33 + ,34 + ,51 + ,7 + ,28 + ,31 + ,23 + ,48 + ,8 + ,38 + ,23 + ,19 + ,55 + ,11 + ,59 + ,42 + ,26 + ,48 + ,11 + ,43 + ,35 + ,15 + ,53 + ,12 + ,29 + ,31 + ,15 + ,49 + ,9 + ,38 + ,31 + ,17 + ,44 + ,13 + ,39 + ,38 + ,30 + ,45 + ,12 + ,50 + ,34 + ,19 + ,40 + ,11 + ,44 + ,33 + ,28 + ,44 + ,18 + ,29 + ,23 + ,23 + ,41 + ,8 + ,29 + ,18 + ,23 + ,46 + ,14 + ,36 + ,33 + ,21 + ,47 + ,10 + ,43 + ,26 + ,18 + ,48 + ,13 + ,28 + ,29 + ,19 + ,43 + ,13 + ,39 + ,23 + ,24 + ,46 + ,8 + ,35 + ,18 + ,15 + ,53 + ,10 + ,43 + ,36 + ,20 + ,33 + ,8 + ,28 + ,21 + ,24 + ,47 + ,9 + ,49 + ,31 + ,9 + ,43 + ,10 + ,33 + ,31 + ,20 + ,45 + ,9 + ,39 + ,29 + ,20 + ,49 + ,9 + ,36 + ,24 + ,10 + ,45 + ,9 + ,24 + ,35 + ,44 + ,37 + ,10 + ,47 + ,37 + ,20 + ,42 + ,8 + ,34 + ,29 + ,20 + ,43 + ,11 + ,33 + ,31 + ,11 + ,44 + ,11 + ,43 + ,34 + ,21 + ,39 + ,10 + ,41 + ,38 + ,21 + ,37 + ,23 + ,40 + ,27 + ,19 + ,53 + ,9 + ,39 + ,33 + ,17 + ,48 + ,12 + ,54 + ,36 + ,16 + ,47 + ,9 + ,43 + ,27 + ,14 + ,49 + ,9 + ,45 + ,33 + ,19 + ,47 + ,8 + ,29 + ,24 + ,21 + ,56 + ,9 + ,45 + ,31 + ,16 + ,51 + ,9 + ,47 + ,31 + ,19 + ,43 + ,9 + ,38 + ,23 + ,19 + ,51 + ,11 + ,52 + ,38 + ,16 + ,36 + ,12 + ,34 + ,30 + ,24 + ,55 + ,8 + ,56 + ,39 + ,29 + ,33 + ,9 + ,26 + ,28 + ,21 + ,42 + ,10 + ,42 + ,39 + ,20 + ,43 + ,8 + ,32 + ,19 + ,23 + ,44 + ,9 + ,39 + ,32 + ,18 + ,47 + ,9 + ,37 + ,32 + ,19 + ,43 + ,13 + ,37 + ,35 + ,23 + ,47 + ,11 + ,52 + ,42 + ,19 + ,41 + ,18 + ,31 + ,25 + ,21 + ,53 + ,10 + ,34 + ,11 + ,26 + ,47 + ,14 + ,38 + ,31 + ,13 + ,23 + ,7 + ,29 + ,30 + ,23 + ,43 + ,10 + ,52 + ,30 + ,17 + ,47 + ,9 + ,40 + ,31 + ,30 + ,47 + ,9 + ,47 + ,28 + ,19 + ,49 + ,12 + ,34 + ,34 + ,22 + ,50 + ,8 + ,37 + ,32 + ,14 + ,43 + ,9 + ,43 + ,30 + ,14 + ,44 + ,8 + ,37 + ,27 + ,21 + ,49 + ,13 + ,55 + ,36 + ,21 + ,47 + ,6 + ,36 + ,32 + ,33 + ,39 + ,11 + ,28 + ,27 + ,23 + ,49 + ,10 + ,47 + ,35 + ,30 + ,41 + ,10 + ,38 + ,34 + ,19 + ,40 + ,14 + ,37 + ,32 + ,21 + ,38 + ,13 + ,32 + ,28 + ,25 + ,43 + ,10 + ,47 + ,29 + ,18 + ,55 + ,8 + ,40 + ,18 + ,25 + ,46 + ,10 + ,45 + ,34 + ,21 + ,54 + ,8 + ,37 + ,35 + ,16 + ,47 + ,10 + ,38 + ,34 + ,17 + ,35 + ,7 + ,37 + ,26 + ,23 + ,41 + ,11 + ,35 + ,30 + ,26 + ,53 + ,10 + ,50 + ,35 + ,18 + ,44 + ,8 + ,32 + ,17 + ,19 + ,48 + ,12 + ,32 + ,34 + ,28 + ,49 + ,12 + ,38 + ,30 + ,20 + ,39 + ,11 + ,31 + ,31 + ,29 + ,45 + ,11 + ,27 + ,25 + ,19 + ,34 + ,6 + ,34 + ,16 + ,18 + ,46 + ,14 + ,43 + ,35 + ,24 + ,45 + ,9 + ,28 + ,28 + ,12 + ,53 + ,11 + ,44 + ,42 + ,19 + ,51 + ,10 + ,43 + ,30 + ,25 + ,45 + ,10 + ,53 + ,37 + ,12 + ,50 + ,8 + ,33 + ,26 + ,15 + ,41 + ,9 + ,36 + ,28 + ,25 + ,44 + ,10 + ,46 + ,33 + ,14 + ,43 + ,10 + ,36 + ,29 + ,19 + ,42 + ,12 + ,24 + ,21 + ,23 + ,48 + ,10 + ,50 + ,38 + ,19 + ,45 + ,11 + ,40 + ,18 + ,24 + ,48 + ,16 + ,40 + ,38 + ,20 + ,48 + ,12 + ,32 + ,30 + ,16 + ,53 + ,10 + ,49 + ,35 + ,13 + ,45 + ,13 + ,47 + ,34 + ,20 + ,45 + ,8 + ,28 + ,21 + ,30 + ,50 + ,12 + ,41 + ,30 + ,18 + ,48 + ,10 + ,25 + ,32 + ,22 + ,41 + ,8 + ,46 + ,23 + ,21 + ,53 + ,14 + ,53 + ,31 + ,25 + ,40 + ,9 + ,34 + ,26 + ,18 + ,49 + ,12 + ,40 + ,29 + ,25 + ,46 + ,10 + ,46 + ,28 + ,44 + ,48 + ,9 + ,38 + ,29 + ,12 + ,43 + ,10 + ,51 + ,36 + ,17 + ,53 + ,11 + ,38 + ,36 + ,26 + ,51 + ,11 + ,45 + ,31 + ,18 + ,41 + ,10 + ,41 + ,30 + ,21 + ,45 + ,10 + ,42 + ,29 + ,24 + ,44 + ,20 + ,36 + ,35 + ,20 + ,43 + ,10 + ,41 + ,26 + ,24 + ,34 + ,8 + ,35 + ,25 + ,28 + ,38 + ,8 + ,42 + ,25 + ,20 + ,40 + ,9 + ,35 + ,20 + ,33 + ,48 + ,18 + ,32 + ,27 + ,19) + ,dim=c(5 + ,146) + ,dimnames=list(c('Carrièremogelijkheden' + ,'Geen_Motivatie' + ,'Leermogelijkheden' + ,'Persoonlijke_redenen' + ,'Ouders') + ,1:146)) > y <- array(NA,dim=c(5,146),dimnames=list(c('Carrièremogelijkheden','Geen_Motivatie','Leermogelijkheden','Persoonlijke_redenen','Ouders'),1:146)) > 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 = '4' > #'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 Persoonlijke_redenen Carri\303\250remogelijkheden Geen_Motivatie 1 26 46 11 2 25 44 8 3 28 42 10 4 30 41 12 5 28 48 12 6 40 49 10 7 28 51 8 8 27 47 10 9 25 49 11 10 27 46 7 11 32 51 10 12 28 54 9 13 21 52 9 14 40 52 11 15 29 45 12 16 27 52 5 17 31 56 10 18 33 54 11 19 28 50 12 20 26 35 9 21 25 48 3 22 37 37 10 23 13 47 7 24 32 31 9 25 32 45 9 26 38 47 10 27 30 44 9 28 33 30 19 29 22 40 14 30 29 44 5 31 33 43 13 32 31 51 7 33 23 48 8 34 42 55 11 35 35 48 11 36 31 53 12 37 31 49 9 38 38 44 13 39 34 45 12 40 33 40 11 41 23 44 18 42 18 41 8 43 33 46 14 44 26 47 10 45 29 48 13 46 23 43 13 47 18 46 8 48 36 53 10 49 21 33 8 50 31 47 9 51 31 43 10 52 29 45 9 53 24 49 9 54 35 45 9 55 37 37 10 56 29 42 8 57 31 43 11 58 34 44 11 59 38 39 10 60 27 37 23 61 33 53 9 62 36 48 12 63 27 47 9 64 33 49 9 65 24 47 8 66 31 56 9 67 31 51 9 68 23 43 9 69 38 51 11 70 30 36 12 71 39 55 8 72 28 33 9 73 39 42 10 74 19 43 8 75 32 44 9 76 32 47 9 77 35 43 13 78 42 47 11 79 25 41 18 80 11 53 10 81 31 47 14 82 30 23 7 83 30 43 10 84 31 47 9 85 28 47 9 86 34 49 12 87 32 50 8 88 30 43 9 89 27 44 8 90 36 49 13 91 32 47 6 92 27 39 11 93 35 49 10 94 34 41 10 95 32 40 14 96 28 38 13 97 29 43 10 98 18 55 8 99 34 46 10 100 35 54 8 101 34 47 10 102 26 35 7 103 30 41 11 104 35 53 10 105 17 44 8 106 34 48 12 107 30 49 12 108 31 39 11 109 25 45 11 110 16 34 6 111 35 46 14 112 28 45 9 113 42 53 11 114 30 51 10 115 37 45 10 116 26 50 8 117 28 41 9 118 33 44 10 119 29 43 10 120 21 42 12 121 38 48 10 122 18 45 11 123 38 48 16 124 30 48 12 125 35 53 10 126 34 45 13 127 21 45 8 128 30 50 12 129 32 48 10 130 23 41 8 131 31 53 14 132 26 40 9 133 29 49 12 134 28 46 10 135 29 48 9 136 36 43 10 137 36 53 11 138 31 51 11 139 30 41 10 140 29 45 10 141 35 44 20 142 26 43 10 143 25 34 8 144 25 38 8 145 20 40 9 146 27 48 18 Leermogelijkheden Ouders 1 52 23 2 39 15 3 42 25 4 35 18 5 32 21 6 49 19 7 33 15 8 47 22 9 46 19 10 40 20 11 33 26 12 39 26 13 37 21 14 56 18 15 36 19 16 24 19 17 56 18 18 32 19 19 41 24 20 24 28 21 42 20 22 47 27 23 25 18 24 33 19 25 43 24 26 45 21 27 44 22 28 46 25 29 31 19 30 31 15 31 42 34 32 28 23 33 38 19 34 59 26 35 43 15 36 29 15 37 38 17 38 39 30 39 50 19 40 44 28 41 29 23 42 29 23 43 36 21 44 43 18 45 28 19 46 39 24 47 35 15 48 43 20 49 28 24 50 49 9 51 33 20 52 39 20 53 36 10 54 24 44 55 47 20 56 34 20 57 33 11 58 43 21 59 41 21 60 40 19 61 39 17 62 54 16 63 43 14 64 45 19 65 29 21 66 45 16 67 47 19 68 38 19 69 52 16 70 34 24 71 56 29 72 26 21 73 42 20 74 32 23 75 39 18 76 37 19 77 37 23 78 52 19 79 31 21 80 34 26 81 38 13 82 29 23 83 52 17 84 40 30 85 47 19 86 34 22 87 37 14 88 43 14 89 37 21 90 55 21 91 36 33 92 28 23 93 47 30 94 38 19 95 37 21 96 32 25 97 47 18 98 40 25 99 45 21 100 37 16 101 38 17 102 37 23 103 35 26 104 50 18 105 32 19 106 32 28 107 38 20 108 31 29 109 27 19 110 34 18 111 43 24 112 28 12 113 44 19 114 43 25 115 53 12 116 33 15 117 36 25 118 46 14 119 36 19 120 24 23 121 50 19 122 40 24 123 40 20 124 32 16 125 49 13 126 47 20 127 28 30 128 41 18 129 25 22 130 46 21 131 53 25 132 34 18 133 40 25 134 46 44 135 38 12 136 51 17 137 38 26 138 45 18 139 41 21 140 42 24 141 36 20 142 41 24 143 35 28 144 42 20 145 35 33 146 32 19 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) `Carri\303\250remogelijkheden` 7.80480 0.08035 Geen_Motivatie Leermogelijkheden 0.40176 0.34656 Ouders 0.02726 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -17.5729 -3.3735 0.4448 3.6020 10.4466 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.80480 4.46721 1.747 0.08279 . `Carri\303\250remogelijkheden` 0.08035 0.07741 1.038 0.30103 Geen_Motivatie 0.40176 0.15155 2.651 0.00895 ** Leermogelijkheden 0.34656 0.05562 6.231 5.04e-09 *** Ouders 0.02726 0.07777 0.351 0.72647 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.961 on 141 degrees of freedom Multiple R-squared: 0.2919, Adjusted R-squared: 0.2718 F-statistic: 14.53 on 4 and 141 DF, p-value: 5.846e-10 > 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.7789044 0.44219113 0.22109557 [2,] 0.8154862 0.36902760 0.18451380 [3,] 0.7125464 0.57490719 0.28745360 [4,] 0.6382858 0.72342836 0.36171418 [5,] 0.5465187 0.90696268 0.45348134 [6,] 0.6618082 0.67638356 0.33819178 [7,] 0.7046093 0.59078150 0.29539075 [8,] 0.6168933 0.76621349 0.38310675 [9,] 0.5749518 0.85009638 0.42504819 [10,] 0.5325896 0.93482086 0.46741043 [11,] 0.4757451 0.95149014 0.52425493 [12,] 0.4119784 0.82395684 0.58802158 [13,] 0.3768355 0.75367097 0.62316452 [14,] 0.3073241 0.61464813 0.69267593 [15,] 0.4198960 0.83979193 0.58010404 [16,] 0.6755994 0.64880121 0.32440060 [17,] 0.6774153 0.64516947 0.32258473 [18,] 0.6244890 0.75102207 0.37551103 [19,] 0.6789821 0.64203584 0.32101792 [20,] 0.6180367 0.76392651 0.38196326 [21,] 0.5875942 0.82481169 0.41240584 [22,] 0.6067999 0.78640024 0.39320012 [23,] 0.5881911 0.82361774 0.41180887 [24,] 0.5295359 0.94092820 0.47046410 [25,] 0.5458810 0.90823798 0.45411899 [26,] 0.5499848 0.90003046 0.45001523 [27,] 0.5581302 0.88373954 0.44186977 [28,] 0.5562450 0.88750996 0.44375498 [29,] 0.5428400 0.91432002 0.45716001 [30,] 0.4966148 0.99322962 0.50338519 [31,] 0.5325420 0.93491607 0.46745804 [32,] 0.4769649 0.95392974 0.52303513 [33,] 0.4233468 0.84669356 0.57665322 [34,] 0.4492227 0.89844535 0.55077733 [35,] 0.5164795 0.96704095 0.48352048 [36,] 0.4849574 0.96991470 0.51504265 [37,] 0.4755459 0.95109181 0.52445410 [38,] 0.4328996 0.86579912 0.56710044 [39,] 0.4985303 0.99706060 0.50146970 [40,] 0.5986036 0.80279280 0.40139640 [41,] 0.5917640 0.81647198 0.40823599 [42,] 0.5565989 0.88680221 0.44340111 [43,] 0.5090302 0.98193954 0.49096977 [44,] 0.4921957 0.98439142 0.50780429 [45,] 0.4413272 0.88265442 0.55867279 [46,] 0.4133405 0.82668095 0.58665952 [47,] 0.5142986 0.97140281 0.48570141 [48,] 0.5380676 0.92386484 0.46193242 [49,] 0.4991795 0.99835894 0.50082053 [50,] 0.5003765 0.99924693 0.49962346 [51,] 0.4672685 0.93453693 0.53273153 [52,] 0.5540050 0.89199004 0.44599502 [53,] 0.5964251 0.80714972 0.40357486 [54,] 0.5745918 0.85081648 0.42540824 [55,] 0.5304139 0.93917220 0.46958610 [56,] 0.5033381 0.99332389 0.49666195 [57,] 0.4589544 0.91790889 0.54104556 [58,] 0.4157423 0.83148466 0.58425767 [59,] 0.3698887 0.73977733 0.63011134 [60,] 0.3278721 0.65574413 0.67212793 [61,] 0.3405743 0.68114851 0.65942574 [62,] 0.3192647 0.63852947 0.68073527 [63,] 0.2831302 0.56626047 0.71686977 [64,] 0.2649611 0.52992230 0.73503885 [65,] 0.2539132 0.50782638 0.74608681 [66,] 0.3413808 0.68276165 0.65861917 [67,] 0.3996191 0.79923829 0.60038085 [68,] 0.3705790 0.74115802 0.62942099 [69,] 0.3478642 0.69572846 0.65213577 [70,] 0.3494305 0.69886102 0.65056949 [71,] 0.4098314 0.81966278 0.59016861 [72,] 0.4143507 0.82870142 0.58564929 [73,] 0.8915247 0.21695068 0.10847534 [74,] 0.8721354 0.25572928 0.12786464 [75,] 0.9179838 0.16403236 0.08201618 [76,] 0.9083623 0.18327536 0.09163768 [77,] 0.8909870 0.21802610 0.10901305 [78,] 0.8827217 0.23455669 0.11727834 [79,] 0.8813156 0.23736883 0.11868441 [80,] 0.8684110 0.26317790 0.13158895 [81,] 0.8395591 0.32088177 0.16044088 [82,] 0.8083522 0.38329561 0.19164780 [83,] 0.7728100 0.45438003 0.22719002 [84,] 0.8074612 0.38507768 0.19253884 [85,] 0.7763057 0.44738869 0.22369434 [86,] 0.7600799 0.47984024 0.23992012 [87,] 0.7753810 0.44923797 0.22461899 [88,] 0.7409901 0.51801974 0.25900987 [89,] 0.6997337 0.60053268 0.30026634 [90,] 0.6681138 0.66377242 0.33188621 [91,] 0.8825349 0.23493029 0.11746515 [92,] 0.8637484 0.27250318 0.13625159 [93,] 0.8694940 0.26101197 0.13050599 [94,] 0.8675715 0.26485706 0.13242853 [95,] 0.8545543 0.29089143 0.14544571 [96,] 0.8397452 0.32050967 0.16025484 [97,] 0.8044853 0.39102947 0.19551474 [98,] 0.8836543 0.23269144 0.11634572 [99,] 0.8996220 0.20075600 0.10037800 [100,] 0.8736202 0.25275969 0.12637985 [101,] 0.9148537 0.17029260 0.08514630 [102,] 0.8900542 0.21989166 0.10994583 [103,] 0.9177346 0.16453078 0.08226539 [104,] 0.9055249 0.18895026 0.09447513 [105,] 0.8817023 0.23659544 0.11829772 [106,] 0.9459602 0.10807959 0.05403980 [107,] 0.9267939 0.14641210 0.07320605 [108,] 0.9107313 0.17853749 0.08926875 [109,] 0.8908763 0.21824740 0.10912370 [110,] 0.8689554 0.26208919 0.13104459 [111,] 0.8340930 0.33181403 0.16590701 [112,] 0.7932692 0.41346160 0.20673080 [113,] 0.7698716 0.46025683 0.23012842 [114,] 0.8009498 0.39810037 0.19905018 [115,] 0.9619297 0.07614069 0.03807034 [116,] 0.9700897 0.05982067 0.02991034 [117,] 0.9540650 0.09187000 0.04593500 [118,] 0.9321202 0.13575961 0.06787981 [119,] 0.9141585 0.17168297 0.08584148 [120,] 0.9134145 0.17317099 0.08658550 [121,] 0.8792556 0.24148871 0.12074435 [122,] 0.8878037 0.22439263 0.11219631 [123,] 0.9141247 0.17175069 0.08587534 [124,] 0.9393373 0.12132534 0.06066267 [125,] 0.9031339 0.19373225 0.09686613 [126,] 0.8524351 0.29512989 0.14756495 [127,] 0.7923928 0.41521440 0.20760720 [128,] 0.7000227 0.59995452 0.29997726 [129,] 0.5981027 0.80379466 0.40189733 [130,] 0.9127639 0.17447213 0.08723607 [131,] 0.8281808 0.34363835 0.17181918 > postscript(file="/var/www/html/rcomp/tmp/1bytx1292754260.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/2lpa01292754260.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/3lpa01292754260.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/4lpa01292754260.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/5wgs31292754260.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 = 146 Frequency = 1 1 2 3 4 5 6 -8.56854642 -3.47915857 -2.43427363 1.45933517 -0.14520754 6.74089544 7 8 9 10 11 12 1.03777284 -5.48705985 -7.62117055 -1.72097036 3.93438768 -1.98428785 13 14 15 16 17 18 -7.99415522 3.69940293 -0.23589004 4.17272356 -5.22024044 4.82897083 19 20 21 22 23 24 -3.50676418 2.68629825 -2.96776952 5.18013644 -10.54834279 6.13397424 25 26 27 28 29 30 1.40713040 6.23332857 -0.80456121 -1.47214115 -5.90483510 4.49862253 31 32 33 34 35 36 1.03475594 5.95426061 -5.56303932 4.20057349 3.60791468 3.65629892 37 38 39 40 41 42 2.00937541 7.10314092 -0.08778203 1.54975909 -6.24918065 -6.99055898 43 44 45 46 47 48 2.82572360 -4.99176103 1.89381217 -7.65294301 -9.25360397 4.47161624 49 50 51 52 53 54 -3.02845526 -1.42403727 3.74075462 -0.09757078 -4.10667023 10.44662116 55 56 57 58 59 60 5.37096338 2.27805529 3.58434641 2.76574924 8.26238442 -7.39867232 61 62 63 64 65 66 3.34141119 0.36669571 -3.48095994 1.52890743 -1.41813775 -0.95176048 67 68 69 70 71 72 -1.32492025 -5.56304583 3.22052989 2.04408356 3.36375305 4.34469801 73 74 75 76 77 78 8.70203132 -7.19095037 3.03730133 3.46211739 5.06744541 7.46014742 79 80 81 82 83 84 -4.64673573 -17.57287628 0.27033397 6.85750039 -3.76217297 1.12255535 85 86 87 88 89 90 -4.00351975 5.05405392 3.75912910 -0.15955944 -0.94959709 -0.59828021 91 92 93 94 95 96 4.63229863 1.31143359 2.13415197 5.19589729 1.96126063 0.14749262 97 98 99 100 101 102 -3.05661539 -11.98218357 2.31367869 6.38320662 4.76831853 -0.87921082 103 104 105 106 107 108 1.64300437 1.10019222 -9.16225654 5.66396553 -0.27767895 4.10817651 109 110 111 112 113 114 -0.71505948 -9.22110747 2.31799463 2.93271800 9.75055638 -1.50398847 115 116 117 118 119 120 2.86686802 -0.88187704 0.12721591 1.31864216 0.72832447 -3.94511906 121 122 123 124 125 126 4.47468185 -12.35669271 5.50251522 1.99109742 1.58306088 0.52289099 127 128 129 130 131 132 -4.15622270 -1.34319824 7.05699173 -7.82762014 -5.73735437 -0.90847961 133 134 135 136 137 138 -2.10711133 -4.65988780 0.22603048 2.58439074 5.63911173 -1.40804609 139 140 141 142 143 144 0.10168417 -1.64806301 2.60314206 -4.14079905 -1.64379534 -4.17305392 145 146 -7.66395818 -3.50122833 > postscript(file="/var/www/html/rcomp/tmp/6wgs31292754260.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 = 146 Frequency = 1 lag(myerror, k = 1) myerror 0 -8.56854642 NA 1 -3.47915857 -8.56854642 2 -2.43427363 -3.47915857 3 1.45933517 -2.43427363 4 -0.14520754 1.45933517 5 6.74089544 -0.14520754 6 1.03777284 6.74089544 7 -5.48705985 1.03777284 8 -7.62117055 -5.48705985 9 -1.72097036 -7.62117055 10 3.93438768 -1.72097036 11 -1.98428785 3.93438768 12 -7.99415522 -1.98428785 13 3.69940293 -7.99415522 14 -0.23589004 3.69940293 15 4.17272356 -0.23589004 16 -5.22024044 4.17272356 17 4.82897083 -5.22024044 18 -3.50676418 4.82897083 19 2.68629825 -3.50676418 20 -2.96776952 2.68629825 21 5.18013644 -2.96776952 22 -10.54834279 5.18013644 23 6.13397424 -10.54834279 24 1.40713040 6.13397424 25 6.23332857 1.40713040 26 -0.80456121 6.23332857 27 -1.47214115 -0.80456121 28 -5.90483510 -1.47214115 29 4.49862253 -5.90483510 30 1.03475594 4.49862253 31 5.95426061 1.03475594 32 -5.56303932 5.95426061 33 4.20057349 -5.56303932 34 3.60791468 4.20057349 35 3.65629892 3.60791468 36 2.00937541 3.65629892 37 7.10314092 2.00937541 38 -0.08778203 7.10314092 39 1.54975909 -0.08778203 40 -6.24918065 1.54975909 41 -6.99055898 -6.24918065 42 2.82572360 -6.99055898 43 -4.99176103 2.82572360 44 1.89381217 -4.99176103 45 -7.65294301 1.89381217 46 -9.25360397 -7.65294301 47 4.47161624 -9.25360397 48 -3.02845526 4.47161624 49 -1.42403727 -3.02845526 50 3.74075462 -1.42403727 51 -0.09757078 3.74075462 52 -4.10667023 -0.09757078 53 10.44662116 -4.10667023 54 5.37096338 10.44662116 55 2.27805529 5.37096338 56 3.58434641 2.27805529 57 2.76574924 3.58434641 58 8.26238442 2.76574924 59 -7.39867232 8.26238442 60 3.34141119 -7.39867232 61 0.36669571 3.34141119 62 -3.48095994 0.36669571 63 1.52890743 -3.48095994 64 -1.41813775 1.52890743 65 -0.95176048 -1.41813775 66 -1.32492025 -0.95176048 67 -5.56304583 -1.32492025 68 3.22052989 -5.56304583 69 2.04408356 3.22052989 70 3.36375305 2.04408356 71 4.34469801 3.36375305 72 8.70203132 4.34469801 73 -7.19095037 8.70203132 74 3.03730133 -7.19095037 75 3.46211739 3.03730133 76 5.06744541 3.46211739 77 7.46014742 5.06744541 78 -4.64673573 7.46014742 79 -17.57287628 -4.64673573 80 0.27033397 -17.57287628 81 6.85750039 0.27033397 82 -3.76217297 6.85750039 83 1.12255535 -3.76217297 84 -4.00351975 1.12255535 85 5.05405392 -4.00351975 86 3.75912910 5.05405392 87 -0.15955944 3.75912910 88 -0.94959709 -0.15955944 89 -0.59828021 -0.94959709 90 4.63229863 -0.59828021 91 1.31143359 4.63229863 92 2.13415197 1.31143359 93 5.19589729 2.13415197 94 1.96126063 5.19589729 95 0.14749262 1.96126063 96 -3.05661539 0.14749262 97 -11.98218357 -3.05661539 98 2.31367869 -11.98218357 99 6.38320662 2.31367869 100 4.76831853 6.38320662 101 -0.87921082 4.76831853 102 1.64300437 -0.87921082 103 1.10019222 1.64300437 104 -9.16225654 1.10019222 105 5.66396553 -9.16225654 106 -0.27767895 5.66396553 107 4.10817651 -0.27767895 108 -0.71505948 4.10817651 109 -9.22110747 -0.71505948 110 2.31799463 -9.22110747 111 2.93271800 2.31799463 112 9.75055638 2.93271800 113 -1.50398847 9.75055638 114 2.86686802 -1.50398847 115 -0.88187704 2.86686802 116 0.12721591 -0.88187704 117 1.31864216 0.12721591 118 0.72832447 1.31864216 119 -3.94511906 0.72832447 120 4.47468185 -3.94511906 121 -12.35669271 4.47468185 122 5.50251522 -12.35669271 123 1.99109742 5.50251522 124 1.58306088 1.99109742 125 0.52289099 1.58306088 126 -4.15622270 0.52289099 127 -1.34319824 -4.15622270 128 7.05699173 -1.34319824 129 -7.82762014 7.05699173 130 -5.73735437 -7.82762014 131 -0.90847961 -5.73735437 132 -2.10711133 -0.90847961 133 -4.65988780 -2.10711133 134 0.22603048 -4.65988780 135 2.58439074 0.22603048 136 5.63911173 2.58439074 137 -1.40804609 5.63911173 138 0.10168417 -1.40804609 139 -1.64806301 0.10168417 140 2.60314206 -1.64806301 141 -4.14079905 2.60314206 142 -1.64379534 -4.14079905 143 -4.17305392 -1.64379534 144 -7.66395818 -4.17305392 145 -3.50122833 -7.66395818 146 NA -3.50122833 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -3.47915857 -8.56854642 [2,] -2.43427363 -3.47915857 [3,] 1.45933517 -2.43427363 [4,] -0.14520754 1.45933517 [5,] 6.74089544 -0.14520754 [6,] 1.03777284 6.74089544 [7,] -5.48705985 1.03777284 [8,] -7.62117055 -5.48705985 [9,] -1.72097036 -7.62117055 [10,] 3.93438768 -1.72097036 [11,] -1.98428785 3.93438768 [12,] -7.99415522 -1.98428785 [13,] 3.69940293 -7.99415522 [14,] -0.23589004 3.69940293 [15,] 4.17272356 -0.23589004 [16,] -5.22024044 4.17272356 [17,] 4.82897083 -5.22024044 [18,] -3.50676418 4.82897083 [19,] 2.68629825 -3.50676418 [20,] -2.96776952 2.68629825 [21,] 5.18013644 -2.96776952 [22,] -10.54834279 5.18013644 [23,] 6.13397424 -10.54834279 [24,] 1.40713040 6.13397424 [25,] 6.23332857 1.40713040 [26,] -0.80456121 6.23332857 [27,] -1.47214115 -0.80456121 [28,] -5.90483510 -1.47214115 [29,] 4.49862253 -5.90483510 [30,] 1.03475594 4.49862253 [31,] 5.95426061 1.03475594 [32,] -5.56303932 5.95426061 [33,] 4.20057349 -5.56303932 [34,] 3.60791468 4.20057349 [35,] 3.65629892 3.60791468 [36,] 2.00937541 3.65629892 [37,] 7.10314092 2.00937541 [38,] -0.08778203 7.10314092 [39,] 1.54975909 -0.08778203 [40,] -6.24918065 1.54975909 [41,] -6.99055898 -6.24918065 [42,] 2.82572360 -6.99055898 [43,] -4.99176103 2.82572360 [44,] 1.89381217 -4.99176103 [45,] -7.65294301 1.89381217 [46,] -9.25360397 -7.65294301 [47,] 4.47161624 -9.25360397 [48,] -3.02845526 4.47161624 [49,] -1.42403727 -3.02845526 [50,] 3.74075462 -1.42403727 [51,] -0.09757078 3.74075462 [52,] -4.10667023 -0.09757078 [53,] 10.44662116 -4.10667023 [54,] 5.37096338 10.44662116 [55,] 2.27805529 5.37096338 [56,] 3.58434641 2.27805529 [57,] 2.76574924 3.58434641 [58,] 8.26238442 2.76574924 [59,] -7.39867232 8.26238442 [60,] 3.34141119 -7.39867232 [61,] 0.36669571 3.34141119 [62,] -3.48095994 0.36669571 [63,] 1.52890743 -3.48095994 [64,] -1.41813775 1.52890743 [65,] -0.95176048 -1.41813775 [66,] -1.32492025 -0.95176048 [67,] -5.56304583 -1.32492025 [68,] 3.22052989 -5.56304583 [69,] 2.04408356 3.22052989 [70,] 3.36375305 2.04408356 [71,] 4.34469801 3.36375305 [72,] 8.70203132 4.34469801 [73,] -7.19095037 8.70203132 [74,] 3.03730133 -7.19095037 [75,] 3.46211739 3.03730133 [76,] 5.06744541 3.46211739 [77,] 7.46014742 5.06744541 [78,] -4.64673573 7.46014742 [79,] -17.57287628 -4.64673573 [80,] 0.27033397 -17.57287628 [81,] 6.85750039 0.27033397 [82,] -3.76217297 6.85750039 [83,] 1.12255535 -3.76217297 [84,] -4.00351975 1.12255535 [85,] 5.05405392 -4.00351975 [86,] 3.75912910 5.05405392 [87,] -0.15955944 3.75912910 [88,] -0.94959709 -0.15955944 [89,] -0.59828021 -0.94959709 [90,] 4.63229863 -0.59828021 [91,] 1.31143359 4.63229863 [92,] 2.13415197 1.31143359 [93,] 5.19589729 2.13415197 [94,] 1.96126063 5.19589729 [95,] 0.14749262 1.96126063 [96,] -3.05661539 0.14749262 [97,] -11.98218357 -3.05661539 [98,] 2.31367869 -11.98218357 [99,] 6.38320662 2.31367869 [100,] 4.76831853 6.38320662 [101,] -0.87921082 4.76831853 [102,] 1.64300437 -0.87921082 [103,] 1.10019222 1.64300437 [104,] -9.16225654 1.10019222 [105,] 5.66396553 -9.16225654 [106,] -0.27767895 5.66396553 [107,] 4.10817651 -0.27767895 [108,] -0.71505948 4.10817651 [109,] -9.22110747 -0.71505948 [110,] 2.31799463 -9.22110747 [111,] 2.93271800 2.31799463 [112,] 9.75055638 2.93271800 [113,] -1.50398847 9.75055638 [114,] 2.86686802 -1.50398847 [115,] -0.88187704 2.86686802 [116,] 0.12721591 -0.88187704 [117,] 1.31864216 0.12721591 [118,] 0.72832447 1.31864216 [119,] -3.94511906 0.72832447 [120,] 4.47468185 -3.94511906 [121,] -12.35669271 4.47468185 [122,] 5.50251522 -12.35669271 [123,] 1.99109742 5.50251522 [124,] 1.58306088 1.99109742 [125,] 0.52289099 1.58306088 [126,] -4.15622270 0.52289099 [127,] -1.34319824 -4.15622270 [128,] 7.05699173 -1.34319824 [129,] -7.82762014 7.05699173 [130,] -5.73735437 -7.82762014 [131,] -0.90847961 -5.73735437 [132,] -2.10711133 -0.90847961 [133,] -4.65988780 -2.10711133 [134,] 0.22603048 -4.65988780 [135,] 2.58439074 0.22603048 [136,] 5.63911173 2.58439074 [137,] -1.40804609 5.63911173 [138,] 0.10168417 -1.40804609 [139,] -1.64806301 0.10168417 [140,] 2.60314206 -1.64806301 [141,] -4.14079905 2.60314206 [142,] -1.64379534 -4.14079905 [143,] -4.17305392 -1.64379534 [144,] -7.66395818 -4.17305392 [145,] -3.50122833 -7.66395818 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -3.47915857 -8.56854642 2 -2.43427363 -3.47915857 3 1.45933517 -2.43427363 4 -0.14520754 1.45933517 5 6.74089544 -0.14520754 6 1.03777284 6.74089544 7 -5.48705985 1.03777284 8 -7.62117055 -5.48705985 9 -1.72097036 -7.62117055 10 3.93438768 -1.72097036 11 -1.98428785 3.93438768 12 -7.99415522 -1.98428785 13 3.69940293 -7.99415522 14 -0.23589004 3.69940293 15 4.17272356 -0.23589004 16 -5.22024044 4.17272356 17 4.82897083 -5.22024044 18 -3.50676418 4.82897083 19 2.68629825 -3.50676418 20 -2.96776952 2.68629825 21 5.18013644 -2.96776952 22 -10.54834279 5.18013644 23 6.13397424 -10.54834279 24 1.40713040 6.13397424 25 6.23332857 1.40713040 26 -0.80456121 6.23332857 27 -1.47214115 -0.80456121 28 -5.90483510 -1.47214115 29 4.49862253 -5.90483510 30 1.03475594 4.49862253 31 5.95426061 1.03475594 32 -5.56303932 5.95426061 33 4.20057349 -5.56303932 34 3.60791468 4.20057349 35 3.65629892 3.60791468 36 2.00937541 3.65629892 37 7.10314092 2.00937541 38 -0.08778203 7.10314092 39 1.54975909 -0.08778203 40 -6.24918065 1.54975909 41 -6.99055898 -6.24918065 42 2.82572360 -6.99055898 43 -4.99176103 2.82572360 44 1.89381217 -4.99176103 45 -7.65294301 1.89381217 46 -9.25360397 -7.65294301 47 4.47161624 -9.25360397 48 -3.02845526 4.47161624 49 -1.42403727 -3.02845526 50 3.74075462 -1.42403727 51 -0.09757078 3.74075462 52 -4.10667023 -0.09757078 53 10.44662116 -4.10667023 54 5.37096338 10.44662116 55 2.27805529 5.37096338 56 3.58434641 2.27805529 57 2.76574924 3.58434641 58 8.26238442 2.76574924 59 -7.39867232 8.26238442 60 3.34141119 -7.39867232 61 0.36669571 3.34141119 62 -3.48095994 0.36669571 63 1.52890743 -3.48095994 64 -1.41813775 1.52890743 65 -0.95176048 -1.41813775 66 -1.32492025 -0.95176048 67 -5.56304583 -1.32492025 68 3.22052989 -5.56304583 69 2.04408356 3.22052989 70 3.36375305 2.04408356 71 4.34469801 3.36375305 72 8.70203132 4.34469801 73 -7.19095037 8.70203132 74 3.03730133 -7.19095037 75 3.46211739 3.03730133 76 5.06744541 3.46211739 77 7.46014742 5.06744541 78 -4.64673573 7.46014742 79 -17.57287628 -4.64673573 80 0.27033397 -17.57287628 81 6.85750039 0.27033397 82 -3.76217297 6.85750039 83 1.12255535 -3.76217297 84 -4.00351975 1.12255535 85 5.05405392 -4.00351975 86 3.75912910 5.05405392 87 -0.15955944 3.75912910 88 -0.94959709 -0.15955944 89 -0.59828021 -0.94959709 90 4.63229863 -0.59828021 91 1.31143359 4.63229863 92 2.13415197 1.31143359 93 5.19589729 2.13415197 94 1.96126063 5.19589729 95 0.14749262 1.96126063 96 -3.05661539 0.14749262 97 -11.98218357 -3.05661539 98 2.31367869 -11.98218357 99 6.38320662 2.31367869 100 4.76831853 6.38320662 101 -0.87921082 4.76831853 102 1.64300437 -0.87921082 103 1.10019222 1.64300437 104 -9.16225654 1.10019222 105 5.66396553 -9.16225654 106 -0.27767895 5.66396553 107 4.10817651 -0.27767895 108 -0.71505948 4.10817651 109 -9.22110747 -0.71505948 110 2.31799463 -9.22110747 111 2.93271800 2.31799463 112 9.75055638 2.93271800 113 -1.50398847 9.75055638 114 2.86686802 -1.50398847 115 -0.88187704 2.86686802 116 0.12721591 -0.88187704 117 1.31864216 0.12721591 118 0.72832447 1.31864216 119 -3.94511906 0.72832447 120 4.47468185 -3.94511906 121 -12.35669271 4.47468185 122 5.50251522 -12.35669271 123 1.99109742 5.50251522 124 1.58306088 1.99109742 125 0.52289099 1.58306088 126 -4.15622270 0.52289099 127 -1.34319824 -4.15622270 128 7.05699173 -1.34319824 129 -7.82762014 7.05699173 130 -5.73735437 -7.82762014 131 -0.90847961 -5.73735437 132 -2.10711133 -0.90847961 133 -4.65988780 -2.10711133 134 0.22603048 -4.65988780 135 2.58439074 0.22603048 136 5.63911173 2.58439074 137 -1.40804609 5.63911173 138 0.10168417 -1.40804609 139 -1.64806301 0.10168417 140 2.60314206 -1.64806301 141 -4.14079905 2.60314206 142 -1.64379534 -4.14079905 143 -4.17305392 -1.64379534 144 -7.66395818 -4.17305392 145 -3.50122833 -7.66395818 > 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/7ppr61292754260.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/8hg891292754260.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/9hg891292754260.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/10hg891292754260.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/11er6i1292754260.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/12z9n61292754260.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/13dj2w1292754260.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/14y1jk1292754260.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/152kh81292754260.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/16nkgw1292754260.tab") + } > > try(system("convert tmp/1bytx1292754260.ps tmp/1bytx1292754260.png",intern=TRUE)) character(0) > try(system("convert tmp/2lpa01292754260.ps tmp/2lpa01292754260.png",intern=TRUE)) character(0) > try(system("convert tmp/3lpa01292754260.ps tmp/3lpa01292754260.png",intern=TRUE)) character(0) > try(system("convert tmp/4lpa01292754260.ps tmp/4lpa01292754260.png",intern=TRUE)) character(0) > try(system("convert tmp/5wgs31292754260.ps tmp/5wgs31292754260.png",intern=TRUE)) character(0) > try(system("convert tmp/6wgs31292754260.ps tmp/6wgs31292754260.png",intern=TRUE)) character(0) > try(system("convert tmp/7ppr61292754260.ps tmp/7ppr61292754260.png",intern=TRUE)) character(0) > try(system("convert tmp/8hg891292754260.ps tmp/8hg891292754260.png",intern=TRUE)) character(0) > try(system("convert tmp/9hg891292754260.ps tmp/9hg891292754260.png",intern=TRUE)) character(0) > try(system("convert tmp/10hg891292754260.ps tmp/10hg891292754260.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.852 1.803 9.530