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(0 + ,41 + ,25 + ,0 + ,15 + ,0 + ,9 + ,0 + ,3 + ,0 + ,0 + ,38 + ,25 + ,0 + ,15 + ,0 + ,9 + ,0 + ,4 + ,0 + ,0 + ,37 + ,19 + ,0 + ,14 + ,0 + ,9 + ,0 + ,4 + ,0 + ,1 + ,36 + ,18 + ,18 + ,10 + ,10 + ,14 + ,14 + ,2 + ,2 + ,1 + ,42 + ,18 + ,18 + ,10 + ,10 + ,8 + ,8 + ,4 + ,4 + ,0 + ,44 + ,23 + ,0 + ,9 + ,0 + ,14 + ,0 + ,4 + ,0 + ,0 + ,40 + ,23 + ,0 + ,18 + ,0 + ,15 + ,0 + ,3 + ,0 + ,0 + ,43 + ,25 + ,0 + ,14 + ,0 + ,9 + ,0 + ,4 + ,0 + ,0 + ,40 + ,23 + ,0 + ,11 + ,0 + ,11 + ,0 + ,4 + ,0 + ,0 + ,45 + ,24 + ,0 + ,11 + ,0 + ,14 + ,0 + ,4 + ,0 + ,1 + ,47 + ,32 + ,32 + ,9 + ,9 + ,14 + ,14 + ,4 + ,4 + ,0 + ,45 + ,30 + ,0 + ,17 + ,0 + ,6 + ,0 + ,5 + ,0 + ,0 + ,45 + ,32 + ,0 + ,21 + ,0 + ,10 + ,0 + ,4 + ,0 + ,1 + ,40 + ,24 + ,24 + ,16 + ,16 + ,9 + ,9 + ,4 + ,4 + ,0 + ,49 + ,17 + ,0 + ,14 + ,0 + ,14 + ,0 + ,4 + ,0 + ,1 + ,48 + ,30 + ,30 + ,24 + ,24 + ,8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14 + ,12 + ,12 + ,2 + ,2 + ,0 + ,40 + ,22 + ,0 + ,12 + ,0 + ,13 + ,0 + ,3 + ,0 + ,1 + ,42 + ,25 + ,25 + ,17 + ,17 + ,14 + ,14 + ,3 + ,3 + ,1 + ,37 + ,21 + ,21 + ,11 + ,11 + ,9 + ,9 + ,3 + ,3 + ,1 + ,29 + ,22 + ,22 + ,15 + ,15 + ,14 + ,14 + ,4 + ,4 + ,1 + ,33 + ,21 + ,21 + ,13 + ,13 + ,8 + ,8 + ,2 + ,2 + ,1 + ,35 + ,18 + ,18 + ,9 + ,9 + ,8 + ,8 + ,4 + ,4 + ,1 + ,42 + ,10 + ,10 + ,12 + ,12 + ,9 + ,9 + ,2 + ,2) + ,dim=c(10 + ,146) + ,dimnames=list(c('G' + ,'Career' + ,'PersonalStandards' + ,'PeG' + ,'ParentalExpectations' + ,'PaG' + ,'Doubts' + ,'DoG' + ,'LeadershipPreference' + ,'LeaderG') + ,1:146)) > y <- array(NA,dim=c(10,146),dimnames=list(c('G','Career','PersonalStandards','PeG','ParentalExpectations','PaG','Doubts','DoG','LeadershipPreference','LeaderG'),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 = '2' > #'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 Career G PersonalStandards PeG ParentalExpectations PaG Doubts DoG 1 41 0 25 0 15 0 9 0 2 38 0 25 0 15 0 9 0 3 37 0 19 0 14 0 9 0 4 36 1 18 18 10 10 14 14 5 42 1 18 18 10 10 8 8 6 44 0 23 0 9 0 14 0 7 40 0 23 0 18 0 15 0 8 43 0 25 0 14 0 9 0 9 40 0 23 0 11 0 11 0 10 45 0 24 0 11 0 14 0 11 47 1 32 32 9 9 14 14 12 45 0 30 0 17 0 6 0 13 45 0 32 0 21 0 10 0 14 40 1 24 24 16 16 9 9 15 49 0 17 0 14 0 14 0 16 48 1 30 30 24 24 8 8 17 44 0 25 0 7 0 11 0 18 29 1 25 25 9 9 10 10 19 42 0 26 0 18 0 16 0 20 45 0 23 0 11 0 11 0 21 32 1 25 25 13 13 11 11 22 32 1 25 25 13 13 11 11 23 41 0 35 0 18 0 7 0 24 29 1 19 19 14 14 13 13 25 38 0 20 0 12 0 10 0 26 41 0 21 0 12 0 9 0 27 38 1 21 21 9 9 9 9 28 24 1 23 23 11 11 15 15 29 34 1 24 24 8 8 13 13 30 38 0 23 0 5 0 16 0 31 37 1 19 19 10 10 12 12 32 46 0 17 0 11 0 6 0 33 48 1 27 27 15 15 4 4 34 42 0 27 0 16 0 12 0 35 46 0 25 0 12 0 10 0 36 43 1 18 18 14 14 14 14 37 38 0 22 0 13 0 9 0 38 39 1 26 26 10 10 10 10 39 34 0 26 0 18 0 14 0 40 39 0 23 0 17 0 14 0 41 35 0 16 0 12 0 10 0 42 41 1 27 27 13 13 9 9 43 40 1 25 25 13 13 14 14 44 43 1 14 14 11 11 8 8 45 37 0 19 0 13 0 9 0 46 41 0 20 0 12 0 8 0 47 46 0 26 0 12 0 10 0 48 26 1 16 16 12 12 9 9 49 41 1 18 18 12 12 9 9 50 37 0 22 0 9 0 9 0 51 39 1 25 25 17 17 9 9 52 44 0 29 0 18 0 11 0 53 39 0 21 0 7 0 15 0 54 36 1 22 22 17 17 8 8 55 38 0 22 0 12 0 10 0 56 38 1 32 32 12 12 8 8 57 38 0 23 0 9 0 14 0 58 32 1 31 31 9 9 11 11 59 33 1 18 18 13 13 10 10 60 46 1 23 23 10 10 12 12 61 42 0 24 0 12 0 9 0 62 42 0 19 0 10 0 13 0 63 43 0 26 0 11 0 14 0 64 41 1 14 14 13 13 15 15 65 49 0 20 0 6 0 8 0 66 45 1 22 22 7 7 7 7 67 39 0 24 0 13 0 10 0 68 45 1 25 25 11 11 10 10 69 31 0 21 0 18 0 13 0 70 30 0 21 0 18 0 13 0 71 45 0 28 0 9 0 11 0 72 48 0 24 0 9 0 8 0 73 28 0 15 0 12 0 14 0 74 35 0 21 0 11 0 9 0 75 38 0 23 0 15 0 10 0 76 39 1 24 24 11 11 11 11 77 40 1 21 21 14 14 10 10 78 38 1 21 21 14 14 16 16 79 42 0 13 0 8 0 11 0 80 36 0 17 0 12 0 16 0 81 49 0 29 0 8 0 6 0 82 41 0 25 0 11 0 11 0 83 18 0 16 0 10 0 12 0 84 36 0 20 0 11 0 12 0 85 42 1 25 25 17 17 14 14 86 41 1 25 25 16 16 9 9 87 43 0 21 0 13 0 11 0 88 46 0 23 0 15 0 8 0 89 37 1 22 22 11 11 8 8 90 38 1 19 19 12 12 7 7 91 43 0 26 0 20 0 13 0 92 41 0 25 0 16 0 8 0 93 35 1 19 19 8 8 20 20 94 39 0 25 0 7 0 11 0 95 42 0 24 0 16 0 16 0 96 36 0 20 0 11 0 11 0 97 35 1 21 21 13 13 12 12 98 33 0 14 0 15 0 10 0 99 36 0 22 0 15 0 14 0 100 48 0 14 0 12 0 8 0 101 41 0 20 0 12 0 10 0 102 47 1 21 21 24 24 14 14 103 41 0 22 0 15 0 10 0 104 31 1 19 19 8 8 5 5 105 36 1 28 28 18 18 12 12 106 46 1 25 25 17 17 9 9 107 39 1 17 17 12 12 16 16 108 44 0 21 0 15 0 8 0 109 43 1 27 27 11 11 16 16 110 32 0 29 0 12 0 12 0 111 40 1 19 19 12 12 13 13 112 40 0 20 0 14 0 8 0 113 46 0 17 0 11 0 14 0 114 45 0 21 0 12 0 8 0 115 39 0 22 0 10 0 8 0 116 44 0 26 0 11 0 7 0 117 35 0 19 0 11 0 10 0 118 38 0 17 0 9 0 11 0 119 38 0 17 0 12 0 11 0 120 36 1 19 19 8 8 14 14 121 42 0 17 0 12 0 10 0 122 39 0 15 0 6 0 6 0 123 41 1 27 27 15 15 9 9 124 41 0 19 0 13 0 12 0 125 47 0 21 0 17 0 11 0 126 39 0 25 0 14 0 14 0 127 40 1 19 19 16 16 12 12 128 44 0 18 0 16 0 8 0 129 42 0 15 0 11 0 8 0 130 35 1 20 20 16 16 11 11 131 46 0 29 0 15 0 12 0 132 43 1 20 20 11 11 14 14 133 40 1 29 29 9 9 16 16 134 44 0 24 0 12 0 13 0 135 37 1 24 24 13 13 11 11 136 46 1 23 23 11 11 9 9 137 44 0 23 0 11 0 11 0 138 35 0 19 0 13 0 9 0 139 39 1 22 22 14 14 12 12 140 40 0 22 0 12 0 13 0 141 42 1 25 25 17 17 14 14 142 37 1 21 21 11 11 9 9 143 29 1 22 22 15 15 14 14 144 33 1 21 21 13 13 8 8 145 35 1 18 18 9 9 8 8 146 42 1 10 10 12 12 9 9 LeadershipPreference LeaderG 1 3 0 2 4 0 3 4 0 4 2 2 5 4 4 6 4 0 7 3 0 8 4 0 9 4 0 10 4 0 11 4 4 12 5 0 13 4 0 14 4 4 15 4 0 16 5 5 17 4 0 18 4 4 19 4 0 20 5 0 21 5 5 22 5 5 23 4 0 24 2 2 25 4 0 26 4 0 27 4 4 28 3 3 29 2 2 30 2 0 31 3 3 32 5 0 33 5 5 34 4 0 35 4 0 36 5 5 37 4 0 38 4 4 39 4 0 40 4 0 41 2 0 42 3 3 43 3 3 44 4 4 45 2 0 46 4 0 47 4 0 48 3 3 49 3 3 50 3 0 51 4 4 52 5 0 53 2 0 54 4 4 55 2 0 56 0 0 57 4 0 58 4 4 59 3 3 60 4 4 61 4 0 62 2 0 63 4 0 64 2 2 65 4 0 66 3 3 67 4 0 68 5 5 69 3 0 70 3 0 71 4 0 72 5 0 73 4 0 74 2 0 75 4 0 76 4 4 77 4 4 78 4 4 79 4 0 80 2 0 81 5 0 82 4 0 83 2 0 84 3 0 85 3 3 86 5 5 87 4 0 88 3 0 89 4 4 90 3 3 91 4 0 92 5 0 93 2 2 94 4 0 95 4 0 96 4 0 97 5 5 98 2 0 99 3 0 100 4 0 101 4 0 102 3 3 103 3 0 104 5 5 105 4 4 106 4 4 107 4 4 108 4 0 109 2 2 110 4 0 111 5 5 112 3 0 113 3 0 114 3 0 115 4 0 116 4 0 117 4 0 118 3 0 119 2 0 120 3 3 121 3 0 122 4 0 123 5 5 124 4 0 125 3 0 126 3 0 127 4 4 128 4 0 129 4 0 130 3 3 131 5 0 132 3 3 133 4 4 134 4 0 135 4 4 136 4 4 137 5 0 138 3 0 139 2 2 140 3 0 141 3 3 142 3 3 143 4 4 144 2 2 145 4 4 146 2 2 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) G PersonalStandards 32.47111 -1.86340 0.19103 PeG ParentalExpectations PaG -0.05401 -0.17367 0.53424 Doubts DoG LeadershipPreference -0.24865 0.14097 2.38392 LeaderG -1.98395 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -17.575 -2.757 0.633 2.576 9.658 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 32.47111 4.19331 7.744 1.98e-12 *** G -1.86340 6.39787 -0.291 0.77130 PersonalStandards 0.19103 0.14446 1.322 0.18825 PeG -0.05401 0.20421 -0.265 0.79179 ParentalExpectations -0.17367 0.16881 -1.029 0.30542 PaG 0.53424 0.24981 2.139 0.03425 * Doubts -0.24865 0.21530 -1.155 0.25014 DoG 0.14097 0.30031 0.469 0.63954 LeadershipPreference 2.38392 0.71880 3.317 0.00117 ** LeaderG -1.98395 0.94964 -2.089 0.03856 * --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 4.806 on 136 degrees of freedom Multiple R-squared: 0.2238, Adjusted R-squared: 0.1725 F-statistic: 4.358 on 9 and 136 DF, p-value: 5.223e-05 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 0.13859716 0.27719432 0.86140284 [2,] 0.05457686 0.10915372 0.94542314 [3,] 0.32434299 0.64868598 0.67565701 [4,] 0.21161658 0.42323317 0.78838342 [5,] 0.14440391 0.28880782 0.85559609 [6,] 0.16186738 0.32373475 0.83813262 [7,] 0.16360822 0.32721644 0.83639178 [8,] 0.10671675 0.21343349 0.89328325 [9,] 0.65911069 0.68177862 0.34088931 [10,] 0.61028817 0.77942367 0.38971183 [11,] 0.53392206 0.93215589 0.46607794 [12,] 0.67433363 0.65133273 0.32566637 [13,] 0.63230622 0.73538756 0.36769378 [14,] 0.55792129 0.88415741 0.44207871 [15,] 0.48905618 0.97811236 0.51094382 [16,] 0.61519850 0.76960299 0.38480150 [17,] 0.60562880 0.78874240 0.39437120 [18,] 0.54123038 0.91753924 0.45876962 [19,] 0.54762644 0.90474712 0.45237356 [20,] 0.51059907 0.97880185 0.48940093 [21,] 0.48654189 0.97308378 0.51345811 [22,] 0.42417750 0.84835501 0.57582250 [23,] 0.40295774 0.80591548 0.59704226 [24,] 0.66282233 0.67435534 0.33717767 [25,] 0.63637976 0.72724048 0.36362024 [26,] 0.57869266 0.84261468 0.42130734 [27,] 0.67941382 0.64117235 0.32058618 [28,] 0.63593137 0.72813726 0.36406863 [29,] 0.57974966 0.84050069 0.42025034 [30,] 0.53003444 0.93993111 0.46996556 [31,] 0.51133159 0.97733681 0.48866841 [32,] 0.52532762 0.94934476 0.47467238 [33,] 0.47321008 0.94642016 0.52678992 [34,] 0.41833590 0.83667179 0.58166410 [35,] 0.39280455 0.78560911 0.60719545 [36,] 0.61383699 0.77232602 0.38616301 [37,] 0.60028589 0.79942822 0.39971411 [38,] 0.56677368 0.86645264 0.43322632 [39,] 0.51893712 0.96212576 0.48106288 [40,] 0.46537574 0.93075148 0.53462426 [41,] 0.42753049 0.85506098 0.57246951 [42,] 0.41384151 0.82768302 0.58615849 [43,] 0.36682917 0.73365835 0.63317083 [44,] 0.32175764 0.64351528 0.67824236 [45,] 0.31066679 0.62133359 0.68933321 [46,] 0.36723977 0.73447954 0.63276023 [47,] 0.35667222 0.71334444 0.64332778 [48,] 0.47796990 0.95593981 0.52203010 [49,] 0.42709977 0.85419955 0.57290023 [50,] 0.45665452 0.91330903 0.54334548 [51,] 0.41550529 0.83101057 0.58449471 [52,] 0.46491344 0.92982688 0.53508656 [53,] 0.50471059 0.99057883 0.49528941 [54,] 0.57166053 0.85667893 0.42833947 [55,] 0.54050836 0.91898329 0.45949164 [56,] 0.57116019 0.85767962 0.42883981 [57,] 0.61564405 0.76871190 0.38435595 [58,] 0.68864983 0.62270034 0.31135017 [59,] 0.66243287 0.67513426 0.33756713 [60,] 0.63416231 0.73167538 0.36583769 [61,] 0.81769589 0.36460822 0.18230411 [62,] 0.78607286 0.42785428 0.21392714 [63,] 0.77637460 0.44725081 0.22362540 [64,] 0.73830960 0.52338079 0.26169040 [65,] 0.69835916 0.60328167 0.30164084 [66,] 0.65827705 0.68344590 0.34172295 [67,] 0.62342543 0.75314913 0.37657457 [68,] 0.59253643 0.81492713 0.40746357 [69,] 0.57996497 0.84007007 0.42003503 [70,] 0.53519053 0.92961893 0.46480947 [71,] 0.95091047 0.09817907 0.04908953 [72,] 0.94066641 0.11866718 0.05933359 [73,] 0.93017164 0.13965672 0.06982836 [74,] 0.91314497 0.17371006 0.08685503 [75,] 0.89490783 0.21018434 0.10509217 [76,] 0.91715684 0.16568633 0.08284316 [77,] 0.89690192 0.20619616 0.10309808 [78,] 0.87101359 0.25797282 0.12898641 [79,] 0.84811939 0.30376122 0.15188061 [80,] 0.83702022 0.32595956 0.16297978 [81,] 0.82325549 0.35348901 0.17674451 [82,] 0.80373522 0.39252956 0.19626478 [83,] 0.76697400 0.46605201 0.23302600 [84,] 0.77399848 0.45200305 0.22600152 [85,] 0.75239343 0.49521314 0.24760657 [86,] 0.79316669 0.41366662 0.20683331 [87,] 0.79470538 0.41058924 0.20529462 [88,] 0.81851248 0.36297504 0.18148752 [89,] 0.77909798 0.44180404 0.22090202 [90,] 0.78919732 0.42160536 0.21080268 [91,] 0.75031962 0.49936077 0.24968038 [92,] 0.78694020 0.42611960 0.21305980 [93,] 0.77998342 0.44003317 0.22001658 [94,] 0.82376751 0.35246497 0.17623249 [95,] 0.78377105 0.43245790 0.21622895 [96,] 0.74032437 0.51935125 0.25967563 [97,] 0.73112473 0.53775053 0.26887527 [98,] 0.86596118 0.26807765 0.13403882 [99,] 0.83075926 0.33848147 0.16924074 [100,] 0.79081141 0.41837717 0.20918859 [101,] 0.85868076 0.28263848 0.14131924 [102,] 0.85497997 0.29004006 0.14502003 [103,] 0.82260641 0.35478718 0.17739359 [104,] 0.78269538 0.43460923 0.21730462 [105,] 0.82490543 0.35018914 0.17509457 [106,] 0.77226111 0.45547779 0.22773889 [107,] 0.71396023 0.57207953 0.28603977 [108,] 0.67486994 0.65026012 0.32513006 [109,] 0.62356945 0.75286110 0.37643055 [110,] 0.57922464 0.84155073 0.42077536 [111,] 0.55839232 0.88321535 0.44160768 [112,] 0.56926206 0.86147589 0.43073794 [113,] 0.54725185 0.90549631 0.45274815 [114,] 0.46439740 0.92879479 0.53560260 [115,] 0.42278536 0.84557073 0.57721464 [116,] 0.33532630 0.67065260 0.66467370 [117,] 0.24435654 0.48871308 0.75564346 [118,] 0.17076427 0.34152855 0.82923573 [119,] 0.10603437 0.21206875 0.89396563 [120,] 0.07183820 0.14367639 0.92816180 [121,] 0.03520122 0.07040243 0.96479878 > postscript(file="/var/www/html/freestat/rcomp/tmp/1p6o21290464993.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/freestat/rcomp/tmp/2p6o21290464993.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/freestat/rcomp/tmp/3p6o21290464993.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/freestat/rcomp/tmp/40fnn1290464993.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/freestat/rcomp/tmp/50fnn1290464993.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.44419130 -3.93973033 -3.96720610 0.02788353 4.58182374 2.64360784 7 8 9 10 11 12 2.83916751 0.88660467 -1.75502122 3.79990631 8.67028169 -0.67743872 13 14 15 16 17 18 3.01369192 -0.29605484 9.65812209 3.48956914 1.16825570 -8.80134543 19 20 21 22 23 24 2.13080428 0.86105715 -7.53593697 -7.53593697 -2.82635676 -8.65912873 25 26 27 28 29 30 -3.25691462 -0.69659918 0.63903627 -13.31006216 -2.18075153 1.21409714 31 32 33 34 35 36 0.27552324 1.76398128 6.71506767 0.59783065 3.78792768 4.38566571 37 38 39 40 41 42 -3.71396572 0.70106036 -6.36650176 -0.96707214 -0.72494520 1.77459499 43 44 45 46 47 48 1.58706271 5.76931502 0.62697216 -0.75422066 3.59689615 -11.35763980 49 50 51 52 53 54 3.36832600 -3.02470409 -1.79364906 -0.06947707 2.69483720 -4.49028447 55 56 57 58 59 60 1.12886556 -0.45769073 -3.35639216 -6.51576132 -4.88456441 8.32748506 61 62 63 64 65 66 -0.26969380 6.10058924 1.41784323 4.60190728 6.20378933 8.40776978 67 68 69 70 71 72 -2.84737577 6.07753056 -6.27607546 -7.27607546 1.94249108 2.57673655 73 74 75 76 77 78 -11.30714484 -2.10242092 -3.30901423 0.72220414 0.94383739 -0.41004239 79 80 81 82 83 84 1.63429917 1.57594139 1.95060781 -1.13708430 -17.57496916 -2.54935195 85 86 87 88 89 90 2.14475424 0.16695827 1.97437186 6.57760135 -1.32682177 0.01593549 91 92 93 94 95 96 2.73217522 -3.39863998 0.25814089 -3.83174430 2.16553736 -5.18192660 97 98 99 100 101 102 -3.88018187 -1.82188712 -1.73944898 7.39196857 -0.25691462 5.16878282 103 104 105 106 107 108 2.26593894 -6.55706902 -5.24221736 5.20635094 1.85918024 2.57574280 109 110 111 112 113 114 5.64952593 -10.47889243 1.86211614 0.97703097 8.52104871 5.43866943 115 116 117 118 119 120 -3.48361374 0.67727208 -6.23954808 -0.57224035 2.33267628 0.21205088 121 122 123 124 125 126 3.70010163 -3.33835902 0.25350119 0.60508796 9.05295350 0.51379140 127 128 129 130 131 132 0.71209076 3.32250242 1.02727203 -4.13264326 1.65818095 5.99330243 133 134 135 136 137 138 2.29670640 2.72491829 -1.99895009 7.64384784 -0.13894285 -3.75694947 139 140 141 142 143 144 0.82213327 1.49090300 2.14475424 -0.68214818 -10.12301001 -5.11101933 145 146 -2.05759914 5.86443258 > postscript(file="/var/www/html/freestat/rcomp/tmp/60fnn1290464993.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.44419130 NA 1 -3.93973033 1.44419130 2 -3.96720610 -3.93973033 3 0.02788353 -3.96720610 4 4.58182374 0.02788353 5 2.64360784 4.58182374 6 2.83916751 2.64360784 7 0.88660467 2.83916751 8 -1.75502122 0.88660467 9 3.79990631 -1.75502122 10 8.67028169 3.79990631 11 -0.67743872 8.67028169 12 3.01369192 -0.67743872 13 -0.29605484 3.01369192 14 9.65812209 -0.29605484 15 3.48956914 9.65812209 16 1.16825570 3.48956914 17 -8.80134543 1.16825570 18 2.13080428 -8.80134543 19 0.86105715 2.13080428 20 -7.53593697 0.86105715 21 -7.53593697 -7.53593697 22 -2.82635676 -7.53593697 23 -8.65912873 -2.82635676 24 -3.25691462 -8.65912873 25 -0.69659918 -3.25691462 26 0.63903627 -0.69659918 27 -13.31006216 0.63903627 28 -2.18075153 -13.31006216 29 1.21409714 -2.18075153 30 0.27552324 1.21409714 31 1.76398128 0.27552324 32 6.71506767 1.76398128 33 0.59783065 6.71506767 34 3.78792768 0.59783065 35 4.38566571 3.78792768 36 -3.71396572 4.38566571 37 0.70106036 -3.71396572 38 -6.36650176 0.70106036 39 -0.96707214 -6.36650176 40 -0.72494520 -0.96707214 41 1.77459499 -0.72494520 42 1.58706271 1.77459499 43 5.76931502 1.58706271 44 0.62697216 5.76931502 45 -0.75422066 0.62697216 46 3.59689615 -0.75422066 47 -11.35763980 3.59689615 48 3.36832600 -11.35763980 49 -3.02470409 3.36832600 50 -1.79364906 -3.02470409 51 -0.06947707 -1.79364906 52 2.69483720 -0.06947707 53 -4.49028447 2.69483720 54 1.12886556 -4.49028447 55 -0.45769073 1.12886556 56 -3.35639216 -0.45769073 57 -6.51576132 -3.35639216 58 -4.88456441 -6.51576132 59 8.32748506 -4.88456441 60 -0.26969380 8.32748506 61 6.10058924 -0.26969380 62 1.41784323 6.10058924 63 4.60190728 1.41784323 64 6.20378933 4.60190728 65 8.40776978 6.20378933 66 -2.84737577 8.40776978 67 6.07753056 -2.84737577 68 -6.27607546 6.07753056 69 -7.27607546 -6.27607546 70 1.94249108 -7.27607546 71 2.57673655 1.94249108 72 -11.30714484 2.57673655 73 -2.10242092 -11.30714484 74 -3.30901423 -2.10242092 75 0.72220414 -3.30901423 76 0.94383739 0.72220414 77 -0.41004239 0.94383739 78 1.63429917 -0.41004239 79 1.57594139 1.63429917 80 1.95060781 1.57594139 81 -1.13708430 1.95060781 82 -17.57496916 -1.13708430 83 -2.54935195 -17.57496916 84 2.14475424 -2.54935195 85 0.16695827 2.14475424 86 1.97437186 0.16695827 87 6.57760135 1.97437186 88 -1.32682177 6.57760135 89 0.01593549 -1.32682177 90 2.73217522 0.01593549 91 -3.39863998 2.73217522 92 0.25814089 -3.39863998 93 -3.83174430 0.25814089 94 2.16553736 -3.83174430 95 -5.18192660 2.16553736 96 -3.88018187 -5.18192660 97 -1.82188712 -3.88018187 98 -1.73944898 -1.82188712 99 7.39196857 -1.73944898 100 -0.25691462 7.39196857 101 5.16878282 -0.25691462 102 2.26593894 5.16878282 103 -6.55706902 2.26593894 104 -5.24221736 -6.55706902 105 5.20635094 -5.24221736 106 1.85918024 5.20635094 107 2.57574280 1.85918024 108 5.64952593 2.57574280 109 -10.47889243 5.64952593 110 1.86211614 -10.47889243 111 0.97703097 1.86211614 112 8.52104871 0.97703097 113 5.43866943 8.52104871 114 -3.48361374 5.43866943 115 0.67727208 -3.48361374 116 -6.23954808 0.67727208 117 -0.57224035 -6.23954808 118 2.33267628 -0.57224035 119 0.21205088 2.33267628 120 3.70010163 0.21205088 121 -3.33835902 3.70010163 122 0.25350119 -3.33835902 123 0.60508796 0.25350119 124 9.05295350 0.60508796 125 0.51379140 9.05295350 126 0.71209076 0.51379140 127 3.32250242 0.71209076 128 1.02727203 3.32250242 129 -4.13264326 1.02727203 130 1.65818095 -4.13264326 131 5.99330243 1.65818095 132 2.29670640 5.99330243 133 2.72491829 2.29670640 134 -1.99895009 2.72491829 135 7.64384784 -1.99895009 136 -0.13894285 7.64384784 137 -3.75694947 -0.13894285 138 0.82213327 -3.75694947 139 1.49090300 0.82213327 140 2.14475424 1.49090300 141 -0.68214818 2.14475424 142 -10.12301001 -0.68214818 143 -5.11101933 -10.12301001 144 -2.05759914 -5.11101933 145 5.86443258 -2.05759914 146 NA 5.86443258 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -3.93973033 1.44419130 [2,] -3.96720610 -3.93973033 [3,] 0.02788353 -3.96720610 [4,] 4.58182374 0.02788353 [5,] 2.64360784 4.58182374 [6,] 2.83916751 2.64360784 [7,] 0.88660467 2.83916751 [8,] -1.75502122 0.88660467 [9,] 3.79990631 -1.75502122 [10,] 8.67028169 3.79990631 [11,] -0.67743872 8.67028169 [12,] 3.01369192 -0.67743872 [13,] -0.29605484 3.01369192 [14,] 9.65812209 -0.29605484 [15,] 3.48956914 9.65812209 [16,] 1.16825570 3.48956914 [17,] -8.80134543 1.16825570 [18,] 2.13080428 -8.80134543 [19,] 0.86105715 2.13080428 [20,] -7.53593697 0.86105715 [21,] -7.53593697 -7.53593697 [22,] -2.82635676 -7.53593697 [23,] -8.65912873 -2.82635676 [24,] -3.25691462 -8.65912873 [25,] -0.69659918 -3.25691462 [26,] 0.63903627 -0.69659918 [27,] -13.31006216 0.63903627 [28,] -2.18075153 -13.31006216 [29,] 1.21409714 -2.18075153 [30,] 0.27552324 1.21409714 [31,] 1.76398128 0.27552324 [32,] 6.71506767 1.76398128 [33,] 0.59783065 6.71506767 [34,] 3.78792768 0.59783065 [35,] 4.38566571 3.78792768 [36,] -3.71396572 4.38566571 [37,] 0.70106036 -3.71396572 [38,] -6.36650176 0.70106036 [39,] -0.96707214 -6.36650176 [40,] -0.72494520 -0.96707214 [41,] 1.77459499 -0.72494520 [42,] 1.58706271 1.77459499 [43,] 5.76931502 1.58706271 [44,] 0.62697216 5.76931502 [45,] -0.75422066 0.62697216 [46,] 3.59689615 -0.75422066 [47,] -11.35763980 3.59689615 [48,] 3.36832600 -11.35763980 [49,] -3.02470409 3.36832600 [50,] -1.79364906 -3.02470409 [51,] -0.06947707 -1.79364906 [52,] 2.69483720 -0.06947707 [53,] -4.49028447 2.69483720 [54,] 1.12886556 -4.49028447 [55,] -0.45769073 1.12886556 [56,] -3.35639216 -0.45769073 [57,] -6.51576132 -3.35639216 [58,] -4.88456441 -6.51576132 [59,] 8.32748506 -4.88456441 [60,] -0.26969380 8.32748506 [61,] 6.10058924 -0.26969380 [62,] 1.41784323 6.10058924 [63,] 4.60190728 1.41784323 [64,] 6.20378933 4.60190728 [65,] 8.40776978 6.20378933 [66,] -2.84737577 8.40776978 [67,] 6.07753056 -2.84737577 [68,] -6.27607546 6.07753056 [69,] -7.27607546 -6.27607546 [70,] 1.94249108 -7.27607546 [71,] 2.57673655 1.94249108 [72,] -11.30714484 2.57673655 [73,] -2.10242092 -11.30714484 [74,] -3.30901423 -2.10242092 [75,] 0.72220414 -3.30901423 [76,] 0.94383739 0.72220414 [77,] -0.41004239 0.94383739 [78,] 1.63429917 -0.41004239 [79,] 1.57594139 1.63429917 [80,] 1.95060781 1.57594139 [81,] -1.13708430 1.95060781 [82,] -17.57496916 -1.13708430 [83,] -2.54935195 -17.57496916 [84,] 2.14475424 -2.54935195 [85,] 0.16695827 2.14475424 [86,] 1.97437186 0.16695827 [87,] 6.57760135 1.97437186 [88,] -1.32682177 6.57760135 [89,] 0.01593549 -1.32682177 [90,] 2.73217522 0.01593549 [91,] -3.39863998 2.73217522 [92,] 0.25814089 -3.39863998 [93,] -3.83174430 0.25814089 [94,] 2.16553736 -3.83174430 [95,] -5.18192660 2.16553736 [96,] -3.88018187 -5.18192660 [97,] -1.82188712 -3.88018187 [98,] -1.73944898 -1.82188712 [99,] 7.39196857 -1.73944898 [100,] -0.25691462 7.39196857 [101,] 5.16878282 -0.25691462 [102,] 2.26593894 5.16878282 [103,] -6.55706902 2.26593894 [104,] -5.24221736 -6.55706902 [105,] 5.20635094 -5.24221736 [106,] 1.85918024 5.20635094 [107,] 2.57574280 1.85918024 [108,] 5.64952593 2.57574280 [109,] -10.47889243 5.64952593 [110,] 1.86211614 -10.47889243 [111,] 0.97703097 1.86211614 [112,] 8.52104871 0.97703097 [113,] 5.43866943 8.52104871 [114,] -3.48361374 5.43866943 [115,] 0.67727208 -3.48361374 [116,] -6.23954808 0.67727208 [117,] -0.57224035 -6.23954808 [118,] 2.33267628 -0.57224035 [119,] 0.21205088 2.33267628 [120,] 3.70010163 0.21205088 [121,] -3.33835902 3.70010163 [122,] 0.25350119 -3.33835902 [123,] 0.60508796 0.25350119 [124,] 9.05295350 0.60508796 [125,] 0.51379140 9.05295350 [126,] 0.71209076 0.51379140 [127,] 3.32250242 0.71209076 [128,] 1.02727203 3.32250242 [129,] -4.13264326 1.02727203 [130,] 1.65818095 -4.13264326 [131,] 5.99330243 1.65818095 [132,] 2.29670640 5.99330243 [133,] 2.72491829 2.29670640 [134,] -1.99895009 2.72491829 [135,] 7.64384784 -1.99895009 [136,] -0.13894285 7.64384784 [137,] -3.75694947 -0.13894285 [138,] 0.82213327 -3.75694947 [139,] 1.49090300 0.82213327 [140,] 2.14475424 1.49090300 [141,] -0.68214818 2.14475424 [142,] -10.12301001 -0.68214818 [143,] -5.11101933 -10.12301001 [144,] -2.05759914 -5.11101933 [145,] 5.86443258 -2.05759914 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -3.93973033 1.44419130 2 -3.96720610 -3.93973033 3 0.02788353 -3.96720610 4 4.58182374 0.02788353 5 2.64360784 4.58182374 6 2.83916751 2.64360784 7 0.88660467 2.83916751 8 -1.75502122 0.88660467 9 3.79990631 -1.75502122 10 8.67028169 3.79990631 11 -0.67743872 8.67028169 12 3.01369192 -0.67743872 13 -0.29605484 3.01369192 14 9.65812209 -0.29605484 15 3.48956914 9.65812209 16 1.16825570 3.48956914 17 -8.80134543 1.16825570 18 2.13080428 -8.80134543 19 0.86105715 2.13080428 20 -7.53593697 0.86105715 21 -7.53593697 -7.53593697 22 -2.82635676 -7.53593697 23 -8.65912873 -2.82635676 24 -3.25691462 -8.65912873 25 -0.69659918 -3.25691462 26 0.63903627 -0.69659918 27 -13.31006216 0.63903627 28 -2.18075153 -13.31006216 29 1.21409714 -2.18075153 30 0.27552324 1.21409714 31 1.76398128 0.27552324 32 6.71506767 1.76398128 33 0.59783065 6.71506767 34 3.78792768 0.59783065 35 4.38566571 3.78792768 36 -3.71396572 4.38566571 37 0.70106036 -3.71396572 38 -6.36650176 0.70106036 39 -0.96707214 -6.36650176 40 -0.72494520 -0.96707214 41 1.77459499 -0.72494520 42 1.58706271 1.77459499 43 5.76931502 1.58706271 44 0.62697216 5.76931502 45 -0.75422066 0.62697216 46 3.59689615 -0.75422066 47 -11.35763980 3.59689615 48 3.36832600 -11.35763980 49 -3.02470409 3.36832600 50 -1.79364906 -3.02470409 51 -0.06947707 -1.79364906 52 2.69483720 -0.06947707 53 -4.49028447 2.69483720 54 1.12886556 -4.49028447 55 -0.45769073 1.12886556 56 -3.35639216 -0.45769073 57 -6.51576132 -3.35639216 58 -4.88456441 -6.51576132 59 8.32748506 -4.88456441 60 -0.26969380 8.32748506 61 6.10058924 -0.26969380 62 1.41784323 6.10058924 63 4.60190728 1.41784323 64 6.20378933 4.60190728 65 8.40776978 6.20378933 66 -2.84737577 8.40776978 67 6.07753056 -2.84737577 68 -6.27607546 6.07753056 69 -7.27607546 -6.27607546 70 1.94249108 -7.27607546 71 2.57673655 1.94249108 72 -11.30714484 2.57673655 73 -2.10242092 -11.30714484 74 -3.30901423 -2.10242092 75 0.72220414 -3.30901423 76 0.94383739 0.72220414 77 -0.41004239 0.94383739 78 1.63429917 -0.41004239 79 1.57594139 1.63429917 80 1.95060781 1.57594139 81 -1.13708430 1.95060781 82 -17.57496916 -1.13708430 83 -2.54935195 -17.57496916 84 2.14475424 -2.54935195 85 0.16695827 2.14475424 86 1.97437186 0.16695827 87 6.57760135 1.97437186 88 -1.32682177 6.57760135 89 0.01593549 -1.32682177 90 2.73217522 0.01593549 91 -3.39863998 2.73217522 92 0.25814089 -3.39863998 93 -3.83174430 0.25814089 94 2.16553736 -3.83174430 95 -5.18192660 2.16553736 96 -3.88018187 -5.18192660 97 -1.82188712 -3.88018187 98 -1.73944898 -1.82188712 99 7.39196857 -1.73944898 100 -0.25691462 7.39196857 101 5.16878282 -0.25691462 102 2.26593894 5.16878282 103 -6.55706902 2.26593894 104 -5.24221736 -6.55706902 105 5.20635094 -5.24221736 106 1.85918024 5.20635094 107 2.57574280 1.85918024 108 5.64952593 2.57574280 109 -10.47889243 5.64952593 110 1.86211614 -10.47889243 111 0.97703097 1.86211614 112 8.52104871 0.97703097 113 5.43866943 8.52104871 114 -3.48361374 5.43866943 115 0.67727208 -3.48361374 116 -6.23954808 0.67727208 117 -0.57224035 -6.23954808 118 2.33267628 -0.57224035 119 0.21205088 2.33267628 120 3.70010163 0.21205088 121 -3.33835902 3.70010163 122 0.25350119 -3.33835902 123 0.60508796 0.25350119 124 9.05295350 0.60508796 125 0.51379140 9.05295350 126 0.71209076 0.51379140 127 3.32250242 0.71209076 128 1.02727203 3.32250242 129 -4.13264326 1.02727203 130 1.65818095 -4.13264326 131 5.99330243 1.65818095 132 2.29670640 5.99330243 133 2.72491829 2.29670640 134 -1.99895009 2.72491829 135 7.64384784 -1.99895009 136 -0.13894285 7.64384784 137 -3.75694947 -0.13894285 138 0.82213327 -3.75694947 139 1.49090300 0.82213327 140 2.14475424 1.49090300 141 -0.68214818 2.14475424 142 -10.12301001 -0.68214818 143 -5.11101933 -10.12301001 144 -2.05759914 -5.11101933 145 5.86443258 -2.05759914 > 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/7a6n81290464993.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/freestat/rcomp/tmp/8lx4b1290464993.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/freestat/rcomp/tmp/9lx4b1290464993.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/freestat/rcomp/tmp/10lx4b1290464993.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/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/11msr81290464993.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/12l8i81290464993.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/13h0yh1290464993.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/1499x21290464993.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/15d9w71290464993.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/1691cy1290464993.tab") + } > > try(system("convert tmp/1p6o21290464993.ps tmp/1p6o21290464993.png",intern=TRUE)) character(0) > try(system("convert tmp/2p6o21290464993.ps tmp/2p6o21290464993.png",intern=TRUE)) character(0) > try(system("convert tmp/3p6o21290464993.ps tmp/3p6o21290464993.png",intern=TRUE)) character(0) > try(system("convert tmp/40fnn1290464993.ps tmp/40fnn1290464993.png",intern=TRUE)) character(0) > try(system("convert tmp/50fnn1290464993.ps tmp/50fnn1290464993.png",intern=TRUE)) character(0) > try(system("convert tmp/60fnn1290464993.ps tmp/60fnn1290464993.png",intern=TRUE)) character(0) > try(system("convert tmp/7a6n81290464993.ps tmp/7a6n81290464993.png",intern=TRUE)) character(0) > try(system("convert tmp/8lx4b1290464993.ps tmp/8lx4b1290464993.png",intern=TRUE)) character(0) > try(system("convert tmp/9lx4b1290464993.ps tmp/9lx4b1290464993.png",intern=TRUE)) character(0) > try(system("convert tmp/10lx4b1290464993.ps tmp/10lx4b1290464993.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.965 2.701 6.428