R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) 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(32 + ,33 + ,16 + ,11 + ,18 + ,7 + ,66 + ,31 + ,31 + ,16 + ,12 + ,11 + ,14 + ,68 + ,39 + ,38 + ,19 + ,13 + ,14 + ,12 + ,54 + ,37 + ,39 + ,16 + ,11 + ,12 + ,14 + ,56 + ,39 + ,32 + ,17 + ,9 + ,17 + ,11 + ,86 + ,41 + ,32 + ,17 + ,13 + ,9 + ,9 + ,80 + ,36 + ,35 + ,16 + ,10 + ,16 + ,11 + ,76 + ,33 + ,37 + ,15 + ,14 + ,14 + ,15 + ,69 + ,33 + ,33 + ,16 + ,12 + ,15 + ,14 + ,78 + ,34 + ,33 + ,14 + ,10 + ,11 + ,13 + ,67 + ,31 + ,28 + ,15 + ,12 + ,16 + ,9 + ,80 + ,27 + ,32 + ,12 + ,8 + ,13 + ,15 + ,54 + ,37 + ,31 + ,14 + ,10 + ,17 + ,10 + ,71 + ,34 + ,37 + ,16 + ,12 + ,15 + ,11 + ,84 + ,34 + ,30 + ,14 + ,12 + ,14 + ,13 + ,74 + ,32 + ,33 + ,7 + ,7 + ,16 + ,8 + ,71 + ,29 + ,31 + ,10 + ,6 + ,9 + ,20 + ,63 + ,36 + ,33 + ,14 + ,12 + ,15 + ,12 + ,71 + ,29 + ,31 + ,16 + ,10 + ,17 + ,10 + ,76 + ,35 + ,33 + ,16 + ,10 + ,13 + ,10 + ,69 + ,37 + ,32 + ,16 + ,10 + ,15 + ,9 + ,74 + ,34 + ,33 + ,14 + ,12 + ,16 + ,14 + ,75 + ,38 + ,32 + ,20 + ,15 + ,16 + ,8 + ,54 + ,35 + ,33 + ,14 + ,10 + ,12 + ,14 + ,52 + ,38 + ,28 + ,14 + ,10 + ,12 + ,11 + ,69 + ,37 + ,35 + ,11 + ,12 + ,11 + ,13 + ,68 + ,38 + ,39 + ,14 + ,13 + ,15 + ,9 + ,65 + ,33 + ,34 + ,15 + ,11 + ,15 + ,11 + ,75 + ,36 + ,38 + ,16 + ,11 + ,17 + ,15 + ,74 + ,38 + ,32 + ,14 + ,12 + ,13 + ,11 + ,75 + ,32 + ,38 + ,16 + ,14 + ,16 + ,10 + ,72 + ,32 + ,30 + ,14 + ,10 + ,14 + ,14 + ,67 + ,32 + ,33 + ,12 + ,12 + ,11 + ,18 + ,63 + ,34 + ,38 + ,16 + ,13 + ,12 + ,14 + ,62 + ,32 + ,32 + ,9 + ,5 + ,12 + ,11 + ,63 + ,37 + ,32 + ,14 + ,6 + ,15 + ,12 + ,76 + ,39 + ,34 + ,16 + ,12 + ,16 + ,13 + ,74 + ,29 + ,34 + ,16 + ,12 + ,15 + ,9 + ,67 + ,37 + ,36 + ,15 + ,11 + ,12 + ,10 + ,73 + ,35 + ,34 + ,16 + ,10 + ,12 + ,15 + ,70 + ,30 + ,28 + ,12 + ,7 + ,8 + ,20 + ,53 + ,38 + ,34 + ,16 + ,12 + ,13 + ,12 + ,77 + ,34 + ,35 + ,16 + ,14 + ,11 + ,12 + ,77 + ,31 + ,35 + ,14 + ,11 + ,14 + ,14 + ,52 + ,34 + ,31 + ,16 + ,12 + ,15 + ,13 + ,54 + ,35 + ,37 + ,17 + ,13 + ,10 + ,11 + ,80 + ,36 + ,35 + ,18 + ,14 + ,11 + ,17 + ,66 + ,30 + ,27 + ,18 + ,11 + ,12 + ,12 + ,73 + ,39 + ,40 + ,12 + ,12 + ,15 + ,13 + ,63 + ,35 + ,37 + ,16 + ,12 + ,15 + ,14 + ,69 + ,38 + ,36 + ,10 + ,8 + ,14 + ,13 + ,67 + ,31 + ,38 + ,14 + ,11 + ,16 + ,15 + ,54 + ,34 + ,39 + ,18 + ,14 + ,15 + ,13 + ,81 + ,38 + ,41 + ,18 + ,14 + ,15 + ,10 + ,69 + ,34 + ,27 + ,16 + ,12 + ,13 + ,11 + ,84 + ,39 + ,30 + ,17 + ,9 + ,12 + ,19 + ,80 + ,37 + ,37 + ,16 + ,13 + ,17 + ,13 + ,70 + ,34 + ,31 + ,16 + ,11 + ,13 + ,17 + ,69 + ,28 + ,31 + ,13 + ,12 + ,15 + ,13 + ,77 + ,37 + ,27 + ,16 + ,12 + ,13 + ,9 + ,54 + ,33 + ,36 + ,16 + ,12 + ,15 + ,11 + ,79 + ,37 + ,38 + ,20 + ,12 + ,16 + ,10 + ,30 + ,35 + ,37 + ,16 + ,12 + ,15 + ,9 + ,71 + ,37 + ,33 + ,15 + ,12 + ,16 + ,12 + ,73 + ,32 + ,34 + ,15 + ,11 + ,15 + ,12 + ,72 + ,33 + ,31 + ,16 + ,10 + ,14 + ,13 + ,77 + ,38 + ,39 + ,14 + ,9 + ,15 + ,13 + ,75 + ,33 + ,34 + ,16 + ,12 + ,14 + ,12 + ,69 + ,29 + ,32 + ,16 + ,12 + ,13 + ,15 + ,54 + ,33 + ,33 + ,15 + ,12 + ,7 + ,22 + ,70 + ,31 + ,36 + ,12 + ,9 + ,17 + ,13 + ,73 + ,36 + ,32 + ,17 + ,15 + ,13 + ,15 + ,54 + ,35 + ,41 + ,16 + ,12 + ,15 + ,13 + ,77 + ,32 + ,28 + ,15 + ,12 + ,14 + ,15 + ,82 + ,29 + ,30 + ,13 + ,12 + ,13 + ,10 + ,80 + ,39 + ,36 + ,16 + ,10 + ,16 + ,11 + ,80 + ,37 + ,35 + ,16 + ,13 + ,12 + ,16 + ,69 + ,35 + ,31 + ,16 + ,9 + ,14 + ,11 + ,78 + ,37 + ,34 + ,16 + ,12 + ,17 + ,11 + ,81 + ,32 + ,36 + ,14 + ,10 + ,15 + ,10 + ,76 + ,38 + ,36 + ,16 + ,14 + ,17 + ,10 + ,76 + ,37 + ,35 + ,16 + ,11 + ,12 + ,16 + ,73 + ,36 + ,37 + ,20 + ,15 + ,16 + ,12 + ,85 + ,32 + ,28 + ,15 + ,11 + ,11 + ,11 + ,66 + ,33 + ,39 + ,16 + ,11 + ,15 + ,16 + ,79 + ,40 + ,32 + ,13 + ,12 + ,9 + ,19 + ,68 + ,38 + ,35 + ,17 + ,12 + ,16 + ,11 + ,76 + ,41 + ,39 + ,16 + ,12 + ,15 + ,16 + ,71 + ,36 + ,35 + ,16 + ,11 + ,10 + ,15 + ,54 + ,43 + ,42 + ,12 + ,7 + ,10 + ,24 + ,46 + ,30 + ,34 + ,16 + ,12 + ,15 + ,14 + ,82 + ,31 + ,33 + ,16 + ,14 + ,11 + ,15 + ,74 + ,32 + ,41 + ,17 + ,11 + ,13 + ,11 + ,88 + ,32 + ,33 + ,13 + ,11 + ,14 + ,15 + ,38 + ,37 + ,34 + ,12 + ,10 + ,18 + ,12 + ,76 + ,37 + ,32 + ,18 + ,13 + ,16 + ,10 + ,86 + ,33 + ,40 + ,14 + ,13 + ,14 + ,14 + ,54 + ,34 + ,40 + ,14 + ,8 + ,14 + ,13 + ,70 + ,33 + ,35 + ,13 + ,11 + ,14 + ,9 + ,69 + ,38 + ,36 + ,16 + ,12 + ,14 + ,15 + ,90 + ,33 + ,37 + ,13 + ,11 + ,12 + ,15 + ,54 + ,31 + ,27 + ,16 + ,13 + ,14 + ,14 + ,76 + ,38 + ,39 + ,13 + ,12 + ,15 + ,11 + ,89 + ,37 + ,38 + ,16 + ,14 + ,15 + ,8 + ,76 + ,33 + ,31 + ,15 + ,13 + ,15 + ,11 + ,73 + ,31 + ,33 + ,16 + ,15 + ,13 + ,11 + ,79 + ,39 + ,32 + ,15 + ,10 + ,17 + ,8 + ,90 + ,44 + ,39 + ,17 + ,11 + ,17 + ,10 + ,74 + ,33 + ,36 + ,15 + ,9 + ,19 + ,11 + ,81 + ,35 + ,33 + ,12 + ,11 + ,15 + ,13 + ,72 + ,32 + ,33 + ,16 + ,10 + ,13 + ,11 + ,71 + ,28 + ,32 + ,10 + ,11 + ,9 + ,20 + ,66 + ,40 + ,37 + ,16 + ,8 + ,15 + ,10 + ,77 + ,27 + ,30 + ,12 + ,11 + ,15 + ,15 + ,65 + ,37 + ,38 + ,14 + ,12 + ,15 + ,12 + ,74 + ,32 + ,29 + ,15 + ,12 + ,16 + ,14 + ,82 + ,28 + ,22 + ,13 + ,9 + ,11 + ,23 + ,54 + ,34 + ,35 + ,15 + ,11 + ,14 + ,14 + ,63 + ,30 + ,35 + ,11 + ,10 + ,11 + ,16 + ,54 + ,35 + ,34 + ,12 + ,8 + ,15 + ,11 + ,64 + ,31 + ,35 + ,8 + ,9 + ,13 + ,12 + ,69 + ,32 + ,34 + ,16 + ,8 + ,15 + ,10 + ,54 + ,30 + ,34 + ,15 + ,9 + ,16 + ,14 + ,84 + ,30 + ,35 + ,17 + ,15 + ,14 + ,12 + ,86 + ,31 + ,23 + ,16 + ,11 + ,15 + ,12 + ,77 + ,40 + ,31 + ,10 + ,8 + ,16 + ,11 + ,89 + ,32 + ,27 + ,18 + ,13 + ,16 + ,12 + ,76 + ,36 + ,36 + ,13 + ,12 + ,11 + ,13 + ,60 + ,32 + ,31 + ,16 + ,12 + ,12 + ,11 + ,75 + ,35 + ,32 + ,13 + ,9 + ,9 + ,19 + ,73 + ,38 + ,39 + ,10 + ,7 + ,16 + ,12 + ,85 + ,42 + ,37 + ,15 + ,13 + ,13 + ,17 + ,79 + ,34 + ,38 + ,16 + ,9 + ,16 + ,9 + ,71 + ,35 + ,39 + ,16 + ,6 + ,12 + ,12 + ,72 + ,35 + ,34 + ,14 + ,8 + ,9 + ,19 + ,69 + ,33 + ,31 + ,10 + ,8 + ,13 + ,18 + ,78 + ,36 + ,32 + ,17 + ,15 + ,13 + ,15 + ,54 + ,32 + ,37 + ,13 + ,6 + ,14 + ,14 + ,69 + ,33 + ,36 + ,15 + ,9 + ,19 + ,11 + ,81 + ,34 + ,32 + ,16 + ,11 + ,13 + ,9 + ,84 + ,32 + ,35 + ,12 + ,8 + ,12 + ,18 + ,84 + ,34 + ,36 + ,13 + ,8 + ,13 + ,16 + ,69) + ,dim=c(7 + ,142) + ,dimnames=list(c('Connected' + ,'Separate' + ,'Learning' + ,'Software' + ,'Happiness' + ,'Depression' + ,'Belonging') + ,1:142)) > y <- array(NA,dim=c(7,142),dimnames=list(c('Connected','Separate','Learning','Software','Happiness','Depression','Belonging'),1:142)) > 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 = '3' > par3 <- 'Linear Trend' > par2 <- 'Do not include Seasonal Dummies' > par1 <- '3' > #'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, 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 Learning Connected Separate Software Happiness Depression Belonging t 1 16 32 33 11 18 7 66 1 2 16 31 31 12 11 14 68 2 3 19 39 38 13 14 12 54 3 4 16 37 39 11 12 14 56 4 5 17 39 32 9 17 11 86 5 6 17 41 32 13 9 9 80 6 7 16 36 35 10 16 11 76 7 8 15 33 37 14 14 15 69 8 9 16 33 33 12 15 14 78 9 10 14 34 33 10 11 13 67 10 11 15 31 28 12 16 9 80 11 12 12 27 32 8 13 15 54 12 13 14 37 31 10 17 10 71 13 14 16 34 37 12 15 11 84 14 15 14 34 30 12 14 13 74 15 16 7 32 33 7 16 8 71 16 17 10 29 31 6 9 20 63 17 18 14 36 33 12 15 12 71 18 19 16 29 31 10 17 10 76 19 20 16 35 33 10 13 10 69 20 21 16 37 32 10 15 9 74 21 22 14 34 33 12 16 14 75 22 23 20 38 32 15 16 8 54 23 24 14 35 33 10 12 14 52 24 25 14 38 28 10 12 11 69 25 26 11 37 35 12 11 13 68 26 27 14 38 39 13 15 9 65 27 28 15 33 34 11 15 11 75 28 29 16 36 38 11 17 15 74 29 30 14 38 32 12 13 11 75 30 31 16 32 38 14 16 10 72 31 32 14 32 30 10 14 14 67 32 33 12 32 33 12 11 18 63 33 34 16 34 38 13 12 14 62 34 35 9 32 32 5 12 11 63 35 36 14 37 32 6 15 12 76 36 37 16 39 34 12 16 13 74 37 38 16 29 34 12 15 9 67 38 39 15 37 36 11 12 10 73 39 40 16 35 34 10 12 15 70 40 41 12 30 28 7 8 20 53 41 42 16 38 34 12 13 12 77 42 43 16 34 35 14 11 12 77 43 44 14 31 35 11 14 14 52 44 45 16 34 31 12 15 13 54 45 46 17 35 37 13 10 11 80 46 47 18 36 35 14 11 17 66 47 48 18 30 27 11 12 12 73 48 49 12 39 40 12 15 13 63 49 50 16 35 37 12 15 14 69 50 51 10 38 36 8 14 13 67 51 52 14 31 38 11 16 15 54 52 53 18 34 39 14 15 13 81 53 54 18 38 41 14 15 10 69 54 55 16 34 27 12 13 11 84 55 56 17 39 30 9 12 19 80 56 57 16 37 37 13 17 13 70 57 58 16 34 31 11 13 17 69 58 59 13 28 31 12 15 13 77 59 60 16 37 27 12 13 9 54 60 61 16 33 36 12 15 11 79 61 62 20 37 38 12 16 10 30 62 63 16 35 37 12 15 9 71 63 64 15 37 33 12 16 12 73 64 65 15 32 34 11 15 12 72 65 66 16 33 31 10 14 13 77 66 67 14 38 39 9 15 13 75 67 68 16 33 34 12 14 12 69 68 69 16 29 32 12 13 15 54 69 70 15 33 33 12 7 22 70 70 71 12 31 36 9 17 13 73 71 72 17 36 32 15 13 15 54 72 73 16 35 41 12 15 13 77 73 74 15 32 28 12 14 15 82 74 75 13 29 30 12 13 10 80 75 76 16 39 36 10 16 11 80 76 77 16 37 35 13 12 16 69 77 78 16 35 31 9 14 11 78 78 79 16 37 34 12 17 11 81 79 80 14 32 36 10 15 10 76 80 81 16 38 36 14 17 10 76 81 82 16 37 35 11 12 16 73 82 83 20 36 37 15 16 12 85 83 84 15 32 28 11 11 11 66 84 85 16 33 39 11 15 16 79 85 86 13 40 32 12 9 19 68 86 87 17 38 35 12 16 11 76 87 88 16 41 39 12 15 16 71 88 89 16 36 35 11 10 15 54 89 90 12 43 42 7 10 24 46 90 91 16 30 34 12 15 14 82 91 92 16 31 33 14 11 15 74 92 93 17 32 41 11 13 11 88 93 94 13 32 33 11 14 15 38 94 95 12 37 34 10 18 12 76 95 96 18 37 32 13 16 10 86 96 97 14 33 40 13 14 14 54 97 98 14 34 40 8 14 13 70 98 99 13 33 35 11 14 9 69 99 100 16 38 36 12 14 15 90 100 101 13 33 37 11 12 15 54 101 102 16 31 27 13 14 14 76 102 103 13 38 39 12 15 11 89 103 104 16 37 38 14 15 8 76 104 105 15 33 31 13 15 11 73 105 106 16 31 33 15 13 11 79 106 107 15 39 32 10 17 8 90 107 108 17 44 39 11 17 10 74 108 109 15 33 36 9 19 11 81 109 110 12 35 33 11 15 13 72 110 111 16 32 33 10 13 11 71 111 112 10 28 32 11 9 20 66 112 113 16 40 37 8 15 10 77 113 114 12 27 30 11 15 15 65 114 115 14 37 38 12 15 12 74 115 116 15 32 29 12 16 14 82 116 117 13 28 22 9 11 23 54 117 118 15 34 35 11 14 14 63 118 119 11 30 35 10 11 16 54 119 120 12 35 34 8 15 11 64 120 121 8 31 35 9 13 12 69 121 122 16 32 34 8 15 10 54 122 123 15 30 34 9 16 14 84 123 124 17 30 35 15 14 12 86 124 125 16 31 23 11 15 12 77 125 126 10 40 31 8 16 11 89 126 127 18 32 27 13 16 12 76 127 128 13 36 36 12 11 13 60 128 129 16 32 31 12 12 11 75 129 130 13 35 32 9 9 19 73 130 131 10 38 39 7 16 12 85 131 132 15 42 37 13 13 17 79 132 133 16 34 38 9 16 9 71 133 134 16 35 39 6 12 12 72 134 135 14 35 34 8 9 19 69 135 136 10 33 31 8 13 18 78 136 137 17 36 32 15 13 15 54 137 138 13 32 37 6 14 14 69 138 139 15 33 36 9 19 11 81 139 140 16 34 32 11 13 9 84 140 141 12 32 35 8 12 18 84 141 142 13 34 36 8 13 16 69 142 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Connected Separate Software Happiness Depression 5.708987 0.105960 -0.026002 0.575965 0.070893 -0.082961 Belonging t 0.003033 -0.001739 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -5.9315 -1.1536 0.2057 1.1058 4.3002 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 5.708987 2.768472 2.062 0.0411 * Connected 0.105960 0.049787 2.128 0.0351 * Separate -0.026002 0.046659 -0.557 0.5783 Software 0.575965 0.074183 7.764 1.89e-12 *** Happiness 0.070893 0.084953 0.835 0.4055 Depression -0.082961 0.063030 -1.316 0.1903 Belonging 0.003033 0.015782 0.192 0.8479 t -0.001739 0.003932 -0.442 0.6590 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.82 on 134 degrees of freedom Multiple R-squared: 0.3915, Adjusted R-squared: 0.3598 F-statistic: 12.32 on 7 and 134 DF, p-value: 4.184e-12 > 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.05300644 0.10601287 0.9469936 [2,] 0.01583512 0.03167024 0.9841649 [3,] 0.04646792 0.09293584 0.9535321 [4,] 0.05096336 0.10192672 0.9490366 [5,] 0.02341275 0.04682550 0.9765872 [6,] 0.29784000 0.59567999 0.7021600 [7,] 0.21454137 0.42908273 0.7854586 [8,] 0.15189159 0.30378318 0.8481084 [9,] 0.60378866 0.79242268 0.3962113 [10,] 0.76120902 0.47758197 0.2387910 [11,] 0.75617932 0.48764136 0.2438207 [12,] 0.71155370 0.57689260 0.2884463 [13,] 0.69961167 0.60077666 0.3003883 [14,] 0.62969398 0.74061204 0.3703060 [15,] 0.56278344 0.87443313 0.4372166 [16,] 0.73304236 0.53391528 0.2669576 [17,] 0.70250841 0.59498318 0.2974916 [18,] 0.71537030 0.56925940 0.2846297 [19,] 0.71080412 0.57839177 0.2891959 [20,] 0.67375422 0.65249156 0.3262458 [21,] 0.63536790 0.72926421 0.3646321 [22,] 0.59425752 0.81148497 0.4057425 [23,] 0.58829985 0.82340029 0.4117001 [24,] 0.58574878 0.82850245 0.4142512 [25,] 0.57229588 0.85540825 0.4277041 [26,] 0.61890610 0.76218779 0.3810939 [27,] 0.56074831 0.87850338 0.4392517 [28,] 0.59008002 0.81983997 0.4099200 [29,] 0.55654743 0.88690514 0.4434526 [30,] 0.61126292 0.77747416 0.3887371 [31,] 0.58865733 0.82268535 0.4113427 [32,] 0.53900841 0.92198318 0.4609916 [33,] 0.49242158 0.98484316 0.5075784 [34,] 0.43941220 0.87882440 0.5605878 [35,] 0.38729459 0.77458918 0.6127054 [36,] 0.38507084 0.77014168 0.6149292 [37,] 0.37218570 0.74437139 0.6278143 [38,] 0.50301370 0.99397259 0.4969863 [39,] 0.64938601 0.70122798 0.3506140 [40,] 0.60673433 0.78653133 0.3932657 [41,] 0.70482624 0.59034752 0.2951738 [42,] 0.66323551 0.67352898 0.3367645 [43,] 0.64622983 0.70754035 0.3537702 [44,] 0.61805201 0.76389597 0.3819480 [45,] 0.56903895 0.86192211 0.4309611 [46,] 0.63450207 0.73099586 0.3654979 [47,] 0.58992321 0.82015358 0.4100768 [48,] 0.55631747 0.88736505 0.4436825 [49,] 0.58465093 0.83069813 0.4153491 [50,] 0.53648197 0.92703605 0.4635180 [51,] 0.49119603 0.98239207 0.5088040 [52,] 0.69293377 0.61413246 0.3070662 [53,] 0.64826842 0.70346317 0.3517316 [54,] 0.62263419 0.75473162 0.3773658 [55,] 0.57430171 0.85139658 0.4256983 [56,] 0.55824361 0.88351277 0.4417564 [57,] 0.50974250 0.98051499 0.4902575 [58,] 0.46177804 0.92355609 0.5382220 [59,] 0.43035731 0.86071462 0.5696427 [60,] 0.38945125 0.77890251 0.6105487 [61,] 0.37693608 0.75387215 0.6230639 [62,] 0.35013878 0.70027756 0.6498612 [63,] 0.31018253 0.62036505 0.6898175 [64,] 0.27238529 0.54477059 0.7276147 [65,] 0.30060441 0.60120881 0.6993956 [66,] 0.26677047 0.53354095 0.7332295 [67,] 0.22984084 0.45968169 0.7701592 [68,] 0.22667258 0.45334516 0.7733274 [69,] 0.19134621 0.38269243 0.8086538 [70,] 0.16231146 0.32462292 0.8376885 [71,] 0.15058458 0.30116916 0.8494154 [72,] 0.13410446 0.26820893 0.8658955 [73,] 0.16262458 0.32524916 0.8373754 [74,] 0.13322244 0.26644487 0.8667776 [75,] 0.12847905 0.25695810 0.8715210 [76,] 0.14606349 0.29212699 0.8539365 [77,] 0.12729448 0.25458895 0.8727055 [78,] 0.11025404 0.22050808 0.8897460 [79,] 0.10640995 0.21281991 0.8935900 [80,] 0.10054005 0.20108011 0.8994599 [81,] 0.08953529 0.17907059 0.9104647 [82,] 0.07493834 0.14987668 0.9250617 [83,] 0.10681613 0.21363226 0.8931839 [84,] 0.09272547 0.18545095 0.9072745 [85,] 0.11380703 0.22761405 0.8861930 [86,] 0.11414218 0.22828436 0.8858578 [87,] 0.09843863 0.19687726 0.9015614 [88,] 0.09707297 0.19414595 0.9029270 [89,] 0.09186070 0.18372139 0.9081393 [90,] 0.10281825 0.20563650 0.8971818 [91,] 0.08346294 0.16692588 0.9165371 [92,] 0.07281814 0.14563628 0.9271819 [93,] 0.07371805 0.14743610 0.9262819 [94,] 0.05760477 0.11520954 0.9423952 [95,] 0.04470767 0.08941534 0.9552923 [96,] 0.03374715 0.06749430 0.9662528 [97,] 0.02412967 0.04825935 0.9758703 [98,] 0.02449912 0.04899825 0.9755009 [99,] 0.02373296 0.04746593 0.9762670 [100,] 0.02481328 0.04962656 0.9751867 [101,] 0.02934011 0.05868023 0.9706599 [102,] 0.03157134 0.06314268 0.9684287 [103,] 0.07492238 0.14984475 0.9250776 [104,] 0.07646278 0.15292556 0.9235372 [105,] 0.06004385 0.12008771 0.9399561 [106,] 0.04536899 0.09073799 0.9546310 [107,] 0.03465715 0.06931430 0.9653429 [108,] 0.03145648 0.06291297 0.9685435 [109,] 0.03071021 0.06142041 0.9692898 [110,] 0.02093864 0.04187729 0.9790614 [111,] 0.39839834 0.79679668 0.6016017 [112,] 0.35572231 0.71144463 0.6442777 [113,] 0.31516254 0.63032508 0.6848375 [114,] 0.24673755 0.49347510 0.7532624 [115,] 0.20102456 0.40204912 0.7989754 [116,] 0.20154715 0.40309430 0.7984528 [117,] 0.30701254 0.61402509 0.6929875 [118,] 0.68418223 0.63163555 0.3158178 [119,] 0.58792125 0.82415750 0.4120787 [120,] 0.44601292 0.89202583 0.5539871 [121,] 0.69193527 0.61612946 0.3080647 > postscript(file="/var/fisher/rcomp/tmp/1pk4f1351787090.ps",horizontal=F,onefile=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/fisher/rcomp/tmp/2h1kt1351787090.ps",horizontal=F,onefile=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/fisher/rcomp/tmp/3nzpf1351787090.ps",horizontal=F,onefile=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/fisher/rcomp/tmp/4twle1351787090.ps",horizontal=F,onefile=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/fisher/rcomp/tmp/5npdv1351787090.ps",horizontal=F,onefile=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 = 142 Frequency = 1 1 2 3 4 5 0.5289553156 1.0795990914 2.5035691283 1.1968018488 2.2621985144 6 7 8 9 10 0.1675795984 1.1868194692 -1.2505572311 0.6179530299 -0.1003623054 11 12 13 14 15 -0.7884232948 -0.1656729948 -1.1514025374 0.3576140338 -1.5555138193 16 17 18 19 20 -5.9315173474 -0.5718883105 -1.8289659322 1.6915435314 1.4143322013 21 22 23 24 25 0.9382373601 -1.5271938788 1.8627369129 -0.1244126364 -0.8710066156 26 27 28 29 30 -4.4933771057 -2.6758735959 0.0131765787 0.9941346811 -1.9993260747 31 32 33 34 35 -0.6442899319 -0.0579091854 -2.5734388857 0.3707202670 -2.2158279027 36 37 38 39 40 1.5109995663 -0.0848336501 0.7367822704 -0.2037450262 1.9577792436 41 42 43 44 45 0.8111408656 0.1504403547 -0.4081239160 -0.3315420803 0.5124252623 46 47 48 49 50 1.0979350485 1.8350815137 3.4855294725 -3.8036983178 0.6086367541 51 52 53 54 55 -3.4356465732 -0.3045161962 1.5005292578 0.9179464812 0.3106808823 56 57 58 59 60 3.3352360577 -0.3948552598 1.5391321862 -1.8972308965 -0.0734340278 61 62 63 64 65 0.5344695089 4.1591382792 0.2103721536 -0.9318914873 0.2755389675 66 67 68 69 70 1.8079670001 -0.0009399937 0.6788235176 1.4176696416 0.9791297322 71 72 73 74 75 -1.4659920694 -0.0467263022 0.6454152453 -0.1513400589 -2.1175645148 76 77 78 79 80 1.0028001884 0.1943031246 2.0239253922 -0.0579234968 -0.2484618654 81 82 83 84 85 -1.3281275821 1.3427960264 2.5468244104 0.3713789001 1.6449810170 86 87 88 89 90 -2.1453694901 0.9620889473 0.2508198912 1.5773817622 0.0941899171 91 92 93 94 95 1.0922986032 0.2009441921 2.5165398503 -1.2771323268 -2.8509364774 96 97 98 99 100 1.3164375216 -1.4792823293 1.1648325744 -1.9141842200 0.4418656461 101 102 103 104 105 -1.1736541779 0.3365815674 -2.8746164193 -1.1543033458 -1.0767908815 106 107 108 109 110 -0.8394709524 -0.3974052627 0.8950337470 1.0561972107 -2.9071263620 111 112 113 114 115 1.9673540117 -3.1636475556 2.1361462404 -1.9433450129 -1.6453339855 116 117 118 119 120 -0.2770482712 0.8804528319 0.4459004678 -2.1466576650 -1.2774972692 121 122 123 124 125 -5.1923006181 2.9912290823 1.7988821117 0.3406306526 1.1846528213 126 127 128 129 130 -4.0215863915 1.9663880349 -2.1597746117 0.8534830591 0.1736742842 131 132 133 134 135 -2.9218993883 -1.2061099051 2.1210647273 4.3001640180 1.8224700669 136 137 138 139 140 -2.4357082687 0.0663078527 1.6062302432 1.1083668207 0.9985467185 141 142 -0.1643515175 0.4601502450 > postscript(file="/var/fisher/rcomp/tmp/65ur01351787090.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 142 Frequency = 1 lag(myerror, k = 1) myerror 0 0.5289553156 NA 1 1.0795990914 0.5289553156 2 2.5035691283 1.0795990914 3 1.1968018488 2.5035691283 4 2.2621985144 1.1968018488 5 0.1675795984 2.2621985144 6 1.1868194692 0.1675795984 7 -1.2505572311 1.1868194692 8 0.6179530299 -1.2505572311 9 -0.1003623054 0.6179530299 10 -0.7884232948 -0.1003623054 11 -0.1656729948 -0.7884232948 12 -1.1514025374 -0.1656729948 13 0.3576140338 -1.1514025374 14 -1.5555138193 0.3576140338 15 -5.9315173474 -1.5555138193 16 -0.5718883105 -5.9315173474 17 -1.8289659322 -0.5718883105 18 1.6915435314 -1.8289659322 19 1.4143322013 1.6915435314 20 0.9382373601 1.4143322013 21 -1.5271938788 0.9382373601 22 1.8627369129 -1.5271938788 23 -0.1244126364 1.8627369129 24 -0.8710066156 -0.1244126364 25 -4.4933771057 -0.8710066156 26 -2.6758735959 -4.4933771057 27 0.0131765787 -2.6758735959 28 0.9941346811 0.0131765787 29 -1.9993260747 0.9941346811 30 -0.6442899319 -1.9993260747 31 -0.0579091854 -0.6442899319 32 -2.5734388857 -0.0579091854 33 0.3707202670 -2.5734388857 34 -2.2158279027 0.3707202670 35 1.5109995663 -2.2158279027 36 -0.0848336501 1.5109995663 37 0.7367822704 -0.0848336501 38 -0.2037450262 0.7367822704 39 1.9577792436 -0.2037450262 40 0.8111408656 1.9577792436 41 0.1504403547 0.8111408656 42 -0.4081239160 0.1504403547 43 -0.3315420803 -0.4081239160 44 0.5124252623 -0.3315420803 45 1.0979350485 0.5124252623 46 1.8350815137 1.0979350485 47 3.4855294725 1.8350815137 48 -3.8036983178 3.4855294725 49 0.6086367541 -3.8036983178 50 -3.4356465732 0.6086367541 51 -0.3045161962 -3.4356465732 52 1.5005292578 -0.3045161962 53 0.9179464812 1.5005292578 54 0.3106808823 0.9179464812 55 3.3352360577 0.3106808823 56 -0.3948552598 3.3352360577 57 1.5391321862 -0.3948552598 58 -1.8972308965 1.5391321862 59 -0.0734340278 -1.8972308965 60 0.5344695089 -0.0734340278 61 4.1591382792 0.5344695089 62 0.2103721536 4.1591382792 63 -0.9318914873 0.2103721536 64 0.2755389675 -0.9318914873 65 1.8079670001 0.2755389675 66 -0.0009399937 1.8079670001 67 0.6788235176 -0.0009399937 68 1.4176696416 0.6788235176 69 0.9791297322 1.4176696416 70 -1.4659920694 0.9791297322 71 -0.0467263022 -1.4659920694 72 0.6454152453 -0.0467263022 73 -0.1513400589 0.6454152453 74 -2.1175645148 -0.1513400589 75 1.0028001884 -2.1175645148 76 0.1943031246 1.0028001884 77 2.0239253922 0.1943031246 78 -0.0579234968 2.0239253922 79 -0.2484618654 -0.0579234968 80 -1.3281275821 -0.2484618654 81 1.3427960264 -1.3281275821 82 2.5468244104 1.3427960264 83 0.3713789001 2.5468244104 84 1.6449810170 0.3713789001 85 -2.1453694901 1.6449810170 86 0.9620889473 -2.1453694901 87 0.2508198912 0.9620889473 88 1.5773817622 0.2508198912 89 0.0941899171 1.5773817622 90 1.0922986032 0.0941899171 91 0.2009441921 1.0922986032 92 2.5165398503 0.2009441921 93 -1.2771323268 2.5165398503 94 -2.8509364774 -1.2771323268 95 1.3164375216 -2.8509364774 96 -1.4792823293 1.3164375216 97 1.1648325744 -1.4792823293 98 -1.9141842200 1.1648325744 99 0.4418656461 -1.9141842200 100 -1.1736541779 0.4418656461 101 0.3365815674 -1.1736541779 102 -2.8746164193 0.3365815674 103 -1.1543033458 -2.8746164193 104 -1.0767908815 -1.1543033458 105 -0.8394709524 -1.0767908815 106 -0.3974052627 -0.8394709524 107 0.8950337470 -0.3974052627 108 1.0561972107 0.8950337470 109 -2.9071263620 1.0561972107 110 1.9673540117 -2.9071263620 111 -3.1636475556 1.9673540117 112 2.1361462404 -3.1636475556 113 -1.9433450129 2.1361462404 114 -1.6453339855 -1.9433450129 115 -0.2770482712 -1.6453339855 116 0.8804528319 -0.2770482712 117 0.4459004678 0.8804528319 118 -2.1466576650 0.4459004678 119 -1.2774972692 -2.1466576650 120 -5.1923006181 -1.2774972692 121 2.9912290823 -5.1923006181 122 1.7988821117 2.9912290823 123 0.3406306526 1.7988821117 124 1.1846528213 0.3406306526 125 -4.0215863915 1.1846528213 126 1.9663880349 -4.0215863915 127 -2.1597746117 1.9663880349 128 0.8534830591 -2.1597746117 129 0.1736742842 0.8534830591 130 -2.9218993883 0.1736742842 131 -1.2061099051 -2.9218993883 132 2.1210647273 -1.2061099051 133 4.3001640180 2.1210647273 134 1.8224700669 4.3001640180 135 -2.4357082687 1.8224700669 136 0.0663078527 -2.4357082687 137 1.6062302432 0.0663078527 138 1.1083668207 1.6062302432 139 0.9985467185 1.1083668207 140 -0.1643515175 0.9985467185 141 0.4601502450 -0.1643515175 142 NA 0.4601502450 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.0795990914 0.5289553156 [2,] 2.5035691283 1.0795990914 [3,] 1.1968018488 2.5035691283 [4,] 2.2621985144 1.1968018488 [5,] 0.1675795984 2.2621985144 [6,] 1.1868194692 0.1675795984 [7,] -1.2505572311 1.1868194692 [8,] 0.6179530299 -1.2505572311 [9,] -0.1003623054 0.6179530299 [10,] -0.7884232948 -0.1003623054 [11,] -0.1656729948 -0.7884232948 [12,] -1.1514025374 -0.1656729948 [13,] 0.3576140338 -1.1514025374 [14,] -1.5555138193 0.3576140338 [15,] -5.9315173474 -1.5555138193 [16,] -0.5718883105 -5.9315173474 [17,] -1.8289659322 -0.5718883105 [18,] 1.6915435314 -1.8289659322 [19,] 1.4143322013 1.6915435314 [20,] 0.9382373601 1.4143322013 [21,] -1.5271938788 0.9382373601 [22,] 1.8627369129 -1.5271938788 [23,] -0.1244126364 1.8627369129 [24,] -0.8710066156 -0.1244126364 [25,] -4.4933771057 -0.8710066156 [26,] -2.6758735959 -4.4933771057 [27,] 0.0131765787 -2.6758735959 [28,] 0.9941346811 0.0131765787 [29,] -1.9993260747 0.9941346811 [30,] -0.6442899319 -1.9993260747 [31,] -0.0579091854 -0.6442899319 [32,] -2.5734388857 -0.0579091854 [33,] 0.3707202670 -2.5734388857 [34,] -2.2158279027 0.3707202670 [35,] 1.5109995663 -2.2158279027 [36,] -0.0848336501 1.5109995663 [37,] 0.7367822704 -0.0848336501 [38,] -0.2037450262 0.7367822704 [39,] 1.9577792436 -0.2037450262 [40,] 0.8111408656 1.9577792436 [41,] 0.1504403547 0.8111408656 [42,] -0.4081239160 0.1504403547 [43,] -0.3315420803 -0.4081239160 [44,] 0.5124252623 -0.3315420803 [45,] 1.0979350485 0.5124252623 [46,] 1.8350815137 1.0979350485 [47,] 3.4855294725 1.8350815137 [48,] -3.8036983178 3.4855294725 [49,] 0.6086367541 -3.8036983178 [50,] -3.4356465732 0.6086367541 [51,] -0.3045161962 -3.4356465732 [52,] 1.5005292578 -0.3045161962 [53,] 0.9179464812 1.5005292578 [54,] 0.3106808823 0.9179464812 [55,] 3.3352360577 0.3106808823 [56,] -0.3948552598 3.3352360577 [57,] 1.5391321862 -0.3948552598 [58,] -1.8972308965 1.5391321862 [59,] -0.0734340278 -1.8972308965 [60,] 0.5344695089 -0.0734340278 [61,] 4.1591382792 0.5344695089 [62,] 0.2103721536 4.1591382792 [63,] -0.9318914873 0.2103721536 [64,] 0.2755389675 -0.9318914873 [65,] 1.8079670001 0.2755389675 [66,] -0.0009399937 1.8079670001 [67,] 0.6788235176 -0.0009399937 [68,] 1.4176696416 0.6788235176 [69,] 0.9791297322 1.4176696416 [70,] -1.4659920694 0.9791297322 [71,] -0.0467263022 -1.4659920694 [72,] 0.6454152453 -0.0467263022 [73,] -0.1513400589 0.6454152453 [74,] -2.1175645148 -0.1513400589 [75,] 1.0028001884 -2.1175645148 [76,] 0.1943031246 1.0028001884 [77,] 2.0239253922 0.1943031246 [78,] -0.0579234968 2.0239253922 [79,] -0.2484618654 -0.0579234968 [80,] -1.3281275821 -0.2484618654 [81,] 1.3427960264 -1.3281275821 [82,] 2.5468244104 1.3427960264 [83,] 0.3713789001 2.5468244104 [84,] 1.6449810170 0.3713789001 [85,] -2.1453694901 1.6449810170 [86,] 0.9620889473 -2.1453694901 [87,] 0.2508198912 0.9620889473 [88,] 1.5773817622 0.2508198912 [89,] 0.0941899171 1.5773817622 [90,] 1.0922986032 0.0941899171 [91,] 0.2009441921 1.0922986032 [92,] 2.5165398503 0.2009441921 [93,] -1.2771323268 2.5165398503 [94,] -2.8509364774 -1.2771323268 [95,] 1.3164375216 -2.8509364774 [96,] -1.4792823293 1.3164375216 [97,] 1.1648325744 -1.4792823293 [98,] -1.9141842200 1.1648325744 [99,] 0.4418656461 -1.9141842200 [100,] -1.1736541779 0.4418656461 [101,] 0.3365815674 -1.1736541779 [102,] -2.8746164193 0.3365815674 [103,] -1.1543033458 -2.8746164193 [104,] -1.0767908815 -1.1543033458 [105,] -0.8394709524 -1.0767908815 [106,] -0.3974052627 -0.8394709524 [107,] 0.8950337470 -0.3974052627 [108,] 1.0561972107 0.8950337470 [109,] -2.9071263620 1.0561972107 [110,] 1.9673540117 -2.9071263620 [111,] -3.1636475556 1.9673540117 [112,] 2.1361462404 -3.1636475556 [113,] -1.9433450129 2.1361462404 [114,] -1.6453339855 -1.9433450129 [115,] -0.2770482712 -1.6453339855 [116,] 0.8804528319 -0.2770482712 [117,] 0.4459004678 0.8804528319 [118,] -2.1466576650 0.4459004678 [119,] -1.2774972692 -2.1466576650 [120,] -5.1923006181 -1.2774972692 [121,] 2.9912290823 -5.1923006181 [122,] 1.7988821117 2.9912290823 [123,] 0.3406306526 1.7988821117 [124,] 1.1846528213 0.3406306526 [125,] -4.0215863915 1.1846528213 [126,] 1.9663880349 -4.0215863915 [127,] -2.1597746117 1.9663880349 [128,] 0.8534830591 -2.1597746117 [129,] 0.1736742842 0.8534830591 [130,] -2.9218993883 0.1736742842 [131,] -1.2061099051 -2.9218993883 [132,] 2.1210647273 -1.2061099051 [133,] 4.3001640180 2.1210647273 [134,] 1.8224700669 4.3001640180 [135,] -2.4357082687 1.8224700669 [136,] 0.0663078527 -2.4357082687 [137,] 1.6062302432 0.0663078527 [138,] 1.1083668207 1.6062302432 [139,] 0.9985467185 1.1083668207 [140,] -0.1643515175 0.9985467185 [141,] 0.4601502450 -0.1643515175 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.0795990914 0.5289553156 2 2.5035691283 1.0795990914 3 1.1968018488 2.5035691283 4 2.2621985144 1.1968018488 5 0.1675795984 2.2621985144 6 1.1868194692 0.1675795984 7 -1.2505572311 1.1868194692 8 0.6179530299 -1.2505572311 9 -0.1003623054 0.6179530299 10 -0.7884232948 -0.1003623054 11 -0.1656729948 -0.7884232948 12 -1.1514025374 -0.1656729948 13 0.3576140338 -1.1514025374 14 -1.5555138193 0.3576140338 15 -5.9315173474 -1.5555138193 16 -0.5718883105 -5.9315173474 17 -1.8289659322 -0.5718883105 18 1.6915435314 -1.8289659322 19 1.4143322013 1.6915435314 20 0.9382373601 1.4143322013 21 -1.5271938788 0.9382373601 22 1.8627369129 -1.5271938788 23 -0.1244126364 1.8627369129 24 -0.8710066156 -0.1244126364 25 -4.4933771057 -0.8710066156 26 -2.6758735959 -4.4933771057 27 0.0131765787 -2.6758735959 28 0.9941346811 0.0131765787 29 -1.9993260747 0.9941346811 30 -0.6442899319 -1.9993260747 31 -0.0579091854 -0.6442899319 32 -2.5734388857 -0.0579091854 33 0.3707202670 -2.5734388857 34 -2.2158279027 0.3707202670 35 1.5109995663 -2.2158279027 36 -0.0848336501 1.5109995663 37 0.7367822704 -0.0848336501 38 -0.2037450262 0.7367822704 39 1.9577792436 -0.2037450262 40 0.8111408656 1.9577792436 41 0.1504403547 0.8111408656 42 -0.4081239160 0.1504403547 43 -0.3315420803 -0.4081239160 44 0.5124252623 -0.3315420803 45 1.0979350485 0.5124252623 46 1.8350815137 1.0979350485 47 3.4855294725 1.8350815137 48 -3.8036983178 3.4855294725 49 0.6086367541 -3.8036983178 50 -3.4356465732 0.6086367541 51 -0.3045161962 -3.4356465732 52 1.5005292578 -0.3045161962 53 0.9179464812 1.5005292578 54 0.3106808823 0.9179464812 55 3.3352360577 0.3106808823 56 -0.3948552598 3.3352360577 57 1.5391321862 -0.3948552598 58 -1.8972308965 1.5391321862 59 -0.0734340278 -1.8972308965 60 0.5344695089 -0.0734340278 61 4.1591382792 0.5344695089 62 0.2103721536 4.1591382792 63 -0.9318914873 0.2103721536 64 0.2755389675 -0.9318914873 65 1.8079670001 0.2755389675 66 -0.0009399937 1.8079670001 67 0.6788235176 -0.0009399937 68 1.4176696416 0.6788235176 69 0.9791297322 1.4176696416 70 -1.4659920694 0.9791297322 71 -0.0467263022 -1.4659920694 72 0.6454152453 -0.0467263022 73 -0.1513400589 0.6454152453 74 -2.1175645148 -0.1513400589 75 1.0028001884 -2.1175645148 76 0.1943031246 1.0028001884 77 2.0239253922 0.1943031246 78 -0.0579234968 2.0239253922 79 -0.2484618654 -0.0579234968 80 -1.3281275821 -0.2484618654 81 1.3427960264 -1.3281275821 82 2.5468244104 1.3427960264 83 0.3713789001 2.5468244104 84 1.6449810170 0.3713789001 85 -2.1453694901 1.6449810170 86 0.9620889473 -2.1453694901 87 0.2508198912 0.9620889473 88 1.5773817622 0.2508198912 89 0.0941899171 1.5773817622 90 1.0922986032 0.0941899171 91 0.2009441921 1.0922986032 92 2.5165398503 0.2009441921 93 -1.2771323268 2.5165398503 94 -2.8509364774 -1.2771323268 95 1.3164375216 -2.8509364774 96 -1.4792823293 1.3164375216 97 1.1648325744 -1.4792823293 98 -1.9141842200 1.1648325744 99 0.4418656461 -1.9141842200 100 -1.1736541779 0.4418656461 101 0.3365815674 -1.1736541779 102 -2.8746164193 0.3365815674 103 -1.1543033458 -2.8746164193 104 -1.0767908815 -1.1543033458 105 -0.8394709524 -1.0767908815 106 -0.3974052627 -0.8394709524 107 0.8950337470 -0.3974052627 108 1.0561972107 0.8950337470 109 -2.9071263620 1.0561972107 110 1.9673540117 -2.9071263620 111 -3.1636475556 1.9673540117 112 2.1361462404 -3.1636475556 113 -1.9433450129 2.1361462404 114 -1.6453339855 -1.9433450129 115 -0.2770482712 -1.6453339855 116 0.8804528319 -0.2770482712 117 0.4459004678 0.8804528319 118 -2.1466576650 0.4459004678 119 -1.2774972692 -2.1466576650 120 -5.1923006181 -1.2774972692 121 2.9912290823 -5.1923006181 122 1.7988821117 2.9912290823 123 0.3406306526 1.7988821117 124 1.1846528213 0.3406306526 125 -4.0215863915 1.1846528213 126 1.9663880349 -4.0215863915 127 -2.1597746117 1.9663880349 128 0.8534830591 -2.1597746117 129 0.1736742842 0.8534830591 130 -2.9218993883 0.1736742842 131 -1.2061099051 -2.9218993883 132 2.1210647273 -1.2061099051 133 4.3001640180 2.1210647273 134 1.8224700669 4.3001640180 135 -2.4357082687 1.8224700669 136 0.0663078527 -2.4357082687 137 1.6062302432 0.0663078527 138 1.1083668207 1.6062302432 139 0.9985467185 1.1083668207 140 -0.1643515175 0.9985467185 141 0.4601502450 -0.1643515175 > 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/fisher/rcomp/tmp/7g0381351787090.ps",horizontal=F,onefile=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/fisher/rcomp/tmp/8fx6g1351787090.ps",horizontal=F,onefile=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/fisher/rcomp/tmp/916pu1351787090.ps",horizontal=F,onefile=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/fisher/rcomp/tmp/10xxwe1351787090.ps",horizontal=F,onefile=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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/11jxr71351787090.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/fisher/rcomp/tmp/12ulz51351787090.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/fisher/rcomp/tmp/13215b1351787090.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/fisher/rcomp/tmp/141ulw1351787090.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/fisher/rcomp/tmp/15o5811351787090.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/fisher/rcomp/tmp/16rf2t1351787090.tab") + } > > try(system("convert tmp/1pk4f1351787090.ps tmp/1pk4f1351787090.png",intern=TRUE)) character(0) > try(system("convert tmp/2h1kt1351787090.ps tmp/2h1kt1351787090.png",intern=TRUE)) character(0) > try(system("convert tmp/3nzpf1351787090.ps tmp/3nzpf1351787090.png",intern=TRUE)) character(0) > try(system("convert tmp/4twle1351787090.ps tmp/4twle1351787090.png",intern=TRUE)) character(0) > try(system("convert tmp/5npdv1351787090.ps tmp/5npdv1351787090.png",intern=TRUE)) character(0) > try(system("convert tmp/65ur01351787090.ps tmp/65ur01351787090.png",intern=TRUE)) character(0) > try(system("convert tmp/7g0381351787090.ps tmp/7g0381351787090.png",intern=TRUE)) character(0) > try(system("convert tmp/8fx6g1351787090.ps tmp/8fx6g1351787090.png",intern=TRUE)) character(0) > try(system("convert tmp/916pu1351787090.ps tmp/916pu1351787090.png",intern=TRUE)) character(0) > try(system("convert tmp/10xxwe1351787090.ps tmp/10xxwe1351787090.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.582 1.109 8.698