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 + ,44 + ,23 + ,11 + ,11 + ,5 + ,35 + ,19 + ,13 + ,9 + ,3 + ,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 + ,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 + ,39 + ,22 + ,14 + ,12 + ,2 + ,40 + ,22 + ,12 + ,13 + ,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 + ,143) + ,dimnames=list(c('StudyForCareer' + ,'PersonalStandards' + ,'ParentalExpectations' + ,'Doubts' + ,'LeaderPreference') + ,1:143)) > y <- array(NA,dim=c(5,143),dimnames=list(c('StudyForCareer','PersonalStandards','ParentalExpectations','Doubts','LeaderPreference'),1:143)) > 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 44 23 11 11 21 35 19 13 9 22 32 25 13 11 23 32 25 13 11 24 41 35 18 7 25 29 19 14 13 26 38 20 12 10 27 41 21 12 9 28 38 21 9 9 29 24 23 11 15 30 34 24 8 13 31 38 23 5 16 32 37 19 10 12 33 46 17 11 6 34 48 27 15 4 35 42 27 16 12 36 46 25 12 10 37 43 18 14 14 38 38 22 13 9 39 39 26 10 10 40 34 26 18 14 41 39 23 17 14 42 35 16 12 10 43 41 27 13 9 44 40 25 13 14 45 43 14 11 8 46 37 19 13 9 47 41 20 12 8 48 46 26 12 10 49 26 16 12 9 50 41 18 12 9 51 37 22 9 9 52 39 25 17 9 53 44 29 18 11 54 39 21 7 15 55 36 22 17 8 56 38 22 12 10 57 38 32 12 8 58 38 23 9 14 59 32 31 9 11 60 33 18 13 10 61 46 23 10 12 62 42 24 12 9 63 42 19 10 13 64 43 26 11 14 65 41 14 13 15 66 49 20 6 8 67 45 22 7 7 68 39 24 13 10 69 45 25 11 10 70 31 21 18 13 71 30 21 18 13 72 45 28 9 11 73 48 24 9 8 74 28 15 12 14 75 35 21 11 9 76 38 23 15 10 77 39 24 11 11 78 40 21 14 10 79 38 21 14 16 80 42 13 8 11 81 36 17 12 16 82 49 29 8 6 83 41 25 11 11 84 18 16 10 12 85 36 20 11 12 86 42 25 17 14 87 41 25 16 9 88 43 21 13 11 89 46 23 15 8 90 37 22 11 8 91 38 19 12 7 92 43 26 20 13 93 41 25 16 8 94 35 19 8 20 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 39 22 14 12 138 40 22 12 13 139 37 21 11 9 140 29 22 15 14 141 33 21 13 8 142 35 18 9 8 143 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 3 22 5 23 5 24 4 25 2 26 4 27 4 28 4 29 3 30 2 31 2 32 3 33 5 34 5 35 4 36 4 37 5 38 4 39 4 40 4 41 4 42 2 43 3 44 3 45 4 46 2 47 4 48 4 49 3 50 3 51 3 52 4 53 5 54 2 55 4 56 2 57 0 58 4 59 4 60 3 61 4 62 4 63 2 64 4 65 2 66 4 67 3 68 4 69 5 70 3 71 3 72 4 73 5 74 4 75 2 76 4 77 4 78 4 79 4 80 4 81 2 82 5 83 4 84 2 85 3 86 3 87 5 88 4 89 3 90 4 91 3 92 4 93 5 94 2 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 2 138 3 139 3 140 4 141 2 142 4 143 2 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) PersonalStandards ParentalExpectations 32.79835 0.17434 0.03742 Doubts LeaderPreference -0.22838 1.37571 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -17.9728 -2.2420 0.6441 3.2903 10.4085 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 32.79835 3.28819 9.975 < 2e-16 *** PersonalStandards 0.17434 0.10506 1.659 0.09931 . ParentalExpectations 0.03742 0.13147 0.285 0.77633 Doubts -0.22838 0.15669 -1.458 0.14723 LeaderPreference 1.37571 0.49129 2.800 0.00584 ** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 5.019 on 138 degrees of freedom Multiple R-squared: 0.1337, Adjusted R-squared: 0.1086 F-statistic: 5.327 on 4 and 138 DF, p-value: 0.0005097 > 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.205696099 0.411392199 0.79430390 [2,] 0.121640829 0.243281659 0.87835917 [3,] 0.066793000 0.133586001 0.93320700 [4,] 0.031544759 0.063089518 0.96845524 [5,] 0.014010229 0.028020458 0.98598977 [6,] 0.006662163 0.013324326 0.99333784 [7,] 0.002741394 0.005482789 0.99725861 [8,] 0.028210757 0.056421513 0.97178924 [9,] 0.016497770 0.032995539 0.98350223 [10,] 0.009291356 0.018582712 0.99070864 [11,] 0.255029771 0.510059541 0.74497023 [12,] 0.278828171 0.557656341 0.72117183 [13,] 0.217753952 0.435507904 0.78224605 [14,] 0.170123790 0.340247580 0.82987621 [15,] 0.525614649 0.948770701 0.47438535 [16,] 0.729309337 0.541381326 0.27069066 [17,] 0.673896907 0.652206186 0.32610309 [18,] 0.761537961 0.476924078 0.23846204 [19,] 0.708695562 0.582608877 0.29130444 [20,] 0.660889420 0.678221160 0.33911058 [21,] 0.601799677 0.796400645 0.39820032 [22,] 0.895904989 0.208190022 0.10409501 [23,] 0.869155531 0.261688938 0.13084447 [24,] 0.850674640 0.298650721 0.14932536 [25,] 0.813825566 0.372348868 0.18617443 [26,] 0.814062556 0.371874889 0.18593744 [27,] 0.805657362 0.388685276 0.19434264 [28,] 0.764467627 0.471064746 0.23553237 [29,] 0.768894389 0.462211221 0.23110561 [30,] 0.728718562 0.542562877 0.27128144 [31,] 0.689363355 0.621273289 0.31063664 [32,] 0.642596516 0.714806967 0.35740348 [33,] 0.679662891 0.640674218 0.32033711 [34,] 0.630371267 0.739257466 0.36962873 [35,] 0.580634609 0.838730783 0.41936539 [36,] 0.536729761 0.926540477 0.46327024 [37,] 0.491473320 0.982946640 0.50852668 [38,] 0.466138508 0.932277015 0.53386149 [39,] 0.416530549 0.833061097 0.58346945 [40,] 0.365828803 0.731657605 0.63417120 [41,] 0.367590480 0.735180961 0.63240952 [42,] 0.579874754 0.840250492 0.42012525 [43,] 0.551994074 0.896011852 0.44800593 [44,] 0.505639385 0.988721229 0.49436061 [45,] 0.462437074 0.924874148 0.53756293 [46,] 0.413451319 0.826902637 0.58654868 [47,] 0.392043890 0.784087781 0.60795611 [48,] 0.382872937 0.765745874 0.61712706 [49,] 0.342576497 0.685152993 0.65742350 [50,] 0.311299065 0.622598131 0.68870093 [51,] 0.271965931 0.543931862 0.72803407 [52,] 0.397711514 0.795423028 0.60228849 [53,] 0.395841210 0.791682420 0.60415879 [54,] 0.418432613 0.836865226 0.58156739 [55,] 0.373279229 0.746558459 0.62672077 [56,] 0.391408543 0.782817087 0.60859146 [57,] 0.358589442 0.717178885 0.64141056 [58,] 0.377184234 0.754368469 0.62281577 [59,] 0.476321002 0.952642004 0.52367900 [60,] 0.483164946 0.966329891 0.51683505 [61,] 0.440045116 0.880090232 0.55995488 [62,] 0.405740365 0.811480730 0.59425963 [63,] 0.455607420 0.911214839 0.54439258 [64,] 0.539727499 0.920545002 0.46027250 [65,] 0.521890081 0.956219837 0.47810992 [66,] 0.541138864 0.917722272 0.45886114 [67,] 0.679312006 0.641375988 0.32068799 [68,] 0.645487116 0.709025768 0.35451288 [69,] 0.612842504 0.774314992 0.38715750 [70,] 0.568015199 0.863969602 0.43198480 [71,] 0.519647641 0.960704717 0.48035236 [72,] 0.472466226 0.944932451 0.52753377 [73,] 0.457677151 0.915354303 0.54232285 [74,] 0.413450602 0.826901203 0.58654940 [75,] 0.458661791 0.917323582 0.54133821 [76,] 0.414041659 0.828083317 0.58595834 [77,] 0.930635692 0.138728616 0.06936431 [78,] 0.917335345 0.165329310 0.08266465 [79,] 0.905401764 0.189196471 0.09459824 [80,] 0.883129043 0.233741913 0.11687096 [81,] 0.868569734 0.262860531 0.13143027 [82,] 0.884077804 0.231844393 0.11592220 [83,] 0.867762923 0.264474155 0.13223708 [84,] 0.840751662 0.318496677 0.15924834 [85,] 0.813904181 0.372191638 0.18609582 [86,] 0.779055215 0.441889569 0.22094478 [87,] 0.743405520 0.513188959 0.25659448 [88,] 0.707398880 0.585202240 0.29260112 [89,] 0.683341483 0.633317034 0.31665852 [90,] 0.700470876 0.599058247 0.29952912 [91,] 0.749065866 0.501868269 0.25093413 [92,] 0.738912135 0.522175730 0.26108786 [93,] 0.815781268 0.368437464 0.18421873 [94,] 0.779092882 0.441814237 0.22090712 [95,] 0.798635349 0.402729301 0.20136465 [96,] 0.759389836 0.481220328 0.24061016 [97,] 0.858074406 0.283851187 0.14192559 [98,] 0.866354437 0.267291125 0.13364556 [99,] 0.861324322 0.277351355 0.13867568 [100,] 0.826664525 0.346670949 0.17333547 [101,] 0.804120913 0.391758174 0.19587909 [102,] 0.809099424 0.381801152 0.19090058 [103,] 0.877813362 0.244373276 0.12218664 [104,] 0.843361092 0.313277817 0.15663891 [105,] 0.802783162 0.394433675 0.19721684 [106,] 0.870271318 0.259457364 0.12972868 [107,] 0.874397180 0.251205639 0.12560282 [108,] 0.839566744 0.320866513 0.16043326 [109,] 0.814078572 0.371842855 0.18592143 [110,] 0.817689590 0.364620820 0.18231041 [111,] 0.767501088 0.464997824 0.23249891 [112,] 0.709916843 0.580166315 0.29008316 [113,] 0.658858474 0.682283053 0.34114153 [114,] 0.610528434 0.778943132 0.38947157 [115,] 0.538384177 0.923231646 0.46161582 [116,] 0.464775958 0.929551916 0.53522404 [117,] 0.387960876 0.775921752 0.61203912 [118,] 0.508857154 0.982285691 0.49114285 [119,] 0.426067427 0.852134853 0.57393257 [120,] 0.342122922 0.684245844 0.65787708 [121,] 0.332515011 0.665030023 0.66748499 [122,] 0.263159257 0.526318513 0.73684074 [123,] 0.197952883 0.395905767 0.80204712 [124,] 0.327804316 0.655608632 0.67219568 [125,] 0.249597575 0.499195149 0.75040243 [126,] 0.223368800 0.446737600 0.77663120 [127,] 0.194484118 0.388968236 0.80551588 [128,] 0.119511060 0.239022120 0.88048894 > postscript(file="/var/www/html/freestat/rcomp/tmp/1z2zx1290454078.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/2styi1290454078.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/3styi1290454078.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/4styi1290454078.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/5k2x31290454078.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 = 143 Frequency = 1 1 2 3 4 5 6 1.21016493 -3.16554050 -3.08209089 0.13525654 2.01356166 4.54958149 7 8 9 10 11 12 1.81685249 1.87188340 -0.21040832 5.30039607 5.98054293 0.82707617 13 14 15 16 17 18 2.61793344 -1.02862678 10.40848770 4.02187021 3.59061205 -11.71261642 19 20 21 22 23 24 2.14651487 2.41388625 -3.66896156 -10.00963679 -10.00963679 -2.47794972 25 26 27 28 29 30 -7.41715735 -1.95320004 0.64408168 -2.24364662 -13.92118021 -3.06430203 31 32 33 34 35 36 1.90744930 -0.87154785 4.31800861 3.96817549 1.13350238 5.17511187 37 38 39 40 41 42 2.85844465 -2.56767984 -1.92437794 -6.31024647 -0.74980971 -1.50443870 43 44 45 46 47 48 0.93633750 1.42691608 3.67348823 -0.29325613 0.59003862 5.00077426 49 50 51 52 53 54 -12.10852480 2.54279996 -2.04227881 -2.24038830 1.10589324 2.95289606 55 56 57 58 59 60 -4.94575611 0.44953559 1.00080894 -1.45041851 -9.53026146 -5.26624327 61 62 63 64 65 66 6.05539625 1.12106882 5.73253826 2.95172084 5.94871598 8.81458203 67 68 69 70 71 72 5.57580765 -1.68797441 2.83683034 -7.29123362 -8.29123362 3.99275139 73 74 75 76 77 78 5.62925442 -10.16798927 -2.56708356 -2.58848459 -1.38474594 -0.20238546 79 80 81 82 83 84 -0.83210144 3.64523956 0.69150770 5.33822889 0.44091644 -17.97282956 85 86 87 88 89 90 -2.08330936 3.27722048 -1.57866983 3.06341911 6.33045950 -3.72121271 91 92 93 94 95 96 -1.08829900 2.38652506 -1.80705050 0.40605075 2.57003791 -3.68739547 97 98 99 100 101 102 -6.08390565 -3.26803517 -2.12491886 8.63606433 1.04679996 8.71260365 103 104 105 106 107 108 1.96155846 -11.14677560 -5.11568304 4.75961170 0.94009684 3.30342930 109 110 111 112 113 114 5.98555542 -9.06547726 -0.46942584 0.89089625 8.89646483 5.79140644 115 116 117 118 119 120 -1.68378881 2.35305615 -4.74143852 0.28617062 1.54960435 -1.33993871 121 122 123 124 125 126 3.94551825 -0.77049122 -1.88992116 1.64047502 8.28942894 0.38949218 127 128 129 130 131 132 0.52820332 3.78901826 2.49915061 -3.49880954 3.44654561 5.37345197 133 134 135 136 137 138 -0.03968288 4.03459150 -3.45959374 5.33283034 1.83144913 1.75897217 139 140 141 142 143 -1.94278899 -10.50062429 -4.87031203 -4.94901444 6.31320634 > postscript(file="/var/www/html/freestat/rcomp/tmp/6k2x31290454078.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 = 143 Frequency = 1 lag(myerror, k = 1) myerror 0 1.21016493 NA 1 -3.16554050 1.21016493 2 -3.08209089 -3.16554050 3 0.13525654 -3.08209089 4 2.01356166 0.13525654 5 4.54958149 2.01356166 6 1.81685249 4.54958149 7 1.87188340 1.81685249 8 -0.21040832 1.87188340 9 5.30039607 -0.21040832 10 5.98054293 5.30039607 11 0.82707617 5.98054293 12 2.61793344 0.82707617 13 -1.02862678 2.61793344 14 10.40848770 -1.02862678 15 4.02187021 10.40848770 16 3.59061205 4.02187021 17 -11.71261642 3.59061205 18 2.14651487 -11.71261642 19 2.41388625 2.14651487 20 -3.66896156 2.41388625 21 -10.00963679 -3.66896156 22 -10.00963679 -10.00963679 23 -2.47794972 -10.00963679 24 -7.41715735 -2.47794972 25 -1.95320004 -7.41715735 26 0.64408168 -1.95320004 27 -2.24364662 0.64408168 28 -13.92118021 -2.24364662 29 -3.06430203 -13.92118021 30 1.90744930 -3.06430203 31 -0.87154785 1.90744930 32 4.31800861 -0.87154785 33 3.96817549 4.31800861 34 1.13350238 3.96817549 35 5.17511187 1.13350238 36 2.85844465 5.17511187 37 -2.56767984 2.85844465 38 -1.92437794 -2.56767984 39 -6.31024647 -1.92437794 40 -0.74980971 -6.31024647 41 -1.50443870 -0.74980971 42 0.93633750 -1.50443870 43 1.42691608 0.93633750 44 3.67348823 1.42691608 45 -0.29325613 3.67348823 46 0.59003862 -0.29325613 47 5.00077426 0.59003862 48 -12.10852480 5.00077426 49 2.54279996 -12.10852480 50 -2.04227881 2.54279996 51 -2.24038830 -2.04227881 52 1.10589324 -2.24038830 53 2.95289606 1.10589324 54 -4.94575611 2.95289606 55 0.44953559 -4.94575611 56 1.00080894 0.44953559 57 -1.45041851 1.00080894 58 -9.53026146 -1.45041851 59 -5.26624327 -9.53026146 60 6.05539625 -5.26624327 61 1.12106882 6.05539625 62 5.73253826 1.12106882 63 2.95172084 5.73253826 64 5.94871598 2.95172084 65 8.81458203 5.94871598 66 5.57580765 8.81458203 67 -1.68797441 5.57580765 68 2.83683034 -1.68797441 69 -7.29123362 2.83683034 70 -8.29123362 -7.29123362 71 3.99275139 -8.29123362 72 5.62925442 3.99275139 73 -10.16798927 5.62925442 74 -2.56708356 -10.16798927 75 -2.58848459 -2.56708356 76 -1.38474594 -2.58848459 77 -0.20238546 -1.38474594 78 -0.83210144 -0.20238546 79 3.64523956 -0.83210144 80 0.69150770 3.64523956 81 5.33822889 0.69150770 82 0.44091644 5.33822889 83 -17.97282956 0.44091644 84 -2.08330936 -17.97282956 85 3.27722048 -2.08330936 86 -1.57866983 3.27722048 87 3.06341911 -1.57866983 88 6.33045950 3.06341911 89 -3.72121271 6.33045950 90 -1.08829900 -3.72121271 91 2.38652506 -1.08829900 92 -1.80705050 2.38652506 93 0.40605075 -1.80705050 94 2.57003791 0.40605075 95 -3.68739547 2.57003791 96 -6.08390565 -3.68739547 97 -3.26803517 -6.08390565 98 -2.12491886 -3.26803517 99 8.63606433 -2.12491886 100 1.04679996 8.63606433 101 8.71260365 1.04679996 102 1.96155846 8.71260365 103 -11.14677560 1.96155846 104 -5.11568304 -11.14677560 105 4.75961170 -5.11568304 106 0.94009684 4.75961170 107 3.30342930 0.94009684 108 5.98555542 3.30342930 109 -9.06547726 5.98555542 110 -0.46942584 -9.06547726 111 0.89089625 -0.46942584 112 8.89646483 0.89089625 113 5.79140644 8.89646483 114 -1.68378881 5.79140644 115 2.35305615 -1.68378881 116 -4.74143852 2.35305615 117 0.28617062 -4.74143852 118 1.54960435 0.28617062 119 -1.33993871 1.54960435 120 3.94551825 -1.33993871 121 -0.77049122 3.94551825 122 -1.88992116 -0.77049122 123 1.64047502 -1.88992116 124 8.28942894 1.64047502 125 0.38949218 8.28942894 126 0.52820332 0.38949218 127 3.78901826 0.52820332 128 2.49915061 3.78901826 129 -3.49880954 2.49915061 130 3.44654561 -3.49880954 131 5.37345197 3.44654561 132 -0.03968288 5.37345197 133 4.03459150 -0.03968288 134 -3.45959374 4.03459150 135 5.33283034 -3.45959374 136 1.83144913 5.33283034 137 1.75897217 1.83144913 138 -1.94278899 1.75897217 139 -10.50062429 -1.94278899 140 -4.87031203 -10.50062429 141 -4.94901444 -4.87031203 142 6.31320634 -4.94901444 143 NA 6.31320634 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -3.16554050 1.21016493 [2,] -3.08209089 -3.16554050 [3,] 0.13525654 -3.08209089 [4,] 2.01356166 0.13525654 [5,] 4.54958149 2.01356166 [6,] 1.81685249 4.54958149 [7,] 1.87188340 1.81685249 [8,] -0.21040832 1.87188340 [9,] 5.30039607 -0.21040832 [10,] 5.98054293 5.30039607 [11,] 0.82707617 5.98054293 [12,] 2.61793344 0.82707617 [13,] -1.02862678 2.61793344 [14,] 10.40848770 -1.02862678 [15,] 4.02187021 10.40848770 [16,] 3.59061205 4.02187021 [17,] -11.71261642 3.59061205 [18,] 2.14651487 -11.71261642 [19,] 2.41388625 2.14651487 [20,] -3.66896156 2.41388625 [21,] -10.00963679 -3.66896156 [22,] -10.00963679 -10.00963679 [23,] -2.47794972 -10.00963679 [24,] -7.41715735 -2.47794972 [25,] -1.95320004 -7.41715735 [26,] 0.64408168 -1.95320004 [27,] -2.24364662 0.64408168 [28,] -13.92118021 -2.24364662 [29,] -3.06430203 -13.92118021 [30,] 1.90744930 -3.06430203 [31,] -0.87154785 1.90744930 [32,] 4.31800861 -0.87154785 [33,] 3.96817549 4.31800861 [34,] 1.13350238 3.96817549 [35,] 5.17511187 1.13350238 [36,] 2.85844465 5.17511187 [37,] -2.56767984 2.85844465 [38,] -1.92437794 -2.56767984 [39,] -6.31024647 -1.92437794 [40,] -0.74980971 -6.31024647 [41,] -1.50443870 -0.74980971 [42,] 0.93633750 -1.50443870 [43,] 1.42691608 0.93633750 [44,] 3.67348823 1.42691608 [45,] -0.29325613 3.67348823 [46,] 0.59003862 -0.29325613 [47,] 5.00077426 0.59003862 [48,] -12.10852480 5.00077426 [49,] 2.54279996 -12.10852480 [50,] -2.04227881 2.54279996 [51,] -2.24038830 -2.04227881 [52,] 1.10589324 -2.24038830 [53,] 2.95289606 1.10589324 [54,] -4.94575611 2.95289606 [55,] 0.44953559 -4.94575611 [56,] 1.00080894 0.44953559 [57,] -1.45041851 1.00080894 [58,] -9.53026146 -1.45041851 [59,] -5.26624327 -9.53026146 [60,] 6.05539625 -5.26624327 [61,] 1.12106882 6.05539625 [62,] 5.73253826 1.12106882 [63,] 2.95172084 5.73253826 [64,] 5.94871598 2.95172084 [65,] 8.81458203 5.94871598 [66,] 5.57580765 8.81458203 [67,] -1.68797441 5.57580765 [68,] 2.83683034 -1.68797441 [69,] -7.29123362 2.83683034 [70,] -8.29123362 -7.29123362 [71,] 3.99275139 -8.29123362 [72,] 5.62925442 3.99275139 [73,] -10.16798927 5.62925442 [74,] -2.56708356 -10.16798927 [75,] -2.58848459 -2.56708356 [76,] -1.38474594 -2.58848459 [77,] -0.20238546 -1.38474594 [78,] -0.83210144 -0.20238546 [79,] 3.64523956 -0.83210144 [80,] 0.69150770 3.64523956 [81,] 5.33822889 0.69150770 [82,] 0.44091644 5.33822889 [83,] -17.97282956 0.44091644 [84,] -2.08330936 -17.97282956 [85,] 3.27722048 -2.08330936 [86,] -1.57866983 3.27722048 [87,] 3.06341911 -1.57866983 [88,] 6.33045950 3.06341911 [89,] -3.72121271 6.33045950 [90,] -1.08829900 -3.72121271 [91,] 2.38652506 -1.08829900 [92,] -1.80705050 2.38652506 [93,] 0.40605075 -1.80705050 [94,] 2.57003791 0.40605075 [95,] -3.68739547 2.57003791 [96,] -6.08390565 -3.68739547 [97,] -3.26803517 -6.08390565 [98,] -2.12491886 -3.26803517 [99,] 8.63606433 -2.12491886 [100,] 1.04679996 8.63606433 [101,] 8.71260365 1.04679996 [102,] 1.96155846 8.71260365 [103,] -11.14677560 1.96155846 [104,] -5.11568304 -11.14677560 [105,] 4.75961170 -5.11568304 [106,] 0.94009684 4.75961170 [107,] 3.30342930 0.94009684 [108,] 5.98555542 3.30342930 [109,] -9.06547726 5.98555542 [110,] -0.46942584 -9.06547726 [111,] 0.89089625 -0.46942584 [112,] 8.89646483 0.89089625 [113,] 5.79140644 8.89646483 [114,] -1.68378881 5.79140644 [115,] 2.35305615 -1.68378881 [116,] -4.74143852 2.35305615 [117,] 0.28617062 -4.74143852 [118,] 1.54960435 0.28617062 [119,] -1.33993871 1.54960435 [120,] 3.94551825 -1.33993871 [121,] -0.77049122 3.94551825 [122,] -1.88992116 -0.77049122 [123,] 1.64047502 -1.88992116 [124,] 8.28942894 1.64047502 [125,] 0.38949218 8.28942894 [126,] 0.52820332 0.38949218 [127,] 3.78901826 0.52820332 [128,] 2.49915061 3.78901826 [129,] -3.49880954 2.49915061 [130,] 3.44654561 -3.49880954 [131,] 5.37345197 3.44654561 [132,] -0.03968288 5.37345197 [133,] 4.03459150 -0.03968288 [134,] -3.45959374 4.03459150 [135,] 5.33283034 -3.45959374 [136,] 1.83144913 5.33283034 [137,] 1.75897217 1.83144913 [138,] -1.94278899 1.75897217 [139,] -10.50062429 -1.94278899 [140,] -4.87031203 -10.50062429 [141,] -4.94901444 -4.87031203 [142,] 6.31320634 -4.94901444 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -3.16554050 1.21016493 2 -3.08209089 -3.16554050 3 0.13525654 -3.08209089 4 2.01356166 0.13525654 5 4.54958149 2.01356166 6 1.81685249 4.54958149 7 1.87188340 1.81685249 8 -0.21040832 1.87188340 9 5.30039607 -0.21040832 10 5.98054293 5.30039607 11 0.82707617 5.98054293 12 2.61793344 0.82707617 13 -1.02862678 2.61793344 14 10.40848770 -1.02862678 15 4.02187021 10.40848770 16 3.59061205 4.02187021 17 -11.71261642 3.59061205 18 2.14651487 -11.71261642 19 2.41388625 2.14651487 20 -3.66896156 2.41388625 21 -10.00963679 -3.66896156 22 -10.00963679 -10.00963679 23 -2.47794972 -10.00963679 24 -7.41715735 -2.47794972 25 -1.95320004 -7.41715735 26 0.64408168 -1.95320004 27 -2.24364662 0.64408168 28 -13.92118021 -2.24364662 29 -3.06430203 -13.92118021 30 1.90744930 -3.06430203 31 -0.87154785 1.90744930 32 4.31800861 -0.87154785 33 3.96817549 4.31800861 34 1.13350238 3.96817549 35 5.17511187 1.13350238 36 2.85844465 5.17511187 37 -2.56767984 2.85844465 38 -1.92437794 -2.56767984 39 -6.31024647 -1.92437794 40 -0.74980971 -6.31024647 41 -1.50443870 -0.74980971 42 0.93633750 -1.50443870 43 1.42691608 0.93633750 44 3.67348823 1.42691608 45 -0.29325613 3.67348823 46 0.59003862 -0.29325613 47 5.00077426 0.59003862 48 -12.10852480 5.00077426 49 2.54279996 -12.10852480 50 -2.04227881 2.54279996 51 -2.24038830 -2.04227881 52 1.10589324 -2.24038830 53 2.95289606 1.10589324 54 -4.94575611 2.95289606 55 0.44953559 -4.94575611 56 1.00080894 0.44953559 57 -1.45041851 1.00080894 58 -9.53026146 -1.45041851 59 -5.26624327 -9.53026146 60 6.05539625 -5.26624327 61 1.12106882 6.05539625 62 5.73253826 1.12106882 63 2.95172084 5.73253826 64 5.94871598 2.95172084 65 8.81458203 5.94871598 66 5.57580765 8.81458203 67 -1.68797441 5.57580765 68 2.83683034 -1.68797441 69 -7.29123362 2.83683034 70 -8.29123362 -7.29123362 71 3.99275139 -8.29123362 72 5.62925442 3.99275139 73 -10.16798927 5.62925442 74 -2.56708356 -10.16798927 75 -2.58848459 -2.56708356 76 -1.38474594 -2.58848459 77 -0.20238546 -1.38474594 78 -0.83210144 -0.20238546 79 3.64523956 -0.83210144 80 0.69150770 3.64523956 81 5.33822889 0.69150770 82 0.44091644 5.33822889 83 -17.97282956 0.44091644 84 -2.08330936 -17.97282956 85 3.27722048 -2.08330936 86 -1.57866983 3.27722048 87 3.06341911 -1.57866983 88 6.33045950 3.06341911 89 -3.72121271 6.33045950 90 -1.08829900 -3.72121271 91 2.38652506 -1.08829900 92 -1.80705050 2.38652506 93 0.40605075 -1.80705050 94 2.57003791 0.40605075 95 -3.68739547 2.57003791 96 -6.08390565 -3.68739547 97 -3.26803517 -6.08390565 98 -2.12491886 -3.26803517 99 8.63606433 -2.12491886 100 1.04679996 8.63606433 101 8.71260365 1.04679996 102 1.96155846 8.71260365 103 -11.14677560 1.96155846 104 -5.11568304 -11.14677560 105 4.75961170 -5.11568304 106 0.94009684 4.75961170 107 3.30342930 0.94009684 108 5.98555542 3.30342930 109 -9.06547726 5.98555542 110 -0.46942584 -9.06547726 111 0.89089625 -0.46942584 112 8.89646483 0.89089625 113 5.79140644 8.89646483 114 -1.68378881 5.79140644 115 2.35305615 -1.68378881 116 -4.74143852 2.35305615 117 0.28617062 -4.74143852 118 1.54960435 0.28617062 119 -1.33993871 1.54960435 120 3.94551825 -1.33993871 121 -0.77049122 3.94551825 122 -1.88992116 -0.77049122 123 1.64047502 -1.88992116 124 8.28942894 1.64047502 125 0.38949218 8.28942894 126 0.52820332 0.38949218 127 3.78901826 0.52820332 128 2.49915061 3.78901826 129 -3.49880954 2.49915061 130 3.44654561 -3.49880954 131 5.37345197 3.44654561 132 -0.03968288 5.37345197 133 4.03459150 -0.03968288 134 -3.45959374 4.03459150 135 5.33283034 -3.45959374 136 1.83144913 5.33283034 137 1.75897217 1.83144913 138 -1.94278899 1.75897217 139 -10.50062429 -1.94278899 140 -4.87031203 -10.50062429 141 -4.94901444 -4.87031203 142 6.31320634 -4.94901444 > 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/7vue61290454078.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/8vue61290454078.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/9nlwr1290454078.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/10nlwr1290454078.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/119luf1290454078.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/12c4t31290454078.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/13158x1290454078.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/145ook1290454078.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/15qo581290454078.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/16t7le1290454078.tab") + } > > try(system("convert tmp/1z2zx1290454078.ps tmp/1z2zx1290454078.png",intern=TRUE)) character(0) > try(system("convert tmp/2styi1290454078.ps tmp/2styi1290454078.png",intern=TRUE)) character(0) > try(system("convert tmp/3styi1290454078.ps tmp/3styi1290454078.png",intern=TRUE)) character(0) > try(system("convert tmp/4styi1290454078.ps tmp/4styi1290454078.png",intern=TRUE)) character(0) > try(system("convert tmp/5k2x31290454078.ps tmp/5k2x31290454078.png",intern=TRUE)) character(0) > try(system("convert tmp/6k2x31290454078.ps tmp/6k2x31290454078.png",intern=TRUE)) character(0) > try(system("convert tmp/7vue61290454078.ps tmp/7vue61290454078.png",intern=TRUE)) character(0) > try(system("convert tmp/8vue61290454078.ps tmp/8vue61290454078.png",intern=TRUE)) character(0) > try(system("convert tmp/9nlwr1290454078.ps tmp/9nlwr1290454078.png",intern=TRUE)) character(0) > try(system("convert tmp/10nlwr1290454078.ps tmp/10nlwr1290454078.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.376 2.741 10.966