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(41 + ,25 + ,15 + ,9 + ,3 + ,38 + ,25 + ,15 + ,9 + ,4 + ,37 + ,19 + ,14 + ,9 + ,4 + ,42 + ,18 + ,10 + ,8 + ,4 + ,40 + ,23 + ,18 + ,15 + ,3 + ,43 + ,25 + ,14 + ,9 + ,4 + ,40 + ,23 + ,11 + ,11 + ,4 + ,45 + ,30 + ,17 + ,6 + ,5 + ,45 + ,32 + ,21 + ,10 + ,4 + ,44 + ,25 + ,7 + ,11 + ,4 + ,42 + ,26 + ,18 + ,16 + ,4 + ,32 + ,25 + ,13 + ,11 + ,5 + ,32 + ,25 + ,13 + ,11 + ,5 + ,41 + ,35 + ,18 + ,7 + ,4 + ,38 + ,20 + ,12 + ,10 + ,4 + ,38 + ,21 + ,9 + ,9 + ,4 + ,24 + ,23 + ,11 + ,15 + ,3 + ,46 + ,17 + ,11 + ,6 + ,5 + ,42 + ,27 + ,16 + ,12 + ,4 + ,46 + ,25 + ,12 + ,10 + ,4 + ,43 + ,18 + ,14 + ,14 + ,5 + ,38 + ,22 + ,13 + ,9 + ,4 + ,39 + ,23 + ,17 + ,14 + ,4 + ,40 + ,25 + ,13 + ,14 + ,3 + ,37 + ,19 + ,13 + ,9 + ,2 + ,41 + ,20 + ,12 + ,8 + ,4 + ,46 + ,26 + ,12 + ,10 + ,4 + ,26 + ,16 + ,12 + ,9 + ,3 + ,37 + ,22 + ,9 + ,9 + ,3 + ,39 + ,25 + ,17 + ,9 + ,4 + ,44 + ,29 + ,18 + ,11 + ,5 + ,38 + ,22 + ,12 + ,10 + ,2 + ,38 + ,32 + ,12 + ,8 + ,0 + ,38 + ,23 + ,9 + ,14 + ,4 + ,33 + ,18 + ,13 + ,10 + ,3 + ,43 + ,26 + ,11 + ,14 + ,4 + ,41 + ,14 + ,13 + ,15 + ,2 + ,49 + ,20 + ,6 + ,8 + ,4 + ,45 + ,25 + ,11 + ,10 + ,5 + ,31 + ,21 + ,18 + ,13 + ,3 + ,30 + ,21 + ,18 + ,13 + ,3 + ,38 + ,23 + ,15 + ,10 + ,4 + ,39 + ,24 + ,11 + ,11 + ,4 + ,40 + ,21 + ,14 + ,10 + ,4 + ,36 + ,17 + ,12 + ,16 + ,2 + ,49 + ,29 + ,8 + ,6 + ,5 + ,41 + ,25 + ,11 + ,11 + ,4 + ,42 + ,25 + ,17 + ,14 + ,3 + ,41 + ,25 + ,16 + ,9 + ,5 + ,43 + ,21 + ,13 + ,11 + ,4 + ,46 + ,23 + ,15 + ,8 + ,3 + ,41 + ,25 + ,16 + ,8 + ,5 + ,39 + ,25 + ,7 + ,11 + ,4 + ,42 + ,24 + ,16 + ,16 + ,4 + ,35 + ,21 + ,13 + ,12 + ,5 + ,36 + ,22 + ,15 + ,14 + ,3 + ,48 + ,14 + ,12 + ,8 + ,4 + ,41 + ,20 + ,12 + ,10 + ,4 + ,47 + ,21 + ,24 + ,14 + ,3 + ,41 + ,22 + ,15 + ,10 + ,3 + ,31 + ,19 + ,8 + ,5 + ,5 + ,36 + ,28 + ,18 + ,12 + ,4 + ,46 + ,25 + ,17 + ,9 + ,4 + ,44 + ,21 + ,15 + ,8 + ,4 + ,43 + ,27 + ,11 + ,16 + ,2 + ,40 + ,19 + ,12 + ,13 + ,5 + ,40 + ,20 + ,14 + ,8 + ,3 + ,46 + ,17 + ,11 + ,14 + ,3 + ,39 + ,22 + ,10 + ,8 + ,4 + ,44 + ,26 + ,11 + ,7 + ,4 + ,38 + ,17 + ,12 + ,11 + ,2 + ,39 + ,15 + ,6 + ,6 + ,4 + ,41 + ,27 + ,15 + ,9 + ,5 + ,39 + ,25 + ,14 + ,14 + ,3 + ,40 + ,19 + ,16 + ,12 + ,4 + ,44 + ,18 + ,16 + ,8 + ,4 + ,42 + ,15 + ,11 + ,8 + ,4 + ,46 + ,29 + ,15 + ,12 + ,5 + ,44 + ,24 + ,12 + ,13 + ,4 + ,37 + ,24 + ,13 + ,11 + ,4 + ,39 + ,22 + ,14 + ,12 + ,2 + ,40 + ,22 + ,12 + ,13 + ,3 + ,42 + ,25 + ,17 + ,14 + ,3 + ,37 + ,21 + ,11 + ,9 + ,3 + ,33 + ,21 + ,13 + ,8 + ,2 + ,35 + ,18 + ,9 + ,8 + ,4 + ,42 + ,10 + ,12 + ,9 + ,2 + ,36 + ,18 + ,10 + ,14 + ,2 + ,44 + ,23 + ,9 + ,14 + ,4 + ,45 + ,24 + ,11 + ,14 + ,4 + ,47 + ,32 + ,9 + ,14 + ,4 + ,40 + ,24 + ,16 + ,9 + ,4 + ,49 + ,17 + ,14 + ,14 + ,4 + ,48 + ,30 + ,24 + ,8 + ,5 + ,29 + ,25 + ,9 + ,10 + ,4 + ,45 + ,23 + ,11 + ,11 + ,5 + ,29 + ,19 + ,14 + ,13 + ,2 + ,41 + ,21 + ,12 + ,9 + ,4 + ,34 + ,24 + ,8 + ,13 + ,2 + ,38 + ,23 + ,5 + ,16 + ,2 + ,37 + ,19 + ,10 + ,12 + ,3 + ,48 + ,27 + ,15 + ,4 + ,5 + ,39 + ,26 + ,10 + ,10 + ,4 + ,34 + ,26 + ,18 + ,14 + ,4 + ,35 + ,16 + ,12 + ,10 + ,2 + ,41 + ,27 + ,13 + ,9 + ,3 + ,43 + ,14 + ,11 + ,8 + ,4 + ,41 + ,18 + ,12 + ,9 + ,3 + ,39 + ,21 + ,7 + ,15 + ,2 + ,36 + ,22 + ,17 + ,8 + ,4 + ,32 + ,31 + ,9 + ,11 + ,4 + ,46 + ,23 + ,10 + ,12 + ,4 + ,42 + ,24 + ,12 + ,9 + ,4 + ,42 + ,19 + ,10 + ,13 + ,2 + ,45 + ,22 + ,7 + ,7 + ,3 + ,39 + ,24 + ,13 + ,10 + ,4 + ,45 + ,28 + ,9 + ,11 + ,4 + ,48 + ,24 + ,9 + ,8 + ,5 + ,28 + ,15 + ,12 + ,14 + ,4 + ,35 + ,21 + ,11 + ,9 + ,2 + ,38 + ,21 + ,14 + ,16 + ,4 + ,42 + ,13 + ,8 + ,11 + ,4 + ,36 + ,20 + ,11 + ,12 + ,3 + ,37 + ,22 + ,11 + ,8 + ,4 + ,38 + ,19 + ,12 + ,7 + ,3 + ,43 + ,26 + ,20 + ,13 + ,4 + ,35 + ,19 + ,8 + ,20 + ,2 + ,36 + ,20 + ,11 + ,11 + ,4 + ,33 + ,14 + ,15 + ,10 + ,2 + ,39 + ,17 + ,12 + ,16 + ,4 + ,32 + ,29 + ,12 + ,12 + ,4 + ,45 + ,21 + ,12 + ,8 + ,3 + ,35 + ,19 + ,11 + ,10 + ,4 + ,38 + ,17 + ,9 + ,11 + ,3 + ,36 + ,19 + ,8 + ,14 + ,3 + ,42 + ,17 + ,12 + ,10 + ,3 + ,41 + ,19 + ,13 + ,12 + ,4 + ,47 + ,21 + ,17 + ,11 + ,3 + ,35 + ,20 + ,16 + ,11 + ,3 + ,43 + ,20 + ,11 + ,14 + ,3 + ,40 + ,29 + ,9 + ,16 + ,4 + ,46 + ,23 + ,11 + ,9 + ,4 + ,44 + ,23 + ,11 + ,11 + ,5 + ,35 + ,19 + ,13 + ,9 + ,3 + ,29 + ,22 + ,15 + ,14 + ,4) + ,dim=c(5 + ,145) + ,dimnames=list(c('StudyForCareer' + ,'PersonalStandards' + ,'ParentalExpectations' + ,'Doubts' + ,'LeaderPreference') + ,1:145)) > y <- array(NA,dim=c(5,145),dimnames=list(c('StudyForCareer','PersonalStandards','ParentalExpectations','Doubts','LeaderPreference'),1:145)) > 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 StudyForCareer PersonalStandards ParentalExpectations Doubts 1 41 25 15 9 2 38 25 15 9 3 37 19 14 9 4 42 18 10 8 5 40 23 18 15 6 43 25 14 9 7 40 23 11 11 8 45 30 17 6 9 45 32 21 10 10 44 25 7 11 11 42 26 18 16 12 32 25 13 11 13 32 25 13 11 14 41 35 18 7 15 38 20 12 10 16 38 21 9 9 17 24 23 11 15 18 46 17 11 6 19 42 27 16 12 20 46 25 12 10 21 43 18 14 14 22 38 22 13 9 23 39 23 17 14 24 40 25 13 14 25 37 19 13 9 26 41 20 12 8 27 46 26 12 10 28 26 16 12 9 29 37 22 9 9 30 39 25 17 9 31 44 29 18 11 32 38 22 12 10 33 38 32 12 8 34 38 23 9 14 35 33 18 13 10 36 43 26 11 14 37 41 14 13 15 38 49 20 6 8 39 45 25 11 10 40 31 21 18 13 41 30 21 18 13 42 38 23 15 10 43 39 24 11 11 44 40 21 14 10 45 36 17 12 16 46 49 29 8 6 47 41 25 11 11 48 42 25 17 14 49 41 25 16 9 50 43 21 13 11 51 46 23 15 8 52 41 25 16 8 53 39 25 7 11 54 42 24 16 16 55 35 21 13 12 56 36 22 15 14 57 48 14 12 8 58 41 20 12 10 59 47 21 24 14 60 41 22 15 10 61 31 19 8 5 62 36 28 18 12 63 46 25 17 9 64 44 21 15 8 65 43 27 11 16 66 40 19 12 13 67 40 20 14 8 68 46 17 11 14 69 39 22 10 8 70 44 26 11 7 71 38 17 12 11 72 39 15 6 6 73 41 27 15 9 74 39 25 14 14 75 40 19 16 12 76 44 18 16 8 77 42 15 11 8 78 46 29 15 12 79 44 24 12 13 80 37 24 13 11 81 39 22 14 12 82 40 22 12 13 83 42 25 17 14 84 37 21 11 9 85 33 21 13 8 86 35 18 9 8 87 42 10 12 9 88 36 18 10 14 89 44 23 9 14 90 45 24 11 14 91 47 32 9 14 92 40 24 16 9 93 49 17 14 14 94 48 30 24 8 95 29 25 9 10 96 45 23 11 11 97 29 19 14 13 98 41 21 12 9 99 34 24 8 13 100 38 23 5 16 101 37 19 10 12 102 48 27 15 4 103 39 26 10 10 104 34 26 18 14 105 35 16 12 10 106 41 27 13 9 107 43 14 11 8 108 41 18 12 9 109 39 21 7 15 110 36 22 17 8 111 32 31 9 11 112 46 23 10 12 113 42 24 12 9 114 42 19 10 13 115 45 22 7 7 116 39 24 13 10 117 45 28 9 11 118 48 24 9 8 119 28 15 12 14 120 35 21 11 9 121 38 21 14 16 122 42 13 8 11 123 36 20 11 12 124 37 22 11 8 125 38 19 12 7 126 43 26 20 13 127 35 19 8 20 128 36 20 11 11 129 33 14 15 10 130 39 17 12 16 131 32 29 12 12 132 45 21 12 8 133 35 19 11 10 134 38 17 9 11 135 36 19 8 14 136 42 17 12 10 137 41 19 13 12 138 47 21 17 11 139 35 20 16 11 140 43 20 11 14 141 40 29 9 16 142 46 23 11 9 143 44 23 11 11 144 35 19 13 9 145 29 22 15 14 LeaderPreference 1 3 2 4 3 4 4 4 5 3 6 4 7 4 8 5 9 4 10 4 11 4 12 5 13 5 14 4 15 4 16 4 17 3 18 5 19 4 20 4 21 5 22 4 23 4 24 3 25 2 26 4 27 4 28 3 29 3 30 4 31 5 32 2 33 0 34 4 35 3 36 4 37 2 38 4 39 5 40 3 41 3 42 4 43 4 44 4 45 2 46 5 47 4 48 3 49 5 50 4 51 3 52 5 53 4 54 4 55 5 56 3 57 4 58 4 59 3 60 3 61 5 62 4 63 4 64 4 65 2 66 5 67 3 68 3 69 4 70 4 71 2 72 4 73 5 74 3 75 4 76 4 77 4 78 5 79 4 80 4 81 2 82 3 83 3 84 3 85 2 86 4 87 2 88 2 89 4 90 4 91 4 92 4 93 4 94 5 95 4 96 5 97 2 98 4 99 2 100 2 101 3 102 5 103 4 104 4 105 2 106 3 107 4 108 3 109 2 110 4 111 4 112 4 113 4 114 2 115 3 116 4 117 4 118 5 119 4 120 2 121 4 122 4 123 3 124 4 125 3 126 4 127 2 128 4 129 2 130 4 131 4 132 3 133 4 134 3 135 3 136 3 137 4 138 3 139 3 140 3 141 4 142 4 143 5 144 3 145 4 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) PersonalStandards ParentalExpectations 34.11213 0.14666 0.03216 Doubts LeaderPreference -0.21615 1.20809 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -14.221 -2.307 0.535 3.222 10.138 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 34.11213 3.12985 10.899 <2e-16 *** PersonalStandards 0.14666 0.09936 1.476 0.1422 ParentalExpectations 0.03216 0.12218 0.263 0.7927 Doubts -0.21615 0.14791 -1.461 0.1462 LeaderPreference 1.20809 0.46291 2.610 0.0100 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.755 on 140 degrees of freedom Multiple R-squared: 0.1148, Adjusted R-squared: 0.08954 F-statistic: 4.54 on 4 and 140 DF, p-value: 0.001770 > 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.23596916 0.47193832 0.7640308 [2,] 0.12958416 0.25916832 0.8704158 [3,] 0.06124303 0.12248607 0.9387570 [4,] 0.02709022 0.05418044 0.9729098 [5,] 0.23517826 0.47035652 0.7648217 [6,] 0.28509606 0.57019212 0.7149039 [7,] 0.31610811 0.63221623 0.6838919 [8,] 0.23299911 0.46599822 0.7670009 [9,] 0.17212486 0.34424971 0.8278751 [10,] 0.76859571 0.46280857 0.2314043 [11,] 0.75737599 0.48524803 0.2426240 [12,] 0.72007888 0.55984224 0.2799211 [13,] 0.77114348 0.45771304 0.2288565 [14,] 0.77322086 0.45355829 0.2267791 [15,] 0.73216488 0.53567023 0.2678351 [16,] 0.67011035 0.65977929 0.3298896 [17,] 0.63601105 0.72797790 0.3639889 [18,] 0.58169965 0.83660070 0.4183003 [19,] 0.51411005 0.97177990 0.4858899 [20,] 0.55743965 0.88512070 0.4425603 [21,] 0.81858165 0.36283671 0.1814184 [22,] 0.77647400 0.44705199 0.2235260 [23,] 0.73705614 0.52588772 0.2629439 [24,] 0.68597627 0.62804747 0.3140237 [25,] 0.63940896 0.72118208 0.3605910 [26,] 0.58381588 0.83236823 0.4161841 [27,] 0.52760541 0.94478919 0.4723946 [28,] 0.51252374 0.97495253 0.4874763 [29,] 0.48904145 0.97808290 0.5109585 [30,] 0.56871003 0.86257993 0.4312900 [31,] 0.70786920 0.58426160 0.2921308 [32,] 0.67507246 0.64985508 0.3249275 [33,] 0.70817884 0.58364232 0.2918212 [34,] 0.75756459 0.48487082 0.2424354 [35,] 0.72150041 0.55699918 0.2784996 [36,] 0.67896255 0.64207490 0.3210375 [37,] 0.63146256 0.73707487 0.3685374 [38,] 0.59196925 0.81606151 0.4080308 [39,] 0.58516711 0.82966578 0.4148329 [40,] 0.53316194 0.93367613 0.4668381 [41,] 0.52292763 0.95414473 0.4770724 [42,] 0.47339384 0.94678768 0.5266062 [43,] 0.44982103 0.89964205 0.5501790 [44,] 0.50246428 0.99507144 0.4975357 [45,] 0.45557449 0.91114899 0.5444255 [46,] 0.41788734 0.83577468 0.5821127 [47,] 0.39121474 0.78242948 0.6087853 [48,] 0.41442030 0.82884059 0.5855797 [49,] 0.37579495 0.75158989 0.6242051 [50,] 0.50062813 0.99874374 0.4993719 [51,] 0.45283029 0.90566057 0.5471697 [52,] 0.57996862 0.84006276 0.4200314 [53,] 0.53687292 0.92625416 0.4631271 [54,] 0.73172294 0.53655412 0.2682771 [55,] 0.73547627 0.52904745 0.2645237 [56,] 0.73328444 0.53343111 0.2667156 [57,] 0.70961201 0.58077597 0.2903880 [58,] 0.72959341 0.54081318 0.2704066 [59,] 0.69105702 0.61788596 0.3089430 [60,] 0.64757256 0.70485488 0.3524274 [61,] 0.73541790 0.52916419 0.2645821 [62,] 0.70011827 0.59976346 0.2998817 [63,] 0.66727640 0.66544719 0.3327236 [64,] 0.62433013 0.75133974 0.3756699 [65,] 0.58183502 0.83632997 0.4181650 [66,] 0.54021159 0.91957683 0.4597884 [67,] 0.49211484 0.98422968 0.5078852 [68,] 0.44399509 0.88799018 0.5560049 [69,] 0.42131238 0.84262476 0.5786876 [70,] 0.38177144 0.76354289 0.6182286 [71,] 0.36315573 0.72631146 0.6368443 [72,] 0.34761090 0.69522181 0.6523891 [73,] 0.32617277 0.65234553 0.6738272 [74,] 0.28983932 0.57967863 0.7101607 [75,] 0.25354766 0.50709531 0.7464523 [76,] 0.23749541 0.47499083 0.7625046 [77,] 0.20831197 0.41662395 0.7916880 [78,] 0.21009353 0.42018707 0.7899065 [79,] 0.22506354 0.45012709 0.7749365 [80,] 0.23567531 0.47135062 0.7643247 [81,] 0.19996417 0.39992834 0.8000358 [82,] 0.19125455 0.38250911 0.8087454 [83,] 0.19636871 0.39273741 0.8036313 [84,] 0.22592322 0.45184644 0.7740768 [85,] 0.19055335 0.38110671 0.8094466 [86,] 0.33746163 0.67492326 0.6625384 [87,] 0.37245524 0.74491048 0.6275448 [88,] 0.65271030 0.69457939 0.3472897 [89,] 0.62734282 0.74531436 0.3726572 [90,] 0.68190502 0.63618997 0.3180950 [91,] 0.63350776 0.73298449 0.3664922 [92,] 0.61356185 0.77287630 0.3864382 [93,] 0.56345621 0.87308759 0.4365438 [94,] 0.51449811 0.97100378 0.4855019 [95,] 0.50770776 0.98458448 0.4922922 [96,] 0.46243283 0.92486567 0.5375672 [97,] 0.45252877 0.90505755 0.5474712 [98,] 0.41388388 0.82776776 0.5861161 [99,] 0.36289171 0.72578342 0.6371083 [100,] 0.32845069 0.65690137 0.6715493 [101,] 0.28641826 0.57283651 0.7135817 [102,] 0.24555355 0.49110711 0.7544464 [103,] 0.23229541 0.46459081 0.7677046 [104,] 0.40712127 0.81424255 0.5928787 [105,] 0.42886638 0.85773276 0.5711336 [106,] 0.37162571 0.74325141 0.6283743 [107,] 0.37706247 0.75412495 0.6229375 [108,] 0.35497044 0.70994088 0.6450296 [109,] 0.30503975 0.61007950 0.6949603 [110,] 0.27659815 0.55319630 0.7234019 [111,] 0.29497138 0.58994276 0.7050286 [112,] 0.49834249 0.99668498 0.5016575 [113,] 0.44556692 0.89113384 0.5544331 [114,] 0.37850039 0.75700079 0.6214996 [115,] 0.34135393 0.68270786 0.6586461 [116,] 0.28818642 0.57637284 0.7118136 [117,] 0.25403540 0.50807080 0.7459646 [118,] 0.20542199 0.41084397 0.7945780 [119,] 0.19485594 0.38971188 0.8051441 [120,] 0.14579468 0.29158936 0.8542053 [121,] 0.12581734 0.25163468 0.8741827 [122,] 0.12453115 0.24906229 0.8754689 [123,] 0.09541888 0.19083776 0.9045811 [124,] 0.22324884 0.44649768 0.7767512 [125,] 0.16338819 0.32677639 0.8366118 [126,] 0.16189225 0.32378451 0.8381077 [127,] 0.10969730 0.21939460 0.8903027 [128,] 0.07733732 0.15467464 0.9226627 [129,] 0.04204189 0.08408378 0.9579581 [130,] 0.02382211 0.04764422 0.9761779 > postscript(file="/var/www/html/rcomp/tmp/179eh1292684824.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/279eh1292684824.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/379eh1292684824.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/4hiv21292684824.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/5hiv21292684824.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 = 145 Frequency = 1 1 2 3 4 5 6 1.06001219 -3.14807958 -3.23596592 1.82320197 1.55372660 1.88408501 7 8 9 10 11 12 -0.29380760 1.19776268 2.84847428 3.54153438 2.12180893 -9.85954490 13 14 15 16 17 18 -9.85954490 -2.14345240 -2.10214629 -2.36845934 -14.22112129 4.29730653 19 20 21 22 23 24 1.17488538 5.16456282 2.78334367 -2.64377587 -0.83834922 1.20508454 25 26 27 28 29 30 -0.78761779 0.46555644 5.01790464 -12.52357044 -2.30702575 -2.21240875 31 32 33 34 35 36 1.39299945 0.02072089 0.53802536 -1.58103252 -5.63290275 2.91466377 37 38 39 40 41 42 5.24256491 8.65854396 2.98863564 -7.58525431 -8.58525431 -2.63861458 43 44 45 46 47 48 -1.44046578 -0.31313364 0.05090360 5.63390214 0.41287604 3.07642619 49 50 51 52 53 54 -1.38833593 2.93517958 6.13717991 -1.60448457 -1.45846562 2.47945446 55 56 57 58 59 60 -6.05676355 -2.41927010 8.34550552 0.89785371 8.43790680 1.71613536 61 62 63 64 65 66 -11.11566471 -5.03610197 4.78759125 3.22240450 5.61648639 -0.51513397 67 68 69 70 71 72 0.60931904 8.44267915 -1.76343074 2.40162332 0.97016042 -1.04046241 73 74 75 76 77 78 -1.64948770 0.17291995 0.34815082 3.63021445 2.23101193 3.70564184 79 80 81 82 83 84 3.95966690 -3.50479496 1.38868899 1.46107503 3.07642619 -2.22469675 85 86 87 88 89 90 -5.29708279 -5.14463344 5.56447041 -0.46372268 4.41896748 5.20798012 91 92 93 94 95 96 6.09904386 -1.03358599 10.13809362 4.40490784 -11.73894342 3.49810063 97 98 99 100 101 102 -7.95518784 0.53504690 -3.49549122 1.39610663 -1.25076990 4.26976912 103 104 105 106 107 108 -1.91776619 -6.31048834 -2.09933003 0.83102500 3.37767010 2.18311320 109 110 111 112 113 114 2.40894518 -4.98858285 -9.40274386 5.95450562 1.09507236 5.17347051 115 116 117 118 119 120 5.32500615 -1.72094359 4.03723067 5.76732572 -10.50426085 -3.01660498 121 122 123 124 125 126 -1.01624183 3.26926795 -2.42959266 -3.79559533 -1.39584225 2.40903385 127 128 129 130 131 132 -0.24915987 -3.85383307 -3.90250744 0.63472006 -8.98977263 5.52699003 133 134 135 136 137 138 -4.92332352 -0.14143759 -1.75414345 3.54592002 1.44464458 8.01461300 139 140 141 142 143 144 -3.80656423 5.00270461 -0.02868433 5.27389513 2.49810063 -3.99570956 145 -10.62736186 > postscript(file="/var/www/html/rcomp/tmp/6hiv21292684824.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 = 145 Frequency = 1 lag(myerror, k = 1) myerror 0 1.06001219 NA 1 -3.14807958 1.06001219 2 -3.23596592 -3.14807958 3 1.82320197 -3.23596592 4 1.55372660 1.82320197 5 1.88408501 1.55372660 6 -0.29380760 1.88408501 7 1.19776268 -0.29380760 8 2.84847428 1.19776268 9 3.54153438 2.84847428 10 2.12180893 3.54153438 11 -9.85954490 2.12180893 12 -9.85954490 -9.85954490 13 -2.14345240 -9.85954490 14 -2.10214629 -2.14345240 15 -2.36845934 -2.10214629 16 -14.22112129 -2.36845934 17 4.29730653 -14.22112129 18 1.17488538 4.29730653 19 5.16456282 1.17488538 20 2.78334367 5.16456282 21 -2.64377587 2.78334367 22 -0.83834922 -2.64377587 23 1.20508454 -0.83834922 24 -0.78761779 1.20508454 25 0.46555644 -0.78761779 26 5.01790464 0.46555644 27 -12.52357044 5.01790464 28 -2.30702575 -12.52357044 29 -2.21240875 -2.30702575 30 1.39299945 -2.21240875 31 0.02072089 1.39299945 32 0.53802536 0.02072089 33 -1.58103252 0.53802536 34 -5.63290275 -1.58103252 35 2.91466377 -5.63290275 36 5.24256491 2.91466377 37 8.65854396 5.24256491 38 2.98863564 8.65854396 39 -7.58525431 2.98863564 40 -8.58525431 -7.58525431 41 -2.63861458 -8.58525431 42 -1.44046578 -2.63861458 43 -0.31313364 -1.44046578 44 0.05090360 -0.31313364 45 5.63390214 0.05090360 46 0.41287604 5.63390214 47 3.07642619 0.41287604 48 -1.38833593 3.07642619 49 2.93517958 -1.38833593 50 6.13717991 2.93517958 51 -1.60448457 6.13717991 52 -1.45846562 -1.60448457 53 2.47945446 -1.45846562 54 -6.05676355 2.47945446 55 -2.41927010 -6.05676355 56 8.34550552 -2.41927010 57 0.89785371 8.34550552 58 8.43790680 0.89785371 59 1.71613536 8.43790680 60 -11.11566471 1.71613536 61 -5.03610197 -11.11566471 62 4.78759125 -5.03610197 63 3.22240450 4.78759125 64 5.61648639 3.22240450 65 -0.51513397 5.61648639 66 0.60931904 -0.51513397 67 8.44267915 0.60931904 68 -1.76343074 8.44267915 69 2.40162332 -1.76343074 70 0.97016042 2.40162332 71 -1.04046241 0.97016042 72 -1.64948770 -1.04046241 73 0.17291995 -1.64948770 74 0.34815082 0.17291995 75 3.63021445 0.34815082 76 2.23101193 3.63021445 77 3.70564184 2.23101193 78 3.95966690 3.70564184 79 -3.50479496 3.95966690 80 1.38868899 -3.50479496 81 1.46107503 1.38868899 82 3.07642619 1.46107503 83 -2.22469675 3.07642619 84 -5.29708279 -2.22469675 85 -5.14463344 -5.29708279 86 5.56447041 -5.14463344 87 -0.46372268 5.56447041 88 4.41896748 -0.46372268 89 5.20798012 4.41896748 90 6.09904386 5.20798012 91 -1.03358599 6.09904386 92 10.13809362 -1.03358599 93 4.40490784 10.13809362 94 -11.73894342 4.40490784 95 3.49810063 -11.73894342 96 -7.95518784 3.49810063 97 0.53504690 -7.95518784 98 -3.49549122 0.53504690 99 1.39610663 -3.49549122 100 -1.25076990 1.39610663 101 4.26976912 -1.25076990 102 -1.91776619 4.26976912 103 -6.31048834 -1.91776619 104 -2.09933003 -6.31048834 105 0.83102500 -2.09933003 106 3.37767010 0.83102500 107 2.18311320 3.37767010 108 2.40894518 2.18311320 109 -4.98858285 2.40894518 110 -9.40274386 -4.98858285 111 5.95450562 -9.40274386 112 1.09507236 5.95450562 113 5.17347051 1.09507236 114 5.32500615 5.17347051 115 -1.72094359 5.32500615 116 4.03723067 -1.72094359 117 5.76732572 4.03723067 118 -10.50426085 5.76732572 119 -3.01660498 -10.50426085 120 -1.01624183 -3.01660498 121 3.26926795 -1.01624183 122 -2.42959266 3.26926795 123 -3.79559533 -2.42959266 124 -1.39584225 -3.79559533 125 2.40903385 -1.39584225 126 -0.24915987 2.40903385 127 -3.85383307 -0.24915987 128 -3.90250744 -3.85383307 129 0.63472006 -3.90250744 130 -8.98977263 0.63472006 131 5.52699003 -8.98977263 132 -4.92332352 5.52699003 133 -0.14143759 -4.92332352 134 -1.75414345 -0.14143759 135 3.54592002 -1.75414345 136 1.44464458 3.54592002 137 8.01461300 1.44464458 138 -3.80656423 8.01461300 139 5.00270461 -3.80656423 140 -0.02868433 5.00270461 141 5.27389513 -0.02868433 142 2.49810063 5.27389513 143 -3.99570956 2.49810063 144 -10.62736186 -3.99570956 145 NA -10.62736186 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -3.14807958 1.06001219 [2,] -3.23596592 -3.14807958 [3,] 1.82320197 -3.23596592 [4,] 1.55372660 1.82320197 [5,] 1.88408501 1.55372660 [6,] -0.29380760 1.88408501 [7,] 1.19776268 -0.29380760 [8,] 2.84847428 1.19776268 [9,] 3.54153438 2.84847428 [10,] 2.12180893 3.54153438 [11,] -9.85954490 2.12180893 [12,] -9.85954490 -9.85954490 [13,] -2.14345240 -9.85954490 [14,] -2.10214629 -2.14345240 [15,] -2.36845934 -2.10214629 [16,] -14.22112129 -2.36845934 [17,] 4.29730653 -14.22112129 [18,] 1.17488538 4.29730653 [19,] 5.16456282 1.17488538 [20,] 2.78334367 5.16456282 [21,] -2.64377587 2.78334367 [22,] -0.83834922 -2.64377587 [23,] 1.20508454 -0.83834922 [24,] -0.78761779 1.20508454 [25,] 0.46555644 -0.78761779 [26,] 5.01790464 0.46555644 [27,] -12.52357044 5.01790464 [28,] -2.30702575 -12.52357044 [29,] -2.21240875 -2.30702575 [30,] 1.39299945 -2.21240875 [31,] 0.02072089 1.39299945 [32,] 0.53802536 0.02072089 [33,] -1.58103252 0.53802536 [34,] -5.63290275 -1.58103252 [35,] 2.91466377 -5.63290275 [36,] 5.24256491 2.91466377 [37,] 8.65854396 5.24256491 [38,] 2.98863564 8.65854396 [39,] -7.58525431 2.98863564 [40,] -8.58525431 -7.58525431 [41,] -2.63861458 -8.58525431 [42,] -1.44046578 -2.63861458 [43,] -0.31313364 -1.44046578 [44,] 0.05090360 -0.31313364 [45,] 5.63390214 0.05090360 [46,] 0.41287604 5.63390214 [47,] 3.07642619 0.41287604 [48,] -1.38833593 3.07642619 [49,] 2.93517958 -1.38833593 [50,] 6.13717991 2.93517958 [51,] -1.60448457 6.13717991 [52,] -1.45846562 -1.60448457 [53,] 2.47945446 -1.45846562 [54,] -6.05676355 2.47945446 [55,] -2.41927010 -6.05676355 [56,] 8.34550552 -2.41927010 [57,] 0.89785371 8.34550552 [58,] 8.43790680 0.89785371 [59,] 1.71613536 8.43790680 [60,] -11.11566471 1.71613536 [61,] -5.03610197 -11.11566471 [62,] 4.78759125 -5.03610197 [63,] 3.22240450 4.78759125 [64,] 5.61648639 3.22240450 [65,] -0.51513397 5.61648639 [66,] 0.60931904 -0.51513397 [67,] 8.44267915 0.60931904 [68,] -1.76343074 8.44267915 [69,] 2.40162332 -1.76343074 [70,] 0.97016042 2.40162332 [71,] -1.04046241 0.97016042 [72,] -1.64948770 -1.04046241 [73,] 0.17291995 -1.64948770 [74,] 0.34815082 0.17291995 [75,] 3.63021445 0.34815082 [76,] 2.23101193 3.63021445 [77,] 3.70564184 2.23101193 [78,] 3.95966690 3.70564184 [79,] -3.50479496 3.95966690 [80,] 1.38868899 -3.50479496 [81,] 1.46107503 1.38868899 [82,] 3.07642619 1.46107503 [83,] -2.22469675 3.07642619 [84,] -5.29708279 -2.22469675 [85,] -5.14463344 -5.29708279 [86,] 5.56447041 -5.14463344 [87,] -0.46372268 5.56447041 [88,] 4.41896748 -0.46372268 [89,] 5.20798012 4.41896748 [90,] 6.09904386 5.20798012 [91,] -1.03358599 6.09904386 [92,] 10.13809362 -1.03358599 [93,] 4.40490784 10.13809362 [94,] -11.73894342 4.40490784 [95,] 3.49810063 -11.73894342 [96,] -7.95518784 3.49810063 [97,] 0.53504690 -7.95518784 [98,] -3.49549122 0.53504690 [99,] 1.39610663 -3.49549122 [100,] -1.25076990 1.39610663 [101,] 4.26976912 -1.25076990 [102,] -1.91776619 4.26976912 [103,] -6.31048834 -1.91776619 [104,] -2.09933003 -6.31048834 [105,] 0.83102500 -2.09933003 [106,] 3.37767010 0.83102500 [107,] 2.18311320 3.37767010 [108,] 2.40894518 2.18311320 [109,] -4.98858285 2.40894518 [110,] -9.40274386 -4.98858285 [111,] 5.95450562 -9.40274386 [112,] 1.09507236 5.95450562 [113,] 5.17347051 1.09507236 [114,] 5.32500615 5.17347051 [115,] -1.72094359 5.32500615 [116,] 4.03723067 -1.72094359 [117,] 5.76732572 4.03723067 [118,] -10.50426085 5.76732572 [119,] -3.01660498 -10.50426085 [120,] -1.01624183 -3.01660498 [121,] 3.26926795 -1.01624183 [122,] -2.42959266 3.26926795 [123,] -3.79559533 -2.42959266 [124,] -1.39584225 -3.79559533 [125,] 2.40903385 -1.39584225 [126,] -0.24915987 2.40903385 [127,] -3.85383307 -0.24915987 [128,] -3.90250744 -3.85383307 [129,] 0.63472006 -3.90250744 [130,] -8.98977263 0.63472006 [131,] 5.52699003 -8.98977263 [132,] -4.92332352 5.52699003 [133,] -0.14143759 -4.92332352 [134,] -1.75414345 -0.14143759 [135,] 3.54592002 -1.75414345 [136,] 1.44464458 3.54592002 [137,] 8.01461300 1.44464458 [138,] -3.80656423 8.01461300 [139,] 5.00270461 -3.80656423 [140,] -0.02868433 5.00270461 [141,] 5.27389513 -0.02868433 [142,] 2.49810063 5.27389513 [143,] -3.99570956 2.49810063 [144,] -10.62736186 -3.99570956 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -3.14807958 1.06001219 2 -3.23596592 -3.14807958 3 1.82320197 -3.23596592 4 1.55372660 1.82320197 5 1.88408501 1.55372660 6 -0.29380760 1.88408501 7 1.19776268 -0.29380760 8 2.84847428 1.19776268 9 3.54153438 2.84847428 10 2.12180893 3.54153438 11 -9.85954490 2.12180893 12 -9.85954490 -9.85954490 13 -2.14345240 -9.85954490 14 -2.10214629 -2.14345240 15 -2.36845934 -2.10214629 16 -14.22112129 -2.36845934 17 4.29730653 -14.22112129 18 1.17488538 4.29730653 19 5.16456282 1.17488538 20 2.78334367 5.16456282 21 -2.64377587 2.78334367 22 -0.83834922 -2.64377587 23 1.20508454 -0.83834922 24 -0.78761779 1.20508454 25 0.46555644 -0.78761779 26 5.01790464 0.46555644 27 -12.52357044 5.01790464 28 -2.30702575 -12.52357044 29 -2.21240875 -2.30702575 30 1.39299945 -2.21240875 31 0.02072089 1.39299945 32 0.53802536 0.02072089 33 -1.58103252 0.53802536 34 -5.63290275 -1.58103252 35 2.91466377 -5.63290275 36 5.24256491 2.91466377 37 8.65854396 5.24256491 38 2.98863564 8.65854396 39 -7.58525431 2.98863564 40 -8.58525431 -7.58525431 41 -2.63861458 -8.58525431 42 -1.44046578 -2.63861458 43 -0.31313364 -1.44046578 44 0.05090360 -0.31313364 45 5.63390214 0.05090360 46 0.41287604 5.63390214 47 3.07642619 0.41287604 48 -1.38833593 3.07642619 49 2.93517958 -1.38833593 50 6.13717991 2.93517958 51 -1.60448457 6.13717991 52 -1.45846562 -1.60448457 53 2.47945446 -1.45846562 54 -6.05676355 2.47945446 55 -2.41927010 -6.05676355 56 8.34550552 -2.41927010 57 0.89785371 8.34550552 58 8.43790680 0.89785371 59 1.71613536 8.43790680 60 -11.11566471 1.71613536 61 -5.03610197 -11.11566471 62 4.78759125 -5.03610197 63 3.22240450 4.78759125 64 5.61648639 3.22240450 65 -0.51513397 5.61648639 66 0.60931904 -0.51513397 67 8.44267915 0.60931904 68 -1.76343074 8.44267915 69 2.40162332 -1.76343074 70 0.97016042 2.40162332 71 -1.04046241 0.97016042 72 -1.64948770 -1.04046241 73 0.17291995 -1.64948770 74 0.34815082 0.17291995 75 3.63021445 0.34815082 76 2.23101193 3.63021445 77 3.70564184 2.23101193 78 3.95966690 3.70564184 79 -3.50479496 3.95966690 80 1.38868899 -3.50479496 81 1.46107503 1.38868899 82 3.07642619 1.46107503 83 -2.22469675 3.07642619 84 -5.29708279 -2.22469675 85 -5.14463344 -5.29708279 86 5.56447041 -5.14463344 87 -0.46372268 5.56447041 88 4.41896748 -0.46372268 89 5.20798012 4.41896748 90 6.09904386 5.20798012 91 -1.03358599 6.09904386 92 10.13809362 -1.03358599 93 4.40490784 10.13809362 94 -11.73894342 4.40490784 95 3.49810063 -11.73894342 96 -7.95518784 3.49810063 97 0.53504690 -7.95518784 98 -3.49549122 0.53504690 99 1.39610663 -3.49549122 100 -1.25076990 1.39610663 101 4.26976912 -1.25076990 102 -1.91776619 4.26976912 103 -6.31048834 -1.91776619 104 -2.09933003 -6.31048834 105 0.83102500 -2.09933003 106 3.37767010 0.83102500 107 2.18311320 3.37767010 108 2.40894518 2.18311320 109 -4.98858285 2.40894518 110 -9.40274386 -4.98858285 111 5.95450562 -9.40274386 112 1.09507236 5.95450562 113 5.17347051 1.09507236 114 5.32500615 5.17347051 115 -1.72094359 5.32500615 116 4.03723067 -1.72094359 117 5.76732572 4.03723067 118 -10.50426085 5.76732572 119 -3.01660498 -10.50426085 120 -1.01624183 -3.01660498 121 3.26926795 -1.01624183 122 -2.42959266 3.26926795 123 -3.79559533 -2.42959266 124 -1.39584225 -3.79559533 125 2.40903385 -1.39584225 126 -0.24915987 2.40903385 127 -3.85383307 -0.24915987 128 -3.90250744 -3.85383307 129 0.63472006 -3.90250744 130 -8.98977263 0.63472006 131 5.52699003 -8.98977263 132 -4.92332352 5.52699003 133 -0.14143759 -4.92332352 134 -1.75414345 -0.14143759 135 3.54592002 -1.75414345 136 1.44464458 3.54592002 137 8.01461300 1.44464458 138 -3.80656423 8.01461300 139 5.00270461 -3.80656423 140 -0.02868433 5.00270461 141 5.27389513 -0.02868433 142 2.49810063 5.27389513 143 -3.99570956 2.49810063 144 -10.62736186 -3.99570956 > 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/7a9c51292684824.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/8lib81292684824.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/9lib81292684824.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/10lib81292684824.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/11zs9g1292684824.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/12ak8j1292684824.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/13g35d1292684824.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/14234j1292684824.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/15cclm1292684824.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/161elq1292684825.tab") + } > > try(system("convert tmp/179eh1292684824.ps tmp/179eh1292684824.png",intern=TRUE)) character(0) > try(system("convert tmp/279eh1292684824.ps tmp/279eh1292684824.png",intern=TRUE)) character(0) > try(system("convert tmp/379eh1292684824.ps tmp/379eh1292684824.png",intern=TRUE)) character(0) > try(system("convert tmp/4hiv21292684824.ps tmp/4hiv21292684824.png",intern=TRUE)) character(0) > try(system("convert tmp/5hiv21292684824.ps tmp/5hiv21292684824.png",intern=TRUE)) character(0) > try(system("convert tmp/6hiv21292684824.ps tmp/6hiv21292684824.png",intern=TRUE)) character(0) > try(system("convert tmp/7a9c51292684824.ps tmp/7a9c51292684824.png",intern=TRUE)) character(0) > try(system("convert tmp/8lib81292684824.ps tmp/8lib81292684824.png",intern=TRUE)) character(0) > try(system("convert tmp/9lib81292684824.ps tmp/9lib81292684824.png",intern=TRUE)) character(0) > try(system("convert tmp/10lib81292684824.ps tmp/10lib81292684824.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.811 1.808 10.263