R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(24 + ,14 + ,11 + ,12 + ,24 + ,26 + ,25 + ,11 + ,7 + ,8 + ,25 + ,23 + ,17 + ,6 + ,17 + ,8 + ,30 + ,25 + ,18 + ,12 + ,10 + ,8 + ,19 + ,23 + ,18 + ,8 + ,12 + ,9 + ,22 + ,19 + ,16 + ,10 + ,12 + ,7 + ,22 + ,29 + ,20 + ,10 + ,11 + ,4 + ,25 + ,25 + ,16 + ,11 + ,11 + ,11 + ,23 + ,21 + ,18 + ,16 + ,12 + ,7 + ,17 + ,22 + ,17 + ,11 + ,13 + ,7 + ,21 + ,25 + ,23 + ,13 + ,14 + ,12 + ,19 + ,24 + ,30 + ,12 + ,16 + ,10 + ,19 + ,18 + ,23 + ,8 + ,11 + ,10 + ,15 + ,22 + ,18 + ,12 + ,10 + ,8 + ,16 + ,15 + ,15 + ,11 + ,11 + ,8 + ,23 + ,22 + ,12 + ,4 + ,15 + ,4 + ,27 + ,28 + ,21 + ,9 + ,9 + ,9 + ,22 + ,20 + ,15 + ,8 + ,11 + ,8 + ,14 + ,12 + ,20 + ,8 + ,17 + ,7 + ,22 + ,24 + ,31 + ,14 + ,17 + ,11 + ,23 + ,20 + ,27 + ,15 + ,11 + ,9 + ,23 + ,21 + ,34 + ,16 + ,18 + ,11 + ,21 + ,20 + ,21 + ,9 + ,14 + ,13 + ,19 + ,21 + ,31 + ,14 + ,10 + ,8 + ,18 + ,23 + ,19 + ,11 + ,11 + ,8 + ,20 + ,28 + ,16 + ,8 + ,15 + ,9 + ,23 + ,24 + ,20 + ,9 + ,15 + ,6 + ,25 + ,24 + ,21 + ,9 + ,13 + ,9 + ,19 + ,24 + ,22 + ,9 + ,16 + ,9 + ,24 + ,23 + ,17 + ,9 + ,13 + ,6 + ,22 + ,23 + ,24 + ,10 + ,9 + ,6 + ,25 + ,29 + ,25 + ,16 + ,18 + ,16 + ,26 + ,24 + ,26 + ,11 + ,18 + ,5 + ,29 + ,18 + ,25 + ,8 + ,12 + ,7 + ,32 + ,25 + ,17 + ,9 + ,17 + ,9 + ,25 + ,21 + ,32 + ,16 + ,9 + ,6 + ,29 + ,26 + ,33 + ,11 + ,9 + ,6 + ,28 + ,22 + ,13 + ,16 + ,12 + ,5 + ,17 + ,22 + ,32 + ,12 + ,18 + ,12 + ,28 + ,22 + ,25 + ,12 + ,12 + ,7 + ,29 + ,23 + ,29 + ,14 + ,18 + ,10 + ,26 + ,30 + ,22 + ,9 + ,14 + ,9 + ,25 + ,23 + ,18 + ,10 + ,15 + ,8 + ,14 + ,17 + ,17 + ,9 + ,16 + ,5 + ,25 + ,23 + ,20 + ,10 + ,10 + ,8 + ,26 + ,23 + ,15 + ,12 + ,11 + ,8 + ,20 + ,25 + ,20 + ,14 + ,14 + ,10 + ,18 + ,24 + ,33 + ,14 + ,9 + ,6 + ,32 + ,24 + ,29 + ,10 + ,12 + ,8 + ,25 + ,23 + ,23 + ,14 + ,17 + ,7 + ,25 + ,21 + ,26 + ,16 + ,5 + ,4 + ,23 + ,24 + ,18 + ,9 + ,12 + ,8 + ,21 + ,24 + ,20 + ,10 + ,12 + ,8 + ,20 + ,28 + ,11 + ,6 + ,6 + ,4 + ,15 + ,16 + ,28 + ,8 + ,24 + ,20 + ,30 + ,20 + ,26 + ,13 + ,12 + ,8 + ,24 + ,29 + ,22 + ,10 + ,12 + ,8 + ,26 + ,27 + ,17 + ,8 + ,14 + ,6 + ,24 + ,22 + ,12 + ,7 + ,7 + ,4 + ,22 + ,28 + ,14 + ,15 + ,13 + ,8 + ,14 + ,16 + ,17 + ,9 + ,12 + ,9 + ,24 + ,25 + ,21 + ,10 + ,13 + ,6 + ,24 + ,24 + ,19 + ,12 + ,14 + ,7 + ,24 + ,28 + ,18 + ,13 + ,8 + ,9 + ,24 + ,24 + ,10 + ,10 + ,11 + ,5 + ,19 + ,23 + ,29 + ,11 + ,9 + ,5 + ,31 + ,30 + ,31 + ,8 + ,11 + ,8 + ,22 + ,24 + ,19 + ,9 + ,13 + ,8 + ,27 + ,21 + ,9 + ,13 + ,10 + ,6 + ,19 + ,25 + ,20 + ,11 + ,11 + ,8 + ,25 + ,25 + ,28 + ,8 + ,12 + ,7 + ,20 + ,22 + ,19 + ,9 + ,9 + ,7 + ,21 + ,23 + ,30 + ,9 + ,15 + ,9 + ,27 + ,26 + ,29 + ,15 + ,18 + ,11 + ,23 + ,23 + ,26 + ,9 + ,15 + ,6 + ,25 + ,25 + ,23 + ,10 + ,12 + ,8 + ,20 + ,21 + ,13 + ,14 + ,13 + ,6 + ,21 + ,25 + ,21 + ,12 + ,14 + ,9 + ,22 + ,24 + ,19 + ,12 + ,10 + ,8 + ,23 + ,29 + ,28 + ,11 + ,13 + ,6 + ,25 + ,22 + ,23 + ,14 + ,13 + ,10 + ,25 + ,27 + ,18 + ,6 + ,11 + ,8 + ,17 + ,26 + ,21 + ,12 + ,13 + ,8 + ,19 + ,22 + ,20 + ,8 + ,16 + ,10 + ,25 + ,24 + ,23 + ,14 + ,8 + ,5 + ,19 + ,27 + ,21 + ,11 + ,16 + ,7 + ,20 + ,24 + ,21 + ,10 + ,11 + ,5 + ,26 + ,24 + ,15 + ,14 + ,9 + ,8 + ,23 + ,29 + ,28 + ,12 + ,16 + ,14 + ,27 + ,22 + ,19 + ,10 + ,12 + ,7 + ,17 + ,21 + ,26 + ,14 + ,14 + ,8 + ,17 + ,24 + ,10 + ,5 + ,8 + ,6 + ,19 + ,24 + ,16 + ,11 + ,9 + ,5 + ,17 + ,23 + ,22 + ,10 + ,15 + ,6 + ,22 + ,20 + ,19 + ,9 + ,11 + ,10 + ,21 + ,27 + ,31 + ,10 + ,21 + ,12 + ,32 + ,26 + ,31 + ,16 + ,14 + ,9 + ,21 + ,25 + ,29 + ,13 + ,18 + ,12 + ,21 + ,21 + ,19 + ,9 + ,12 + ,7 + ,18 + ,21 + ,22 + ,10 + ,13 + ,8 + ,18 + ,19 + ,23 + ,10 + ,15 + ,10 + ,23 + ,21 + ,15 + ,7 + ,12 + ,6 + ,19 + ,21 + ,20 + ,9 + ,19 + ,10 + ,20 + ,16 + ,18 + ,8 + ,15 + ,10 + ,21 + ,22 + ,23 + ,14 + ,11 + ,10 + ,20 + ,29 + ,25 + ,14 + ,11 + ,5 + ,17 + ,15 + ,21 + ,8 + ,10 + ,7 + ,18 + ,17 + ,24 + ,9 + ,13 + ,10 + ,19 + ,15 + ,25 + ,14 + ,15 + ,11 + ,22 + ,21 + ,17 + ,14 + ,12 + ,6 + ,15 + ,21 + ,13 + ,8 + ,12 + ,7 + ,14 + ,19 + ,28 + ,8 + ,16 + ,12 + ,18 + ,24 + ,21 + ,8 + ,9 + ,11 + ,24 + ,20 + ,25 + ,7 + ,18 + ,11 + ,35 + ,17 + ,9 + ,6 + ,8 + ,11 + ,29 + ,23 + ,16 + ,8 + ,13 + ,5 + ,21 + ,24 + ,19 + ,6 + ,17 + ,8 + ,25 + ,14 + ,17 + ,11 + ,9 + ,6 + ,20 + ,19 + ,25 + ,14 + ,15 + ,9 + ,22 + ,24 + ,20 + ,11 + ,8 + ,4 + ,13 + ,13 + ,29 + ,11 + ,7 + ,4 + ,26 + ,22 + ,14 + ,11 + ,12 + ,7 + ,17 + ,16 + ,22 + ,14 + ,14 + ,11 + ,25 + ,19 + ,15 + ,8 + ,6 + ,6 + ,20 + ,25 + ,19 + ,20 + ,8 + ,7 + ,19 + ,25 + ,20 + ,11 + ,17 + ,8 + ,21 + ,23 + ,15 + ,8 + ,10 + ,4 + ,22 + ,24 + ,20 + ,11 + ,11 + ,8 + ,24 + ,26 + ,18 + ,10 + ,14 + ,9 + ,21 + ,26 + ,33 + ,14 + ,11 + ,8 + ,26 + ,25 + ,22 + ,11 + ,13 + ,11 + ,24 + ,18 + ,16 + ,9 + ,12 + ,8 + ,16 + ,21 + ,17 + ,9 + ,11 + ,5 + ,23 + ,26 + ,16 + ,8 + ,9 + ,4 + ,18 + ,23 + ,21 + ,10 + ,12 + ,8 + ,16 + ,23 + ,26 + ,13 + ,20 + ,10 + ,26 + ,22 + ,18 + ,13 + ,12 + ,6 + ,19 + ,20 + ,18 + ,12 + ,13 + ,9 + ,21 + ,13 + ,17 + ,8 + ,12 + ,9 + ,21 + ,24 + ,22 + ,13 + ,12 + ,13 + ,22 + ,15 + ,30 + ,14 + ,9 + ,9 + ,23 + ,14 + ,30 + ,12 + ,15 + ,10 + ,29 + ,22 + ,24 + ,14 + ,24 + ,20 + ,21 + ,10 + ,21 + ,15 + ,7 + ,5 + ,21 + ,24 + ,21 + ,13 + ,17 + ,11 + ,23 + ,22 + ,29 + ,16 + ,11 + ,6 + ,27 + ,24 + ,31 + ,9 + ,17 + ,9 + ,25 + ,19 + ,20 + ,9 + ,11 + ,7 + ,21 + ,20 + ,16 + ,9 + ,12 + ,9 + ,10 + ,13 + ,22 + ,8 + ,14 + ,10 + ,20 + ,20 + ,20 + ,7 + ,11 + ,9 + ,26 + ,22 + ,28 + ,16 + ,16 + ,8 + ,24 + ,24 + ,38 + ,11 + ,21 + ,7 + ,29 + ,29 + ,22 + ,9 + ,14 + ,6 + ,19 + ,12 + ,20 + ,11 + ,20 + ,13 + ,24 + ,20 + ,17 + ,9 + ,13 + ,6 + ,19 + ,21 + ,28 + ,14 + ,11 + ,8 + ,24 + ,24 + ,22 + ,13 + ,15 + ,10 + ,22 + ,22 + ,31 + ,16 + ,19 + ,16 + ,17 + ,20) + ,dim=c(6 + ,159) + ,dimnames=list(c('Concern_over_Mistakes' + ,'Doubts_about_actions' + ,'Parental_Expectations' + ,'Parental_Criticism' + ,'Personal_Standards' + ,'Organization') + ,1:159)) > y <- array(NA,dim=c(6,159),dimnames=list(c('Concern_over_Mistakes','Doubts_about_actions','Parental_Expectations','Parental_Criticism','Personal_Standards','Organization'),1:159)) > 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 = '5' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Personal_Standards Concern_over_Mistakes Doubts_about_actions 1 24 24 14 2 25 25 11 3 30 17 6 4 19 18 12 5 22 18 8 6 22 16 10 7 25 20 10 8 23 16 11 9 17 18 16 10 21 17 11 11 19 23 13 12 19 30 12 13 15 23 8 14 16 18 12 15 23 15 11 16 27 12 4 17 22 21 9 18 14 15 8 19 22 20 8 20 23 31 14 21 23 27 15 22 21 34 16 23 19 21 9 24 18 31 14 25 20 19 11 26 23 16 8 27 25 20 9 28 19 21 9 29 24 22 9 30 22 17 9 31 25 24 10 32 26 25 16 33 29 26 11 34 32 25 8 35 25 17 9 36 29 32 16 37 28 33 11 38 17 13 16 39 28 32 12 40 29 25 12 41 26 29 14 42 25 22 9 43 14 18 10 44 25 17 9 45 26 20 10 46 20 15 12 47 18 20 14 48 32 33 14 49 25 29 10 50 25 23 14 51 23 26 16 52 21 18 9 53 20 20 10 54 15 11 6 55 30 28 8 56 24 26 13 57 26 22 10 58 24 17 8 59 22 12 7 60 14 14 15 61 24 17 9 62 24 21 10 63 24 19 12 64 24 18 13 65 19 10 10 66 31 29 11 67 22 31 8 68 27 19 9 69 19 9 13 70 25 20 11 71 20 28 8 72 21 19 9 73 27 30 9 74 23 29 15 75 25 26 9 76 20 23 10 77 21 13 14 78 22 21 12 79 23 19 12 80 25 28 11 81 25 23 14 82 17 18 6 83 19 21 12 84 25 20 8 85 19 23 14 86 20 21 11 87 26 21 10 88 23 15 14 89 27 28 12 90 17 19 10 91 17 26 14 92 19 10 5 93 17 16 11 94 22 22 10 95 21 19 9 96 32 31 10 97 21 31 16 98 21 29 13 99 18 19 9 100 18 22 10 101 23 23 10 102 19 15 7 103 20 20 9 104 21 18 8 105 20 23 14 106 17 25 14 107 18 21 8 108 19 24 9 109 22 25 14 110 15 17 14 111 14 13 8 112 18 28 8 113 24 21 8 114 35 25 7 115 29 9 6 116 21 16 8 117 25 19 6 118 20 17 11 119 22 25 14 120 13 20 11 121 26 29 11 122 17 14 11 123 25 22 14 124 20 15 8 125 19 19 20 126 21 20 11 127 22 15 8 128 24 20 11 129 21 18 10 130 26 33 14 131 24 22 11 132 16 16 9 133 23 17 9 134 18 16 8 135 16 21 10 136 26 26 13 137 19 18 13 138 21 18 12 139 21 17 8 140 22 22 13 141 23 30 14 142 29 30 12 143 21 24 14 144 21 21 15 145 23 21 13 146 27 29 16 147 25 31 9 148 21 20 9 149 10 16 9 150 20 22 8 151 26 20 7 152 24 28 16 153 29 38 11 154 19 22 9 155 24 20 11 156 19 17 9 157 24 28 14 158 22 22 13 159 17 31 16 Parental_Expectations Parental_Criticism Organization 1 11 12 26 2 7 8 23 3 17 8 25 4 10 8 23 5 12 9 19 6 12 7 29 7 11 4 25 8 11 11 21 9 12 7 22 10 13 7 25 11 14 12 24 12 16 10 18 13 11 10 22 14 10 8 15 15 11 8 22 16 15 4 28 17 9 9 20 18 11 8 12 19 17 7 24 20 17 11 20 21 11 9 21 22 18 11 20 23 14 13 21 24 10 8 23 25 11 8 28 26 15 9 24 27 15 6 24 28 13 9 24 29 16 9 23 30 13 6 23 31 9 6 29 32 18 16 24 33 18 5 18 34 12 7 25 35 17 9 21 36 9 6 26 37 9 6 22 38 12 5 22 39 18 12 22 40 12 7 23 41 18 10 30 42 14 9 23 43 15 8 17 44 16 5 23 45 10 8 23 46 11 8 25 47 14 10 24 48 9 6 24 49 12 8 23 50 17 7 21 51 5 4 24 52 12 8 24 53 12 8 28 54 6 4 16 55 24 20 20 56 12 8 29 57 12 8 27 58 14 6 22 59 7 4 28 60 13 8 16 61 12 9 25 62 13 6 24 63 14 7 28 64 8 9 24 65 11 5 23 66 9 5 30 67 11 8 24 68 13 8 21 69 10 6 25 70 11 8 25 71 12 7 22 72 9 7 23 73 15 9 26 74 18 11 23 75 15 6 25 76 12 8 21 77 13 6 25 78 14 9 24 79 10 8 29 80 13 6 22 81 13 10 27 82 11 8 26 83 13 8 22 84 16 10 24 85 8 5 27 86 16 7 24 87 11 5 24 88 9 8 29 89 16 14 22 90 12 7 21 91 14 8 24 92 8 6 24 93 9 5 23 94 15 6 20 95 11 10 27 96 21 12 26 97 14 9 25 98 18 12 21 99 12 7 21 100 13 8 19 101 15 10 21 102 12 6 21 103 19 10 16 104 15 10 22 105 11 10 29 106 11 5 15 107 10 7 17 108 13 10 15 109 15 11 21 110 12 6 21 111 12 7 19 112 16 12 24 113 9 11 20 114 18 11 17 115 8 11 23 116 13 5 24 117 17 8 14 118 9 6 19 119 15 9 24 120 8 4 13 121 7 4 22 122 12 7 16 123 14 11 19 124 6 6 25 125 8 7 25 126 17 8 23 127 10 4 24 128 11 8 26 129 14 9 26 130 11 8 25 131 13 11 18 132 12 8 21 133 11 5 26 134 9 4 23 135 12 8 23 136 20 10 22 137 12 6 20 138 13 9 13 139 12 9 24 140 12 13 15 141 9 9 14 142 15 10 22 143 24 20 10 144 7 5 24 145 17 11 22 146 11 6 24 147 17 9 19 148 11 7 20 149 12 9 13 150 14 10 20 151 11 9 22 152 16 8 24 153 21 7 29 154 14 6 12 155 20 13 20 156 13 6 21 157 11 8 24 158 15 10 22 159 19 16 20 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Concern_over_Mistakes Doubts_about_actions 7.46043 0.32815 -0.36274 Parental_Expectations Parental_Criticism Organization 0.18656 0.02338 0.40127 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -8.6429143 -2.1602008 -0.0001409 2.1735704 11.4379673 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.46043 2.24811 3.319 0.00113 ** Concern_over_Mistakes 0.32815 0.05554 5.908 2.17e-08 *** Doubts_about_actions -0.36274 0.10712 -3.386 0.00090 *** Parental_Expectations 0.18656 0.10114 1.845 0.06703 . Parental_Criticism 0.02338 0.12862 0.182 0.85597 Organization 0.40127 0.07177 5.591 1.01e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.409 on 153 degrees of freedom Multiple R-squared: 0.3671, Adjusted R-squared: 0.3464 F-statistic: 17.75 on 5 and 153 DF, p-value: 7.55e-14 > 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.30316717 0.60633435 0.6968328 [2,] 0.18327191 0.36654381 0.8167281 [3,] 0.33896575 0.67793151 0.6610342 [4,] 0.28960882 0.57921764 0.7103912 [5,] 0.86604763 0.26790473 0.1339524 [6,] 0.80493438 0.39013125 0.1950656 [7,] 0.75990210 0.48019580 0.2400979 [8,] 0.69717006 0.60565988 0.3028299 [9,] 0.61928275 0.76143450 0.3807172 [10,] 0.59103869 0.81792263 0.4089613 [11,] 0.52402539 0.95194922 0.4759746 [12,] 0.51820402 0.96359195 0.4817960 [13,] 0.49782432 0.99564864 0.5021757 [14,] 0.43087937 0.86175874 0.5691206 [15,] 0.38589468 0.77178935 0.6141053 [16,] 0.43499451 0.86998902 0.5650055 [17,] 0.44772104 0.89544209 0.5522790 [18,] 0.37960572 0.75921143 0.6203943 [19,] 0.32928175 0.65856350 0.6707183 [20,] 0.34529132 0.69058265 0.6547087 [21,] 0.29166345 0.58332690 0.7083365 [22,] 0.23850287 0.47700574 0.7614971 [23,] 0.19195255 0.38390511 0.8080474 [24,] 0.21217411 0.42434823 0.7878259 [25,] 0.36208470 0.72416941 0.6379153 [26,] 0.59668327 0.80663346 0.4033167 [27,] 0.57383665 0.85232669 0.4261633 [28,] 0.63399747 0.73200507 0.3660025 [29,] 0.62504648 0.74990705 0.3749535 [30,] 0.58120710 0.83758580 0.4187929 [31,] 0.54926504 0.90146992 0.4507350 [32,] 0.63401498 0.73197004 0.3659850 [33,] 0.60269681 0.79460639 0.3973032 [34,] 0.55749378 0.88501243 0.4425062 [35,] 0.64404552 0.71190895 0.3559545 [36,] 0.61600100 0.76799801 0.3839990 [37,] 0.63920420 0.72159159 0.3607958 [38,] 0.58970397 0.82059207 0.4102960 [39,] 0.58044335 0.83911330 0.4195567 [40,] 0.69168947 0.61662106 0.3083105 [41,] 0.65049361 0.69901279 0.3495064 [42,] 0.63968567 0.72062866 0.3603143 [43,] 0.60117621 0.79764758 0.3988238 [44,] 0.56022331 0.87955339 0.4397767 [45,] 0.59654801 0.80690398 0.4034520 [46,] 0.56340956 0.87318088 0.4365904 [47,] 0.61489342 0.77021315 0.3851066 [48,] 0.58185544 0.83628911 0.4181446 [49,] 0.54213308 0.91573385 0.4578669 [50,] 0.51104165 0.97791669 0.4889583 [51,] 0.46396714 0.92793429 0.5360329 [52,] 0.42276228 0.84552455 0.5772377 [53,] 0.38985615 0.77971230 0.6101439 [54,] 0.35005359 0.70010717 0.6499464 [55,] 0.30927596 0.61855192 0.6907240 [56,] 0.34221487 0.68442974 0.6577851 [57,] 0.30078934 0.60157868 0.6992107 [58,] 0.31462219 0.62924438 0.6853778 [59,] 0.37672230 0.75344460 0.6232777 [60,] 0.45373581 0.90747162 0.5462642 [61,] 0.41517360 0.83034720 0.5848264 [62,] 0.39896243 0.79792486 0.6010376 [63,] 0.46580513 0.93161027 0.5341949 [64,] 0.42054722 0.84109444 0.5794528 [65,] 0.37942008 0.75884017 0.6205799 [66,] 0.34398795 0.68797589 0.6560121 [67,] 0.31194164 0.62388329 0.6880584 [68,] 0.28832232 0.57664465 0.7116777 [69,] 0.26576005 0.53152011 0.7342399 [70,] 0.22996366 0.45992733 0.7700363 [71,] 0.19760962 0.39521925 0.8023904 [72,] 0.17088970 0.34177941 0.8291103 [73,] 0.14992771 0.29985542 0.8500723 [74,] 0.24395880 0.48791760 0.7560412 [75,] 0.22576963 0.45153926 0.7742304 [76,] 0.19663052 0.39326105 0.8033695 [77,] 0.19863553 0.39727105 0.8013645 [78,] 0.19410909 0.38821818 0.8058909 [79,] 0.20156676 0.40313351 0.7984332 [80,] 0.18844161 0.37688322 0.8115584 [81,] 0.17629410 0.35258820 0.8237059 [82,] 0.18130859 0.36261719 0.8186914 [83,] 0.25855265 0.51710530 0.7414473 [84,] 0.22422775 0.44845549 0.7757723 [85,] 0.20747277 0.41494554 0.7925272 [86,] 0.17664701 0.35329401 0.8233530 [87,] 0.16186053 0.32372106 0.8381395 [88,] 0.16559595 0.33119190 0.8344041 [89,] 0.16737393 0.33474785 0.8326261 [90,] 0.16345764 0.32691528 0.8365424 [91,] 0.15634952 0.31269904 0.8436505 [92,] 0.15119867 0.30239734 0.8488013 [93,] 0.12481128 0.24962256 0.8751887 [94,] 0.10469077 0.20938154 0.8953092 [95,] 0.08483472 0.16966944 0.9151653 [96,] 0.06916770 0.13833539 0.9308323 [97,] 0.07399201 0.14798402 0.9260080 [98,] 0.06100521 0.12201042 0.9389948 [99,] 0.05390697 0.10781395 0.9460930 [100,] 0.04722097 0.09444194 0.9527790 [101,] 0.03639851 0.07279702 0.9636015 [102,] 0.03589926 0.07179852 0.9641007 [103,] 0.04521252 0.09042503 0.9547875 [104,] 0.18095568 0.36191137 0.8190443 [105,] 0.16505445 0.33010890 0.8349455 [106,] 0.59730723 0.80538554 0.4026928 [107,] 0.87451015 0.25097970 0.1254899 [108,] 0.84497946 0.31004108 0.1550205 [109,] 0.89463271 0.21073457 0.1053673 [110,] 0.87279444 0.25441112 0.1272056 [111,] 0.84768956 0.30462088 0.1523104 [112,] 0.87797171 0.24405658 0.1220283 [113,] 0.85767166 0.28465669 0.1423283 [114,] 0.82194940 0.35610120 0.1780506 [115,] 0.85040073 0.29919855 0.1495993 [116,] 0.81277596 0.37444809 0.1872240 [117,] 0.77727498 0.44545004 0.2227250 [118,] 0.73284830 0.53430339 0.2671517 [119,] 0.69903198 0.60193604 0.3009680 [120,] 0.65962555 0.68074891 0.3403745 [121,] 0.60399781 0.79200438 0.3960022 [122,] 0.54261801 0.91476399 0.4573820 [123,] 0.54139697 0.91720606 0.4586030 [124,] 0.54150731 0.91698539 0.4584927 [125,] 0.49201842 0.98403684 0.5079816 [126,] 0.44429851 0.88859701 0.5557015 [127,] 0.59684311 0.80631377 0.4031569 [128,] 0.56022554 0.87954893 0.4397745 [129,] 0.48806040 0.97612079 0.5119396 [130,] 0.50046575 0.99906851 0.4995343 [131,] 0.42867736 0.85735471 0.5713226 [132,] 0.39239474 0.78478949 0.6076053 [133,] 0.35789912 0.71579824 0.6421009 [134,] 0.41756606 0.83513212 0.5824339 [135,] 0.57095049 0.85809902 0.4290495 [136,] 0.49766194 0.99532387 0.5023381 [137,] 0.41681495 0.83362990 0.5831851 [138,] 0.41193437 0.82386874 0.5880656 [139,] 0.36046092 0.72092185 0.6395391 [140,] 0.25107121 0.50214242 0.7489288 [141,] 0.45656742 0.91313484 0.5434326 [142,] 0.38552134 0.77104268 0.6144787 > postscript(file="/var/www/html/rcomp/tmp/10i931290523793.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2b9961290523793.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3b9961290523793.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4b9961290523793.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5418r1290523793.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 = 159 Frequency = 1 1 2 3 4 5 0.9763823666 2.6036078927 5.7470136927 -1.2962579947 1.4613717147 6 7 8 9 10 -1.1227812852 2.4263973916 3.5431405418 -1.7937770437 -0.6696775852 11 12 13 14 15 -3.8153403514 -4.3938848920 -8.2200335337 -1.0860954232 3.5401774820 16 17 18 19 20 2.9251576179 0.9980567113 -2.5353293207 -2.0873202920 -1.0090508616 21 22 23 24 25 1.4311618221 -3.4545998179 -3.4295524471 -5.8367869290 -3.1800605325 26 27 28 29 30 0.5516474404 1.6719212671 -4.3532655212 0.1601700688 0.4307741263 31 32 33 34 35 -0.1649483335 2.7767830225 6.2997961151 6.8034404626 3.4169205823 36 37 38 39 40 4.5900504935 3.0532943958 -0.1062381096 1.9248364791 6.0569277951 41 42 43 44 45 -1.5286218564 1.5332905421 -5.5469105943 2.8944778297 4.3219606176 46 47 48 49 50 -0.3008968099 -3.4213727878 7.3389637701 -0.0045460490 3.3084486422 51 52 53 54 55 2.1545250387 -1.1588588067 -4.0575114630 -1.5269290284 3.2826097910 56 57 58 59 60 -1.3394958961 1.6874508155 2.2827475387 0.5058495286 -1.6462203516 61 62 63 64 65 1.7446404799 1.0796243914 0.6463798433 4.0149444162 0.4870938357 66 67 68 69 70 4.1791323236 -4.6010375215 5.5302378995 1.2640930548 2.6955964104 71 72 73 74 75 -4.9772106375 -0.5026773833 -0.4823128306 -1.3803773473 -0.6982731831 76 77 78 79 80 -2.2330812773 1.7545329313 -0.4516157407 -0.0320339448 0.9478235564 81 82 83 84 85 1.5769144201 -6.8630492301 -2.4391304477 1.0290867044 -3.3733623295 86 87 88 89 90 -3.1407040596 3.4761292782 2.1926157225 2.5638042116 -3.8970807780 91 92 93 94 95 -6.3435280898 -1.1915635510 -2.7459731473 -0.0165688176 -2.5510323826 96 97 98 99 100 3.3627551600 -3.6834795872 -3.3266944626 -3.2598174504 -3.2889468496 101 102 103 104 105 0.1604691858 -1.6492902960 -0.9576947617 -1.3255043731 -3.8525057494 106 107 108 109 110 -1.7741072251 -2.3006604066 -1.7496791060 -0.0682765809 -3.7664416322 111 112 113 114 115 -4.8510893512 -8.6429142941 2.5885512121 11.4379672881 9.7836753973 116 117 118 119 120 -0.9816944326 4.5046791857 1.5075697036 -1.2253187185 -3.8359413687 121 122 123 124 125 2.7857997819 0.1127776089 4.9052863630 -0.7722734892 0.8714456068 126 127 128 129 130 -1.6212243668 0.9295247123 1.2943260890 -1.9951676640 0.5178041485 131 132 133 134 135 3.4049069040 -4.2987397994 0.6234680488 -2.8107987511 -6.3793138773 136 137 138 139 140 1.9301456338 -0.0560620046 4.1333800962 -1.2168258710 3.4739826230 141 142 143 144 145 3.2659758087 4.1875940589 1.7843491256 1.0360535869 1.1072120377 146 147 148 149 150 4.0039327274 -0.3746950754 -0.0001409138 -7.1119616413 -2.6490195794 151 152 153 154 155 3.4250762718 0.3525167387 -2.6584752152 0.0174173182 1.9059838204 156 157 158 159 -1.7666852308 0.5598445773 0.1755629030 -6.7736200572 > postscript(file="/var/www/html/rcomp/tmp/6418r1290523793.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 = 159 Frequency = 1 lag(myerror, k = 1) myerror 0 0.9763823666 NA 1 2.6036078927 0.9763823666 2 5.7470136927 2.6036078927 3 -1.2962579947 5.7470136927 4 1.4613717147 -1.2962579947 5 -1.1227812852 1.4613717147 6 2.4263973916 -1.1227812852 7 3.5431405418 2.4263973916 8 -1.7937770437 3.5431405418 9 -0.6696775852 -1.7937770437 10 -3.8153403514 -0.6696775852 11 -4.3938848920 -3.8153403514 12 -8.2200335337 -4.3938848920 13 -1.0860954232 -8.2200335337 14 3.5401774820 -1.0860954232 15 2.9251576179 3.5401774820 16 0.9980567113 2.9251576179 17 -2.5353293207 0.9980567113 18 -2.0873202920 -2.5353293207 19 -1.0090508616 -2.0873202920 20 1.4311618221 -1.0090508616 21 -3.4545998179 1.4311618221 22 -3.4295524471 -3.4545998179 23 -5.8367869290 -3.4295524471 24 -3.1800605325 -5.8367869290 25 0.5516474404 -3.1800605325 26 1.6719212671 0.5516474404 27 -4.3532655212 1.6719212671 28 0.1601700688 -4.3532655212 29 0.4307741263 0.1601700688 30 -0.1649483335 0.4307741263 31 2.7767830225 -0.1649483335 32 6.2997961151 2.7767830225 33 6.8034404626 6.2997961151 34 3.4169205823 6.8034404626 35 4.5900504935 3.4169205823 36 3.0532943958 4.5900504935 37 -0.1062381096 3.0532943958 38 1.9248364791 -0.1062381096 39 6.0569277951 1.9248364791 40 -1.5286218564 6.0569277951 41 1.5332905421 -1.5286218564 42 -5.5469105943 1.5332905421 43 2.8944778297 -5.5469105943 44 4.3219606176 2.8944778297 45 -0.3008968099 4.3219606176 46 -3.4213727878 -0.3008968099 47 7.3389637701 -3.4213727878 48 -0.0045460490 7.3389637701 49 3.3084486422 -0.0045460490 50 2.1545250387 3.3084486422 51 -1.1588588067 2.1545250387 52 -4.0575114630 -1.1588588067 53 -1.5269290284 -4.0575114630 54 3.2826097910 -1.5269290284 55 -1.3394958961 3.2826097910 56 1.6874508155 -1.3394958961 57 2.2827475387 1.6874508155 58 0.5058495286 2.2827475387 59 -1.6462203516 0.5058495286 60 1.7446404799 -1.6462203516 61 1.0796243914 1.7446404799 62 0.6463798433 1.0796243914 63 4.0149444162 0.6463798433 64 0.4870938357 4.0149444162 65 4.1791323236 0.4870938357 66 -4.6010375215 4.1791323236 67 5.5302378995 -4.6010375215 68 1.2640930548 5.5302378995 69 2.6955964104 1.2640930548 70 -4.9772106375 2.6955964104 71 -0.5026773833 -4.9772106375 72 -0.4823128306 -0.5026773833 73 -1.3803773473 -0.4823128306 74 -0.6982731831 -1.3803773473 75 -2.2330812773 -0.6982731831 76 1.7545329313 -2.2330812773 77 -0.4516157407 1.7545329313 78 -0.0320339448 -0.4516157407 79 0.9478235564 -0.0320339448 80 1.5769144201 0.9478235564 81 -6.8630492301 1.5769144201 82 -2.4391304477 -6.8630492301 83 1.0290867044 -2.4391304477 84 -3.3733623295 1.0290867044 85 -3.1407040596 -3.3733623295 86 3.4761292782 -3.1407040596 87 2.1926157225 3.4761292782 88 2.5638042116 2.1926157225 89 -3.8970807780 2.5638042116 90 -6.3435280898 -3.8970807780 91 -1.1915635510 -6.3435280898 92 -2.7459731473 -1.1915635510 93 -0.0165688176 -2.7459731473 94 -2.5510323826 -0.0165688176 95 3.3627551600 -2.5510323826 96 -3.6834795872 3.3627551600 97 -3.3266944626 -3.6834795872 98 -3.2598174504 -3.3266944626 99 -3.2889468496 -3.2598174504 100 0.1604691858 -3.2889468496 101 -1.6492902960 0.1604691858 102 -0.9576947617 -1.6492902960 103 -1.3255043731 -0.9576947617 104 -3.8525057494 -1.3255043731 105 -1.7741072251 -3.8525057494 106 -2.3006604066 -1.7741072251 107 -1.7496791060 -2.3006604066 108 -0.0682765809 -1.7496791060 109 -3.7664416322 -0.0682765809 110 -4.8510893512 -3.7664416322 111 -8.6429142941 -4.8510893512 112 2.5885512121 -8.6429142941 113 11.4379672881 2.5885512121 114 9.7836753973 11.4379672881 115 -0.9816944326 9.7836753973 116 4.5046791857 -0.9816944326 117 1.5075697036 4.5046791857 118 -1.2253187185 1.5075697036 119 -3.8359413687 -1.2253187185 120 2.7857997819 -3.8359413687 121 0.1127776089 2.7857997819 122 4.9052863630 0.1127776089 123 -0.7722734892 4.9052863630 124 0.8714456068 -0.7722734892 125 -1.6212243668 0.8714456068 126 0.9295247123 -1.6212243668 127 1.2943260890 0.9295247123 128 -1.9951676640 1.2943260890 129 0.5178041485 -1.9951676640 130 3.4049069040 0.5178041485 131 -4.2987397994 3.4049069040 132 0.6234680488 -4.2987397994 133 -2.8107987511 0.6234680488 134 -6.3793138773 -2.8107987511 135 1.9301456338 -6.3793138773 136 -0.0560620046 1.9301456338 137 4.1333800962 -0.0560620046 138 -1.2168258710 4.1333800962 139 3.4739826230 -1.2168258710 140 3.2659758087 3.4739826230 141 4.1875940589 3.2659758087 142 1.7843491256 4.1875940589 143 1.0360535869 1.7843491256 144 1.1072120377 1.0360535869 145 4.0039327274 1.1072120377 146 -0.3746950754 4.0039327274 147 -0.0001409138 -0.3746950754 148 -7.1119616413 -0.0001409138 149 -2.6490195794 -7.1119616413 150 3.4250762718 -2.6490195794 151 0.3525167387 3.4250762718 152 -2.6584752152 0.3525167387 153 0.0174173182 -2.6584752152 154 1.9059838204 0.0174173182 155 -1.7666852308 1.9059838204 156 0.5598445773 -1.7666852308 157 0.1755629030 0.5598445773 158 -6.7736200572 0.1755629030 159 NA -6.7736200572 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 2.6036078927 0.9763823666 [2,] 5.7470136927 2.6036078927 [3,] -1.2962579947 5.7470136927 [4,] 1.4613717147 -1.2962579947 [5,] -1.1227812852 1.4613717147 [6,] 2.4263973916 -1.1227812852 [7,] 3.5431405418 2.4263973916 [8,] -1.7937770437 3.5431405418 [9,] -0.6696775852 -1.7937770437 [10,] -3.8153403514 -0.6696775852 [11,] -4.3938848920 -3.8153403514 [12,] -8.2200335337 -4.3938848920 [13,] -1.0860954232 -8.2200335337 [14,] 3.5401774820 -1.0860954232 [15,] 2.9251576179 3.5401774820 [16,] 0.9980567113 2.9251576179 [17,] -2.5353293207 0.9980567113 [18,] -2.0873202920 -2.5353293207 [19,] -1.0090508616 -2.0873202920 [20,] 1.4311618221 -1.0090508616 [21,] -3.4545998179 1.4311618221 [22,] -3.4295524471 -3.4545998179 [23,] -5.8367869290 -3.4295524471 [24,] -3.1800605325 -5.8367869290 [25,] 0.5516474404 -3.1800605325 [26,] 1.6719212671 0.5516474404 [27,] -4.3532655212 1.6719212671 [28,] 0.1601700688 -4.3532655212 [29,] 0.4307741263 0.1601700688 [30,] -0.1649483335 0.4307741263 [31,] 2.7767830225 -0.1649483335 [32,] 6.2997961151 2.7767830225 [33,] 6.8034404626 6.2997961151 [34,] 3.4169205823 6.8034404626 [35,] 4.5900504935 3.4169205823 [36,] 3.0532943958 4.5900504935 [37,] -0.1062381096 3.0532943958 [38,] 1.9248364791 -0.1062381096 [39,] 6.0569277951 1.9248364791 [40,] -1.5286218564 6.0569277951 [41,] 1.5332905421 -1.5286218564 [42,] -5.5469105943 1.5332905421 [43,] 2.8944778297 -5.5469105943 [44,] 4.3219606176 2.8944778297 [45,] -0.3008968099 4.3219606176 [46,] -3.4213727878 -0.3008968099 [47,] 7.3389637701 -3.4213727878 [48,] -0.0045460490 7.3389637701 [49,] 3.3084486422 -0.0045460490 [50,] 2.1545250387 3.3084486422 [51,] -1.1588588067 2.1545250387 [52,] -4.0575114630 -1.1588588067 [53,] -1.5269290284 -4.0575114630 [54,] 3.2826097910 -1.5269290284 [55,] -1.3394958961 3.2826097910 [56,] 1.6874508155 -1.3394958961 [57,] 2.2827475387 1.6874508155 [58,] 0.5058495286 2.2827475387 [59,] -1.6462203516 0.5058495286 [60,] 1.7446404799 -1.6462203516 [61,] 1.0796243914 1.7446404799 [62,] 0.6463798433 1.0796243914 [63,] 4.0149444162 0.6463798433 [64,] 0.4870938357 4.0149444162 [65,] 4.1791323236 0.4870938357 [66,] -4.6010375215 4.1791323236 [67,] 5.5302378995 -4.6010375215 [68,] 1.2640930548 5.5302378995 [69,] 2.6955964104 1.2640930548 [70,] -4.9772106375 2.6955964104 [71,] -0.5026773833 -4.9772106375 [72,] -0.4823128306 -0.5026773833 [73,] -1.3803773473 -0.4823128306 [74,] -0.6982731831 -1.3803773473 [75,] -2.2330812773 -0.6982731831 [76,] 1.7545329313 -2.2330812773 [77,] -0.4516157407 1.7545329313 [78,] -0.0320339448 -0.4516157407 [79,] 0.9478235564 -0.0320339448 [80,] 1.5769144201 0.9478235564 [81,] -6.8630492301 1.5769144201 [82,] -2.4391304477 -6.8630492301 [83,] 1.0290867044 -2.4391304477 [84,] -3.3733623295 1.0290867044 [85,] -3.1407040596 -3.3733623295 [86,] 3.4761292782 -3.1407040596 [87,] 2.1926157225 3.4761292782 [88,] 2.5638042116 2.1926157225 [89,] -3.8970807780 2.5638042116 [90,] -6.3435280898 -3.8970807780 [91,] -1.1915635510 -6.3435280898 [92,] -2.7459731473 -1.1915635510 [93,] -0.0165688176 -2.7459731473 [94,] -2.5510323826 -0.0165688176 [95,] 3.3627551600 -2.5510323826 [96,] -3.6834795872 3.3627551600 [97,] -3.3266944626 -3.6834795872 [98,] -3.2598174504 -3.3266944626 [99,] -3.2889468496 -3.2598174504 [100,] 0.1604691858 -3.2889468496 [101,] -1.6492902960 0.1604691858 [102,] -0.9576947617 -1.6492902960 [103,] -1.3255043731 -0.9576947617 [104,] -3.8525057494 -1.3255043731 [105,] -1.7741072251 -3.8525057494 [106,] -2.3006604066 -1.7741072251 [107,] -1.7496791060 -2.3006604066 [108,] -0.0682765809 -1.7496791060 [109,] -3.7664416322 -0.0682765809 [110,] -4.8510893512 -3.7664416322 [111,] -8.6429142941 -4.8510893512 [112,] 2.5885512121 -8.6429142941 [113,] 11.4379672881 2.5885512121 [114,] 9.7836753973 11.4379672881 [115,] -0.9816944326 9.7836753973 [116,] 4.5046791857 -0.9816944326 [117,] 1.5075697036 4.5046791857 [118,] -1.2253187185 1.5075697036 [119,] -3.8359413687 -1.2253187185 [120,] 2.7857997819 -3.8359413687 [121,] 0.1127776089 2.7857997819 [122,] 4.9052863630 0.1127776089 [123,] -0.7722734892 4.9052863630 [124,] 0.8714456068 -0.7722734892 [125,] -1.6212243668 0.8714456068 [126,] 0.9295247123 -1.6212243668 [127,] 1.2943260890 0.9295247123 [128,] -1.9951676640 1.2943260890 [129,] 0.5178041485 -1.9951676640 [130,] 3.4049069040 0.5178041485 [131,] -4.2987397994 3.4049069040 [132,] 0.6234680488 -4.2987397994 [133,] -2.8107987511 0.6234680488 [134,] -6.3793138773 -2.8107987511 [135,] 1.9301456338 -6.3793138773 [136,] -0.0560620046 1.9301456338 [137,] 4.1333800962 -0.0560620046 [138,] -1.2168258710 4.1333800962 [139,] 3.4739826230 -1.2168258710 [140,] 3.2659758087 3.4739826230 [141,] 4.1875940589 3.2659758087 [142,] 1.7843491256 4.1875940589 [143,] 1.0360535869 1.7843491256 [144,] 1.1072120377 1.0360535869 [145,] 4.0039327274 1.1072120377 [146,] -0.3746950754 4.0039327274 [147,] -0.0001409138 -0.3746950754 [148,] -7.1119616413 -0.0001409138 [149,] -2.6490195794 -7.1119616413 [150,] 3.4250762718 -2.6490195794 [151,] 0.3525167387 3.4250762718 [152,] -2.6584752152 0.3525167387 [153,] 0.0174173182 -2.6584752152 [154,] 1.9059838204 0.0174173182 [155,] -1.7666852308 1.9059838204 [156,] 0.5598445773 -1.7666852308 [157,] 0.1755629030 0.5598445773 [158,] -6.7736200572 0.1755629030 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 2.6036078927 0.9763823666 2 5.7470136927 2.6036078927 3 -1.2962579947 5.7470136927 4 1.4613717147 -1.2962579947 5 -1.1227812852 1.4613717147 6 2.4263973916 -1.1227812852 7 3.5431405418 2.4263973916 8 -1.7937770437 3.5431405418 9 -0.6696775852 -1.7937770437 10 -3.8153403514 -0.6696775852 11 -4.3938848920 -3.8153403514 12 -8.2200335337 -4.3938848920 13 -1.0860954232 -8.2200335337 14 3.5401774820 -1.0860954232 15 2.9251576179 3.5401774820 16 0.9980567113 2.9251576179 17 -2.5353293207 0.9980567113 18 -2.0873202920 -2.5353293207 19 -1.0090508616 -2.0873202920 20 1.4311618221 -1.0090508616 21 -3.4545998179 1.4311618221 22 -3.4295524471 -3.4545998179 23 -5.8367869290 -3.4295524471 24 -3.1800605325 -5.8367869290 25 0.5516474404 -3.1800605325 26 1.6719212671 0.5516474404 27 -4.3532655212 1.6719212671 28 0.1601700688 -4.3532655212 29 0.4307741263 0.1601700688 30 -0.1649483335 0.4307741263 31 2.7767830225 -0.1649483335 32 6.2997961151 2.7767830225 33 6.8034404626 6.2997961151 34 3.4169205823 6.8034404626 35 4.5900504935 3.4169205823 36 3.0532943958 4.5900504935 37 -0.1062381096 3.0532943958 38 1.9248364791 -0.1062381096 39 6.0569277951 1.9248364791 40 -1.5286218564 6.0569277951 41 1.5332905421 -1.5286218564 42 -5.5469105943 1.5332905421 43 2.8944778297 -5.5469105943 44 4.3219606176 2.8944778297 45 -0.3008968099 4.3219606176 46 -3.4213727878 -0.3008968099 47 7.3389637701 -3.4213727878 48 -0.0045460490 7.3389637701 49 3.3084486422 -0.0045460490 50 2.1545250387 3.3084486422 51 -1.1588588067 2.1545250387 52 -4.0575114630 -1.1588588067 53 -1.5269290284 -4.0575114630 54 3.2826097910 -1.5269290284 55 -1.3394958961 3.2826097910 56 1.6874508155 -1.3394958961 57 2.2827475387 1.6874508155 58 0.5058495286 2.2827475387 59 -1.6462203516 0.5058495286 60 1.7446404799 -1.6462203516 61 1.0796243914 1.7446404799 62 0.6463798433 1.0796243914 63 4.0149444162 0.6463798433 64 0.4870938357 4.0149444162 65 4.1791323236 0.4870938357 66 -4.6010375215 4.1791323236 67 5.5302378995 -4.6010375215 68 1.2640930548 5.5302378995 69 2.6955964104 1.2640930548 70 -4.9772106375 2.6955964104 71 -0.5026773833 -4.9772106375 72 -0.4823128306 -0.5026773833 73 -1.3803773473 -0.4823128306 74 -0.6982731831 -1.3803773473 75 -2.2330812773 -0.6982731831 76 1.7545329313 -2.2330812773 77 -0.4516157407 1.7545329313 78 -0.0320339448 -0.4516157407 79 0.9478235564 -0.0320339448 80 1.5769144201 0.9478235564 81 -6.8630492301 1.5769144201 82 -2.4391304477 -6.8630492301 83 1.0290867044 -2.4391304477 84 -3.3733623295 1.0290867044 85 -3.1407040596 -3.3733623295 86 3.4761292782 -3.1407040596 87 2.1926157225 3.4761292782 88 2.5638042116 2.1926157225 89 -3.8970807780 2.5638042116 90 -6.3435280898 -3.8970807780 91 -1.1915635510 -6.3435280898 92 -2.7459731473 -1.1915635510 93 -0.0165688176 -2.7459731473 94 -2.5510323826 -0.0165688176 95 3.3627551600 -2.5510323826 96 -3.6834795872 3.3627551600 97 -3.3266944626 -3.6834795872 98 -3.2598174504 -3.3266944626 99 -3.2889468496 -3.2598174504 100 0.1604691858 -3.2889468496 101 -1.6492902960 0.1604691858 102 -0.9576947617 -1.6492902960 103 -1.3255043731 -0.9576947617 104 -3.8525057494 -1.3255043731 105 -1.7741072251 -3.8525057494 106 -2.3006604066 -1.7741072251 107 -1.7496791060 -2.3006604066 108 -0.0682765809 -1.7496791060 109 -3.7664416322 -0.0682765809 110 -4.8510893512 -3.7664416322 111 -8.6429142941 -4.8510893512 112 2.5885512121 -8.6429142941 113 11.4379672881 2.5885512121 114 9.7836753973 11.4379672881 115 -0.9816944326 9.7836753973 116 4.5046791857 -0.9816944326 117 1.5075697036 4.5046791857 118 -1.2253187185 1.5075697036 119 -3.8359413687 -1.2253187185 120 2.7857997819 -3.8359413687 121 0.1127776089 2.7857997819 122 4.9052863630 0.1127776089 123 -0.7722734892 4.9052863630 124 0.8714456068 -0.7722734892 125 -1.6212243668 0.8714456068 126 0.9295247123 -1.6212243668 127 1.2943260890 0.9295247123 128 -1.9951676640 1.2943260890 129 0.5178041485 -1.9951676640 130 3.4049069040 0.5178041485 131 -4.2987397994 3.4049069040 132 0.6234680488 -4.2987397994 133 -2.8107987511 0.6234680488 134 -6.3793138773 -2.8107987511 135 1.9301456338 -6.3793138773 136 -0.0560620046 1.9301456338 137 4.1333800962 -0.0560620046 138 -1.2168258710 4.1333800962 139 3.4739826230 -1.2168258710 140 3.2659758087 3.4739826230 141 4.1875940589 3.2659758087 142 1.7843491256 4.1875940589 143 1.0360535869 1.7843491256 144 1.1072120377 1.0360535869 145 4.0039327274 1.1072120377 146 -0.3746950754 4.0039327274 147 -0.0001409138 -0.3746950754 148 -7.1119616413 -0.0001409138 149 -2.6490195794 -7.1119616413 150 3.4250762718 -2.6490195794 151 0.3525167387 3.4250762718 152 -2.6584752152 0.3525167387 153 0.0174173182 -2.6584752152 154 1.9059838204 0.0174173182 155 -1.7666852308 1.9059838204 156 0.5598445773 -1.7666852308 157 0.1755629030 0.5598445773 158 -6.7736200572 0.1755629030 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7fapc1290523793.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/8fapc1290523793.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/9pjow1290523793.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/10pjow1290523793.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/11s15k1290523793.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/12w23q1290523793.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/133l021290523793.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/14vc051290523793.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/154ynz1290523793.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/16dne11290523793.tab") + } > > try(system("convert tmp/10i931290523793.ps tmp/10i931290523793.png",intern=TRUE)) character(0) > try(system("convert tmp/2b9961290523793.ps tmp/2b9961290523793.png",intern=TRUE)) character(0) > try(system("convert tmp/3b9961290523793.ps tmp/3b9961290523793.png",intern=TRUE)) character(0) > try(system("convert tmp/4b9961290523793.ps tmp/4b9961290523793.png",intern=TRUE)) character(0) > try(system("convert tmp/5418r1290523793.ps tmp/5418r1290523793.png",intern=TRUE)) character(0) > try(system("convert tmp/6418r1290523793.ps tmp/6418r1290523793.png",intern=TRUE)) character(0) > try(system("convert tmp/7fapc1290523793.ps tmp/7fapc1290523793.png",intern=TRUE)) character(0) > try(system("convert tmp/8fapc1290523793.ps tmp/8fapc1290523793.png",intern=TRUE)) character(0) > try(system("convert tmp/9pjow1290523793.ps tmp/9pjow1290523793.png",intern=TRUE)) character(0) > try(system("convert tmp/10pjow1290523793.ps tmp/10pjow1290523793.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.048 1.761 10.803