R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(41 + ,25 + ,15 + ,9 + ,3 + ,38 + ,25 + ,15 + ,9 + ,4 + ,37 + ,19 + ,14 + ,9 + ,4 + ,36 + ,18 + ,10 + ,14 + ,2 + ,42 + ,18 + ,10 + ,8 + ,4 + ,44 + ,23 + ,9 + ,14 + ,4 + ,40 + ,23 + ,18 + ,15 + ,3 + ,43 + ,25 + ,14 + ,9 + ,4 + ,40 + ,23 + ,11 + ,11 + ,4 + ,45 + ,24 + ,11 + ,14 + ,4 + ,47 + ,32 + ,9 + ,14 + ,4 + ,45 + ,30 + ,17 + ,6 + ,5 + ,45 + ,32 + ,21 + ,10 + ,4 + ,40 + ,24 + ,16 + ,9 + ,4 + ,49 + ,17 + ,14 + ,14 + ,4 + ,48 + ,30 + ,24 + ,8 + ,5 + ,44 + ,25 + ,7 + ,11 + ,4 + ,29 + ,25 + ,9 + ,10 + ,4 + ,42 + ,26 + ,18 + ,16 + ,4 + ,45 + ,23 + ,11 + ,11 + ,5 + ,32 + ,25 + ,13 + ,11 + ,5 + ,32 + ,25 + ,13 + ,11 + ,5 + ,41 + ,35 + ,18 + ,7 + ,4 + ,29 + ,19 + ,14 + ,13 + ,2 + ,38 + ,20 + ,12 + ,10 + ,4 + ,41 + ,21 + ,12 + ,9 + ,4 + ,38 + ,21 + ,9 + ,9 + ,4 + ,24 + ,23 + ,11 + ,15 + ,3 + ,34 + ,24 + ,8 + ,13 + ,2 + ,38 + ,23 + ,5 + ,16 + ,2 + ,37 + ,19 + ,10 + ,12 + ,3 + ,46 + ,17 + ,11 + ,6 + ,5 + ,48 + ,27 + ,15 + ,4 + ,5 + ,42 + ,27 + ,16 + ,12 + ,4 + ,46 + ,25 + ,12 + ,10 + ,4 + ,43 + ,18 + ,14 + ,14 + ,5 + ,38 + ,22 + ,13 + ,9 + ,4 + ,39 + ,26 + ,10 + ,10 + ,4 + ,34 + ,26 + ,18 + ,14 + ,4 + ,39 + ,23 + ,17 + ,14 + ,4 + ,35 + ,16 + ,12 + ,10 + ,2 + ,41 + ,27 + ,13 + ,9 + ,3 + ,40 + ,25 + ,13 + ,14 + ,3 + ,43 + ,14 + ,11 + ,8 + ,4 + ,37 + ,19 + ,13 + ,9 + ,2 + ,41 + ,20 + ,12 + ,8 + ,4 + ,46 + ,26 + ,12 + ,10 + ,4 + ,26 + ,16 + ,12 + ,9 + ,3 + ,41 + ,18 + ,12 + ,9 + ,3 + ,37 + ,22 + ,9 + ,9 + ,3 + ,39 + ,25 + ,17 + ,9 + ,4 + ,44 + ,29 + ,18 + ,11 + ,5 + ,39 + ,21 + ,7 + ,15 + ,2 + ,36 + ,22 + ,17 + ,8 + ,4 + ,38 + ,22 + ,12 + ,10 + ,2 + ,38 + ,32 + ,12 + ,8 + ,0 + ,38 + ,23 + ,9 + ,14 + ,4 + ,32 + ,31 + ,9 + ,11 + ,4 + ,33 + ,18 + ,13 + ,10 + ,3 + ,46 + ,23 + ,10 + ,12 + ,4 + ,42 + ,24 + ,12 + ,9 + ,4 + ,42 + ,19 + ,10 + ,13 + ,2 + ,43 + ,26 + ,11 + ,14 + ,4 + ,41 + ,14 + ,13 + ,15 + ,2 + ,49 + ,20 + ,6 + ,8 + ,4 + ,45 + ,22 + ,7 + ,7 + ,3 + ,39 + ,24 + ,13 + ,10 + ,4 + ,45 + ,25 + ,11 + ,10 + ,5 + ,31 + ,21 + ,18 + ,13 + ,3 + ,30 + ,21 + ,18 + ,13 + ,3 + ,45 + ,28 + ,9 + ,11 + ,4 + ,48 + ,24 + ,9 + ,8 + ,5 + ,28 + ,15 + ,12 + ,14 + ,4 + ,35 + ,21 + ,11 + ,9 + ,2 + ,38 + ,23 + ,15 + ,10 + ,4 + ,39 + ,24 + ,11 + ,11 + ,4 + ,40 + ,21 + ,14 + ,10 + ,4 + ,38 + ,21 + ,14 + ,16 + ,4 + ,42 + ,13 + ,8 + ,11 + ,4 + ,36 + ,17 + ,12 + ,16 + ,2 + ,49 + ,29 + ,8 + ,6 + ,5 + ,41 + ,25 + ,11 + ,11 + ,4 + ,18 + ,16 + ,10 + ,12 + ,2 + ,36 + ,20 + ,11 + ,12 + ,3 + ,42 + ,25 + ,17 + ,14 + ,3 + ,41 + ,25 + ,16 + ,9 + ,5 + ,43 + ,21 + ,13 + ,11 + ,4 + ,46 + ,23 + ,15 + ,8 + ,3 + ,37 + ,22 + ,11 + ,8 + ,4 + ,38 + ,19 + ,12 + ,7 + ,3 + ,43 + ,26 + ,20 + ,13 + ,4 + ,41 + ,25 + ,16 + ,8 + ,5 + ,35 + ,19 + ,8 + ,20 + ,2 + ,39 + ,25 + ,7 + ,11 + ,4 + ,42 + ,24 + ,16 + ,16 + ,4 + ,36 + ,20 + ,11 + ,11 + ,4 + ,35 + ,21 + ,13 + ,12 + ,5 + ,33 + ,14 + ,15 + ,10 + ,2 + ,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 + ,39 + ,17 + ,12 + ,16 + ,4 + ,44 + ,21 + ,15 + ,8 + ,4 + ,43 + ,27 + ,11 + ,16 + ,2 + ,32 + ,29 + ,12 + ,12 + ,4 + ,40 + ,19 + ,12 + ,13 + ,5 + ,40 + ,20 + ,14 + ,8 + ,3 + ,46 + ,17 + ,11 + ,14 + ,3 + ,45 + ,21 + ,12 + ,8 + ,3 + ,39 + ,22 + ,10 + ,8 + ,4 + ,44 + ,26 + ,11 + ,7 + ,4 + ,35 + ,19 + ,11 + ,10 + ,4 + ,38 + ,17 + ,9 + ,11 + ,3 + ,38 + ,17 + ,12 + ,11 + ,2 + ,36 + ,19 + ,8 + ,14 + ,3 + ,42 + ,17 + ,12 + ,10 + ,3 + ,39 + ,15 + ,6 + ,6 + ,4 + ,41 + ,27 + ,15 + ,9 + ,5 + ,41 + ,19 + ,13 + ,12 + ,4 + ,47 + ,21 + ,17 + ,11 + ,3 + ,39 + ,25 + ,14 + ,14 + ,3 + ,40 + ,19 + ,16 + ,12 + ,4 + ,44 + ,18 + ,16 + ,8 + ,4 + ,42 + ,15 + ,11 + ,8 + ,4 + ,35 + ,20 + ,16 + ,11 + ,3 + ,46 + ,29 + ,15 + ,12 + ,5 + ,43 + ,20 + ,11 + ,14 + ,3 + ,40 + ,29 + ,9 + ,16 + ,4 + ,44 + ,24 + ,12 + ,13 + ,4 + ,37 + ,24 + ,13 + ,11 + ,4 + ,46 + ,23 + ,11 + ,9 + ,4 + ,44 + ,23 + ,11 + ,11 + ,5 + ,35 + ,19 + ,13 + ,9 + ,3 + ,39 + ,22 + ,14 + ,12 + ,2 + ,40 + ,22 + ,12 + ,13 + ,3 + ,42 + ,25 + ,17 + ,14 + ,3 + ,37 + ,21 + ,11 + ,9 + ,3 + ,29 + ,22 + ,15 + ,14 + ,4 + ,33 + ,21 + ,13 + ,8 + ,2 + ,35 + ,18 + ,9 + ,8 + ,4 + ,42 + ,10 + ,12 + ,9 + ,2) + ,dim=c(5 + ,146) + ,dimnames=list(c('StudyForCareer' + ,'PersonalStandards' + ,'ParentalExpectations' + ,'Doubts' + ,'LeaderPreference') + ,1:146)) > y <- array(NA,dim=c(5,146),dimnames=list(c('StudyForCareer','PersonalStandards','ParentalExpectations','Doubts','LeaderPreference'),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 = '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 36 18 10 14 5 42 18 10 8 6 44 23 9 14 7 40 23 18 15 8 43 25 14 9 9 40 23 11 11 10 45 24 11 14 11 47 32 9 14 12 45 30 17 6 13 45 32 21 10 14 40 24 16 9 15 49 17 14 14 16 48 30 24 8 17 44 25 7 11 18 29 25 9 10 19 42 26 18 16 20 45 23 11 11 21 32 25 13 11 22 32 25 13 11 23 41 35 18 7 24 29 19 14 13 25 38 20 12 10 26 41 21 12 9 27 38 21 9 9 28 24 23 11 15 29 34 24 8 13 30 38 23 5 16 31 37 19 10 12 32 46 17 11 6 33 48 27 15 4 34 42 27 16 12 35 46 25 12 10 36 43 18 14 14 37 38 22 13 9 38 39 26 10 10 39 34 26 18 14 40 39 23 17 14 41 35 16 12 10 42 41 27 13 9 43 40 25 13 14 44 43 14 11 8 45 37 19 13 9 46 41 20 12 8 47 46 26 12 10 48 26 16 12 9 49 41 18 12 9 50 37 22 9 9 51 39 25 17 9 52 44 29 18 11 53 39 21 7 15 54 36 22 17 8 55 38 22 12 10 56 38 32 12 8 57 38 23 9 14 58 32 31 9 11 59 33 18 13 10 60 46 23 10 12 61 42 24 12 9 62 42 19 10 13 63 43 26 11 14 64 41 14 13 15 65 49 20 6 8 66 45 22 7 7 67 39 24 13 10 68 45 25 11 10 69 31 21 18 13 70 30 21 18 13 71 45 28 9 11 72 48 24 9 8 73 28 15 12 14 74 35 21 11 9 75 38 23 15 10 76 39 24 11 11 77 40 21 14 10 78 38 21 14 16 79 42 13 8 11 80 36 17 12 16 81 49 29 8 6 82 41 25 11 11 83 18 16 10 12 84 36 20 11 12 85 42 25 17 14 86 41 25 16 9 87 43 21 13 11 88 46 23 15 8 89 37 22 11 8 90 38 19 12 7 91 43 26 20 13 92 41 25 16 8 93 35 19 8 20 94 39 25 7 11 95 42 24 16 16 96 36 20 11 11 97 35 21 13 12 98 33 14 15 10 99 36 22 15 14 100 48 14 12 8 101 41 20 12 10 102 47 21 24 14 103 41 22 15 10 104 31 19 8 5 105 36 28 18 12 106 46 25 17 9 107 39 17 12 16 108 44 21 15 8 109 43 27 11 16 110 32 29 12 12 111 40 19 12 13 112 40 20 14 8 113 46 17 11 14 114 45 21 12 8 115 39 22 10 8 116 44 26 11 7 117 35 19 11 10 118 38 17 9 11 119 38 17 12 11 120 36 19 8 14 121 42 17 12 10 122 39 15 6 6 123 41 27 15 9 124 41 19 13 12 125 47 21 17 11 126 39 25 14 14 127 40 19 16 12 128 44 18 16 8 129 42 15 11 8 130 35 20 16 11 131 46 29 15 12 132 43 20 11 14 133 40 29 9 16 134 44 24 12 13 135 37 24 13 11 136 46 23 11 9 137 44 23 11 11 138 35 19 13 9 139 39 22 14 12 140 40 22 12 13 141 42 25 17 14 142 37 21 11 9 143 29 22 15 14 144 33 21 13 8 145 35 18 9 8 146 42 10 12 9 LeaderPreference 1 3 2 4 3 4 4 2 5 4 6 4 7 3 8 4 9 4 10 4 11 4 12 5 13 4 14 4 15 4 16 5 17 4 18 4 19 4 20 5 21 5 22 5 23 4 24 2 25 4 26 4 27 4 28 3 29 2 30 2 31 3 32 5 33 5 34 4 35 4 36 5 37 4 38 4 39 4 40 4 41 2 42 3 43 3 44 4 45 2 46 4 47 4 48 3 49 3 50 3 51 4 52 5 53 2 54 4 55 2 56 0 57 4 58 4 59 3 60 4 61 4 62 2 63 4 64 2 65 4 66 3 67 4 68 5 69 3 70 3 71 4 72 5 73 4 74 2 75 4 76 4 77 4 78 4 79 4 80 2 81 5 82 4 83 2 84 3 85 3 86 5 87 4 88 3 89 4 90 3 91 4 92 5 93 2 94 4 95 4 96 4 97 5 98 2 99 3 100 4 101 4 102 3 103 3 104 5 105 4 106 4 107 4 108 4 109 2 110 4 111 5 112 3 113 3 114 3 115 4 116 4 117 4 118 3 119 2 120 3 121 3 122 4 123 5 124 4 125 3 126 3 127 4 128 4 129 4 130 3 131 5 132 3 133 4 134 4 135 4 136 4 137 5 138 3 139 2 140 3 141 3 142 3 143 4 144 2 145 4 146 2 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) PersonalStandards ParentalExpectations 32.52021 0.17419 0.04668 Doubts LeaderPreference -0.21737 1.39807 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -17.962 -2.227 0.633 3.246 10.316 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 32.52021 3.25036 10.005 < 2e-16 *** PersonalStandards 0.17419 0.10383 1.678 0.09563 . ParentalExpectations 0.04668 0.12794 0.365 0.71578 Doubts -0.21737 0.15497 -1.403 0.16291 LeaderPreference 1.39807 0.48222 2.899 0.00434 ** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 4.982 on 141 degrees of freedom Multiple R-squared: 0.1354, Adjusted R-squared: 0.1108 F-statistic: 5.519 on 4 and 141 DF, p-value: 0.0003713 > 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.209623361 0.419246722 0.79037664 [2,] 0.124782191 0.249564382 0.87521781 [3,] 0.068952480 0.137904960 0.93104752 [4,] 0.032772374 0.065544749 0.96722763 [5,] 0.014661957 0.029323915 0.98533804 [6,] 0.007017306 0.014034611 0.99298269 [7,] 0.002909888 0.005819775 0.99709011 [8,] 0.029745696 0.059491392 0.97025430 [9,] 0.017475334 0.034950667 0.98252467 [10,] 0.009903935 0.019807871 0.99009606 [11,] 0.265533382 0.531066763 0.73446662 [12,] 0.290141280 0.580282560 0.70985872 [13,] 0.226571794 0.453143589 0.77342821 [14,] 0.608355423 0.783289153 0.39164458 [15,] 0.793292587 0.413414826 0.20670741 [16,] 0.744127293 0.511745414 0.25587271 [17,] 0.827311131 0.345377738 0.17268887 [18,] 0.782819324 0.434361352 0.21718068 [19,] 0.739165867 0.521668267 0.26083413 [20,] 0.685206172 0.629587657 0.31479383 [21,] 0.930632256 0.138735489 0.06936774 [22,] 0.910314125 0.179371749 0.08968587 [23,] 0.896012734 0.207974532 0.10398727 [24,] 0.866578077 0.266843846 0.13342192 [25,] 0.864089683 0.271820634 0.13591032 [26,] 0.855829405 0.288341191 0.14417060 [27,] 0.821104330 0.357791341 0.17889567 [28,] 0.823875889 0.352248222 0.17612411 [29,] 0.788738223 0.422523554 0.21126178 [30,] 0.754766385 0.490467230 0.24523362 [31,] 0.712594382 0.574811236 0.28740562 [32,] 0.746914557 0.506170886 0.25308544 [33,] 0.702428372 0.595143255 0.29757163 [34,] 0.655249412 0.689501176 0.34475059 [35,] 0.612742139 0.774515721 0.38725786 [36,] 0.568466839 0.863066323 0.43153316 [37,] 0.540820204 0.918359592 0.45917980 [38,] 0.489536548 0.979073096 0.51046345 [39,] 0.436928625 0.873857250 0.56307137 [40,] 0.438239343 0.876478687 0.56176066 [41,] 0.654575836 0.690848328 0.34542416 [42,] 0.627180923 0.745638154 0.37281908 [43,] 0.582237566 0.835524868 0.41776243 [44,] 0.540199889 0.919600222 0.45980011 [45,] 0.490375182 0.980750364 0.50962482 [46,] 0.468344553 0.936689106 0.53165545 [47,] 0.460298735 0.920597470 0.53970126 [48,] 0.417628921 0.835257841 0.58237108 [49,] 0.384016018 0.768032036 0.61598398 [50,] 0.341508960 0.683017919 0.65849104 [51,] 0.475289612 0.950579224 0.52471039 [52,] 0.474338070 0.948676141 0.52566193 [53,] 0.497242505 0.994485011 0.50275749 [54,] 0.450726223 0.901452446 0.54927378 [55,] 0.469942159 0.939884318 0.53005784 [56,] 0.435636608 0.871273216 0.56436339 [57,] 0.454480525 0.908961051 0.54551947 [58,] 0.556025091 0.887949819 0.44397491 [59,] 0.564193481 0.871613039 0.43580652 [60,] 0.521913418 0.956173165 0.47808658 [61,] 0.486624851 0.973249702 0.51337515 [62,] 0.539543277 0.920913445 0.46045672 [63,] 0.623402039 0.753195921 0.37659796 [64,] 0.605607530 0.788784940 0.39439247 [65,] 0.621395610 0.757208780 0.37860439 [66,] 0.753263919 0.493472162 0.24673608 [67,] 0.722685622 0.554628756 0.27731438 [68,] 0.693891059 0.612217882 0.30610894 [69,] 0.653228401 0.693543198 0.34677160 [70,] 0.607822720 0.784354561 0.39217728 [71,] 0.563198869 0.873602263 0.43680113 [72,] 0.547389939 0.905220122 0.45261006 [73,] 0.503236418 0.993527163 0.49676358 [74,] 0.542394004 0.915211992 0.45760600 [75,] 0.496818676 0.993637351 0.50318132 [76,] 0.950784554 0.098430892 0.04921545 [77,] 0.940759803 0.118480393 0.05924020 [78,] 0.931980571 0.136038857 0.06801943 [79,] 0.915098492 0.169803017 0.08490151 [80,] 0.903230800 0.193538401 0.09676920 [81,] 0.917280560 0.165438879 0.08271944 [82,] 0.905460612 0.189078775 0.09453939 [83,] 0.883843843 0.232312314 0.11615616 [84,] 0.862690339 0.274619322 0.13730966 [85,] 0.834981228 0.330037545 0.16501877 [86,] 0.806406863 0.387186274 0.19359314 [87,] 0.774657182 0.450685636 0.22534282 [88,] 0.740818701 0.518362597 0.25918130 [89,] 0.720286411 0.559427179 0.27971359 [90,] 0.743479781 0.513040437 0.25652022 [91,] 0.776518151 0.446963698 0.22348185 [92,] 0.766633316 0.466733368 0.23336668 [93,] 0.837483291 0.325033417 0.16251671 [94,] 0.804027809 0.391944381 0.19597219 [95,] 0.824688221 0.350623557 0.17531178 [96,] 0.789841055 0.420317889 0.21015894 [97,] 0.882707716 0.234584569 0.11729228 [98,] 0.891754429 0.216491142 0.10824557 [99,] 0.888060133 0.223879734 0.11193987 [100,] 0.859952712 0.280094576 0.14004729 [101,] 0.841739925 0.316520151 0.15826008 [102,] 0.846942831 0.306114338 0.15305717 [103,] 0.909156859 0.181686283 0.09084314 [104,] 0.883386254 0.233227492 0.11661375 [105,] 0.850965717 0.298068566 0.14903428 [106,] 0.903469650 0.193060701 0.09653035 [107,] 0.911531621 0.176936758 0.08846838 [108,] 0.885207340 0.229585321 0.11479266 [109,] 0.868673241 0.262653519 0.13132676 [110,] 0.874059968 0.251880064 0.12594003 [111,] 0.836059037 0.327881927 0.16394096 [112,] 0.791391895 0.417216209 0.20860810 [113,] 0.752662659 0.494674681 0.24733734 [114,] 0.716343908 0.567312183 0.28365609 [115,] 0.653245573 0.693508855 0.34675443 [116,] 0.589029283 0.821941434 0.41097072 [117,] 0.516756898 0.966486204 0.48324310 [118,] 0.628954284 0.742091433 0.37104572 [119,] 0.552534886 0.894930228 0.44746511 [120,] 0.472949295 0.945898590 0.52705071 [121,] 0.457608919 0.915217838 0.54239108 [122,] 0.394211867 0.788423734 0.60578813 [123,] 0.334792894 0.669585787 0.66520711 [124,] 0.364780826 0.729561651 0.63521917 [125,] 0.301368013 0.602736025 0.69863199 [126,] 0.259140196 0.518280392 0.74085980 [127,] 0.207367343 0.414734686 0.79263266 [128,] 0.141586940 0.283173880 0.85841306 [129,] 0.221599840 0.443199680 0.77840016 [130,] 0.468679991 0.937359981 0.53132001 [131,] 0.314416546 0.628833093 0.68558345 > postscript(file="/var/www/html/freestat/rcomp/tmp/1rkg11292682719.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/2rkg11292682719.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/3rkg11292682719.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/41bfl1292682719.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/51bfl1292682719.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 1.1869570 -3.2111084 -3.1192741 0.1246308 2.0242613 4.5042164 7 8 9 10 11 12 1.6995439 1.8355706 -0.2412610 5.2366658 5.9364835 0.7743862 13 14 15 16 17 18 2.5068430 -1.0835948 10.3159767 3.8823795 3.5970699 -11.7136613 19 20 21 22 23 24 1.9962741 3.3606736 -10.0810694 -10.0810694 -2.5278170 -7.4536509 25 26 27 28 29 30 -1.9827355 0.6256988 -2.2342642 -13.9737031 -3.0445396 1.9218093 31 32 33 34 35 36 -0.8823734 4.3189632 3.9555755 1.0459470 5.1463018 2.7437188 37 38 39 40 41 42 -2.5951727 -1.9345328 -6.4384722 -0.8692156 -1.4898347 0.9319299 43 44 45 46 47 48 1.3671806 3.6743525 -0.2764644 0.5825182 4.9721092 -12.1052731 49 50 51 52 53 54 2.5463418 -2.0103914 -2.3044663 0.9887654 2.9594632 -4.9992618 55 56 57 58 59 60 0.4650101 1.0844690 -1.4957836 -9.5414434 -5.2829641 6.0227911 61 62 63 64 65 66 1.1031212 5.7330651 2.8882807 5.8987371 8.8625922 5.6482203 67 68 69 70 71 72 -1.7261847 2.7949154 -7.3868173 -8.3868173 3.9811342 5.6277197 73 74 75 76 77 78 -10.2422803 -2.5314915 -2.6453501 -1.4154536 -0.2502861 -0.9460472 79 80 81 82 83 84 3.6407014 0.6402116 5.3686897 0.4103539 -17.9617304 -2.1032449 85 86 87 88 89 90 3.1804647 -1.6558527 3.0137661 6.3179689 -3.7191879 -1.0625970 91 92 93 94 95 96 2.2507967 -1.8732258 0.3480350 -1.4029301 2.4380171 -3.7186834 97 98 99 100 101 102 -6.1669261 -3.2814866 -2.2035997 8.6276735 1.0172645 8.5504819 103 104 105 106 107 108 1.9269078 -11.1067580 -5.2216036 4.6955337 0.8440809 3.2682887 109 110 111 112 113 114 5.9449652 -9.1157221 -0.5544889 0.8872256 8.8540790 5.8063910 115 116 117 118 119 120 -1.6725089 2.3666688 -4.7618640 0.2953176 1.5533459 -1.3542691 121 122 123 124 125 126 3.9379074 -0.7011914 -1.9575588 1.5795243 8.2251154 0.3205017 127 128 129 130 131 132 0.4394873 3.7441873 2.5001599 -3.5540130 3.3461755 5.3315013 133 134 135 136 137 138 -0.1061926 3.9726137 -3.5088116 5.3239927 2.3606736 -3.6745298 139 140 141 142 143 144 1.8063984 1.7190641 3.1804647 -1.9295569 -10.6016650 -4.8422226 145 146 -4.9290597 6.3379475 > postscript(file="/var/www/html/freestat/rcomp/tmp/61bfl1292682719.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 1.1869570 NA 1 -3.2111084 1.1869570 2 -3.1192741 -3.2111084 3 0.1246308 -3.1192741 4 2.0242613 0.1246308 5 4.5042164 2.0242613 6 1.6995439 4.5042164 7 1.8355706 1.6995439 8 -0.2412610 1.8355706 9 5.2366658 -0.2412610 10 5.9364835 5.2366658 11 0.7743862 5.9364835 12 2.5068430 0.7743862 13 -1.0835948 2.5068430 14 10.3159767 -1.0835948 15 3.8823795 10.3159767 16 3.5970699 3.8823795 17 -11.7136613 3.5970699 18 1.9962741 -11.7136613 19 3.3606736 1.9962741 20 -10.0810694 3.3606736 21 -10.0810694 -10.0810694 22 -2.5278170 -10.0810694 23 -7.4536509 -2.5278170 24 -1.9827355 -7.4536509 25 0.6256988 -1.9827355 26 -2.2342642 0.6256988 27 -13.9737031 -2.2342642 28 -3.0445396 -13.9737031 29 1.9218093 -3.0445396 30 -0.8823734 1.9218093 31 4.3189632 -0.8823734 32 3.9555755 4.3189632 33 1.0459470 3.9555755 34 5.1463018 1.0459470 35 2.7437188 5.1463018 36 -2.5951727 2.7437188 37 -1.9345328 -2.5951727 38 -6.4384722 -1.9345328 39 -0.8692156 -6.4384722 40 -1.4898347 -0.8692156 41 0.9319299 -1.4898347 42 1.3671806 0.9319299 43 3.6743525 1.3671806 44 -0.2764644 3.6743525 45 0.5825182 -0.2764644 46 4.9721092 0.5825182 47 -12.1052731 4.9721092 48 2.5463418 -12.1052731 49 -2.0103914 2.5463418 50 -2.3044663 -2.0103914 51 0.9887654 -2.3044663 52 2.9594632 0.9887654 53 -4.9992618 2.9594632 54 0.4650101 -4.9992618 55 1.0844690 0.4650101 56 -1.4957836 1.0844690 57 -9.5414434 -1.4957836 58 -5.2829641 -9.5414434 59 6.0227911 -5.2829641 60 1.1031212 6.0227911 61 5.7330651 1.1031212 62 2.8882807 5.7330651 63 5.8987371 2.8882807 64 8.8625922 5.8987371 65 5.6482203 8.8625922 66 -1.7261847 5.6482203 67 2.7949154 -1.7261847 68 -7.3868173 2.7949154 69 -8.3868173 -7.3868173 70 3.9811342 -8.3868173 71 5.6277197 3.9811342 72 -10.2422803 5.6277197 73 -2.5314915 -10.2422803 74 -2.6453501 -2.5314915 75 -1.4154536 -2.6453501 76 -0.2502861 -1.4154536 77 -0.9460472 -0.2502861 78 3.6407014 -0.9460472 79 0.6402116 3.6407014 80 5.3686897 0.6402116 81 0.4103539 5.3686897 82 -17.9617304 0.4103539 83 -2.1032449 -17.9617304 84 3.1804647 -2.1032449 85 -1.6558527 3.1804647 86 3.0137661 -1.6558527 87 6.3179689 3.0137661 88 -3.7191879 6.3179689 89 -1.0625970 -3.7191879 90 2.2507967 -1.0625970 91 -1.8732258 2.2507967 92 0.3480350 -1.8732258 93 -1.4029301 0.3480350 94 2.4380171 -1.4029301 95 -3.7186834 2.4380171 96 -6.1669261 -3.7186834 97 -3.2814866 -6.1669261 98 -2.2035997 -3.2814866 99 8.6276735 -2.2035997 100 1.0172645 8.6276735 101 8.5504819 1.0172645 102 1.9269078 8.5504819 103 -11.1067580 1.9269078 104 -5.2216036 -11.1067580 105 4.6955337 -5.2216036 106 0.8440809 4.6955337 107 3.2682887 0.8440809 108 5.9449652 3.2682887 109 -9.1157221 5.9449652 110 -0.5544889 -9.1157221 111 0.8872256 -0.5544889 112 8.8540790 0.8872256 113 5.8063910 8.8540790 114 -1.6725089 5.8063910 115 2.3666688 -1.6725089 116 -4.7618640 2.3666688 117 0.2953176 -4.7618640 118 1.5533459 0.2953176 119 -1.3542691 1.5533459 120 3.9379074 -1.3542691 121 -0.7011914 3.9379074 122 -1.9575588 -0.7011914 123 1.5795243 -1.9575588 124 8.2251154 1.5795243 125 0.3205017 8.2251154 126 0.4394873 0.3205017 127 3.7441873 0.4394873 128 2.5001599 3.7441873 129 -3.5540130 2.5001599 130 3.3461755 -3.5540130 131 5.3315013 3.3461755 132 -0.1061926 5.3315013 133 3.9726137 -0.1061926 134 -3.5088116 3.9726137 135 5.3239927 -3.5088116 136 2.3606736 5.3239927 137 -3.6745298 2.3606736 138 1.8063984 -3.6745298 139 1.7190641 1.8063984 140 3.1804647 1.7190641 141 -1.9295569 3.1804647 142 -10.6016650 -1.9295569 143 -4.8422226 -10.6016650 144 -4.9290597 -4.8422226 145 6.3379475 -4.9290597 146 NA 6.3379475 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -3.2111084 1.1869570 [2,] -3.1192741 -3.2111084 [3,] 0.1246308 -3.1192741 [4,] 2.0242613 0.1246308 [5,] 4.5042164 2.0242613 [6,] 1.6995439 4.5042164 [7,] 1.8355706 1.6995439 [8,] -0.2412610 1.8355706 [9,] 5.2366658 -0.2412610 [10,] 5.9364835 5.2366658 [11,] 0.7743862 5.9364835 [12,] 2.5068430 0.7743862 [13,] -1.0835948 2.5068430 [14,] 10.3159767 -1.0835948 [15,] 3.8823795 10.3159767 [16,] 3.5970699 3.8823795 [17,] -11.7136613 3.5970699 [18,] 1.9962741 -11.7136613 [19,] 3.3606736 1.9962741 [20,] -10.0810694 3.3606736 [21,] -10.0810694 -10.0810694 [22,] -2.5278170 -10.0810694 [23,] -7.4536509 -2.5278170 [24,] -1.9827355 -7.4536509 [25,] 0.6256988 -1.9827355 [26,] -2.2342642 0.6256988 [27,] -13.9737031 -2.2342642 [28,] -3.0445396 -13.9737031 [29,] 1.9218093 -3.0445396 [30,] -0.8823734 1.9218093 [31,] 4.3189632 -0.8823734 [32,] 3.9555755 4.3189632 [33,] 1.0459470 3.9555755 [34,] 5.1463018 1.0459470 [35,] 2.7437188 5.1463018 [36,] -2.5951727 2.7437188 [37,] -1.9345328 -2.5951727 [38,] -6.4384722 -1.9345328 [39,] -0.8692156 -6.4384722 [40,] -1.4898347 -0.8692156 [41,] 0.9319299 -1.4898347 [42,] 1.3671806 0.9319299 [43,] 3.6743525 1.3671806 [44,] -0.2764644 3.6743525 [45,] 0.5825182 -0.2764644 [46,] 4.9721092 0.5825182 [47,] -12.1052731 4.9721092 [48,] 2.5463418 -12.1052731 [49,] -2.0103914 2.5463418 [50,] -2.3044663 -2.0103914 [51,] 0.9887654 -2.3044663 [52,] 2.9594632 0.9887654 [53,] -4.9992618 2.9594632 [54,] 0.4650101 -4.9992618 [55,] 1.0844690 0.4650101 [56,] -1.4957836 1.0844690 [57,] -9.5414434 -1.4957836 [58,] -5.2829641 -9.5414434 [59,] 6.0227911 -5.2829641 [60,] 1.1031212 6.0227911 [61,] 5.7330651 1.1031212 [62,] 2.8882807 5.7330651 [63,] 5.8987371 2.8882807 [64,] 8.8625922 5.8987371 [65,] 5.6482203 8.8625922 [66,] -1.7261847 5.6482203 [67,] 2.7949154 -1.7261847 [68,] -7.3868173 2.7949154 [69,] -8.3868173 -7.3868173 [70,] 3.9811342 -8.3868173 [71,] 5.6277197 3.9811342 [72,] -10.2422803 5.6277197 [73,] -2.5314915 -10.2422803 [74,] -2.6453501 -2.5314915 [75,] -1.4154536 -2.6453501 [76,] -0.2502861 -1.4154536 [77,] -0.9460472 -0.2502861 [78,] 3.6407014 -0.9460472 [79,] 0.6402116 3.6407014 [80,] 5.3686897 0.6402116 [81,] 0.4103539 5.3686897 [82,] -17.9617304 0.4103539 [83,] -2.1032449 -17.9617304 [84,] 3.1804647 -2.1032449 [85,] -1.6558527 3.1804647 [86,] 3.0137661 -1.6558527 [87,] 6.3179689 3.0137661 [88,] -3.7191879 6.3179689 [89,] -1.0625970 -3.7191879 [90,] 2.2507967 -1.0625970 [91,] -1.8732258 2.2507967 [92,] 0.3480350 -1.8732258 [93,] -1.4029301 0.3480350 [94,] 2.4380171 -1.4029301 [95,] -3.7186834 2.4380171 [96,] -6.1669261 -3.7186834 [97,] -3.2814866 -6.1669261 [98,] -2.2035997 -3.2814866 [99,] 8.6276735 -2.2035997 [100,] 1.0172645 8.6276735 [101,] 8.5504819 1.0172645 [102,] 1.9269078 8.5504819 [103,] -11.1067580 1.9269078 [104,] -5.2216036 -11.1067580 [105,] 4.6955337 -5.2216036 [106,] 0.8440809 4.6955337 [107,] 3.2682887 0.8440809 [108,] 5.9449652 3.2682887 [109,] -9.1157221 5.9449652 [110,] -0.5544889 -9.1157221 [111,] 0.8872256 -0.5544889 [112,] 8.8540790 0.8872256 [113,] 5.8063910 8.8540790 [114,] -1.6725089 5.8063910 [115,] 2.3666688 -1.6725089 [116,] -4.7618640 2.3666688 [117,] 0.2953176 -4.7618640 [118,] 1.5533459 0.2953176 [119,] -1.3542691 1.5533459 [120,] 3.9379074 -1.3542691 [121,] -0.7011914 3.9379074 [122,] -1.9575588 -0.7011914 [123,] 1.5795243 -1.9575588 [124,] 8.2251154 1.5795243 [125,] 0.3205017 8.2251154 [126,] 0.4394873 0.3205017 [127,] 3.7441873 0.4394873 [128,] 2.5001599 3.7441873 [129,] -3.5540130 2.5001599 [130,] 3.3461755 -3.5540130 [131,] 5.3315013 3.3461755 [132,] -0.1061926 5.3315013 [133,] 3.9726137 -0.1061926 [134,] -3.5088116 3.9726137 [135,] 5.3239927 -3.5088116 [136,] 2.3606736 5.3239927 [137,] -3.6745298 2.3606736 [138,] 1.8063984 -3.6745298 [139,] 1.7190641 1.8063984 [140,] 3.1804647 1.7190641 [141,] -1.9295569 3.1804647 [142,] -10.6016650 -1.9295569 [143,] -4.8422226 -10.6016650 [144,] -4.9290597 -4.8422226 [145,] 6.3379475 -4.9290597 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -3.2111084 1.1869570 2 -3.1192741 -3.2111084 3 0.1246308 -3.1192741 4 2.0242613 0.1246308 5 4.5042164 2.0242613 6 1.6995439 4.5042164 7 1.8355706 1.6995439 8 -0.2412610 1.8355706 9 5.2366658 -0.2412610 10 5.9364835 5.2366658 11 0.7743862 5.9364835 12 2.5068430 0.7743862 13 -1.0835948 2.5068430 14 10.3159767 -1.0835948 15 3.8823795 10.3159767 16 3.5970699 3.8823795 17 -11.7136613 3.5970699 18 1.9962741 -11.7136613 19 3.3606736 1.9962741 20 -10.0810694 3.3606736 21 -10.0810694 -10.0810694 22 -2.5278170 -10.0810694 23 -7.4536509 -2.5278170 24 -1.9827355 -7.4536509 25 0.6256988 -1.9827355 26 -2.2342642 0.6256988 27 -13.9737031 -2.2342642 28 -3.0445396 -13.9737031 29 1.9218093 -3.0445396 30 -0.8823734 1.9218093 31 4.3189632 -0.8823734 32 3.9555755 4.3189632 33 1.0459470 3.9555755 34 5.1463018 1.0459470 35 2.7437188 5.1463018 36 -2.5951727 2.7437188 37 -1.9345328 -2.5951727 38 -6.4384722 -1.9345328 39 -0.8692156 -6.4384722 40 -1.4898347 -0.8692156 41 0.9319299 -1.4898347 42 1.3671806 0.9319299 43 3.6743525 1.3671806 44 -0.2764644 3.6743525 45 0.5825182 -0.2764644 46 4.9721092 0.5825182 47 -12.1052731 4.9721092 48 2.5463418 -12.1052731 49 -2.0103914 2.5463418 50 -2.3044663 -2.0103914 51 0.9887654 -2.3044663 52 2.9594632 0.9887654 53 -4.9992618 2.9594632 54 0.4650101 -4.9992618 55 1.0844690 0.4650101 56 -1.4957836 1.0844690 57 -9.5414434 -1.4957836 58 -5.2829641 -9.5414434 59 6.0227911 -5.2829641 60 1.1031212 6.0227911 61 5.7330651 1.1031212 62 2.8882807 5.7330651 63 5.8987371 2.8882807 64 8.8625922 5.8987371 65 5.6482203 8.8625922 66 -1.7261847 5.6482203 67 2.7949154 -1.7261847 68 -7.3868173 2.7949154 69 -8.3868173 -7.3868173 70 3.9811342 -8.3868173 71 5.6277197 3.9811342 72 -10.2422803 5.6277197 73 -2.5314915 -10.2422803 74 -2.6453501 -2.5314915 75 -1.4154536 -2.6453501 76 -0.2502861 -1.4154536 77 -0.9460472 -0.2502861 78 3.6407014 -0.9460472 79 0.6402116 3.6407014 80 5.3686897 0.6402116 81 0.4103539 5.3686897 82 -17.9617304 0.4103539 83 -2.1032449 -17.9617304 84 3.1804647 -2.1032449 85 -1.6558527 3.1804647 86 3.0137661 -1.6558527 87 6.3179689 3.0137661 88 -3.7191879 6.3179689 89 -1.0625970 -3.7191879 90 2.2507967 -1.0625970 91 -1.8732258 2.2507967 92 0.3480350 -1.8732258 93 -1.4029301 0.3480350 94 2.4380171 -1.4029301 95 -3.7186834 2.4380171 96 -6.1669261 -3.7186834 97 -3.2814866 -6.1669261 98 -2.2035997 -3.2814866 99 8.6276735 -2.2035997 100 1.0172645 8.6276735 101 8.5504819 1.0172645 102 1.9269078 8.5504819 103 -11.1067580 1.9269078 104 -5.2216036 -11.1067580 105 4.6955337 -5.2216036 106 0.8440809 4.6955337 107 3.2682887 0.8440809 108 5.9449652 3.2682887 109 -9.1157221 5.9449652 110 -0.5544889 -9.1157221 111 0.8872256 -0.5544889 112 8.8540790 0.8872256 113 5.8063910 8.8540790 114 -1.6725089 5.8063910 115 2.3666688 -1.6725089 116 -4.7618640 2.3666688 117 0.2953176 -4.7618640 118 1.5533459 0.2953176 119 -1.3542691 1.5533459 120 3.9379074 -1.3542691 121 -0.7011914 3.9379074 122 -1.9575588 -0.7011914 123 1.5795243 -1.9575588 124 8.2251154 1.5795243 125 0.3205017 8.2251154 126 0.4394873 0.3205017 127 3.7441873 0.4394873 128 2.5001599 3.7441873 129 -3.5540130 2.5001599 130 3.3461755 -3.5540130 131 5.3315013 3.3461755 132 -0.1061926 5.3315013 133 3.9726137 -0.1061926 134 -3.5088116 3.9726137 135 5.3239927 -3.5088116 136 2.3606736 5.3239927 137 -3.6745298 2.3606736 138 1.8063984 -3.6745298 139 1.7190641 1.8063984 140 3.1804647 1.7190641 141 -1.9295569 3.1804647 142 -10.6016650 -1.9295569 143 -4.8422226 -10.6016650 144 -4.9290597 -4.8422226 145 6.3379475 -4.9290597 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/7ulw71292682719.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/85uv91292682719.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/95uv91292682719.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/freestat/rcomp/tmp/105uv91292682719.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/freestat/rcomp/tmp/111mti1292682719.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/freestat/rcomp/tmp/12uva31292682719.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/freestat/rcomp/tmp/131w8f1292682719.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/freestat/rcomp/tmp/14bopi1292682719.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/freestat/rcomp/tmp/15x6561292682719.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/freestat/rcomp/tmp/16tflw1292682719.tab") + } > > try(system("convert tmp/1rkg11292682719.ps tmp/1rkg11292682719.png",intern=TRUE)) character(0) > try(system("convert tmp/2rkg11292682719.ps tmp/2rkg11292682719.png",intern=TRUE)) character(0) > try(system("convert tmp/3rkg11292682719.ps tmp/3rkg11292682719.png",intern=TRUE)) character(0) > try(system("convert tmp/41bfl1292682719.ps tmp/41bfl1292682719.png",intern=TRUE)) character(0) > try(system("convert tmp/51bfl1292682719.ps tmp/51bfl1292682719.png",intern=TRUE)) character(0) > try(system("convert tmp/61bfl1292682719.ps tmp/61bfl1292682719.png",intern=TRUE)) character(0) > try(system("convert tmp/7ulw71292682719.ps tmp/7ulw71292682719.png",intern=TRUE)) character(0) > try(system("convert tmp/85uv91292682719.ps tmp/85uv91292682719.png",intern=TRUE)) character(0) > try(system("convert tmp/95uv91292682719.ps tmp/95uv91292682719.png",intern=TRUE)) character(0) > try(system("convert tmp/105uv91292682719.ps tmp/105uv91292682719.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.354 2.709 5.704