R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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(13 + ,15 + ,2 + ,9 + ,42 + ,9 + ,12 + ,18 + ,1 + ,9 + ,51 + ,9 + ,15 + ,11 + ,1 + ,9 + ,42 + ,9 + ,12 + ,16 + ,1 + ,8 + ,46 + ,8 + ,10 + ,12 + ,2 + ,14 + ,41 + ,14 + ,12 + ,17 + ,2 + ,14 + ,49 + ,14 + ,15 + ,15 + ,1 + ,15 + ,47 + ,15 + ,9 + ,19 + ,1 + ,11 + ,33 + ,11 + ,11 + ,18 + ,1 + ,8 + ,47 + ,8 + ,11 + ,10 + ,2 + ,14 + ,42 + ,14 + ,11 + ,14 + ,1 + ,9 + ,32 + ,9 + ,15 + ,18 + ,1 + ,6 + ,53 + ,6 + ,7 + ,18 + ,2 + ,14 + ,41 + ,14 + ,11 + ,14 + ,2 + ,8 + ,41 + ,8 + ,11 + ,14 + ,1 + ,11 + ,33 + ,11 + ,10 + ,12 + ,1 + ,16 + ,37 + ,16 + ,14 + ,16 + ,2 + ,11 + ,43 + ,11 + ,6 + ,13 + ,2 + ,13 + ,33 + ,13 + ,11 + ,16 + ,1 + ,7 + ,49 + ,7 + ,15 + ,14 + ,2 + ,9 + ,42 + ,9 + ,11 + ,9 + ,1 + ,15 + ,43 + ,15 + ,12 + ,9 + ,2 + ,16 + ,37 + ,16 + ,14 + ,17 + ,1 + ,10 + ,43 + ,10 + ,15 + ,13 + ,2 + ,14 + ,42 + ,14 + ,9 + ,15 + ,2 + ,12 + ,43 + ,12 + ,13 + ,17 + ,1 + ,6 + ,46 + ,6 + ,13 + ,16 + ,2 + ,4 + ,33 + ,4 + ,16 + ,12 + ,1 + ,12 + ,42 + ,12 + ,13 + ,11 + ,1 + ,14 + ,40 + ,14 + ,12 + ,16 + ,2 + ,13 + ,44 + ,13 + ,14 + ,17 + ,1 + ,9 + ,42 + ,9 + ,11 + ,17 + ,2 + ,14 + ,52 + ,14 + ,9 + ,16 + ,1 + ,14 + ,44 + ,14 + ,16 + ,13 + ,2 + ,10 + ,45 + ,10 + ,12 + ,12 + ,1 + ,14 + ,46 + ,14 + ,10 + ,12 + ,2 + ,8 + ,36 + ,8 + ,13 + ,16 + ,1 + ,8 + ,45 + ,8 + ,16 + ,14 + ,1 + ,10 + ,49 + ,10 + ,14 + ,12 + ,2 + ,9 + ,43 + ,9 + ,15 + ,12 + ,1 + ,9 + ,43 + ,9 + ,5 + ,14 + ,1 + ,11 + ,37 + ,11 + ,8 + ,8 + ,2 + ,15 + ,32 + ,15 + ,11 + ,15 + ,1 + ,9 + ,45 + ,9 + ,16 + ,14 + ,2 + ,9 + ,45 + ,9 + ,17 + ,11 + ,1 + ,10 + ,45 + ,10 + ,9 + ,13 + ,2 + ,8 + ,45 + ,8 + ,9 + ,14 + ,1 + ,8 + ,31 + ,8 + ,13 + ,15 + ,1 + ,14 + ,33 + ,14 + ,10 + ,16 + ,1 + ,10 + ,44 + ,10 + ,6 + ,10 + ,2 + ,11 + ,49 + ,11 + ,12 + ,11 + ,2 + ,9 + ,44 + ,9 + ,8 + ,12 + ,2 + ,12 + ,41 + ,12 + ,14 + ,14 + ,2 + ,13 + ,44 + ,13 + ,12 + ,15 + ,1 + ,14 + ,38 + ,14 + ,11 + ,16 + ,1 + ,15 + ,33 + ,15 + ,16 + ,9 + ,1 + ,11 + ,47 + ,11 + ,8 + ,11 + ,2 + ,9 + ,37 + ,9 + ,15 + ,15 + ,1 + ,8 + ,48 + ,8 + ,7 + ,15 + ,2 + ,7 + ,40 + ,7 + ,16 + ,13 + ,2 + ,10 + ,50 + ,10 + ,14 + ,17 + ,1 + ,10 + ,54 + ,10 + ,16 + ,17 + ,1 + ,10 + ,43 + ,10 + ,9 + ,15 + ,1 + ,9 + ,54 + ,9 + ,14 + ,13 + ,1 + ,13 + ,44 + ,13 + ,11 + ,15 + ,2 + ,11 + ,47 + ,11 + ,13 + ,13 + ,2 + ,8 + ,33 + ,8 + ,15 + ,15 + ,1 + ,10 + ,45 + ,10 + ,5 + ,10 + ,2 + ,14 + ,33 + ,14 + ,15 + ,15 + ,1 + ,11 + ,44 + ,11 + ,13 + ,14 + ,1 + ,10 + ,47 + ,10 + ,11 + ,15 + ,2 + ,16 + ,45 + ,16 + ,11 + ,16 + ,2 + ,11 + ,43 + ,11 + ,12 + ,7 + ,1 + ,16 + ,43 + ,16 + ,12 + ,13 + ,1 + ,6 + ,33 + ,6 + ,12 + ,15 + ,1 + ,11 + ,46 + ,11 + ,14 + ,13 + ,1 + ,14 + ,47 + ,14 + ,6 + ,16 + ,1 + ,9 + ,47 + ,9 + ,7 + ,16 + ,2 + ,9 + ,0 + ,9 + ,14 + ,12 + ,1 + ,11 + ,43 + ,11 + ,13 + ,15 + ,2 + ,12 + ,46 + ,12 + ,12 + ,14 + ,2 + ,20 + ,36 + ,20 + ,9 + ,11 + ,2 + ,11 + ,42 + ,11 + ,12 + ,14 + ,1 + ,12 + ,44 + ,12 + ,16 + ,15 + ,1 + ,9 + ,47 + ,9 + ,10 + ,9 + ,2 + ,10 + ,41 + ,10 + ,14 + ,15 + ,1 + ,14 + ,47 + ,14 + ,10 + ,17 + ,1 + ,8 + ,46 + ,8 + ,16 + ,16 + ,1 + ,10 + ,47 + ,10 + ,15 + ,14 + ,1 + ,8 + ,46 + ,8 + ,12 + ,15 + ,2 + ,7 + ,46 + ,7 + ,10 + ,16 + ,1 + ,11 + ,36 + ,11 + ,8 + ,10 + ,1 + ,14 + ,30 + ,14 + ,8 + ,17 + ,2 + ,8 + ,48 + ,8 + ,11 + ,15 + ,2 + ,14 + ,45 + ,14 + ,13 + ,15 + ,1 + ,10 + ,49 + ,10 + ,16 + ,13 + ,1 + ,9 + ,55 + ,9 + ,14 + ,14 + ,2 + ,16 + ,11 + ,16 + ,11 + ,16 + ,1 + ,8 + ,52 + ,8 + ,4 + ,11 + ,2 + ,12 + ,33 + ,12 + ,14 + ,18 + ,1 + ,8 + ,47 + ,8 + ,9 + ,14 + ,1 + ,16 + ,33 + ,16 + ,14 + ,14 + ,1 + ,13 + ,44 + ,13 + ,8 + ,14 + ,1 + ,13 + ,42 + ,13 + ,8 + ,14 + ,1 + ,8 + ,55 + ,8 + ,11 + ,15 + ,1 + ,9 + ,42 + ,9 + ,12 + ,14 + ,1 + ,11 + ,46 + ,11 + ,14 + ,15 + ,1 + ,9 + ,46 + ,9 + ,15 + ,15 + ,2 + ,8 + ,47 + ,8 + ,16 + ,12 + ,1 + ,14 + ,33 + ,14 + ,16 + ,19 + ,1 + ,7 + ,53 + ,7 + ,14 + ,13 + ,2 + ,11 + ,42 + ,11 + ,12 + ,15 + ,1 + ,11 + ,44 + ,11 + ,14 + ,17 + ,2 + ,10 + ,55 + ,10 + ,8 + ,9 + ,2 + ,14 + ,40 + ,14 + ,16 + ,15 + ,2 + ,10 + ,46 + ,10 + ,12 + ,16 + ,1 + ,9 + ,53 + ,9 + ,12 + ,17 + ,1 + ,8 + ,44 + ,8 + ,11 + ,11 + ,1 + ,14 + ,35 + ,14 + ,4 + ,15 + ,1 + ,12 + ,40 + ,12 + ,16 + ,11 + ,1 + ,12 + ,44 + ,12 + ,15 + ,15 + ,1 + ,6 + ,46 + ,6 + ,10 + ,17 + ,1 + ,16 + ,45 + ,16 + ,13 + ,14 + ,1 + ,8 + ,53 + ,8 + ,15 + ,12 + ,2 + ,13 + ,45 + ,13 + ,12 + ,14 + ,1 + ,12 + ,48 + ,12 + ,14 + ,15 + ,2 + ,11 + ,46 + ,11 + ,7 + ,16 + ,1 + ,12 + ,55 + ,12 + ,19 + ,16 + ,1 + ,9 + ,47 + ,9 + ,12 + ,14 + ,1 + ,11 + ,43 + ,11 + ,12 + ,11 + ,2 + ,16 + ,38 + ,16 + ,8 + ,14 + ,2 + ,10 + ,40 + ,10 + ,12 + ,13 + ,1 + ,13 + ,47 + ,13 + ,10 + ,13 + ,1 + ,11 + ,47 + ,11 + ,8 + ,14 + ,2 + ,11 + ,42 + ,11 + ,10 + ,16 + ,2 + ,9 + ,53 + ,9 + ,14 + ,16 + ,2 + ,11 + ,43 + ,11 + ,16 + ,12 + ,1 + ,12 + ,44 + ,12 + ,13 + ,11 + ,1 + ,10 + ,42 + ,10 + ,16 + ,13 + ,1 + ,13 + ,51 + ,13 + ,9 + ,15 + ,1 + ,9 + ,54 + ,9 + ,14 + ,13 + ,2 + ,14 + ,41 + ,14 + ,14 + ,16 + ,2 + ,14 + ,51 + ,14 + ,12 + ,13 + ,1 + ,8 + ,51 + ,8) + ,dim=c(6 + ,143) + ,dimnames=list(c('popularity' + ,'hapiness' + ,'gender' + ,'doubsaboutactions' + ,'belonging' + ,'parentalexpectations') + ,1:143)) > y <- array(NA,dim=c(6,143),dimnames=list(c('popularity','hapiness','gender','doubsaboutactions','belonging','parentalexpectations'),1:143)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > 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 popularity hapiness gender doubsaboutactions belonging parentalexpectations 1 13 15 2 9 42 9 2 12 18 1 9 51 9 3 15 11 1 9 42 9 4 12 16 1 8 46 8 5 10 12 2 14 41 14 6 12 17 2 14 49 14 7 15 15 1 15 47 15 8 9 19 1 11 33 11 9 11 18 1 8 47 8 10 11 10 2 14 42 14 11 11 14 1 9 32 9 12 15 18 1 6 53 6 13 7 18 2 14 41 14 14 11 14 2 8 41 8 15 11 14 1 11 33 11 16 10 12 1 16 37 16 17 14 16 2 11 43 11 18 6 13 2 13 33 13 19 11 16 1 7 49 7 20 15 14 2 9 42 9 21 11 9 1 15 43 15 22 12 9 2 16 37 16 23 14 17 1 10 43 10 24 15 13 2 14 42 14 25 9 15 2 12 43 12 26 13 17 1 6 46 6 27 13 16 2 4 33 4 28 16 12 1 12 42 12 29 13 11 1 14 40 14 30 12 16 2 13 44 13 31 14 17 1 9 42 9 32 11 17 2 14 52 14 33 9 16 1 14 44 14 34 16 13 2 10 45 10 35 12 12 1 14 46 14 36 10 12 2 8 36 8 37 13 16 1 8 45 8 38 16 14 1 10 49 10 39 14 12 2 9 43 9 40 15 12 1 9 43 9 41 5 14 1 11 37 11 42 8 8 2 15 32 15 43 11 15 1 9 45 9 44 16 14 2 9 45 9 45 17 11 1 10 45 10 46 9 13 2 8 45 8 47 9 14 1 8 31 8 48 13 15 1 14 33 14 49 10 16 1 10 44 10 50 6 10 2 11 49 11 51 12 11 2 9 44 9 52 8 12 2 12 41 12 53 14 14 2 13 44 13 54 12 15 1 14 38 14 55 11 16 1 15 33 15 56 16 9 1 11 47 11 57 8 11 2 9 37 9 58 15 15 1 8 48 8 59 7 15 2 7 40 7 60 16 13 2 10 50 10 61 14 17 1 10 54 10 62 16 17 1 10 43 10 63 9 15 1 9 54 9 64 14 13 1 13 44 13 65 11 15 2 11 47 11 66 13 13 2 8 33 8 67 15 15 1 10 45 10 68 5 10 2 14 33 14 69 15 15 1 11 44 11 70 13 14 1 10 47 10 71 11 15 2 16 45 16 72 11 16 2 11 43 11 73 12 7 1 16 43 16 74 12 13 1 6 33 6 75 12 15 1 11 46 11 76 14 13 1 14 47 14 77 6 16 1 9 47 9 78 7 16 2 9 0 9 79 14 12 1 11 43 11 80 13 15 2 12 46 12 81 12 14 2 20 36 20 82 9 11 2 11 42 11 83 12 14 1 12 44 12 84 16 15 1 9 47 9 85 10 9 2 10 41 10 86 14 15 1 14 47 14 87 10 17 1 8 46 8 88 16 16 1 10 47 10 89 15 14 1 8 46 8 90 12 15 2 7 46 7 91 10 16 1 11 36 11 92 8 10 1 14 30 14 93 8 17 2 8 48 8 94 11 15 2 14 45 14 95 13 15 1 10 49 10 96 16 13 1 9 55 9 97 14 14 2 16 11 16 98 11 16 1 8 52 8 99 4 11 2 12 33 12 100 14 18 1 8 47 8 101 9 14 1 16 33 16 102 14 14 1 13 44 13 103 8 14 1 13 42 13 104 8 14 1 8 55 8 105 11 15 1 9 42 9 106 12 14 1 11 46 11 107 14 15 1 9 46 9 108 15 15 2 8 47 8 109 16 12 1 14 33 14 110 16 19 1 7 53 7 111 14 13 2 11 42 11 112 12 15 1 11 44 11 113 14 17 2 10 55 10 114 8 9 2 14 40 14 115 16 15 2 10 46 10 116 12 16 1 9 53 9 117 12 17 1 8 44 8 118 11 11 1 14 35 14 119 4 15 1 12 40 12 120 16 11 1 12 44 12 121 15 15 1 6 46 6 122 10 17 1 16 45 16 123 13 14 1 8 53 8 124 15 12 2 13 45 13 125 12 14 1 12 48 12 126 14 15 2 11 46 11 127 7 16 1 12 55 12 128 19 16 1 9 47 9 129 12 14 1 11 43 11 130 12 11 2 16 38 16 131 8 14 2 10 40 10 132 12 13 1 13 47 13 133 10 13 1 11 47 11 134 8 14 2 11 42 11 135 10 16 2 9 53 9 136 14 16 2 11 43 11 137 16 12 1 12 44 12 138 13 11 1 10 42 10 139 16 13 1 13 51 13 140 9 15 1 9 54 9 141 14 13 2 14 41 14 142 14 16 2 14 51 14 143 12 13 1 8 51 8 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) hapiness gender 9.90575 -0.03357 -0.83387 doubsaboutactions belonging parentalexpectations -0.06249 0.10156 NA > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.8808 -1.8472 0.0313 2.2538 6.2544 Coefficients: (1 not defined because of singularities) Estimate Std. Error t value Pr(>|t|) (Intercept) 9.90575 2.77022 3.576 0.000482 *** hapiness -0.03357 0.11174 -0.300 0.764291 gender -0.83387 0.50590 -1.648 0.101569 doubsaboutactions -0.06249 0.09547 -0.655 0.513872 belonging 0.10156 0.03488 2.912 0.004190 ** parentalexpectations NA NA NA NA --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.874 on 138 degrees of freedom Multiple R-squared: 0.103, Adjusted R-squared: 0.07704 F-statistic: 3.963 on 4 and 138 DF, p-value: 0.00447 > 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.348486070 0.696972140 0.6515139 [2,] 0.272595182 0.545190364 0.7274048 [3,] 0.156531146 0.313062291 0.8434689 [4,] 0.103012368 0.206024737 0.8969876 [5,] 0.083540820 0.167081640 0.9164592 [6,] 0.044501620 0.089003239 0.9554984 [7,] 0.022561952 0.045123904 0.9774380 [8,] 0.016539934 0.033079868 0.9834601 [9,] 0.036406386 0.072812771 0.9635936 [10,] 0.050792113 0.101584226 0.9492079 [11,] 0.064998032 0.129996064 0.9350020 [12,] 0.093191564 0.186383128 0.9068084 [13,] 0.075559696 0.151119392 0.9244403 [14,] 0.056456194 0.112912388 0.9435438 [15,] 0.053969866 0.107939731 0.9460301 [16,] 0.081179786 0.162359572 0.9188202 [17,] 0.077217168 0.154434335 0.9227828 [18,] 0.053402585 0.106805170 0.9465974 [19,] 0.045065749 0.090131498 0.9549343 [20,] 0.059363293 0.118726586 0.9406367 [21,] 0.042599363 0.085198725 0.9574006 [22,] 0.030687127 0.061374254 0.9693129 [23,] 0.026234226 0.052468452 0.9737658 [24,] 0.018398336 0.036796672 0.9816017 [25,] 0.017277748 0.034555497 0.9827223 [26,] 0.019768804 0.039537608 0.9802312 [27,] 0.013861481 0.027722963 0.9861385 [28,] 0.013391967 0.026783934 0.9866080 [29,] 0.008845506 0.017691012 0.9911545 [30,] 0.007664053 0.015328106 0.9923359 [31,] 0.005397272 0.010794543 0.9946027 [32,] 0.003941573 0.007883145 0.9960584 [33,] 0.026928870 0.053857739 0.9730711 [34,] 0.024748535 0.049497071 0.9752515 [35,] 0.021660181 0.043320361 0.9783398 [36,] 0.024451465 0.048902930 0.9755485 [37,] 0.027751353 0.055502707 0.9722486 [38,] 0.052432413 0.104864825 0.9475676 [39,] 0.042483545 0.084967090 0.9575165 [40,] 0.056830721 0.113661442 0.9431693 [41,] 0.052973647 0.105947294 0.9470264 [42,] 0.214580277 0.429160554 0.7854197 [43,] 0.180305293 0.360610586 0.8196947 [44,] 0.189704446 0.379408892 0.8102956 [45,] 0.185600537 0.371201074 0.8143995 [46,] 0.157077292 0.314154585 0.8429227 [47,] 0.132747326 0.265494652 0.8672527 [48,] 0.129492589 0.258985179 0.8705074 [49,] 0.132486105 0.264972209 0.8675139 [50,] 0.115075466 0.230150931 0.8849245 [51,] 0.146238437 0.292476873 0.8537616 [52,] 0.158205061 0.316410122 0.8417949 [53,] 0.130543450 0.261086900 0.8694566 [54,] 0.149174539 0.298349078 0.8508255 [55,] 0.225656360 0.451312720 0.7743436 [56,] 0.199705644 0.399411288 0.8002944 [57,] 0.169239740 0.338479480 0.8307603 [58,] 0.164424567 0.328849133 0.8355754 [59,] 0.153687786 0.307375571 0.8463122 [60,] 0.222544349 0.445088699 0.7774557 [61,] 0.214004248 0.428008497 0.7859958 [62,] 0.180719858 0.361439715 0.8192801 [63,] 0.151182795 0.302365589 0.8488172 [64,] 0.124535747 0.249071494 0.8754643 [65,] 0.101557543 0.203115086 0.8984425 [66,] 0.082172323 0.164344646 0.9178277 [67,] 0.066043860 0.132087720 0.9339561 [68,] 0.054236089 0.108472178 0.9457639 [69,] 0.151850914 0.303701828 0.8481491 [70,] 0.138812726 0.277625451 0.8611873 [71,] 0.121504199 0.243008398 0.8784958 [72,] 0.102541577 0.205083154 0.8974584 [73,] 0.091471285 0.182942570 0.9085287 [74,] 0.085213463 0.170426925 0.9147865 [75,] 0.067587465 0.135174929 0.9324125 [76,] 0.070265929 0.140531859 0.9297341 [77,] 0.058534498 0.117068995 0.9414655 [78,] 0.049175083 0.098350167 0.9508249 [79,] 0.048058475 0.096116950 0.9519415 [80,] 0.051268141 0.102536283 0.9487319 [81,] 0.045673929 0.091347858 0.9543261 [82,] 0.034847382 0.069694764 0.9651526 [83,] 0.028649869 0.057299738 0.9713501 [84,] 0.028856058 0.057712116 0.9711439 [85,] 0.040875685 0.081751371 0.9591243 [86,] 0.031182516 0.062365032 0.9688175 [87,] 0.023298383 0.046596766 0.9767016 [88,] 0.023090045 0.046180091 0.9769100 [89,] 0.042425041 0.084850083 0.9575750 [90,] 0.037148593 0.074297187 0.9628514 [91,] 0.125824858 0.251649716 0.8741751 [92,] 0.104406010 0.208812019 0.8955940 [93,] 0.092508452 0.185016905 0.9074915 [94,] 0.080852255 0.161704511 0.9191477 [95,] 0.097142382 0.194284763 0.9028576 [96,] 0.153890227 0.307780454 0.8461098 [97,] 0.131702285 0.263404571 0.8682977 [98,] 0.104544944 0.209089888 0.8954551 [99,] 0.084053945 0.168107890 0.9159461 [100,] 0.074706598 0.149413196 0.9252934 [101,] 0.106667010 0.213334019 0.8933330 [102,] 0.107515518 0.215031035 0.8924845 [103,] 0.092008824 0.184017648 0.9079912 [104,] 0.069790091 0.139580183 0.9302099 [105,] 0.054459479 0.108918959 0.9455405 [106,] 0.085228637 0.170457273 0.9147714 [107,] 0.098867548 0.197735097 0.9011325 [108,] 0.074987809 0.149975618 0.9250122 [109,] 0.058561703 0.117123406 0.9414383 [110,] 0.043458121 0.086916242 0.9565419 [111,] 0.206017650 0.412035300 0.7939823 [112,] 0.192917965 0.385835930 0.8070820 [113,] 0.174050955 0.348101909 0.8259490 [114,] 0.165470004 0.330940009 0.8345300 [115,] 0.133047591 0.266095182 0.8669524 [116,] 0.146397737 0.292795475 0.8536023 [117,] 0.109606205 0.219212410 0.8903938 [118,] 0.100799730 0.201599459 0.8992003 [119,] 0.358188612 0.716377224 0.6418114 [120,] 0.638502991 0.722994018 0.3614970 [121,] 0.540885455 0.918229089 0.4591145 [122,] 0.506881490 0.986237021 0.4931185 [123,] 0.458878771 0.917757542 0.5411212 [124,] 0.423251882 0.846503764 0.5767481 [125,] 0.488667391 0.977334783 0.5113326 [126,] 0.680156825 0.639686349 0.3198432 > postscript(file="/var/www/rcomp/tmp/1mguq1292056052.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/www/rcomp/tmp/2mguq1292056052.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/www/rcomp/tmp/3xpbb1292056052.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/www/rcomp/tmp/4xpbb1292056052.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/www/rcomp/tmp/5xpbb1292056052.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 = 143 Frequency = 1 1 2 3 4 5 6 1.56250923 -1.08465910 2.59435332 -0.70650051 -1.12422481 0.23117564 7 8 9 10 11 12 2.59576509 -2.09807773 -1.74091337 -0.29292736 -0.28935234 1.52477018 13 14 15 16 17 18 -3.92279028 -0.43199059 -0.26593984 -1.42689000 2.61949415 -4.34067583 19 20 21 22 23 24 -2.07365873 3.52893681 -1.19943861 1.30625897 1.75671525 3.80778991 25 26 27 28 29 30 -2.35159316 0.20210171 2.19767550 3.81538105 1.10989425 0.64290665 31 32 33 34 35 36 1.79578785 -1.07349748 -3.12847447 4.25317637 -0.46587957 -0.99134689 37 38 39 40 41 42 0.39505720 3.04665174 2.36023426 2.52636804 -6.67217067 -2.28201002 43 44 45 46 47 48 -1.57603012 4.22426369 4.35216530 -2.87179384 -2.25027974 1.95508789 49 50 51 52 53 54 -2.37841488 -6.19128662 0.22510413 -3.24919501 2.57576181 0.44729935 55 56 57 58 59 60 0.05114542 3.14439015 -3.06399192 2.05681166 -4.35934556 3.74538783 61 62 63 64 65 66 0.63958046 3.75671525 -4.49004948 1.70832316 -0.82030910 2.34689865 67 68 69 70 71 72 2.48645499 -5.37890799 2.65049780 0.24976715 -0.30476817 -0.38050585 73 74 75 76 77 78 -0.20409835 0.38806222 -0.55261762 1.46613514 -6.74557311 -0.13849463 79 80 81 82 83 84 1.65133824 1.34373371 1.82561919 -2.44681025 -0.32058952 3.22085447 85 86 87 88 89 90 -1.47488248 1.53327999 -2.67292808 3.31691199 2.22635465 0.03130819 91 92 93 94 95 96 -1.50346812 -2.90810109 -4.04217727 -0.42973837 0.08022416 2.34124797 97 98 99 100 101 102 6.11462147 -2.31584675 -6.47030578 1.25908663 -1.95351432 1.74189558 103 104 105 106 107 108 -4.05498900 -5.68766472 -1.27135699 -0.58619004 1.32241218 2.99223559 109 110 111 112 113 114 4.85437063 2.62082770 2.62033460 -0.34950220 1.37188898 -3.12338436 115 116 117 118 119 120 4.21876351 -1.35491935 -0.46981267 -0.38231721 -7.88078627 3.57869322 121 122 123 124 125 126 2.13495687 -2.07148955 -0.48454930 3.40705926 -0.72682035 2.28124861 127 128 129 130 131 132 -6.37057946 6.25442689 -0.28151692 1.27184610 -3.20546267 -0.59634996 133 134 135 136 137 138 -2.72132017 -3.34609298 -2.52105313 2.61949415 3.61226564 0.65683842 139 140 141 142 143 2.99741921 -4.49004948 2.90934761 1.99448780 -1.31500631 > postscript(file="/var/www/rcomp/tmp/6iqd91292056053.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 = 143 Frequency = 1 lag(myerror, k = 1) myerror 0 1.56250923 NA 1 -1.08465910 1.56250923 2 2.59435332 -1.08465910 3 -0.70650051 2.59435332 4 -1.12422481 -0.70650051 5 0.23117564 -1.12422481 6 2.59576509 0.23117564 7 -2.09807773 2.59576509 8 -1.74091337 -2.09807773 9 -0.29292736 -1.74091337 10 -0.28935234 -0.29292736 11 1.52477018 -0.28935234 12 -3.92279028 1.52477018 13 -0.43199059 -3.92279028 14 -0.26593984 -0.43199059 15 -1.42689000 -0.26593984 16 2.61949415 -1.42689000 17 -4.34067583 2.61949415 18 -2.07365873 -4.34067583 19 3.52893681 -2.07365873 20 -1.19943861 3.52893681 21 1.30625897 -1.19943861 22 1.75671525 1.30625897 23 3.80778991 1.75671525 24 -2.35159316 3.80778991 25 0.20210171 -2.35159316 26 2.19767550 0.20210171 27 3.81538105 2.19767550 28 1.10989425 3.81538105 29 0.64290665 1.10989425 30 1.79578785 0.64290665 31 -1.07349748 1.79578785 32 -3.12847447 -1.07349748 33 4.25317637 -3.12847447 34 -0.46587957 4.25317637 35 -0.99134689 -0.46587957 36 0.39505720 -0.99134689 37 3.04665174 0.39505720 38 2.36023426 3.04665174 39 2.52636804 2.36023426 40 -6.67217067 2.52636804 41 -2.28201002 -6.67217067 42 -1.57603012 -2.28201002 43 4.22426369 -1.57603012 44 4.35216530 4.22426369 45 -2.87179384 4.35216530 46 -2.25027974 -2.87179384 47 1.95508789 -2.25027974 48 -2.37841488 1.95508789 49 -6.19128662 -2.37841488 50 0.22510413 -6.19128662 51 -3.24919501 0.22510413 52 2.57576181 -3.24919501 53 0.44729935 2.57576181 54 0.05114542 0.44729935 55 3.14439015 0.05114542 56 -3.06399192 3.14439015 57 2.05681166 -3.06399192 58 -4.35934556 2.05681166 59 3.74538783 -4.35934556 60 0.63958046 3.74538783 61 3.75671525 0.63958046 62 -4.49004948 3.75671525 63 1.70832316 -4.49004948 64 -0.82030910 1.70832316 65 2.34689865 -0.82030910 66 2.48645499 2.34689865 67 -5.37890799 2.48645499 68 2.65049780 -5.37890799 69 0.24976715 2.65049780 70 -0.30476817 0.24976715 71 -0.38050585 -0.30476817 72 -0.20409835 -0.38050585 73 0.38806222 -0.20409835 74 -0.55261762 0.38806222 75 1.46613514 -0.55261762 76 -6.74557311 1.46613514 77 -0.13849463 -6.74557311 78 1.65133824 -0.13849463 79 1.34373371 1.65133824 80 1.82561919 1.34373371 81 -2.44681025 1.82561919 82 -0.32058952 -2.44681025 83 3.22085447 -0.32058952 84 -1.47488248 3.22085447 85 1.53327999 -1.47488248 86 -2.67292808 1.53327999 87 3.31691199 -2.67292808 88 2.22635465 3.31691199 89 0.03130819 2.22635465 90 -1.50346812 0.03130819 91 -2.90810109 -1.50346812 92 -4.04217727 -2.90810109 93 -0.42973837 -4.04217727 94 0.08022416 -0.42973837 95 2.34124797 0.08022416 96 6.11462147 2.34124797 97 -2.31584675 6.11462147 98 -6.47030578 -2.31584675 99 1.25908663 -6.47030578 100 -1.95351432 1.25908663 101 1.74189558 -1.95351432 102 -4.05498900 1.74189558 103 -5.68766472 -4.05498900 104 -1.27135699 -5.68766472 105 -0.58619004 -1.27135699 106 1.32241218 -0.58619004 107 2.99223559 1.32241218 108 4.85437063 2.99223559 109 2.62082770 4.85437063 110 2.62033460 2.62082770 111 -0.34950220 2.62033460 112 1.37188898 -0.34950220 113 -3.12338436 1.37188898 114 4.21876351 -3.12338436 115 -1.35491935 4.21876351 116 -0.46981267 -1.35491935 117 -0.38231721 -0.46981267 118 -7.88078627 -0.38231721 119 3.57869322 -7.88078627 120 2.13495687 3.57869322 121 -2.07148955 2.13495687 122 -0.48454930 -2.07148955 123 3.40705926 -0.48454930 124 -0.72682035 3.40705926 125 2.28124861 -0.72682035 126 -6.37057946 2.28124861 127 6.25442689 -6.37057946 128 -0.28151692 6.25442689 129 1.27184610 -0.28151692 130 -3.20546267 1.27184610 131 -0.59634996 -3.20546267 132 -2.72132017 -0.59634996 133 -3.34609298 -2.72132017 134 -2.52105313 -3.34609298 135 2.61949415 -2.52105313 136 3.61226564 2.61949415 137 0.65683842 3.61226564 138 2.99741921 0.65683842 139 -4.49004948 2.99741921 140 2.90934761 -4.49004948 141 1.99448780 2.90934761 142 -1.31500631 1.99448780 143 NA -1.31500631 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.08465910 1.56250923 [2,] 2.59435332 -1.08465910 [3,] -0.70650051 2.59435332 [4,] -1.12422481 -0.70650051 [5,] 0.23117564 -1.12422481 [6,] 2.59576509 0.23117564 [7,] -2.09807773 2.59576509 [8,] -1.74091337 -2.09807773 [9,] -0.29292736 -1.74091337 [10,] -0.28935234 -0.29292736 [11,] 1.52477018 -0.28935234 [12,] -3.92279028 1.52477018 [13,] -0.43199059 -3.92279028 [14,] -0.26593984 -0.43199059 [15,] -1.42689000 -0.26593984 [16,] 2.61949415 -1.42689000 [17,] -4.34067583 2.61949415 [18,] -2.07365873 -4.34067583 [19,] 3.52893681 -2.07365873 [20,] -1.19943861 3.52893681 [21,] 1.30625897 -1.19943861 [22,] 1.75671525 1.30625897 [23,] 3.80778991 1.75671525 [24,] -2.35159316 3.80778991 [25,] 0.20210171 -2.35159316 [26,] 2.19767550 0.20210171 [27,] 3.81538105 2.19767550 [28,] 1.10989425 3.81538105 [29,] 0.64290665 1.10989425 [30,] 1.79578785 0.64290665 [31,] -1.07349748 1.79578785 [32,] -3.12847447 -1.07349748 [33,] 4.25317637 -3.12847447 [34,] -0.46587957 4.25317637 [35,] -0.99134689 -0.46587957 [36,] 0.39505720 -0.99134689 [37,] 3.04665174 0.39505720 [38,] 2.36023426 3.04665174 [39,] 2.52636804 2.36023426 [40,] -6.67217067 2.52636804 [41,] -2.28201002 -6.67217067 [42,] -1.57603012 -2.28201002 [43,] 4.22426369 -1.57603012 [44,] 4.35216530 4.22426369 [45,] -2.87179384 4.35216530 [46,] -2.25027974 -2.87179384 [47,] 1.95508789 -2.25027974 [48,] -2.37841488 1.95508789 [49,] -6.19128662 -2.37841488 [50,] 0.22510413 -6.19128662 [51,] -3.24919501 0.22510413 [52,] 2.57576181 -3.24919501 [53,] 0.44729935 2.57576181 [54,] 0.05114542 0.44729935 [55,] 3.14439015 0.05114542 [56,] -3.06399192 3.14439015 [57,] 2.05681166 -3.06399192 [58,] -4.35934556 2.05681166 [59,] 3.74538783 -4.35934556 [60,] 0.63958046 3.74538783 [61,] 3.75671525 0.63958046 [62,] -4.49004948 3.75671525 [63,] 1.70832316 -4.49004948 [64,] -0.82030910 1.70832316 [65,] 2.34689865 -0.82030910 [66,] 2.48645499 2.34689865 [67,] -5.37890799 2.48645499 [68,] 2.65049780 -5.37890799 [69,] 0.24976715 2.65049780 [70,] -0.30476817 0.24976715 [71,] -0.38050585 -0.30476817 [72,] -0.20409835 -0.38050585 [73,] 0.38806222 -0.20409835 [74,] -0.55261762 0.38806222 [75,] 1.46613514 -0.55261762 [76,] -6.74557311 1.46613514 [77,] -0.13849463 -6.74557311 [78,] 1.65133824 -0.13849463 [79,] 1.34373371 1.65133824 [80,] 1.82561919 1.34373371 [81,] -2.44681025 1.82561919 [82,] -0.32058952 -2.44681025 [83,] 3.22085447 -0.32058952 [84,] -1.47488248 3.22085447 [85,] 1.53327999 -1.47488248 [86,] -2.67292808 1.53327999 [87,] 3.31691199 -2.67292808 [88,] 2.22635465 3.31691199 [89,] 0.03130819 2.22635465 [90,] -1.50346812 0.03130819 [91,] -2.90810109 -1.50346812 [92,] -4.04217727 -2.90810109 [93,] -0.42973837 -4.04217727 [94,] 0.08022416 -0.42973837 [95,] 2.34124797 0.08022416 [96,] 6.11462147 2.34124797 [97,] -2.31584675 6.11462147 [98,] -6.47030578 -2.31584675 [99,] 1.25908663 -6.47030578 [100,] -1.95351432 1.25908663 [101,] 1.74189558 -1.95351432 [102,] -4.05498900 1.74189558 [103,] -5.68766472 -4.05498900 [104,] -1.27135699 -5.68766472 [105,] -0.58619004 -1.27135699 [106,] 1.32241218 -0.58619004 [107,] 2.99223559 1.32241218 [108,] 4.85437063 2.99223559 [109,] 2.62082770 4.85437063 [110,] 2.62033460 2.62082770 [111,] -0.34950220 2.62033460 [112,] 1.37188898 -0.34950220 [113,] -3.12338436 1.37188898 [114,] 4.21876351 -3.12338436 [115,] -1.35491935 4.21876351 [116,] -0.46981267 -1.35491935 [117,] -0.38231721 -0.46981267 [118,] -7.88078627 -0.38231721 [119,] 3.57869322 -7.88078627 [120,] 2.13495687 3.57869322 [121,] -2.07148955 2.13495687 [122,] -0.48454930 -2.07148955 [123,] 3.40705926 -0.48454930 [124,] -0.72682035 3.40705926 [125,] 2.28124861 -0.72682035 [126,] -6.37057946 2.28124861 [127,] 6.25442689 -6.37057946 [128,] -0.28151692 6.25442689 [129,] 1.27184610 -0.28151692 [130,] -3.20546267 1.27184610 [131,] -0.59634996 -3.20546267 [132,] -2.72132017 -0.59634996 [133,] -3.34609298 -2.72132017 [134,] -2.52105313 -3.34609298 [135,] 2.61949415 -2.52105313 [136,] 3.61226564 2.61949415 [137,] 0.65683842 3.61226564 [138,] 2.99741921 0.65683842 [139,] -4.49004948 2.99741921 [140,] 2.90934761 -4.49004948 [141,] 1.99448780 2.90934761 [142,] -1.31500631 1.99448780 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.08465910 1.56250923 2 2.59435332 -1.08465910 3 -0.70650051 2.59435332 4 -1.12422481 -0.70650051 5 0.23117564 -1.12422481 6 2.59576509 0.23117564 7 -2.09807773 2.59576509 8 -1.74091337 -2.09807773 9 -0.29292736 -1.74091337 10 -0.28935234 -0.29292736 11 1.52477018 -0.28935234 12 -3.92279028 1.52477018 13 -0.43199059 -3.92279028 14 -0.26593984 -0.43199059 15 -1.42689000 -0.26593984 16 2.61949415 -1.42689000 17 -4.34067583 2.61949415 18 -2.07365873 -4.34067583 19 3.52893681 -2.07365873 20 -1.19943861 3.52893681 21 1.30625897 -1.19943861 22 1.75671525 1.30625897 23 3.80778991 1.75671525 24 -2.35159316 3.80778991 25 0.20210171 -2.35159316 26 2.19767550 0.20210171 27 3.81538105 2.19767550 28 1.10989425 3.81538105 29 0.64290665 1.10989425 30 1.79578785 0.64290665 31 -1.07349748 1.79578785 32 -3.12847447 -1.07349748 33 4.25317637 -3.12847447 34 -0.46587957 4.25317637 35 -0.99134689 -0.46587957 36 0.39505720 -0.99134689 37 3.04665174 0.39505720 38 2.36023426 3.04665174 39 2.52636804 2.36023426 40 -6.67217067 2.52636804 41 -2.28201002 -6.67217067 42 -1.57603012 -2.28201002 43 4.22426369 -1.57603012 44 4.35216530 4.22426369 45 -2.87179384 4.35216530 46 -2.25027974 -2.87179384 47 1.95508789 -2.25027974 48 -2.37841488 1.95508789 49 -6.19128662 -2.37841488 50 0.22510413 -6.19128662 51 -3.24919501 0.22510413 52 2.57576181 -3.24919501 53 0.44729935 2.57576181 54 0.05114542 0.44729935 55 3.14439015 0.05114542 56 -3.06399192 3.14439015 57 2.05681166 -3.06399192 58 -4.35934556 2.05681166 59 3.74538783 -4.35934556 60 0.63958046 3.74538783 61 3.75671525 0.63958046 62 -4.49004948 3.75671525 63 1.70832316 -4.49004948 64 -0.82030910 1.70832316 65 2.34689865 -0.82030910 66 2.48645499 2.34689865 67 -5.37890799 2.48645499 68 2.65049780 -5.37890799 69 0.24976715 2.65049780 70 -0.30476817 0.24976715 71 -0.38050585 -0.30476817 72 -0.20409835 -0.38050585 73 0.38806222 -0.20409835 74 -0.55261762 0.38806222 75 1.46613514 -0.55261762 76 -6.74557311 1.46613514 77 -0.13849463 -6.74557311 78 1.65133824 -0.13849463 79 1.34373371 1.65133824 80 1.82561919 1.34373371 81 -2.44681025 1.82561919 82 -0.32058952 -2.44681025 83 3.22085447 -0.32058952 84 -1.47488248 3.22085447 85 1.53327999 -1.47488248 86 -2.67292808 1.53327999 87 3.31691199 -2.67292808 88 2.22635465 3.31691199 89 0.03130819 2.22635465 90 -1.50346812 0.03130819 91 -2.90810109 -1.50346812 92 -4.04217727 -2.90810109 93 -0.42973837 -4.04217727 94 0.08022416 -0.42973837 95 2.34124797 0.08022416 96 6.11462147 2.34124797 97 -2.31584675 6.11462147 98 -6.47030578 -2.31584675 99 1.25908663 -6.47030578 100 -1.95351432 1.25908663 101 1.74189558 -1.95351432 102 -4.05498900 1.74189558 103 -5.68766472 -4.05498900 104 -1.27135699 -5.68766472 105 -0.58619004 -1.27135699 106 1.32241218 -0.58619004 107 2.99223559 1.32241218 108 4.85437063 2.99223559 109 2.62082770 4.85437063 110 2.62033460 2.62082770 111 -0.34950220 2.62033460 112 1.37188898 -0.34950220 113 -3.12338436 1.37188898 114 4.21876351 -3.12338436 115 -1.35491935 4.21876351 116 -0.46981267 -1.35491935 117 -0.38231721 -0.46981267 118 -7.88078627 -0.38231721 119 3.57869322 -7.88078627 120 2.13495687 3.57869322 121 -2.07148955 2.13495687 122 -0.48454930 -2.07148955 123 3.40705926 -0.48454930 124 -0.72682035 3.40705926 125 2.28124861 -0.72682035 126 -6.37057946 2.28124861 127 6.25442689 -6.37057946 128 -0.28151692 6.25442689 129 1.27184610 -0.28151692 130 -3.20546267 1.27184610 131 -0.59634996 -3.20546267 132 -2.72132017 -0.59634996 133 -3.34609298 -2.72132017 134 -2.52105313 -3.34609298 135 2.61949415 -2.52105313 136 3.61226564 2.61949415 137 0.65683842 3.61226564 138 2.99741921 0.65683842 139 -4.49004948 2.99741921 140 2.90934761 -4.49004948 141 1.99448780 2.90934761 142 -1.31500631 1.99448780 > 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/rcomp/tmp/7bivu1292056053.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/www/rcomp/tmp/8bivu1292056053.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/www/rcomp/tmp/9bivu1292056053.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/www/rcomp/tmp/10lrue1292056053.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/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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='') + } + } Error: subscript out of bounds Execution halted