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(38 + ,23 + ,10 + ,11 + ,35 + ,37 + ,12 + ,36 + ,15 + ,10 + ,11 + ,35 + ,37 + ,12 + ,23 + ,25 + ,10 + ,11 + ,35 + ,37 + ,12 + ,30 + ,18 + ,10 + ,11 + ,35 + ,37 + ,12 + ,26 + ,21 + ,10 + ,11 + ,35 + ,37 + ,12 + ,26 + ,19 + ,10 + ,11 + ,35 + ,37 + ,12 + ,30 + ,15 + ,13 + ,12 + ,38 + ,34 + ,12 + ,27 + ,22 + ,10 + ,11 + ,35 + ,37 + ,12 + ,34 + ,19 + ,10 + ,11 + ,35 + ,37 + ,14 + ,28 + ,20 + ,13 + ,9 + ,34 + ,32 + ,12 + ,36 + ,26 + ,10 + ,11 + ,35 + ,37 + ,12 + ,42 + ,26 + ,10 + ,11 + ,35 + ,37 + ,12 + ,31 + ,21 + ,10 + ,11 + ,35 + ,37 + ,14 + ,26 + ,19 + ,10 + ,11 + ,35 + ,37 + ,12 + ,16 + ,19 + ,13 + ,12 + ,38 + ,34 + ,12 + ,23 + ,19 + ,10 + ,11 + ,35 + ,37 + ,14 + ,45 + ,28 + ,10 + ,11 + ,35 + ,37 + ,12 + ,30 + ,27 + ,10 + ,11 + ,35 + ,37 + ,15 + ,45 + ,18 + ,10 + ,11 + ,35 + ,37 + ,12 + ,30 + ,19 + ,10 + ,11 + ,35 + ,37 + ,15 + ,24 + ,24 + ,10 + ,11 + ,35 + ,37 + ,12 + ,29 + ,21 + ,13 + ,12 + ,38 + ,34 + ,12 + ,30 + ,22 + ,13 + ,9 + ,34 + ,32 + ,12 + ,31 + ,25 + ,10 + ,11 + ,35 + ,37 + ,14 + ,34 + ,15 + ,10 + ,11 + ,35 + ,37 + ,14 + ,41 + ,34 + ,10 + ,11 + ,35 + ,37 + ,12 + ,37 + ,23 + ,10 + ,11 + ,35 + ,37 + ,12 + ,33 + ,19 + ,10 + ,11 + ,35 + ,37 + ,12 + ,48 + ,15 + ,10 + ,11 + ,35 + ,37 + ,14 + ,44 + ,15 + ,10 + ,11 + ,35 + ,37 + ,15 + ,29 + ,17 + ,10 + ,11 + ,35 + ,37 + ,14 + ,44 + ,30 + ,13 + ,9 + ,34 + ,32 + ,12 + ,43 + ,28 + ,10 + ,11 + ,35 + ,37 + ,14 + ,31 + ,23 + ,10 + ,11 + ,35 + ,37 + ,14 + ,28 + ,23 + ,10 + ,11 + ,35 + ,37 + ,12 + ,26 + ,21 + ,10 + ,11 + ,35 + ,37 + ,14 + ,30 + ,18 + ,10 + ,11 + ,35 + ,37 + ,12 + ,27 + ,19 + ,15 + ,11 + ,33 + ,36 + ,12 + ,34 + ,24 + ,10 + ,11 + ,35 + ,37 + ,12 + ,47 + ,15 + ,10 + ,11 + ,35 + ,37 + ,12 + ,37 + ,24 + ,13 + ,16 + ,34 + ,36 + ,12 + ,27 + ,20 + ,10 + ,11 + ,35 + ,37 + ,12 + ,30 + ,20 + ,10 + ,11 + ,35 + ,37 + ,12 + ,36 + ,44 + ,10 + ,11 + ,35 + ,37 + ,14 + ,39 + ,20 + ,10 + ,11 + ,35 + ,37 + ,12 + ,32 + ,20 + ,10 + ,11 + ,35 + ,37 + ,12 + ,25 + ,20 + ,10 + ,11 + ,35 + ,37 + ,12 + ,19 + ,11 + ,10 + ,11 + ,35 + ,37 + ,12 + ,29 + ,21 + ,10 + ,11 + ,35 + ,37 + ,12 + ,26 + ,21 + ,13 + ,9 + ,34 + ,32 + ,12 + ,31 + ,19 + ,13 + ,12 + ,38 + ,34 + ,12 + ,31 + ,21 + ,10 + ,11 + ,35 + ,37 + ,12 + ,31 + ,17 + ,10 + ,11 + ,35 + ,37 + ,15 + ,39 + ,19 + ,10 + ,11 + ,35 + ,37 + ,12 + ,28 + ,21 + ,10 + ,11 + ,35 + ,37 + ,12 + ,22 + ,16 + ,10 + ,11 + ,35 + ,37 + ,12 + ,31 + ,19 + ,10 + ,11 + ,35 + ,37 + ,12 + ,36 + ,19 + ,10 + ,11 + ,35 + ,37 + ,14 + ,28 + ,16 + ,10 + ,11 + ,35 + ,37 + ,12 + ,39 + ,24 + ,10 + ,11 + ,35 + ,37 + ,12 + ,35 + ,21 + ,10 + ,11 + ,35 + ,37 + ,12 + ,33 + ,20 + ,10 + ,11 + ,35 + ,37 + ,12 + ,27 + ,19 + ,10 + ,11 + ,35 + ,37 + ,12 + ,33 + ,23 + ,10 + ,11 + ,35 + ,37 + ,12 + ,31 + ,18 + ,10 + ,11 + ,35 + ,37 + ,12 + ,39 + ,19 + ,10 + ,11 + ,35 + ,37 + ,14 + ,37 + ,23 + ,10 + ,11 + ,35 + ,37 + ,14 + ,24 + ,19 + ,10 + ,11 + ,35 + ,37 + ,15 + ,28 + ,26 + ,13 + ,12 + ,38 + ,34 + ,12 + ,37 + ,13 + ,13 + ,12 + ,38 + ,34 + ,12 + ,32 + ,23 + ,10 + ,11 + ,35 + ,37 + ,14 + ,31 + ,16 + ,13 + ,12 + ,38 + ,34 + ,12 + ,29 + ,17 + ,13 + ,12 + ,38 + ,34 + ,12 + ,40 + ,30 + ,10 + ,11 + ,35 + ,37 + ,12 + ,40 + ,22 + ,10 + ,11 + ,35 + ,37 + ,14 + ,15 + ,14 + ,10 + ,11 + ,35 + ,37 + ,12 + ,27 + ,14 + ,13 + ,9 + ,34 + ,32 + ,12 + ,32 + ,21 + ,13 + ,9 + ,34 + ,32 + ,12 + ,28 + ,21 + ,10 + ,11 + ,35 + ,37 + ,12 + ,41 + ,33 + ,10 + ,11 + ,35 + ,37 + ,14 + ,47 + ,23 + ,10 + ,11 + ,35 + ,37 + ,12 + ,42 + ,30 + ,10 + ,11 + ,35 + ,37 + ,12 + ,32 + ,21 + ,11 + ,17 + ,36 + ,35 + ,12 + ,33 + ,25 + ,10 + ,11 + ,35 + ,37 + ,15 + ,29 + ,29 + ,10 + ,11 + ,35 + ,37 + ,12 + ,37 + ,21 + ,10 + ,11 + ,35 + ,37 + ,14 + ,39 + ,16 + ,10 + ,11 + ,35 + ,37 + ,15 + ,29 + ,17 + ,10 + ,11 + ,35 + ,37 + ,12 + ,33 + ,23 + ,10 + ,11 + ,35 + ,37 + ,12 + ,31 + ,18 + ,13 + ,9 + ,34 + ,32 + ,12 + ,21 + ,19 + ,10 + ,11 + ,35 + ,37 + ,15 + ,36 + ,28 + ,10 + ,11 + ,35 + ,37 + ,14 + ,32 + ,29 + ,10 + ,11 + ,35 + ,37 + ,14 + ,15 + ,19 + ,10 + ,11 + ,35 + ,37 + ,12 + ,25 + ,25 + ,13 + ,9 + ,34 + ,32 + ,12 + ,28 + ,15 + ,10 + ,11 + ,35 + ,37 + ,12 + ,39 + ,24 + ,10 + ,11 + ,35 + ,37 + ,12 + ,31 + ,12 + ,13 + ,9 + ,34 + ,32 + ,12 + ,40 + ,11 + ,10 + ,11 + ,35 + ,37 + ,12 + ,25 + ,19 + ,10 + ,11 + ,35 + ,37 + ,12 + ,36 + ,25 + ,10 + ,11 + ,35 + ,37 + ,14 + ,23 + ,12 + ,10 + ,11 + ,35 + ,37 + ,14 + ,39 + ,15 + ,10 + ,11 + ,35 + ,37 + ,12 + ,31 + ,25 + ,10 + ,11 + ,35 + ,37 + ,14 + ,23 + ,14 + ,10 + ,11 + ,35 + ,37 + ,12 + ,31 + ,19 + ,10 + ,11 + ,35 + ,37 + ,14 + ,28 + ,23 + ,13 + ,9 + ,34 + ,32 + ,12 + ,47 + ,19 + ,13 + ,9 + ,34 + ,32 + ,12 + ,25 + ,20 + ,10 + ,11 + ,35 + ,37 + ,15 + ,26 + ,16 + ,13 + ,9 + ,34 + ,32 + ,12 + ,24 + ,13 + ,12 + ,18 + ,32 + ,35 + ,12 + ,30 + ,22 + ,10 + ,11 + ,35 + ,37 + ,15 + ,25 + ,21 + ,13 + ,16 + ,34 + ,36 + ,12 + ,44 + ,18 + ,15 + ,13 + ,34 + ,31 + ,12 + ,38 + ,44 + ,10 + ,11 + ,35 + ,37 + ,15 + ,36 + ,12 + ,10 + ,11 + ,35 + ,37 + ,12 + ,34 + ,28 + ,13 + ,12 + ,38 + ,34 + ,12 + ,45 + ,17 + ,13 + ,16 + ,34 + ,36 + ,12 + ,29 + ,18 + ,10 + ,11 + ,35 + ,37 + ,14 + ,25 + ,21 + ,10 + ,11 + ,35 + ,37 + ,12 + ,30 + ,24 + ,10 + ,11 + ,35 + ,37 + ,12 + ,27 + ,20 + ,10 + ,11 + ,35 + ,37 + ,16 + ,44 + ,24 + ,10 + ,11 + ,35 + ,37 + ,14 + ,31 + ,33 + ,10 + ,11 + ,35 + ,37 + ,12 + ,35 + ,25 + ,10 + ,11 + ,35 + ,37 + ,12 + ,47 + ,35 + ,10 + ,11 + ,35 + ,37 + ,12) + ,dim=c(7 + ,126) + ,dimnames=list(c('CM+D' + ,'PE+PC' + ,'happiness' + ,'depression' + ,'connected' + ,'separated' + ,'populariteit') + ,1:126)) > y <- array(NA,dim=c(7,126),dimnames=list(c('CM+D','PE+PC','happiness','depression','connected','separated','populariteit'),1:126)) > 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 = '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 CM+D PE+PC happiness depression connected separated populariteit t 1 38 23 10 11 35 37 12 1 2 36 15 10 11 35 37 12 2 3 23 25 10 11 35 37 12 3 4 30 18 10 11 35 37 12 4 5 26 21 10 11 35 37 12 5 6 26 19 10 11 35 37 12 6 7 30 15 13 12 38 34 12 7 8 27 22 10 11 35 37 12 8 9 34 19 10 11 35 37 14 9 10 28 20 13 9 34 32 12 10 11 36 26 10 11 35 37 12 11 12 42 26 10 11 35 37 12 12 13 31 21 10 11 35 37 14 13 14 26 19 10 11 35 37 12 14 15 16 19 13 12 38 34 12 15 16 23 19 10 11 35 37 14 16 17 45 28 10 11 35 37 12 17 18 30 27 10 11 35 37 15 18 19 45 18 10 11 35 37 12 19 20 30 19 10 11 35 37 15 20 21 24 24 10 11 35 37 12 21 22 29 21 13 12 38 34 12 22 23 30 22 13 9 34 32 12 23 24 31 25 10 11 35 37 14 24 25 34 15 10 11 35 37 14 25 26 41 34 10 11 35 37 12 26 27 37 23 10 11 35 37 12 27 28 33 19 10 11 35 37 12 28 29 48 15 10 11 35 37 14 29 30 44 15 10 11 35 37 15 30 31 29 17 10 11 35 37 14 31 32 44 30 13 9 34 32 12 32 33 43 28 10 11 35 37 14 33 34 31 23 10 11 35 37 14 34 35 28 23 10 11 35 37 12 35 36 26 21 10 11 35 37 14 36 37 30 18 10 11 35 37 12 37 38 27 19 15 11 33 36 12 38 39 34 24 10 11 35 37 12 39 40 47 15 10 11 35 37 12 40 41 37 24 13 16 34 36 12 41 42 27 20 10 11 35 37 12 42 43 30 20 10 11 35 37 12 43 44 36 44 10 11 35 37 14 44 45 39 20 10 11 35 37 12 45 46 32 20 10 11 35 37 12 46 47 25 20 10 11 35 37 12 47 48 19 11 10 11 35 37 12 48 49 29 21 10 11 35 37 12 49 50 26 21 13 9 34 32 12 50 51 31 19 13 12 38 34 12 51 52 31 21 10 11 35 37 12 52 53 31 17 10 11 35 37 15 53 54 39 19 10 11 35 37 12 54 55 28 21 10 11 35 37 12 55 56 22 16 10 11 35 37 12 56 57 31 19 10 11 35 37 12 57 58 36 19 10 11 35 37 14 58 59 28 16 10 11 35 37 12 59 60 39 24 10 11 35 37 12 60 61 35 21 10 11 35 37 12 61 62 33 20 10 11 35 37 12 62 63 27 19 10 11 35 37 12 63 64 33 23 10 11 35 37 12 64 65 31 18 10 11 35 37 12 65 66 39 19 10 11 35 37 14 66 67 37 23 10 11 35 37 14 67 68 24 19 10 11 35 37 15 68 69 28 26 13 12 38 34 12 69 70 37 13 13 12 38 34 12 70 71 32 23 10 11 35 37 14 71 72 31 16 13 12 38 34 12 72 73 29 17 13 12 38 34 12 73 74 40 30 10 11 35 37 12 74 75 40 22 10 11 35 37 14 75 76 15 14 10 11 35 37 12 76 77 27 14 13 9 34 32 12 77 78 32 21 13 9 34 32 12 78 79 28 21 10 11 35 37 12 79 80 41 33 10 11 35 37 14 80 81 47 23 10 11 35 37 12 81 82 42 30 10 11 35 37 12 82 83 32 21 11 17 36 35 12 83 84 33 25 10 11 35 37 15 84 85 29 29 10 11 35 37 12 85 86 37 21 10 11 35 37 14 86 87 39 16 10 11 35 37 15 87 88 29 17 10 11 35 37 12 88 89 33 23 10 11 35 37 12 89 90 31 18 13 9 34 32 12 90 91 21 19 10 11 35 37 15 91 92 36 28 10 11 35 37 14 92 93 32 29 10 11 35 37 14 93 94 15 19 10 11 35 37 12 94 95 25 25 13 9 34 32 12 95 96 28 15 10 11 35 37 12 96 97 39 24 10 11 35 37 12 97 98 31 12 13 9 34 32 12 98 99 40 11 10 11 35 37 12 99 100 25 19 10 11 35 37 12 100 101 36 25 10 11 35 37 14 101 102 23 12 10 11 35 37 14 102 103 39 15 10 11 35 37 12 103 104 31 25 10 11 35 37 14 104 105 23 14 10 11 35 37 12 105 106 31 19 10 11 35 37 14 106 107 28 23 13 9 34 32 12 107 108 47 19 13 9 34 32 12 108 109 25 20 10 11 35 37 15 109 110 26 16 13 9 34 32 12 110 111 24 13 12 18 32 35 12 111 112 30 22 10 11 35 37 15 112 113 25 21 13 16 34 36 12 113 114 44 18 15 13 34 31 12 114 115 38 44 10 11 35 37 15 115 116 36 12 10 11 35 37 12 116 117 34 28 13 12 38 34 12 117 118 45 17 13 16 34 36 12 118 119 29 18 10 11 35 37 14 119 120 25 21 10 11 35 37 12 120 121 30 24 10 11 35 37 12 121 122 27 20 10 11 35 37 16 122 123 44 24 10 11 35 37 14 123 124 31 33 10 11 35 37 12 124 125 35 25 10 11 35 37 12 125 126 47 35 10 11 35 37 12 126 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) `PE+PC` happiness depression connected 44.174476 0.355225 -0.223616 0.253261 -0.457391 separated populariteit t -0.134164 0.073103 0.001736 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -16.541 -4.570 -1.049 4.335 17.846 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 44.174476 50.901410 0.868 0.38724 `PE+PC` 0.355225 0.112263 3.164 0.00198 ** happiness -0.223616 1.298405 -0.172 0.86356 depression 0.253261 0.599177 0.423 0.67330 connected -0.457391 0.676092 -0.677 0.50003 separated -0.134164 1.036453 -0.129 0.89723 populariteit 0.073103 0.598537 0.122 0.90300 t 0.001736 0.017724 0.098 0.92216 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 6.949 on 118 degrees of freedom Multiple R-squared: 0.08641, Adjusted R-squared: 0.03221 F-statistic: 1.594 on 7 and 118 DF, p-value: 0.1436 > 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.77417955 0.4516409 0.2258204 [2,] 0.81491455 0.3701709 0.1850854 [3,] 0.72975509 0.5404898 0.2702449 [4,] 0.67958002 0.6408400 0.3204200 [5,] 0.76036371 0.4792726 0.2396363 [6,] 0.73521251 0.5295750 0.2647875 [7,] 0.83539785 0.3292043 0.1646022 [8,] 0.78085791 0.4382842 0.2191421 [9,] 0.85789324 0.2842135 0.1421068 [10,] 0.80528885 0.3894223 0.1947111 [11,] 0.87660437 0.2467913 0.1233956 [12,] 0.84092862 0.3181428 0.1590714 [13,] 0.79199725 0.4160055 0.2080027 [14,] 0.73803874 0.5239225 0.2619613 [15,] 0.68235590 0.6352882 0.3176441 [16,] 0.62839773 0.7432045 0.3716023 [17,] 0.56068953 0.8786209 0.4393105 [18,] 0.49937254 0.9987451 0.5006275 [19,] 0.71249463 0.5750107 0.2875054 [20,] 0.75895650 0.4820870 0.2410435 [21,] 0.76280838 0.4743832 0.2371916 [22,] 0.77789457 0.4442109 0.2221054 [23,] 0.76403185 0.4719363 0.2359681 [24,] 0.75439700 0.4912060 0.2456030 [25,] 0.79051804 0.4189639 0.2094820 [26,] 0.81555443 0.3688911 0.1844456 [27,] 0.78963738 0.4207252 0.2103626 [28,] 0.76038122 0.4792376 0.2396188 [29,] 0.71470457 0.5705909 0.2852954 [30,] 0.83459375 0.3308125 0.1654063 [31,] 0.79565379 0.4086924 0.2043462 [32,] 0.81078285 0.3784343 0.1892172 [33,] 0.78789115 0.4242177 0.2121088 [34,] 0.75337097 0.4932581 0.2466290 [35,] 0.73564580 0.5287084 0.2643542 [36,] 0.69757175 0.6048565 0.3024282 [37,] 0.72256613 0.5548677 0.2774339 [38,] 0.79191494 0.4161701 0.2080851 [39,] 0.76026130 0.4794774 0.2397387 [40,] 0.75302264 0.4939547 0.2469774 [41,] 0.72055859 0.5588828 0.2794414 [42,] 0.67454694 0.6509061 0.3254531 [43,] 0.62588503 0.7482299 0.3741150 [44,] 0.62589878 0.7482024 0.3741012 [45,] 0.59468530 0.8106294 0.4053147 [46,] 0.62100382 0.7579924 0.3789962 [47,] 0.56857017 0.8628597 0.4314298 [48,] 0.53180428 0.9363914 0.4681957 [49,] 0.48465310 0.9693062 0.5153469 [50,] 0.46527391 0.9305478 0.5347261 [51,] 0.41921617 0.8384323 0.5807838 [52,] 0.36816454 0.7363291 0.6318355 [53,] 0.33896894 0.6779379 0.6610311 [54,] 0.29077819 0.5815564 0.7092218 [55,] 0.24611491 0.4922298 0.7538851 [56,] 0.24656379 0.4931276 0.7534362 [57,] 0.21855016 0.4371003 0.7814498 [58,] 0.23019168 0.4603834 0.7698083 [59,] 0.21651685 0.4330337 0.7834832 [60,] 0.23764251 0.4752850 0.7623575 [61,] 0.19905642 0.3981128 0.8009436 [62,] 0.16526376 0.3305275 0.8347362 [63,] 0.13785321 0.2757064 0.8621468 [64,] 0.12025931 0.2405186 0.8797407 [65,] 0.12198667 0.2439733 0.8780133 [66,] 0.23859220 0.4771844 0.7614078 [67,] 0.20466210 0.4093242 0.7953379 [68,] 0.16846483 0.3369297 0.8315352 [69,] 0.14940332 0.2988066 0.8505967 [70,] 0.12930222 0.2586044 0.8706978 [71,] 0.22958576 0.4591715 0.7704142 [72,] 0.23629295 0.4725859 0.7637071 [73,] 0.21256913 0.4251383 0.7874309 [74,] 0.17945198 0.3589040 0.8205480 [75,] 0.15969257 0.3193851 0.8403074 [76,] 0.15234261 0.3046852 0.8476574 [77,] 0.20346518 0.4069304 0.7965348 [78,] 0.16632674 0.3326535 0.8336733 [79,] 0.13805570 0.2761114 0.8619443 [80,] 0.10759845 0.2151969 0.8924015 [81,] 0.11863634 0.2372727 0.8813637 [82,] 0.10671068 0.2134214 0.8932893 [83,] 0.08751513 0.1750303 0.9124849 [84,] 0.18817050 0.3763410 0.8118295 [85,] 0.21023347 0.4204669 0.7897665 [86,] 0.16957014 0.3391403 0.8304299 [87,] 0.15961028 0.3192206 0.8403897 [88,] 0.12591847 0.2518369 0.8740815 [89,] 0.20045629 0.4009126 0.7995437 [90,] 0.17119469 0.3423894 0.8288053 [91,] 0.15564204 0.3112841 0.8443580 [92,] 0.12568722 0.2513744 0.8743128 [93,] 0.20451957 0.4090391 0.7954804 [94,] 0.17133602 0.3426720 0.8286640 [95,] 0.13076754 0.2615351 0.8692325 [96,] 0.12134003 0.2426801 0.8786600 [97,] 0.11903599 0.2380720 0.8809640 [98,] 0.24848143 0.4969629 0.7515186 [99,] 0.18889527 0.3777905 0.8111047 [100,] 0.19122816 0.3824563 0.8087718 [101,] 0.13169339 0.2633868 0.8683066 [102,] 0.08673177 0.1734635 0.9132682 [103,] 0.17305552 0.3461110 0.8269445 [104,] 0.11517405 0.2303481 0.8848260 [105,] 0.06585746 0.1317149 0.9341425 > postscript(file="/var/www/html/freestat/rcomp/tmp/1gyt01290517274.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/2gyt01290517274.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/3r7sl1290517274.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/4r7sl1290517274.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/5jyao1290517274.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 = 126 Frequency = 1 1 2 3 4 5 6 5.19941417 6.03948122 -10.51450777 -1.02966605 -6.09707769 -5.38836265 7 8 9 10 11 12 1.41807196 -5.45750992 2.46022519 -3.70136908 2.11638184 8.11464620 13 14 15 16 17 18 -1.25716801 -5.40224771 -14.01671444 -8.55192423 10.39551737 -4.47030081 19 20 21 22 23 24 13.94429946 -1.63196939 -9.19052382 -1.73931454 -2.43438298 -2.69716131 25 26 27 28 29 30 3.85335641 4.24854467 4.15428772 1.57345343 17.84641388 13.77157562 31 32 33 34 35 36 -1.86750805 8.70819365 8.22154200 -2.00406696 -4.85959734 -6.29708756 37 38 39 40 41 42 -1.08694193 -4.37476658 0.77823479 16.97352718 2.58775045 -4.80607076 43 44 45 46 47 48 -1.80780640 -4.48115533 7.18872234 0.18698671 -6.81474893 -9.61945654 49 50 51 52 53 54 -3.17344553 -6.12601972 0.92080279 -1.17865242 0.02120540 7.52832698 55 56 57 58 59 60 -4.18385932 -8.40946828 -0.47687992 4.37517920 -2.41467518 5.74178651 61 62 63 64 65 66 2.80572688 1.15921659 -4.48729371 0.09006931 -0.13553964 7.36129414 67 68 69 70 71 72 3.93865716 -7.71527976 -4.59701595 9.01917778 -1.06828537 1.95003051 73 74 75 76 77 78 -0.40693046 4.58613564 7.27999744 -14.73373026 -2.68630446 -0.17461743 79 80 81 82 83 84 -4.22551450 4.36384059 14.06056356 6.57225058 -1.33934652 -0.87440189 85 86 87 88 89 90 -6.07773098 4.61613081 8.31741923 -1.82023386 0.04667850 -0.12976902 91 92 93 94 95 96 -10.75519931 1.11913967 -3.23782130 -16.54109832 -8.62502453 -2.12366825 97 98 99 100 101 102 5.67756810 1.98769793 11.29202620 -6.55151212 2.16919498 -6.21461129 103 104 105 106 107 108 8.86418232 -2.83601191 -6.78406361 -0.70813117 -4.93540145 15.48376426 109 110 111 112 113 114 -7.14166603 -4.45403100 -8.40535057 -2.85732360 -8.47153909 12.12859875 115 116 117 118 119 120 -2.67748787 6.90729511 0.60922302 12.94068409 -2.37546906 -7.29667544 121 122 123 124 125 126 -3.36408708 -5.23733188 10.48623640 -5.56632199 1.27374505 9.71975607 > postscript(file="/var/www/html/freestat/rcomp/tmp/6jyao1290517274.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 = 126 Frequency = 1 lag(myerror, k = 1) myerror 0 5.19941417 NA 1 6.03948122 5.19941417 2 -10.51450777 6.03948122 3 -1.02966605 -10.51450777 4 -6.09707769 -1.02966605 5 -5.38836265 -6.09707769 6 1.41807196 -5.38836265 7 -5.45750992 1.41807196 8 2.46022519 -5.45750992 9 -3.70136908 2.46022519 10 2.11638184 -3.70136908 11 8.11464620 2.11638184 12 -1.25716801 8.11464620 13 -5.40224771 -1.25716801 14 -14.01671444 -5.40224771 15 -8.55192423 -14.01671444 16 10.39551737 -8.55192423 17 -4.47030081 10.39551737 18 13.94429946 -4.47030081 19 -1.63196939 13.94429946 20 -9.19052382 -1.63196939 21 -1.73931454 -9.19052382 22 -2.43438298 -1.73931454 23 -2.69716131 -2.43438298 24 3.85335641 -2.69716131 25 4.24854467 3.85335641 26 4.15428772 4.24854467 27 1.57345343 4.15428772 28 17.84641388 1.57345343 29 13.77157562 17.84641388 30 -1.86750805 13.77157562 31 8.70819365 -1.86750805 32 8.22154200 8.70819365 33 -2.00406696 8.22154200 34 -4.85959734 -2.00406696 35 -6.29708756 -4.85959734 36 -1.08694193 -6.29708756 37 -4.37476658 -1.08694193 38 0.77823479 -4.37476658 39 16.97352718 0.77823479 40 2.58775045 16.97352718 41 -4.80607076 2.58775045 42 -1.80780640 -4.80607076 43 -4.48115533 -1.80780640 44 7.18872234 -4.48115533 45 0.18698671 7.18872234 46 -6.81474893 0.18698671 47 -9.61945654 -6.81474893 48 -3.17344553 -9.61945654 49 -6.12601972 -3.17344553 50 0.92080279 -6.12601972 51 -1.17865242 0.92080279 52 0.02120540 -1.17865242 53 7.52832698 0.02120540 54 -4.18385932 7.52832698 55 -8.40946828 -4.18385932 56 -0.47687992 -8.40946828 57 4.37517920 -0.47687992 58 -2.41467518 4.37517920 59 5.74178651 -2.41467518 60 2.80572688 5.74178651 61 1.15921659 2.80572688 62 -4.48729371 1.15921659 63 0.09006931 -4.48729371 64 -0.13553964 0.09006931 65 7.36129414 -0.13553964 66 3.93865716 7.36129414 67 -7.71527976 3.93865716 68 -4.59701595 -7.71527976 69 9.01917778 -4.59701595 70 -1.06828537 9.01917778 71 1.95003051 -1.06828537 72 -0.40693046 1.95003051 73 4.58613564 -0.40693046 74 7.27999744 4.58613564 75 -14.73373026 7.27999744 76 -2.68630446 -14.73373026 77 -0.17461743 -2.68630446 78 -4.22551450 -0.17461743 79 4.36384059 -4.22551450 80 14.06056356 4.36384059 81 6.57225058 14.06056356 82 -1.33934652 6.57225058 83 -0.87440189 -1.33934652 84 -6.07773098 -0.87440189 85 4.61613081 -6.07773098 86 8.31741923 4.61613081 87 -1.82023386 8.31741923 88 0.04667850 -1.82023386 89 -0.12976902 0.04667850 90 -10.75519931 -0.12976902 91 1.11913967 -10.75519931 92 -3.23782130 1.11913967 93 -16.54109832 -3.23782130 94 -8.62502453 -16.54109832 95 -2.12366825 -8.62502453 96 5.67756810 -2.12366825 97 1.98769793 5.67756810 98 11.29202620 1.98769793 99 -6.55151212 11.29202620 100 2.16919498 -6.55151212 101 -6.21461129 2.16919498 102 8.86418232 -6.21461129 103 -2.83601191 8.86418232 104 -6.78406361 -2.83601191 105 -0.70813117 -6.78406361 106 -4.93540145 -0.70813117 107 15.48376426 -4.93540145 108 -7.14166603 15.48376426 109 -4.45403100 -7.14166603 110 -8.40535057 -4.45403100 111 -2.85732360 -8.40535057 112 -8.47153909 -2.85732360 113 12.12859875 -8.47153909 114 -2.67748787 12.12859875 115 6.90729511 -2.67748787 116 0.60922302 6.90729511 117 12.94068409 0.60922302 118 -2.37546906 12.94068409 119 -7.29667544 -2.37546906 120 -3.36408708 -7.29667544 121 -5.23733188 -3.36408708 122 10.48623640 -5.23733188 123 -5.56632199 10.48623640 124 1.27374505 -5.56632199 125 9.71975607 1.27374505 126 NA 9.71975607 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 6.03948122 5.19941417 [2,] -10.51450777 6.03948122 [3,] -1.02966605 -10.51450777 [4,] -6.09707769 -1.02966605 [5,] -5.38836265 -6.09707769 [6,] 1.41807196 -5.38836265 [7,] -5.45750992 1.41807196 [8,] 2.46022519 -5.45750992 [9,] -3.70136908 2.46022519 [10,] 2.11638184 -3.70136908 [11,] 8.11464620 2.11638184 [12,] -1.25716801 8.11464620 [13,] -5.40224771 -1.25716801 [14,] -14.01671444 -5.40224771 [15,] -8.55192423 -14.01671444 [16,] 10.39551737 -8.55192423 [17,] -4.47030081 10.39551737 [18,] 13.94429946 -4.47030081 [19,] -1.63196939 13.94429946 [20,] -9.19052382 -1.63196939 [21,] -1.73931454 -9.19052382 [22,] -2.43438298 -1.73931454 [23,] -2.69716131 -2.43438298 [24,] 3.85335641 -2.69716131 [25,] 4.24854467 3.85335641 [26,] 4.15428772 4.24854467 [27,] 1.57345343 4.15428772 [28,] 17.84641388 1.57345343 [29,] 13.77157562 17.84641388 [30,] -1.86750805 13.77157562 [31,] 8.70819365 -1.86750805 [32,] 8.22154200 8.70819365 [33,] -2.00406696 8.22154200 [34,] -4.85959734 -2.00406696 [35,] -6.29708756 -4.85959734 [36,] -1.08694193 -6.29708756 [37,] -4.37476658 -1.08694193 [38,] 0.77823479 -4.37476658 [39,] 16.97352718 0.77823479 [40,] 2.58775045 16.97352718 [41,] -4.80607076 2.58775045 [42,] -1.80780640 -4.80607076 [43,] -4.48115533 -1.80780640 [44,] 7.18872234 -4.48115533 [45,] 0.18698671 7.18872234 [46,] -6.81474893 0.18698671 [47,] -9.61945654 -6.81474893 [48,] -3.17344553 -9.61945654 [49,] -6.12601972 -3.17344553 [50,] 0.92080279 -6.12601972 [51,] -1.17865242 0.92080279 [52,] 0.02120540 -1.17865242 [53,] 7.52832698 0.02120540 [54,] -4.18385932 7.52832698 [55,] -8.40946828 -4.18385932 [56,] -0.47687992 -8.40946828 [57,] 4.37517920 -0.47687992 [58,] -2.41467518 4.37517920 [59,] 5.74178651 -2.41467518 [60,] 2.80572688 5.74178651 [61,] 1.15921659 2.80572688 [62,] -4.48729371 1.15921659 [63,] 0.09006931 -4.48729371 [64,] -0.13553964 0.09006931 [65,] 7.36129414 -0.13553964 [66,] 3.93865716 7.36129414 [67,] -7.71527976 3.93865716 [68,] -4.59701595 -7.71527976 [69,] 9.01917778 -4.59701595 [70,] -1.06828537 9.01917778 [71,] 1.95003051 -1.06828537 [72,] -0.40693046 1.95003051 [73,] 4.58613564 -0.40693046 [74,] 7.27999744 4.58613564 [75,] -14.73373026 7.27999744 [76,] -2.68630446 -14.73373026 [77,] -0.17461743 -2.68630446 [78,] -4.22551450 -0.17461743 [79,] 4.36384059 -4.22551450 [80,] 14.06056356 4.36384059 [81,] 6.57225058 14.06056356 [82,] -1.33934652 6.57225058 [83,] -0.87440189 -1.33934652 [84,] -6.07773098 -0.87440189 [85,] 4.61613081 -6.07773098 [86,] 8.31741923 4.61613081 [87,] -1.82023386 8.31741923 [88,] 0.04667850 -1.82023386 [89,] -0.12976902 0.04667850 [90,] -10.75519931 -0.12976902 [91,] 1.11913967 -10.75519931 [92,] -3.23782130 1.11913967 [93,] -16.54109832 -3.23782130 [94,] -8.62502453 -16.54109832 [95,] -2.12366825 -8.62502453 [96,] 5.67756810 -2.12366825 [97,] 1.98769793 5.67756810 [98,] 11.29202620 1.98769793 [99,] -6.55151212 11.29202620 [100,] 2.16919498 -6.55151212 [101,] -6.21461129 2.16919498 [102,] 8.86418232 -6.21461129 [103,] -2.83601191 8.86418232 [104,] -6.78406361 -2.83601191 [105,] -0.70813117 -6.78406361 [106,] -4.93540145 -0.70813117 [107,] 15.48376426 -4.93540145 [108,] -7.14166603 15.48376426 [109,] -4.45403100 -7.14166603 [110,] -8.40535057 -4.45403100 [111,] -2.85732360 -8.40535057 [112,] -8.47153909 -2.85732360 [113,] 12.12859875 -8.47153909 [114,] -2.67748787 12.12859875 [115,] 6.90729511 -2.67748787 [116,] 0.60922302 6.90729511 [117,] 12.94068409 0.60922302 [118,] -2.37546906 12.94068409 [119,] -7.29667544 -2.37546906 [120,] -3.36408708 -7.29667544 [121,] -5.23733188 -3.36408708 [122,] 10.48623640 -5.23733188 [123,] -5.56632199 10.48623640 [124,] 1.27374505 -5.56632199 [125,] 9.71975607 1.27374505 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 6.03948122 5.19941417 2 -10.51450777 6.03948122 3 -1.02966605 -10.51450777 4 -6.09707769 -1.02966605 5 -5.38836265 -6.09707769 6 1.41807196 -5.38836265 7 -5.45750992 1.41807196 8 2.46022519 -5.45750992 9 -3.70136908 2.46022519 10 2.11638184 -3.70136908 11 8.11464620 2.11638184 12 -1.25716801 8.11464620 13 -5.40224771 -1.25716801 14 -14.01671444 -5.40224771 15 -8.55192423 -14.01671444 16 10.39551737 -8.55192423 17 -4.47030081 10.39551737 18 13.94429946 -4.47030081 19 -1.63196939 13.94429946 20 -9.19052382 -1.63196939 21 -1.73931454 -9.19052382 22 -2.43438298 -1.73931454 23 -2.69716131 -2.43438298 24 3.85335641 -2.69716131 25 4.24854467 3.85335641 26 4.15428772 4.24854467 27 1.57345343 4.15428772 28 17.84641388 1.57345343 29 13.77157562 17.84641388 30 -1.86750805 13.77157562 31 8.70819365 -1.86750805 32 8.22154200 8.70819365 33 -2.00406696 8.22154200 34 -4.85959734 -2.00406696 35 -6.29708756 -4.85959734 36 -1.08694193 -6.29708756 37 -4.37476658 -1.08694193 38 0.77823479 -4.37476658 39 16.97352718 0.77823479 40 2.58775045 16.97352718 41 -4.80607076 2.58775045 42 -1.80780640 -4.80607076 43 -4.48115533 -1.80780640 44 7.18872234 -4.48115533 45 0.18698671 7.18872234 46 -6.81474893 0.18698671 47 -9.61945654 -6.81474893 48 -3.17344553 -9.61945654 49 -6.12601972 -3.17344553 50 0.92080279 -6.12601972 51 -1.17865242 0.92080279 52 0.02120540 -1.17865242 53 7.52832698 0.02120540 54 -4.18385932 7.52832698 55 -8.40946828 -4.18385932 56 -0.47687992 -8.40946828 57 4.37517920 -0.47687992 58 -2.41467518 4.37517920 59 5.74178651 -2.41467518 60 2.80572688 5.74178651 61 1.15921659 2.80572688 62 -4.48729371 1.15921659 63 0.09006931 -4.48729371 64 -0.13553964 0.09006931 65 7.36129414 -0.13553964 66 3.93865716 7.36129414 67 -7.71527976 3.93865716 68 -4.59701595 -7.71527976 69 9.01917778 -4.59701595 70 -1.06828537 9.01917778 71 1.95003051 -1.06828537 72 -0.40693046 1.95003051 73 4.58613564 -0.40693046 74 7.27999744 4.58613564 75 -14.73373026 7.27999744 76 -2.68630446 -14.73373026 77 -0.17461743 -2.68630446 78 -4.22551450 -0.17461743 79 4.36384059 -4.22551450 80 14.06056356 4.36384059 81 6.57225058 14.06056356 82 -1.33934652 6.57225058 83 -0.87440189 -1.33934652 84 -6.07773098 -0.87440189 85 4.61613081 -6.07773098 86 8.31741923 4.61613081 87 -1.82023386 8.31741923 88 0.04667850 -1.82023386 89 -0.12976902 0.04667850 90 -10.75519931 -0.12976902 91 1.11913967 -10.75519931 92 -3.23782130 1.11913967 93 -16.54109832 -3.23782130 94 -8.62502453 -16.54109832 95 -2.12366825 -8.62502453 96 5.67756810 -2.12366825 97 1.98769793 5.67756810 98 11.29202620 1.98769793 99 -6.55151212 11.29202620 100 2.16919498 -6.55151212 101 -6.21461129 2.16919498 102 8.86418232 -6.21461129 103 -2.83601191 8.86418232 104 -6.78406361 -2.83601191 105 -0.70813117 -6.78406361 106 -4.93540145 -0.70813117 107 15.48376426 -4.93540145 108 -7.14166603 15.48376426 109 -4.45403100 -7.14166603 110 -8.40535057 -4.45403100 111 -2.85732360 -8.40535057 112 -8.47153909 -2.85732360 113 12.12859875 -8.47153909 114 -2.67748787 12.12859875 115 6.90729511 -2.67748787 116 0.60922302 6.90729511 117 12.94068409 0.60922302 118 -2.37546906 12.94068409 119 -7.29667544 -2.37546906 120 -3.36408708 -7.29667544 121 -5.23733188 -3.36408708 122 10.48623640 -5.23733188 123 -5.56632199 10.48623640 124 1.27374505 -5.56632199 125 9.71975607 1.27374505 > 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/7u7r81290517274.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/8u7r81290517274.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/9nz8t1290517274.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/10nz8t1290517274.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/11qz7h1290517274.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/12ti5n1290517274.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/13012h1290517274.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/14m21n1290517274.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/15pkhs1290517274.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/16lu0t1290517275.tab") + } > > try(system("convert tmp/1gyt01290517274.ps tmp/1gyt01290517274.png",intern=TRUE)) character(0) > try(system("convert tmp/2gyt01290517274.ps tmp/2gyt01290517274.png",intern=TRUE)) character(0) > try(system("convert tmp/3r7sl1290517274.ps tmp/3r7sl1290517274.png",intern=TRUE)) character(0) > try(system("convert tmp/4r7sl1290517274.ps tmp/4r7sl1290517274.png",intern=TRUE)) character(0) > try(system("convert tmp/5jyao1290517274.ps tmp/5jyao1290517274.png",intern=TRUE)) character(0) > try(system("convert tmp/6jyao1290517274.ps tmp/6jyao1290517274.png",intern=TRUE)) character(0) > try(system("convert tmp/7u7r81290517274.ps tmp/7u7r81290517274.png",intern=TRUE)) character(0) > try(system("convert tmp/8u7r81290517274.ps tmp/8u7r81290517274.png",intern=TRUE)) character(0) > try(system("convert tmp/9nz8t1290517274.ps tmp/9nz8t1290517274.png",intern=TRUE)) character(0) > try(system("convert tmp/10nz8t1290517274.ps tmp/10nz8t1290517274.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.249 2.691 10.894