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 + ,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('Career' + ,'PersonalStandards' + ,'ParentalExpectations' + ,'Doubts' + ,'LeadershipPreference') + ,1:146)) > y <- array(NA,dim=c(5,146),dimnames=list(c('Career','PersonalStandards','ParentalExpectations','Doubts','LeadershipPreference'),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 = 'Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '5' > #'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 LeadershipPreference Career PersonalStandards ParentalExpectations Doubts 1 3 41 25 15 9 2 4 38 25 15 9 3 4 37 19 14 9 4 2 36 18 10 14 5 4 42 18 10 8 6 4 44 23 9 14 7 3 40 23 18 15 8 4 43 25 14 9 9 4 40 23 11 11 10 4 45 24 11 14 11 4 47 32 9 14 12 5 45 30 17 6 13 4 45 32 21 10 14 4 40 24 16 9 15 4 49 17 14 14 16 5 48 30 24 8 17 4 44 25 7 11 18 4 29 25 9 10 19 4 42 26 18 16 20 5 45 23 11 11 21 5 32 25 13 11 22 5 32 25 13 11 23 4 41 35 18 7 24 2 29 19 14 13 25 4 38 20 12 10 26 4 41 21 12 9 27 4 38 21 9 9 28 3 24 23 11 15 29 2 34 24 8 13 30 2 38 23 5 16 31 3 37 19 10 12 32 5 46 17 11 6 33 5 48 27 15 4 34 4 42 27 16 12 35 4 46 25 12 10 36 5 43 18 14 14 37 4 38 22 13 9 38 4 39 26 10 10 39 4 34 26 18 14 40 4 39 23 17 14 41 2 35 16 12 10 42 3 41 27 13 9 43 3 40 25 13 14 44 4 43 14 11 8 45 2 37 19 13 9 46 4 41 20 12 8 47 4 46 26 12 10 48 3 26 16 12 9 49 3 41 18 12 9 50 3 37 22 9 9 51 4 39 25 17 9 52 5 44 29 18 11 53 2 39 21 7 15 54 4 36 22 17 8 55 2 38 22 12 10 56 0 38 32 12 8 57 4 38 23 9 14 58 4 32 31 9 11 59 3 33 18 13 10 60 4 46 23 10 12 61 4 42 24 12 9 62 2 42 19 10 13 63 4 43 26 11 14 64 2 41 14 13 15 65 4 49 20 6 8 66 3 45 22 7 7 67 4 39 24 13 10 68 5 45 25 11 10 69 3 31 21 18 13 70 3 30 21 18 13 71 4 45 28 9 11 72 5 48 24 9 8 73 4 28 15 12 14 74 2 35 21 11 9 75 4 38 23 15 10 76 4 39 24 11 11 77 4 40 21 14 10 78 4 38 21 14 16 79 4 42 13 8 11 80 2 36 17 12 16 81 5 49 29 8 6 82 4 41 25 11 11 83 2 18 16 10 12 84 3 36 20 11 12 85 3 42 25 17 14 86 5 41 25 16 9 87 4 43 21 13 11 88 3 46 23 15 8 89 4 37 22 11 8 90 3 38 19 12 7 91 4 43 26 20 13 92 5 41 25 16 8 93 2 35 19 8 20 94 4 39 25 7 11 95 4 42 24 16 16 96 4 36 20 11 11 97 5 35 21 13 12 98 2 33 14 15 10 99 3 36 22 15 14 100 4 48 14 12 8 101 4 41 20 12 10 102 3 47 21 24 14 103 3 41 22 15 10 104 5 31 19 8 5 105 4 36 28 18 12 106 4 46 25 17 9 107 4 39 17 12 16 108 4 44 21 15 8 109 2 43 27 11 16 110 4 32 29 12 12 111 5 40 19 12 13 112 3 40 20 14 8 113 3 46 17 11 14 114 3 45 21 12 8 115 4 39 22 10 8 116 4 44 26 11 7 117 4 35 19 11 10 118 3 38 17 9 11 119 2 38 17 12 11 120 3 36 19 8 14 121 3 42 17 12 10 122 4 39 15 6 6 123 5 41 27 15 9 124 4 41 19 13 12 125 3 47 21 17 11 126 3 39 25 14 14 127 4 40 19 16 12 128 4 44 18 16 8 129 4 42 15 11 8 130 3 35 20 16 11 131 5 46 29 15 12 132 3 43 20 11 14 133 4 40 29 9 16 134 4 44 24 12 13 135 4 37 24 13 11 136 4 46 23 11 9 137 5 44 23 11 11 138 3 35 19 13 9 139 2 39 22 14 12 140 3 40 22 12 13 141 3 42 25 17 14 142 3 37 21 11 9 143 4 29 22 15 14 144 2 33 21 13 8 145 4 35 18 9 8 146 2 42 10 12 9 t 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 57 58 58 59 59 60 60 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 68 69 69 70 70 71 71 72 72 73 73 74 74 75 75 76 76 77 77 78 78 79 79 80 80 81 81 82 82 83 83 84 84 85 85 86 86 87 87 88 88 89 89 90 90 91 91 92 92 93 93 94 94 95 95 96 96 97 97 98 98 99 99 100 100 101 101 102 102 103 103 104 104 105 105 106 106 107 107 108 108 109 109 110 110 111 111 112 112 113 113 114 114 115 115 116 116 117 117 118 118 119 119 120 120 121 121 122 122 123 123 124 124 125 125 126 126 127 127 128 128 129 129 130 130 131 131 132 132 133 133 134 134 135 135 136 136 137 137 138 138 139 139 140 140 141 141 142 142 143 143 144 144 145 145 146 146 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Career PersonalStandards 1.6359677 0.0405311 0.0478901 ParentalExpectations Doubts t 0.0137974 -0.0745267 -0.0008554 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -4.2301 -0.5038 0.1624 0.4590 1.7377 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.6359677 0.7348550 2.226 0.02760 * Career 0.0405311 0.0139293 2.910 0.00421 ** PersonalStandards 0.0478901 0.0178853 2.678 0.00830 ** ParentalExpectations 0.0137974 0.0217582 0.634 0.52704 Doubts -0.0745267 0.0257897 -2.890 0.00447 ** t -0.0008554 0.0017188 -0.498 0.61948 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.8475 on 140 degrees of freedom Multiple R-squared: 0.2079, Adjusted R-squared: 0.1797 F-statistic: 7.351 on 5 and 140 DF, p-value: 3.799e-06 > 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.511551365 0.976897271 0.48844864 [2,] 0.343316904 0.686633809 0.65668310 [3,] 0.223754599 0.447509198 0.77624540 [4,] 0.138319636 0.276639272 0.86168036 [5,] 0.092668193 0.185336386 0.90733181 [6,] 0.052724097 0.105448194 0.94727590 [7,] 0.028067984 0.056135967 0.97193202 [8,] 0.014988840 0.029977680 0.98501116 [9,] 0.009488436 0.018976872 0.99051156 [10,] 0.006895512 0.013791025 0.99310449 [11,] 0.004163587 0.008327174 0.99583641 [12,] 0.002673830 0.005347661 0.99732617 [13,] 0.004083818 0.008167636 0.99591618 [14,] 0.003373184 0.006746369 0.99662682 [15,] 0.015661377 0.031322754 0.98433862 [16,] 0.123332226 0.246664451 0.87666777 [17,] 0.097601114 0.195202228 0.90239889 [18,] 0.083654538 0.167309076 0.91634546 [19,] 0.065945858 0.131891715 0.93405414 [20,] 0.046995400 0.093990799 0.95300460 [21,] 0.151228234 0.302456468 0.84877177 [22,] 0.202900253 0.405800507 0.79709975 [23,] 0.172547601 0.345095201 0.82745240 [24,] 0.149722230 0.299444460 0.85027777 [25,] 0.122600954 0.245201909 0.87739905 [26,] 0.093383130 0.186766259 0.90661687 [27,] 0.072390019 0.144780039 0.92760998 [28,] 0.126644467 0.253288933 0.87335553 [29,] 0.100758122 0.201516243 0.89924188 [30,] 0.077319953 0.154639907 0.92268005 [31,] 0.063501215 0.127002431 0.93649878 [32,] 0.049950738 0.099901475 0.95004926 [33,] 0.118497439 0.236994878 0.88150256 [34,] 0.150130856 0.300261712 0.84986914 [35,] 0.132300949 0.264601898 0.86769905 [36,] 0.109131117 0.218262234 0.89086888 [37,] 0.195103915 0.390207830 0.80489608 [38,] 0.162296353 0.324592706 0.83770365 [39,] 0.131289170 0.262578341 0.86871083 [40,] 0.105199652 0.210399305 0.89480035 [41,] 0.094821685 0.189643371 0.90517831 [42,] 0.079865343 0.159730685 0.92013466 [43,] 0.062549089 0.125098179 0.93745091 [44,] 0.066029879 0.132059758 0.93397012 [45,] 0.072755815 0.145511631 0.92724418 [46,] 0.059030203 0.118060406 0.94096980 [47,] 0.096902359 0.193804718 0.90309764 [48,] 0.897705797 0.204588405 0.10229420 [49,] 0.909744850 0.180510300 0.09025515 [50,] 0.921168303 0.157663394 0.07883170 [51,] 0.902325152 0.195349695 0.09767485 [52,] 0.884775911 0.230448178 0.11522409 [53,] 0.863035132 0.273929737 0.13696487 [54,] 0.895106782 0.209786436 0.10489322 [55,] 0.881831576 0.236336848 0.11816842 [56,] 0.885574667 0.228850666 0.11442533 [57,] 0.864312691 0.271374618 0.13568731 [58,] 0.881966612 0.236066775 0.11803339 [59,] 0.865554260 0.268891479 0.13444574 [60,] 0.882123056 0.235753889 0.11787694 [61,] 0.856976976 0.286046048 0.14302302 [62,] 0.828617123 0.342765755 0.17138288 [63,] 0.808013606 0.383972787 0.19198639 [64,] 0.805817252 0.388365495 0.19418275 [65,] 0.868452769 0.263094463 0.13154723 [66,] 0.924210212 0.151579576 0.07578979 [67,] 0.908323706 0.183352588 0.09167629 [68,] 0.892318324 0.215363353 0.10768168 [69,] 0.871343869 0.257312263 0.12865613 [70,] 0.872059898 0.255880204 0.12794010 [71,] 0.871218893 0.257562215 0.12878111 [72,] 0.869408735 0.261182531 0.13059127 [73,] 0.851987437 0.296025125 0.14801256 [74,] 0.824825840 0.350348320 0.17517416 [75,] 0.811212669 0.377574662 0.18878733 [76,] 0.786759776 0.426480448 0.21324022 [77,] 0.778678132 0.442643737 0.22132187 [78,] 0.784875932 0.430248137 0.21512407 [79,] 0.749662130 0.500675741 0.25033787 [80,] 0.793260966 0.413478068 0.20673903 [81,] 0.761828035 0.476343929 0.23817196 [82,] 0.770441337 0.459117326 0.22955866 [83,] 0.730112388 0.539775225 0.26988761 [84,] 0.723693823 0.552612353 0.27630618 [85,] 0.725905480 0.548189041 0.27409452 [86,] 0.702327463 0.595345073 0.29767254 [87,] 0.668813574 0.662372853 0.33118643 [88,] 0.634997026 0.730005949 0.36500297 [89,] 0.743349985 0.513300030 0.25665002 [90,] 0.770683546 0.458632908 0.22931645 [91,] 0.739483937 0.521032126 0.26051606 [92,] 0.702855925 0.594288149 0.29714407 [93,] 0.659083810 0.681832380 0.34091619 [94,] 0.632887486 0.734225027 0.36711251 [95,] 0.627901063 0.744197875 0.37209894 [96,] 0.671608015 0.656783971 0.32839199 [97,] 0.621418938 0.757162125 0.37858106 [98,] 0.568008866 0.863982268 0.43199113 [99,] 0.599506091 0.800987817 0.40049391 [100,] 0.545451761 0.909096478 0.45454824 [101,] 0.748571789 0.502856422 0.25142821 [102,] 0.710077392 0.579845216 0.28992261 [103,] 0.850955144 0.298089712 0.14904486 [104,] 0.836413144 0.327173712 0.16358686 [105,] 0.797201137 0.405597725 0.20279886 [106,] 0.822952700 0.354094600 0.17704730 [107,] 0.779799007 0.440401986 0.22020099 [108,] 0.793077777 0.413844447 0.20692222 [109,] 0.763709358 0.472581285 0.23629064 [110,] 0.714843808 0.570312385 0.28515619 [111,] 0.791926687 0.416146626 0.20807331 [112,] 0.759444352 0.481111297 0.24055565 [113,] 0.748935148 0.502129704 0.25106485 [114,] 0.708100208 0.583799584 0.29189979 [115,] 0.659974657 0.680050686 0.34002534 [116,] 0.598175834 0.803648333 0.40182417 [117,] 0.588490004 0.823019993 0.41151000 [118,] 0.632563337 0.734873325 0.36743666 [119,] 0.576255297 0.847489407 0.42374470 [120,] 0.507078687 0.985842626 0.49292131 [121,] 0.457739507 0.915479014 0.54226049 [122,] 0.369108115 0.738216229 0.63089189 [123,] 0.365306539 0.730613077 0.63469346 [124,] 0.312983211 0.625966421 0.68701679 [125,] 0.444011227 0.888022454 0.55598877 [126,] 0.357175023 0.714350047 0.64282498 [127,] 0.253500828 0.507001656 0.74649917 [128,] 0.171939618 0.343879237 0.82806038 [129,] 0.382671608 0.765343216 0.61732839 > postscript(file="/var/www/html/rcomp/tmp/15yyo1290458249.ps",horizontal=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/2y7fr1290458249.ps",horizontal=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/3y7fr1290458249.ps",horizontal=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/4y7fr1290458249.ps",horizontal=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/59zxc1290458249.ps",horizontal=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.03036237 0.09208643 0.43461120 -1.04828932 0.26221935 0.40351919 7 8 9 10 11 12 -0.48315045 -0.09163925 0.31703526 0.29092493 -0.14480831 0.32629742 13 14 15 16 17 18 -0.52571020 0.05538213 0.42691649 0.26059758 0.12116336 0.62786429 19 20 21 22 23 24 0.37690871 1.12378937 1.52817443 1.52902986 -0.68088974 -0.92506907 25 26 27 28 29 30 0.46713080 0.22397604 0.38781693 0.27989313 -1.28011410 -1.12852094 31 32 33 34 35 36 -0.26266729 1.00823092 0.24487990 0.07133808 -0.08801461 1.64017715 37 38 39 40 41 42 0.29329166 0.17797414 0.56921299 0.52488058 -1.20602836 -1.06347528 43 44 45 46 47 48 -0.55367509 0.43281323 -1.51566335 0.21444813 -0.12563958 0.09021311 49 50 51 52 53 54 -0.61267862 -0.59986718 0.06587669 0.80777190 -1.15571826 0.25918012 55 56 57 58 59 60 -1.60298656 -4.23008589 0.69033291 0.32767395 -0.21914600 0.20579950 61 62 63 64 65 66 0.06971457 -1.36427790 0.32154472 -0.97492394 -0.01076353 -1.03188791 67 68 69 70 71 72 0.25716984 0.99454309 -0.11860667 -0.07722011 -0.04443965 0.80280296 73 74 75 76 77 78 1.45106012 -1.47797917 0.32483983 0.36699010 0.35506608 0.88414378 79 80 81 82 83 84 0.81614666 -0.81392782 0.39526403 0.24317029 -0.30442308 -0.23848584 85 86 87 88 89 90 -0.65399870 1.02855188 0.33035104 -1.13734191 0.33137323 -0.65295606 91 92 93 94 95 96 0.14679387 0.95915779 -0.50476026 0.38968716 0.56529645 0.69725266 97 98 99 100 101 102 1.73768103 -1.02181836 -0.22757076 0.26426437 0.41055016 -0.74713295 103 104 105 106 107 108 -0.72491134 1.54887395 0.29977555 -0.17079249 1.08757543 0.05660924 109 110 111 112 113 114 -1.53794227 0.50107123 1.73110574 -0.71615703 -0.32626584 -0.93739722 115 116 117 118 119 120 0.28634954 -0.19533525 0.72911131 -0.19372496 -1.23426161 0.03064523 121 122 123 124 125 126 -0.46920192 0.53370466 0.97821989 0.61337119 -0.85445653 -0.45594058 127 128 129 130 131 132 0.61507652 0.20359092 0.49816583 -0.30211837 0.91020743 -0.33208970 133 134 135 136 137 138 0.53599588 0.34920544 0.47092805 0.03343487 1.26440589 -0.35504604 139 140 141 142 143 144 -1.45020289 -0.38775719 -0.60609457 -0.50087213 1.09378607 -1.43915815 145 146 0.67949489 -1.18711183 > postscript(file="/var/www/html/rcomp/tmp/69zxc1290458249.ps",horizontal=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.03036237 NA 1 0.09208643 -1.03036237 2 0.43461120 0.09208643 3 -1.04828932 0.43461120 4 0.26221935 -1.04828932 5 0.40351919 0.26221935 6 -0.48315045 0.40351919 7 -0.09163925 -0.48315045 8 0.31703526 -0.09163925 9 0.29092493 0.31703526 10 -0.14480831 0.29092493 11 0.32629742 -0.14480831 12 -0.52571020 0.32629742 13 0.05538213 -0.52571020 14 0.42691649 0.05538213 15 0.26059758 0.42691649 16 0.12116336 0.26059758 17 0.62786429 0.12116336 18 0.37690871 0.62786429 19 1.12378937 0.37690871 20 1.52817443 1.12378937 21 1.52902986 1.52817443 22 -0.68088974 1.52902986 23 -0.92506907 -0.68088974 24 0.46713080 -0.92506907 25 0.22397604 0.46713080 26 0.38781693 0.22397604 27 0.27989313 0.38781693 28 -1.28011410 0.27989313 29 -1.12852094 -1.28011410 30 -0.26266729 -1.12852094 31 1.00823092 -0.26266729 32 0.24487990 1.00823092 33 0.07133808 0.24487990 34 -0.08801461 0.07133808 35 1.64017715 -0.08801461 36 0.29329166 1.64017715 37 0.17797414 0.29329166 38 0.56921299 0.17797414 39 0.52488058 0.56921299 40 -1.20602836 0.52488058 41 -1.06347528 -1.20602836 42 -0.55367509 -1.06347528 43 0.43281323 -0.55367509 44 -1.51566335 0.43281323 45 0.21444813 -1.51566335 46 -0.12563958 0.21444813 47 0.09021311 -0.12563958 48 -0.61267862 0.09021311 49 -0.59986718 -0.61267862 50 0.06587669 -0.59986718 51 0.80777190 0.06587669 52 -1.15571826 0.80777190 53 0.25918012 -1.15571826 54 -1.60298656 0.25918012 55 -4.23008589 -1.60298656 56 0.69033291 -4.23008589 57 0.32767395 0.69033291 58 -0.21914600 0.32767395 59 0.20579950 -0.21914600 60 0.06971457 0.20579950 61 -1.36427790 0.06971457 62 0.32154472 -1.36427790 63 -0.97492394 0.32154472 64 -0.01076353 -0.97492394 65 -1.03188791 -0.01076353 66 0.25716984 -1.03188791 67 0.99454309 0.25716984 68 -0.11860667 0.99454309 69 -0.07722011 -0.11860667 70 -0.04443965 -0.07722011 71 0.80280296 -0.04443965 72 1.45106012 0.80280296 73 -1.47797917 1.45106012 74 0.32483983 -1.47797917 75 0.36699010 0.32483983 76 0.35506608 0.36699010 77 0.88414378 0.35506608 78 0.81614666 0.88414378 79 -0.81392782 0.81614666 80 0.39526403 -0.81392782 81 0.24317029 0.39526403 82 -0.30442308 0.24317029 83 -0.23848584 -0.30442308 84 -0.65399870 -0.23848584 85 1.02855188 -0.65399870 86 0.33035104 1.02855188 87 -1.13734191 0.33035104 88 0.33137323 -1.13734191 89 -0.65295606 0.33137323 90 0.14679387 -0.65295606 91 0.95915779 0.14679387 92 -0.50476026 0.95915779 93 0.38968716 -0.50476026 94 0.56529645 0.38968716 95 0.69725266 0.56529645 96 1.73768103 0.69725266 97 -1.02181836 1.73768103 98 -0.22757076 -1.02181836 99 0.26426437 -0.22757076 100 0.41055016 0.26426437 101 -0.74713295 0.41055016 102 -0.72491134 -0.74713295 103 1.54887395 -0.72491134 104 0.29977555 1.54887395 105 -0.17079249 0.29977555 106 1.08757543 -0.17079249 107 0.05660924 1.08757543 108 -1.53794227 0.05660924 109 0.50107123 -1.53794227 110 1.73110574 0.50107123 111 -0.71615703 1.73110574 112 -0.32626584 -0.71615703 113 -0.93739722 -0.32626584 114 0.28634954 -0.93739722 115 -0.19533525 0.28634954 116 0.72911131 -0.19533525 117 -0.19372496 0.72911131 118 -1.23426161 -0.19372496 119 0.03064523 -1.23426161 120 -0.46920192 0.03064523 121 0.53370466 -0.46920192 122 0.97821989 0.53370466 123 0.61337119 0.97821989 124 -0.85445653 0.61337119 125 -0.45594058 -0.85445653 126 0.61507652 -0.45594058 127 0.20359092 0.61507652 128 0.49816583 0.20359092 129 -0.30211837 0.49816583 130 0.91020743 -0.30211837 131 -0.33208970 0.91020743 132 0.53599588 -0.33208970 133 0.34920544 0.53599588 134 0.47092805 0.34920544 135 0.03343487 0.47092805 136 1.26440589 0.03343487 137 -0.35504604 1.26440589 138 -1.45020289 -0.35504604 139 -0.38775719 -1.45020289 140 -0.60609457 -0.38775719 141 -0.50087213 -0.60609457 142 1.09378607 -0.50087213 143 -1.43915815 1.09378607 144 0.67949489 -1.43915815 145 -1.18711183 0.67949489 146 NA -1.18711183 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.09208643 -1.03036237 [2,] 0.43461120 0.09208643 [3,] -1.04828932 0.43461120 [4,] 0.26221935 -1.04828932 [5,] 0.40351919 0.26221935 [6,] -0.48315045 0.40351919 [7,] -0.09163925 -0.48315045 [8,] 0.31703526 -0.09163925 [9,] 0.29092493 0.31703526 [10,] -0.14480831 0.29092493 [11,] 0.32629742 -0.14480831 [12,] -0.52571020 0.32629742 [13,] 0.05538213 -0.52571020 [14,] 0.42691649 0.05538213 [15,] 0.26059758 0.42691649 [16,] 0.12116336 0.26059758 [17,] 0.62786429 0.12116336 [18,] 0.37690871 0.62786429 [19,] 1.12378937 0.37690871 [20,] 1.52817443 1.12378937 [21,] 1.52902986 1.52817443 [22,] -0.68088974 1.52902986 [23,] -0.92506907 -0.68088974 [24,] 0.46713080 -0.92506907 [25,] 0.22397604 0.46713080 [26,] 0.38781693 0.22397604 [27,] 0.27989313 0.38781693 [28,] -1.28011410 0.27989313 [29,] -1.12852094 -1.28011410 [30,] -0.26266729 -1.12852094 [31,] 1.00823092 -0.26266729 [32,] 0.24487990 1.00823092 [33,] 0.07133808 0.24487990 [34,] -0.08801461 0.07133808 [35,] 1.64017715 -0.08801461 [36,] 0.29329166 1.64017715 [37,] 0.17797414 0.29329166 [38,] 0.56921299 0.17797414 [39,] 0.52488058 0.56921299 [40,] -1.20602836 0.52488058 [41,] -1.06347528 -1.20602836 [42,] -0.55367509 -1.06347528 [43,] 0.43281323 -0.55367509 [44,] -1.51566335 0.43281323 [45,] 0.21444813 -1.51566335 [46,] -0.12563958 0.21444813 [47,] 0.09021311 -0.12563958 [48,] -0.61267862 0.09021311 [49,] -0.59986718 -0.61267862 [50,] 0.06587669 -0.59986718 [51,] 0.80777190 0.06587669 [52,] -1.15571826 0.80777190 [53,] 0.25918012 -1.15571826 [54,] -1.60298656 0.25918012 [55,] -4.23008589 -1.60298656 [56,] 0.69033291 -4.23008589 [57,] 0.32767395 0.69033291 [58,] -0.21914600 0.32767395 [59,] 0.20579950 -0.21914600 [60,] 0.06971457 0.20579950 [61,] -1.36427790 0.06971457 [62,] 0.32154472 -1.36427790 [63,] -0.97492394 0.32154472 [64,] -0.01076353 -0.97492394 [65,] -1.03188791 -0.01076353 [66,] 0.25716984 -1.03188791 [67,] 0.99454309 0.25716984 [68,] -0.11860667 0.99454309 [69,] -0.07722011 -0.11860667 [70,] -0.04443965 -0.07722011 [71,] 0.80280296 -0.04443965 [72,] 1.45106012 0.80280296 [73,] -1.47797917 1.45106012 [74,] 0.32483983 -1.47797917 [75,] 0.36699010 0.32483983 [76,] 0.35506608 0.36699010 [77,] 0.88414378 0.35506608 [78,] 0.81614666 0.88414378 [79,] -0.81392782 0.81614666 [80,] 0.39526403 -0.81392782 [81,] 0.24317029 0.39526403 [82,] -0.30442308 0.24317029 [83,] -0.23848584 -0.30442308 [84,] -0.65399870 -0.23848584 [85,] 1.02855188 -0.65399870 [86,] 0.33035104 1.02855188 [87,] -1.13734191 0.33035104 [88,] 0.33137323 -1.13734191 [89,] -0.65295606 0.33137323 [90,] 0.14679387 -0.65295606 [91,] 0.95915779 0.14679387 [92,] -0.50476026 0.95915779 [93,] 0.38968716 -0.50476026 [94,] 0.56529645 0.38968716 [95,] 0.69725266 0.56529645 [96,] 1.73768103 0.69725266 [97,] -1.02181836 1.73768103 [98,] -0.22757076 -1.02181836 [99,] 0.26426437 -0.22757076 [100,] 0.41055016 0.26426437 [101,] -0.74713295 0.41055016 [102,] -0.72491134 -0.74713295 [103,] 1.54887395 -0.72491134 [104,] 0.29977555 1.54887395 [105,] -0.17079249 0.29977555 [106,] 1.08757543 -0.17079249 [107,] 0.05660924 1.08757543 [108,] -1.53794227 0.05660924 [109,] 0.50107123 -1.53794227 [110,] 1.73110574 0.50107123 [111,] -0.71615703 1.73110574 [112,] -0.32626584 -0.71615703 [113,] -0.93739722 -0.32626584 [114,] 0.28634954 -0.93739722 [115,] -0.19533525 0.28634954 [116,] 0.72911131 -0.19533525 [117,] -0.19372496 0.72911131 [118,] -1.23426161 -0.19372496 [119,] 0.03064523 -1.23426161 [120,] -0.46920192 0.03064523 [121,] 0.53370466 -0.46920192 [122,] 0.97821989 0.53370466 [123,] 0.61337119 0.97821989 [124,] -0.85445653 0.61337119 [125,] -0.45594058 -0.85445653 [126,] 0.61507652 -0.45594058 [127,] 0.20359092 0.61507652 [128,] 0.49816583 0.20359092 [129,] -0.30211837 0.49816583 [130,] 0.91020743 -0.30211837 [131,] -0.33208970 0.91020743 [132,] 0.53599588 -0.33208970 [133,] 0.34920544 0.53599588 [134,] 0.47092805 0.34920544 [135,] 0.03343487 0.47092805 [136,] 1.26440589 0.03343487 [137,] -0.35504604 1.26440589 [138,] -1.45020289 -0.35504604 [139,] -0.38775719 -1.45020289 [140,] -0.60609457 -0.38775719 [141,] -0.50087213 -0.60609457 [142,] 1.09378607 -0.50087213 [143,] -1.43915815 1.09378607 [144,] 0.67949489 -1.43915815 [145,] -1.18711183 0.67949489 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.09208643 -1.03036237 2 0.43461120 0.09208643 3 -1.04828932 0.43461120 4 0.26221935 -1.04828932 5 0.40351919 0.26221935 6 -0.48315045 0.40351919 7 -0.09163925 -0.48315045 8 0.31703526 -0.09163925 9 0.29092493 0.31703526 10 -0.14480831 0.29092493 11 0.32629742 -0.14480831 12 -0.52571020 0.32629742 13 0.05538213 -0.52571020 14 0.42691649 0.05538213 15 0.26059758 0.42691649 16 0.12116336 0.26059758 17 0.62786429 0.12116336 18 0.37690871 0.62786429 19 1.12378937 0.37690871 20 1.52817443 1.12378937 21 1.52902986 1.52817443 22 -0.68088974 1.52902986 23 -0.92506907 -0.68088974 24 0.46713080 -0.92506907 25 0.22397604 0.46713080 26 0.38781693 0.22397604 27 0.27989313 0.38781693 28 -1.28011410 0.27989313 29 -1.12852094 -1.28011410 30 -0.26266729 -1.12852094 31 1.00823092 -0.26266729 32 0.24487990 1.00823092 33 0.07133808 0.24487990 34 -0.08801461 0.07133808 35 1.64017715 -0.08801461 36 0.29329166 1.64017715 37 0.17797414 0.29329166 38 0.56921299 0.17797414 39 0.52488058 0.56921299 40 -1.20602836 0.52488058 41 -1.06347528 -1.20602836 42 -0.55367509 -1.06347528 43 0.43281323 -0.55367509 44 -1.51566335 0.43281323 45 0.21444813 -1.51566335 46 -0.12563958 0.21444813 47 0.09021311 -0.12563958 48 -0.61267862 0.09021311 49 -0.59986718 -0.61267862 50 0.06587669 -0.59986718 51 0.80777190 0.06587669 52 -1.15571826 0.80777190 53 0.25918012 -1.15571826 54 -1.60298656 0.25918012 55 -4.23008589 -1.60298656 56 0.69033291 -4.23008589 57 0.32767395 0.69033291 58 -0.21914600 0.32767395 59 0.20579950 -0.21914600 60 0.06971457 0.20579950 61 -1.36427790 0.06971457 62 0.32154472 -1.36427790 63 -0.97492394 0.32154472 64 -0.01076353 -0.97492394 65 -1.03188791 -0.01076353 66 0.25716984 -1.03188791 67 0.99454309 0.25716984 68 -0.11860667 0.99454309 69 -0.07722011 -0.11860667 70 -0.04443965 -0.07722011 71 0.80280296 -0.04443965 72 1.45106012 0.80280296 73 -1.47797917 1.45106012 74 0.32483983 -1.47797917 75 0.36699010 0.32483983 76 0.35506608 0.36699010 77 0.88414378 0.35506608 78 0.81614666 0.88414378 79 -0.81392782 0.81614666 80 0.39526403 -0.81392782 81 0.24317029 0.39526403 82 -0.30442308 0.24317029 83 -0.23848584 -0.30442308 84 -0.65399870 -0.23848584 85 1.02855188 -0.65399870 86 0.33035104 1.02855188 87 -1.13734191 0.33035104 88 0.33137323 -1.13734191 89 -0.65295606 0.33137323 90 0.14679387 -0.65295606 91 0.95915779 0.14679387 92 -0.50476026 0.95915779 93 0.38968716 -0.50476026 94 0.56529645 0.38968716 95 0.69725266 0.56529645 96 1.73768103 0.69725266 97 -1.02181836 1.73768103 98 -0.22757076 -1.02181836 99 0.26426437 -0.22757076 100 0.41055016 0.26426437 101 -0.74713295 0.41055016 102 -0.72491134 -0.74713295 103 1.54887395 -0.72491134 104 0.29977555 1.54887395 105 -0.17079249 0.29977555 106 1.08757543 -0.17079249 107 0.05660924 1.08757543 108 -1.53794227 0.05660924 109 0.50107123 -1.53794227 110 1.73110574 0.50107123 111 -0.71615703 1.73110574 112 -0.32626584 -0.71615703 113 -0.93739722 -0.32626584 114 0.28634954 -0.93739722 115 -0.19533525 0.28634954 116 0.72911131 -0.19533525 117 -0.19372496 0.72911131 118 -1.23426161 -0.19372496 119 0.03064523 -1.23426161 120 -0.46920192 0.03064523 121 0.53370466 -0.46920192 122 0.97821989 0.53370466 123 0.61337119 0.97821989 124 -0.85445653 0.61337119 125 -0.45594058 -0.85445653 126 0.61507652 -0.45594058 127 0.20359092 0.61507652 128 0.49816583 0.20359092 129 -0.30211837 0.49816583 130 0.91020743 -0.30211837 131 -0.33208970 0.91020743 132 0.53599588 -0.33208970 133 0.34920544 0.53599588 134 0.47092805 0.34920544 135 0.03343487 0.47092805 136 1.26440589 0.03343487 137 -0.35504604 1.26440589 138 -1.45020289 -0.35504604 139 -0.38775719 -1.45020289 140 -0.60609457 -0.38775719 141 -0.50087213 -0.60609457 142 1.09378607 -0.50087213 143 -1.43915815 1.09378607 144 0.67949489 -1.43915815 145 -1.18711183 0.67949489 > 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/7j8ex1290458249.ps",horizontal=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/8uhv01290458249.ps",horizontal=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/9uhv01290458249.ps",horizontal=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/10uhv01290458249.ps",horizontal=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/11gic61290458249.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/121isc1290458249.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/13qj7o1290458249.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/14jaor1290458249.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/154b5e1290458249.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/1603l51290458249.tab") + } > > try(system("convert tmp/15yyo1290458249.ps tmp/15yyo1290458249.png",intern=TRUE)) character(0) > try(system("convert tmp/2y7fr1290458249.ps tmp/2y7fr1290458249.png",intern=TRUE)) character(0) > try(system("convert tmp/3y7fr1290458249.ps tmp/3y7fr1290458249.png",intern=TRUE)) character(0) > try(system("convert tmp/4y7fr1290458249.ps tmp/4y7fr1290458249.png",intern=TRUE)) character(0) > try(system("convert tmp/59zxc1290458249.ps tmp/59zxc1290458249.png",intern=TRUE)) character(0) > try(system("convert tmp/69zxc1290458249.ps tmp/69zxc1290458249.png",intern=TRUE)) character(0) > try(system("convert tmp/7j8ex1290458249.ps tmp/7j8ex1290458249.png",intern=TRUE)) character(0) > try(system("convert tmp/8uhv01290458249.ps tmp/8uhv01290458249.png",intern=TRUE)) character(0) > try(system("convert tmp/9uhv01290458249.ps tmp/9uhv01290458249.png",intern=TRUE)) character(0) > try(system("convert tmp/10uhv01290458249.ps tmp/10uhv01290458249.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.796 1.707 9.303