R version 2.15.2 (2012-10-26) -- "Trick or Treat" 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(4264830 + ,1.23 + ,2.35 + ,1.80 + ,0.48 + ,0.37 + ,0.95 + ,3924674 + ,1.22 + ,2.32 + ,1.79 + ,0.48 + ,0.37 + ,0.97 + ,3734753 + ,1.21 + ,2.36 + ,1.78 + ,0.49 + ,0.38 + ,0.97 + ,3762290 + ,1.22 + ,2.28 + ,1.80 + ,0.49 + ,0.38 + ,0.95 + ,3609739 + ,1.21 + ,2.26 + ,1.79 + ,0.49 + ,0.38 + ,0.96 + ,3877594 + ,1.22 + ,2.31 + ,1.76 + ,0.49 + ,0.38 + ,0.96 + ,3636415 + ,1.21 + ,2.28 + ,1.76 + ,0.49 + ,0.38 + ,0.94 + ,3578195 + ,1.20 + ,2.20 + ,1.77 + ,0.49 + ,0.38 + ,0.96 + ,3604342 + ,1.18 + ,2.24 + ,1.76 + ,0.49 + ,0.38 + ,0.98 + ,3459513 + ,1.19 + ,2.33 + ,1.74 + ,0.49 + ,0.38 + ,0.97 + ,3366571 + ,1.20 + ,2.36 + ,1.75 + ,0.49 + ,0.37 + ,0.96 + ,3371277 + ,1.19 + ,2.23 + ,1.70 + ,0.49 + ,0.39 + ,0.95 + ,3724848 + ,1.19 + ,2.31 + ,1.71 + ,0.49 + ,0.39 + ,0.96 + ,3350830 + ,1.20 + ,2.27 + ,1.77 + ,0.49 + ,0.37 + ,0.96 + ,3305159 + ,1.21 + ,2.28 + ,1.77 + ,0.50 + ,0.37 + ,0.97 + ,3390736 + ,1.20 + ,2.31 + ,1.77 + ,0.49 + ,0.37 + ,0.96 + ,3349758 + ,1.20 + ,2.43 + ,1.77 + ,0.50 + ,0.37 + ,0.95 + ,3253655 + ,1.20 + ,2.46 + ,1.77 + ,0.50 + ,0.36 + ,0.95 + ,3734250 + ,1.21 + ,2.48 + ,1.77 + ,0.51 + ,0.36 + ,0.94 + ,3455433 + ,1.21 + ,2.45 + ,1.79 + ,0.51 + ,0.36 + ,0.94 + ,2966726 + ,1.21 + ,2.44 + ,1.79 + ,0.51 + ,0.37 + ,0.98 + ,2993716 + ,1.20 + ,2.36 + ,1.76 + ,0.50 + ,0.37 + ,0.93 + ,3009320 + ,1.21 + ,2.34 + ,1.76 + ,0.50 + ,0.37 + ,0.93 + ,3169713 + ,1.21 + ,2.16 + ,1.78 + ,0.50 + ,0.38 + ,0.96 + ,3170061 + ,1.21 + ,2.23 + ,1.81 + ,0.49 + ,0.37 + ,0.97 + ,3368934 + ,1.20 + ,2.16 + ,1.77 + ,0.49 + ,0.37 + ,0.97 + ,3292638 + ,1.19 + ,2.20 + ,1.75 + ,0.50 + ,0.37 + ,0.95 + ,3337344 + ,1.20 + ,2.26 + ,1.77 + ,0.50 + ,0.37 + ,0.95 + ,3208306 + ,1.20 + ,2.23 + ,1.72 + ,0.50 + ,0.37 + ,0.96 + ,3359130 + ,1.20 + ,2.32 + ,1.80 + ,0.50 + ,0.37 + ,0.98 + ,3223078 + ,1.22 + ,2.34 + ,1.77 + ,0.50 + ,0.37 + ,0.98 + ,3437159 + ,1.22 + ,2.33 + ,1.80 + ,0.50 + ,0.39 + ,0.97 + ,3400156 + ,1.21 + ,2.30 + ,1.79 + ,0.49 + ,0.39 + ,0.98 + ,3657576 + ,1.25 + ,2.32 + ,1.82 + ,0.50 + ,0.38 + ,0.98 + ,3765613 + ,1.25 + ,2.31 + ,1.81 + ,0.50 + ,0.39 + ,0.99 + ,3481921 + ,1.27 + ,2.32 + ,1.80 + ,0.49 + ,0.38 + ,0.99 + ,3604800 + ,1.28 + ,2.32 + ,1.76 + ,0.50 + ,0.39 + ,0.97 + ,3981340 + ,1.27 + ,2.30 + ,1.73 + ,0.50 + ,0.38 + ,0.98 + ,3734078 + ,1.28 + ,2.33 + ,1.77 + ,0.50 + ,0.39 + ,0.97 + ,4018173 + ,1.29 + ,2.34 + ,1.78 + ,0.51 + ,0.40 + ,0.97 + ,3887417 + ,1.26 + ,2.32 + ,1.77 + ,0.51 + ,0.40 + ,0.97 + ,3919880 + ,1.27 + ,2.32 + ,1.75 + ,0.50 + ,0.39 + ,0.98 + ,4014466 + ,1.25 + ,2.32 + ,1.75 + ,0.51 + ,0.39 + ,0.97 + ,4197758 + ,1.27 + ,2.33 + ,1.78 + ,0.51 + ,0.40 + ,0.97 + ,3896531 + ,1.27 + ,2.36 + ,1.76 + ,0.51 + ,0.39 + ,0.98 + ,3964742 + ,1.27 + ,2.37 + ,1.73 + ,0.51 + ,0.39 + ,0.98 + ,4201847 + ,1.29 + ,2.35 + ,1.77 + ,0.51 + ,0.38 + ,0.95 + ,4050512 + ,1.26 + ,2.28 + ,1.78 + ,0.51 + ,0.39 + ,0.97 + ,3997402 + ,1.27 + ,2.21 + ,1.80 + ,0.51 + ,0.38 + ,0.97 + ,4314479 + ,1.27 + ,2.26 + ,1.81 + ,0.51 + ,0.38 + ,0.97 + ,4925744 + ,1.28 + ,2.32 + ,1.79 + ,0.51 + ,0.39 + ,0.97 + ,5130631 + ,1.28 + ,2.33 + ,1.79 + ,0.51 + ,0.38 + ,0.98 + ,4444855 + ,1.28 + ,2.36 + ,1.79 + ,0.51 + ,0.38 + ,0.98 + ,3967319 + ,1.27 + ,2.36 + ,1.76 + ,0.52 + ,0.38 + ,0.98 + ,3931250 + ,1.24 + ,2.35 + ,1.78 + ,0.51 + ,0.39 + ,0.96 + ,4235952 + ,1.25 + ,2.34 + ,1.81 + ,0.52 + ,0.39 + ,0.98 + ,4169219 + ,1.25 + ,2.32 + ,1.82 + ,0.51 + ,0.39 + ,1.00 + ,3779064 + ,1.24 + ,2.27 + ,1.80 + ,0.52 + ,0.39 + ,1.01 + ,3558810 + ,1.24 + ,2.30 + ,1.78 + ,0.51 + ,0.39 + ,1.02 + ,3699466 + ,1.23 + ,2.29 + ,1.76 + ,0.51 + ,0.39 + ,1.01 + ,3650693 + ,1.24 + ,2.30 + ,1.76 + ,0.51 + ,0.38 + ,1.01 + ,3525633 + ,1.23 + ,2.30 + ,1.76 + ,0.51 + ,0.38 + ,1.02 + ,3470276 + ,1.24 + ,2.36 + ,1.77 + ,0.51 + ,0.37 + ,1.01 + ,3859094 + ,1.24 + ,2.35 + ,1.78 + ,0.50 + ,0.37 + ,1.01 + ,3661155 + ,1.24 + ,2.35 + ,1.78 + ,0.50 + ,0.37 + ,1.01 + ,3356365 + ,1.25 + ,2.30 + ,1.79 + ,0.50 + ,0.38 + ,1.02 + ,3344440 + ,1.26 + ,2.24 + ,1.84 + ,0.50 + ,0.37 + ,1.02 + ,3338684 + ,1.26 + ,2.22 + ,1.91 + ,0.51 + ,0.37 + ,1.02 + ,3404294 + ,1.27 + ,2.27 + ,1.92 + ,0.51 + ,0.37 + ,1.01 + ,3289319 + ,1.26 + ,2.37 + ,1.86 + ,0.51 + ,0.37 + ,1.01 + ,3469252 + ,1.28 + ,2.38 + ,1.76 + ,0.53 + ,0.37 + ,0.99 + ,3571850 + ,1.29 + ,2.41 + ,1.80 + ,0.52 + ,0.37 + ,1.00 + ,3639914 + ,1.28 + ,2.37 + ,1.81 + ,0.50 + ,0.37 + ,1.01 + ,3091730 + ,1.27 + ,2.37 + ,1.80 + ,0.50 + ,0.38 + ,0.99 + ,3078149 + ,1.30 + ,2.36 + ,1.81 + ,0.50 + ,0.38 + ,1.00 + ,3188115 + ,1.30 + ,2.30 + ,1.80 + ,0.50 + ,0.38 + ,1.02 + ,3246082 + ,1.28 + ,2.18 + ,1.80 + ,0.50 + ,0.38 + ,1.01 + ,3486992 + ,1.29 + ,2.22 + ,1.76 + ,0.51 + ,0.38 + ,1.01 + ,3378187 + ,1.27 + ,2.24 + ,1.76 + ,0.50 + ,0.38 + ,1.01 + ,3282306 + ,1.26 + ,2.17 + ,1.76 + ,0.50 + ,0.38 + ,1.03 + ,3288345 + ,1.27 + ,2.23 + ,1.78 + ,0.51 + ,0.38 + ,1.02 + ,3325749 + ,1.27 + ,2.27 + ,1.77 + ,0.52 + ,0.39 + ,1.02 + ,3352262 + ,1.27 + ,2.25 + ,1.80 + ,0.52 + ,0.39 + ,1.03 + ,3531954 + ,1.28 + ,2.25 + ,1.80 + ,0.52 + ,0.39 + ,1.03 + ,3722622 + ,1.29 + ,2.27 + ,1.81 + ,0.52 + ,0.39 + ,1.02 + ,3809365 + ,1.28 + ,2.28 + ,1.79 + ,0.50 + ,0.39 + ,1.02 + ,3750617 + ,1.30 + ,2.32 + ,1.81 + ,0.49 + ,0.38 + ,1.02 + ,3615286 + ,1.30 + ,2.33 + ,1.81 + ,0.49 + ,0.39 + ,1.02 + ,3696556 + ,1.30 + ,2.30 + ,1.79 + ,0.49 + ,0.39 + ,1.03 + ,4123959 + ,1.29 + ,2.30 + ,1.79 + ,0.49 + ,0.39 + ,1.02 + ,4136163 + ,1.30 + ,2.20 + ,1.79 + ,0.50 + ,0.40 + ,1.02 + ,3933392 + ,1.29 + ,2.15 + ,1.79 + ,0.51 + ,0.40 + ,1.02 + ,4035576 + ,1.28 + ,2.15 + ,1.80 + ,0.50 + ,0.40 + ,1.03 + ,4551202 + ,1.30 + ,2.13 + ,1.86 + ,0.50 + ,0.40 + ,1.02 + ,4032195 + ,1.30 + ,2.12 + ,1.93 + ,0.50 + ,0.41 + ,1.02 + ,3970893 + ,1.31 + ,2.17 + ,1.81 + ,0.50 + ,0.40 + ,1.02 + ,4489016 + ,1.32 + ,2.20 + ,1.70 + ,0.49 + ,0.40 + ,1.02 + ,5426127 + ,1.33 + ,2.21 + ,1.74 + ,0.49 + ,0.39 + ,1.02 + ,4578224 + ,1.32 + ,2.28 + ,1.74 + ,0.49 + ,0.39 + ,1.00 + ,4126390 + ,1.30 + ,2.32 + ,1.73 + ,0.49 + ,0.39 + ,1.04 + ,4892100 + ,1.31 + ,2.32 + ,1.76 + ,0.48 + ,0.39 + ,1.04 + ,4128697 + ,1.30 + ,2.33 + ,1.75 + ,0.49 + ,0.40 + ,1.03 + ,4408721 + ,1.30 + ,2.32 + ,1.79 + ,0.49 + ,0.39 + ,1.02 + ,4199465 + ,1.30 + ,2.31 + ,1.79 + ,0.49 + ,0.39 + ,1.04 + ,4074767 + ,1.29 + ,2.33 + ,1.83 + ,0.49 + ,0.39 + ,1.05 + ,4161758 + ,1.29 + ,2.31 + ,1.82 + ,0.48 + ,0.39 + ,1.03 + ,3891319 + ,1.30 + ,2.19 + ,1.85 + ,0.48 + ,0.39 + ,0.99 + ,4470302 + ,1.30 + ,2.13 + ,1.85 + ,0.48 + ,0.40 + ,1.03 + ,4283111 + ,1.29 + ,2.15 + ,1.86 + ,0.48 + ,0.39 + ,1.08 + ,3845962 + ,1.27 + ,2.25 + ,1.83 + ,0.49 + ,0.39 + ,1.09 + ,3911471 + ,1.26 + ,2.29 + ,1.87 + ,0.48 + ,0.39 + ,1.08 + ,3798478 + ,1.25 + ,2.29 + ,1.88 + ,0.48 + ,0.39 + ,1.05 + ,3644313 + ,1.26 + ,2.29 + ,1.92 + ,0.50 + ,0.39 + ,1.06 + ,3784029 + ,1.27 + ,2.32 + ,1.91 + ,0.48 + ,0.39 + ,1.04 + ,3647134 + ,1.26 + ,2.32 + ,1.93 + ,0.48 + ,0.39 + ,1.06 + ,3994662 + ,1.25 + ,2.34 + ,1.90 + ,0.48 + ,0.38 + ,1.06 + ,3607836 + ,1.25 + ,2.32 + ,1.91 + ,0.47 + ,0.38 + ,1.07 + ,3566008 + ,1.25 + ,2.16 + ,1.89 + ,0.48 + ,0.38 + ,1.08 + ,3511412 + ,1.26 + ,1.88 + ,1.91 + ,0.48 + ,0.39 + ,1.08 + ,3258665 + ,1.26 + ,2.02 + ,1.92 + ,0.48 + ,0.39 + ,1.05 + ,3486573 + ,1.26 + ,2.07 + ,1.91 + ,0.48 + ,0.39 + ,1.04 + ,3369443 + ,1.27 + ,2.22 + ,1.95 + ,0.48 + ,0.39 + ,1.04 + ,3465544 + ,1.28 + ,2.40 + ,1.95 + ,0.49 + ,0.39 + ,1.04 + ,3905224 + ,1.29 + ,2.47 + ,1.97 + ,0.50 + ,0.39 + ,1.04 + ,3733881 + ,1.30 + ,2.43 + ,1.97 + ,0.49 + ,0.39 + ,1.06 + ,3220642 + ,1.26 + ,2.39 + ,1.94 + ,0.49 + ,0.40 + ,1.08 + ,3225812 + ,1.25 + ,2.39 + ,1.93 + ,0.52 + ,0.44 + ,1.08 + ,3354461 + ,1.26 + ,2.39 + ,1.92 + ,0.52 + ,0.44 + ,1.08 + ,3352261 + ,1.25 + ,2.36 + ,1.93 + ,0.51 + ,0.44 + ,1.07 + ,3450652 + ,1.24 + ,2.32 + ,1.91 + ,0.54 + ,0.45 + ,1.06) + ,dim=c(7 + ,130) + ,dimnames=list(c('QBEPIL' + ,'PBEPIL' + ,'PBEABD' + ,'PBEWIT' + ,'PWABR' + ,'PWAPL' + ,'PSOCOLA') + ,1:130)) > y <- array(NA,dim=c(7,130),dimnames=list(c('QBEPIL','PBEPIL','PBEABD','PBEWIT','PWABR','PWAPL','PSOCOLA'),1:130)) > 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' > par3 <- 'No Linear Trend' > par2 <- 'Do not include Seasonal Dummies' > par1 <- '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, 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 QBEPIL PBEPIL PBEABD PBEWIT PWABR PWAPL PSOCOLA 1 4264830 1.23 2.35 1.80 0.48 0.37 0.95 2 3924674 1.22 2.32 1.79 0.48 0.37 0.97 3 3734753 1.21 2.36 1.78 0.49 0.38 0.97 4 3762290 1.22 2.28 1.80 0.49 0.38 0.95 5 3609739 1.21 2.26 1.79 0.49 0.38 0.96 6 3877594 1.22 2.31 1.76 0.49 0.38 0.96 7 3636415 1.21 2.28 1.76 0.49 0.38 0.94 8 3578195 1.20 2.20 1.77 0.49 0.38 0.96 9 3604342 1.18 2.24 1.76 0.49 0.38 0.98 10 3459513 1.19 2.33 1.74 0.49 0.38 0.97 11 3366571 1.20 2.36 1.75 0.49 0.37 0.96 12 3371277 1.19 2.23 1.70 0.49 0.39 0.95 13 3724848 1.19 2.31 1.71 0.49 0.39 0.96 14 3350830 1.20 2.27 1.77 0.49 0.37 0.96 15 3305159 1.21 2.28 1.77 0.50 0.37 0.97 16 3390736 1.20 2.31 1.77 0.49 0.37 0.96 17 3349758 1.20 2.43 1.77 0.50 0.37 0.95 18 3253655 1.20 2.46 1.77 0.50 0.36 0.95 19 3734250 1.21 2.48 1.77 0.51 0.36 0.94 20 3455433 1.21 2.45 1.79 0.51 0.36 0.94 21 2966726 1.21 2.44 1.79 0.51 0.37 0.98 22 2993716 1.20 2.36 1.76 0.50 0.37 0.93 23 3009320 1.21 2.34 1.76 0.50 0.37 0.93 24 3169713 1.21 2.16 1.78 0.50 0.38 0.96 25 3170061 1.21 2.23 1.81 0.49 0.37 0.97 26 3368934 1.20 2.16 1.77 0.49 0.37 0.97 27 3292638 1.19 2.20 1.75 0.50 0.37 0.95 28 3337344 1.20 2.26 1.77 0.50 0.37 0.95 29 3208306 1.20 2.23 1.72 0.50 0.37 0.96 30 3359130 1.20 2.32 1.80 0.50 0.37 0.98 31 3223078 1.22 2.34 1.77 0.50 0.37 0.98 32 3437159 1.22 2.33 1.80 0.50 0.39 0.97 33 3400156 1.21 2.30 1.79 0.49 0.39 0.98 34 3657576 1.25 2.32 1.82 0.50 0.38 0.98 35 3765613 1.25 2.31 1.81 0.50 0.39 0.99 36 3481921 1.27 2.32 1.80 0.49 0.38 0.99 37 3604800 1.28 2.32 1.76 0.50 0.39 0.97 38 3981340 1.27 2.30 1.73 0.50 0.38 0.98 39 3734078 1.28 2.33 1.77 0.50 0.39 0.97 40 4018173 1.29 2.34 1.78 0.51 0.40 0.97 41 3887417 1.26 2.32 1.77 0.51 0.40 0.97 42 3919880 1.27 2.32 1.75 0.50 0.39 0.98 43 4014466 1.25 2.32 1.75 0.51 0.39 0.97 44 4197758 1.27 2.33 1.78 0.51 0.40 0.97 45 3896531 1.27 2.36 1.76 0.51 0.39 0.98 46 3964742 1.27 2.37 1.73 0.51 0.39 0.98 47 4201847 1.29 2.35 1.77 0.51 0.38 0.95 48 4050512 1.26 2.28 1.78 0.51 0.39 0.97 49 3997402 1.27 2.21 1.80 0.51 0.38 0.97 50 4314479 1.27 2.26 1.81 0.51 0.38 0.97 51 4925744 1.28 2.32 1.79 0.51 0.39 0.97 52 5130631 1.28 2.33 1.79 0.51 0.38 0.98 53 4444855 1.28 2.36 1.79 0.51 0.38 0.98 54 3967319 1.27 2.36 1.76 0.52 0.38 0.98 55 3931250 1.24 2.35 1.78 0.51 0.39 0.96 56 4235952 1.25 2.34 1.81 0.52 0.39 0.98 57 4169219 1.25 2.32 1.82 0.51 0.39 1.00 58 3779064 1.24 2.27 1.80 0.52 0.39 1.01 59 3558810 1.24 2.30 1.78 0.51 0.39 1.02 60 3699466 1.23 2.29 1.76 0.51 0.39 1.01 61 3650693 1.24 2.30 1.76 0.51 0.38 1.01 62 3525633 1.23 2.30 1.76 0.51 0.38 1.02 63 3470276 1.24 2.36 1.77 0.51 0.37 1.01 64 3859094 1.24 2.35 1.78 0.50 0.37 1.01 65 3661155 1.24 2.35 1.78 0.50 0.37 1.01 66 3356365 1.25 2.30 1.79 0.50 0.38 1.02 67 3344440 1.26 2.24 1.84 0.50 0.37 1.02 68 3338684 1.26 2.22 1.91 0.51 0.37 1.02 69 3404294 1.27 2.27 1.92 0.51 0.37 1.01 70 3289319 1.26 2.37 1.86 0.51 0.37 1.01 71 3469252 1.28 2.38 1.76 0.53 0.37 0.99 72 3571850 1.29 2.41 1.80 0.52 0.37 1.00 73 3639914 1.28 2.37 1.81 0.50 0.37 1.01 74 3091730 1.27 2.37 1.80 0.50 0.38 0.99 75 3078149 1.30 2.36 1.81 0.50 0.38 1.00 76 3188115 1.30 2.30 1.80 0.50 0.38 1.02 77 3246082 1.28 2.18 1.80 0.50 0.38 1.01 78 3486992 1.29 2.22 1.76 0.51 0.38 1.01 79 3378187 1.27 2.24 1.76 0.50 0.38 1.01 80 3282306 1.26 2.17 1.76 0.50 0.38 1.03 81 3288345 1.27 2.23 1.78 0.51 0.38 1.02 82 3325749 1.27 2.27 1.77 0.52 0.39 1.02 83 3352262 1.27 2.25 1.80 0.52 0.39 1.03 84 3531954 1.28 2.25 1.80 0.52 0.39 1.03 85 3722622 1.29 2.27 1.81 0.52 0.39 1.02 86 3809365 1.28 2.28 1.79 0.50 0.39 1.02 87 3750617 1.30 2.32 1.81 0.49 0.38 1.02 88 3615286 1.30 2.33 1.81 0.49 0.39 1.02 89 3696556 1.30 2.30 1.79 0.49 0.39 1.03 90 4123959 1.29 2.30 1.79 0.49 0.39 1.02 91 4136163 1.30 2.20 1.79 0.50 0.40 1.02 92 3933392 1.29 2.15 1.79 0.51 0.40 1.02 93 4035576 1.28 2.15 1.80 0.50 0.40 1.03 94 4551202 1.30 2.13 1.86 0.50 0.40 1.02 95 4032195 1.30 2.12 1.93 0.50 0.41 1.02 96 3970893 1.31 2.17 1.81 0.50 0.40 1.02 97 4489016 1.32 2.20 1.70 0.49 0.40 1.02 98 5426127 1.33 2.21 1.74 0.49 0.39 1.02 99 4578224 1.32 2.28 1.74 0.49 0.39 1.00 100 4126390 1.30 2.32 1.73 0.49 0.39 1.04 101 4892100 1.31 2.32 1.76 0.48 0.39 1.04 102 4128697 1.30 2.33 1.75 0.49 0.40 1.03 103 4408721 1.30 2.32 1.79 0.49 0.39 1.02 104 4199465 1.30 2.31 1.79 0.49 0.39 1.04 105 4074767 1.29 2.33 1.83 0.49 0.39 1.05 106 4161758 1.29 2.31 1.82 0.48 0.39 1.03 107 3891319 1.30 2.19 1.85 0.48 0.39 0.99 108 4470302 1.30 2.13 1.85 0.48 0.40 1.03 109 4283111 1.29 2.15 1.86 0.48 0.39 1.08 110 3845962 1.27 2.25 1.83 0.49 0.39 1.09 111 3911471 1.26 2.29 1.87 0.48 0.39 1.08 112 3798478 1.25 2.29 1.88 0.48 0.39 1.05 113 3644313 1.26 2.29 1.92 0.50 0.39 1.06 114 3784029 1.27 2.32 1.91 0.48 0.39 1.04 115 3647134 1.26 2.32 1.93 0.48 0.39 1.06 116 3994662 1.25 2.34 1.90 0.48 0.38 1.06 117 3607836 1.25 2.32 1.91 0.47 0.38 1.07 118 3566008 1.25 2.16 1.89 0.48 0.38 1.08 119 3511412 1.26 1.88 1.91 0.48 0.39 1.08 120 3258665 1.26 2.02 1.92 0.48 0.39 1.05 121 3486573 1.26 2.07 1.91 0.48 0.39 1.04 122 3369443 1.27 2.22 1.95 0.48 0.39 1.04 123 3465544 1.28 2.40 1.95 0.49 0.39 1.04 124 3905224 1.29 2.47 1.97 0.50 0.39 1.04 125 3733881 1.30 2.43 1.97 0.49 0.39 1.06 126 3220642 1.26 2.39 1.94 0.49 0.40 1.08 127 3225812 1.25 2.39 1.93 0.52 0.44 1.08 128 3354461 1.26 2.39 1.92 0.52 0.44 1.08 129 3352261 1.25 2.36 1.93 0.51 0.44 1.07 130 3450652 1.24 2.32 1.91 0.54 0.45 1.06 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) PBEPIL PBEABD PBEWIT PWABR PWAPL 937628 8056925 235921 -1529426 -9625944 8079834 PSOCOLA -3415029 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -964330 -198286 -3179 175827 1253738 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 937628 1901642 0.493 0.62285 PBEPIL 8056925 1020057 7.899 1.34e-12 *** PBEABD 235921 363469 0.649 0.51749 PBEWIT -1529426 671513 -2.278 0.02448 * PWABR -9625944 2669247 -3.606 0.00045 *** PWAPL 8079834 2613469 3.092 0.00246 ** PSOCOLA -3415029 1297500 -2.632 0.00958 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 338600 on 123 degrees of freedom Multiple R-squared: 0.4361, Adjusted R-squared: 0.4086 F-statistic: 15.85 on 6 and 123 DF, p-value: 1.975e-13 > 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.1268807811 0.2537615622 0.8731192189 [2,] 0.0483431579 0.0966863159 0.9516568421 [3,] 0.0285675025 0.0571350049 0.9714324975 [4,] 0.0167257910 0.0334515819 0.9832742090 [5,] 0.0061524520 0.0123049040 0.9938475480 [6,] 0.0032173594 0.0064347188 0.9967826406 [7,] 0.0011344043 0.0022688085 0.9988655957 [8,] 0.0006020237 0.0012040474 0.9993979763 [9,] 0.0002538534 0.0005077068 0.9997461466 [10,] 0.0078538998 0.0157077995 0.9921461002 [11,] 0.0039945143 0.0079890287 0.9960054857 [12,] 0.0088611700 0.0177223400 0.9911388300 [13,] 0.0221292206 0.0442584411 0.9778707794 [14,] 0.0337464349 0.0674928699 0.9662535651 [15,] 0.0216521029 0.0433042058 0.9783478971 [16,] 0.0214713602 0.0429427204 0.9785286398 [17,] 0.0149997292 0.0299994584 0.9850002708 [18,] 0.0148541726 0.0297083452 0.9851458274 [19,] 0.0099939782 0.0199879564 0.9900060218 [20,] 0.0061715572 0.0123431145 0.9938284428 [21,] 0.0037728301 0.0075456602 0.9962271699 [22,] 0.0031197125 0.0062394250 0.9968802875 [23,] 0.0019562329 0.0039124658 0.9980437671 [24,] 0.0016617143 0.0033234287 0.9983382857 [25,] 0.0009605448 0.0019210896 0.9990394552 [26,] 0.0005789291 0.0011578581 0.9994210709 [27,] 0.0012759004 0.0025518008 0.9987240996 [28,] 0.0009809035 0.0019618071 0.9990190965 [29,] 0.0015467690 0.0030935381 0.9984532310 [30,] 0.0011294526 0.0022589051 0.9988705474 [31,] 0.0011907067 0.0023814134 0.9988092933 [32,] 0.0010892533 0.0021785065 0.9989107467 [33,] 0.0007352459 0.0014704918 0.9992647541 [34,] 0.0012615012 0.0025230024 0.9987384988 [35,] 0.0014677661 0.0029355321 0.9985322339 [36,] 0.0009757689 0.0019515378 0.9990242311 [37,] 0.0006609548 0.0013219095 0.9993390452 [38,] 0.0006150100 0.0012300200 0.9993849900 [39,] 0.0006231605 0.0012463210 0.9993768395 [40,] 0.0005880148 0.0011760296 0.9994119852 [41,] 0.0013986452 0.0027972904 0.9986013548 [42,] 0.0218232703 0.0436465406 0.9781767297 [43,] 0.3336739433 0.6673478867 0.6663260567 [44,] 0.3884596082 0.7769192164 0.6115403918 [45,] 0.3550719538 0.7101439075 0.6449280462 [46,] 0.3213012494 0.6426024989 0.6786987506 [47,] 0.4299989364 0.8599978728 0.5700010636 [48,] 0.5069916065 0.9860167870 0.4930083935 [49,] 0.5162695050 0.9674609900 0.4837304950 [50,] 0.4782472733 0.9564945467 0.5217527267 [51,] 0.4576433342 0.9152866683 0.5423566658 [52,] 0.4315881637 0.8631763274 0.5684118363 [53,] 0.4047325597 0.8094651195 0.5952674403 [54,] 0.3816154607 0.7632309215 0.6183845393 [55,] 0.4618596047 0.9237192095 0.5381403953 [56,] 0.5105119733 0.9789760533 0.4894880267 [57,] 0.5142342653 0.9715314695 0.4857657347 [58,] 0.5198446712 0.9603106575 0.4801553288 [59,] 0.5302654575 0.9394690850 0.4697345425 [60,] 0.5371988601 0.9256022797 0.4628011399 [61,] 0.5479536972 0.9040926057 0.4520463028 [62,] 0.5813953779 0.8372092442 0.4186046221 [63,] 0.5866775447 0.8266449107 0.4133224553 [64,] 0.5677253879 0.8645492242 0.4322746121 [65,] 0.6598688961 0.6802622078 0.3401311039 [66,] 0.8573931588 0.2852136824 0.1426068412 [67,] 0.9440654568 0.1118690865 0.0559345432 [68,] 0.9508938416 0.0982123167 0.0491061584 [69,] 0.9443680359 0.1112639282 0.0556319641 [70,] 0.9333122351 0.1333755298 0.0666877649 [71,] 0.9219270742 0.1561458516 0.0780729258 [72,] 0.9117767811 0.1764464379 0.0882232189 [73,] 0.9052650097 0.1894699806 0.0947349903 [74,] 0.8919685751 0.2160628498 0.1080314249 [75,] 0.8720080576 0.2559838847 0.1279919424 [76,] 0.8434510828 0.3130978344 0.1565489172 [77,] 0.8100783483 0.3798433034 0.1899216517 [78,] 0.8217510946 0.3564978109 0.1782489054 [79,] 0.8855629688 0.2288740624 0.1144370312 [80,] 0.9377906126 0.1244187749 0.0622093874 [81,] 0.9250106309 0.1499787383 0.0749893691 [82,] 0.9073730684 0.1852538632 0.0926269316 [83,] 0.8933863353 0.2132273293 0.1066136647 [84,] 0.8674602889 0.2650794222 0.1325397111 [85,] 0.9157793278 0.1684413445 0.0842206722 [86,] 0.9078636089 0.1842727823 0.0921363911 [87,] 0.9070959367 0.1858081266 0.0929040633 [88,] 0.9138086592 0.1723826817 0.0861913408 [89,] 0.9937378057 0.0125243886 0.0062621943 [90,] 0.9902764353 0.0194471293 0.0097235647 [91,] 0.9943436699 0.0113126603 0.0056563301 [92,] 0.9970679563 0.0058640875 0.0029320437 [93,] 0.9977849210 0.0044301580 0.0022150790 [94,] 0.9961715088 0.0076569824 0.0038284912 [95,] 0.9954868709 0.0090262583 0.0045131291 [96,] 0.9939114873 0.0121770254 0.0060885127 [97,] 0.9912246778 0.0175506444 0.0087753222 [98,] 0.9981838666 0.0036322669 0.0018161334 [99,] 0.9971405643 0.0057188714 0.0028594357 [100,] 0.9987321225 0.0025357549 0.0012678775 [101,] 0.9990416257 0.0019167485 0.0009583743 [102,] 0.9977665155 0.0044669690 0.0022334845 [103,] 0.9949590142 0.0100819716 0.0050409858 [104,] 0.9901059042 0.0197881917 0.0098940958 [105,] 0.9792544565 0.0414910870 0.0207455435 [106,] 0.9669933238 0.0660133525 0.0330066762 [107,] 0.9767887802 0.0464224396 0.0232112198 [108,] 0.9799526972 0.0400946056 0.0200473028 [109,] 0.9740217408 0.0519565184 0.0259782592 [110,] 0.9574218532 0.0851562936 0.0425781468 [111,] 0.9028294252 0.1943411495 0.0971705748 > postscript(file="/var/fisher/rcomp/tmp/15k9p1353434897.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/2d0rn1353434897.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/3rwy01353434897.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/4epji1353434897.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/5megm1353434897.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 = 130 Frequency = 1 1 2 3 4 5 6 490928.4047 291425.6126 172803.8493 100933.2501 52525.9549 182132.8478 7 8 9 10 11 12 -39699.8407 85117.9597 315972.9264 4602.9396 -114043.6378 -270316.9008 13 14 15 16 17 18 113824.9462 -77963.1924 -76152.9255 -47494.0454 -54673.4524 -77055.7515 19 20 21 22 23 24 380360.7224 139209.8883 -291335.0795 -477795.8026 -538042.6276 -282942.7340 25 26 27 28 29 30 -234537.2486 242.4432 -7550.8225 -26980.8273 -191262.2132 128983.5523 31 32 33 34 35 36 -218808.1666 -152232.1351 -178991.6589 -25626.5197 22827.3797 -455117.7009 37 38 39 40 41 42 -526824.4835 4069.0357 -384611.4336 -152689.5341 -52313.6162 -112319.2052 43 44 45 46 47 48 205514.4498 190393.1822 -33551.3533 -13582.3558 106627.0910 216310.8405 49 50 51 52 53 54 210532.9486 531108.1455 936261.7476 1253738.1649 560884.5252 214294.4292 55 56 57 58 59 60 207522.5610 644457.3336 569778.1612 371809.6844 51780.3666 210626.0152 61 62 63 64 65 66 159722.8911 149382.4325 61243.2154 371455.2499 173516.2499 -231400.7230 67 68 69 70 71 72 -152470.0389 49811.6712 4200.3267 -145563.1329 -157852.1765 -143833.1672 73 74 75 76 77 78 -128837.3933 -760845.3253 -964330.3137 -787202.7175 -573936.9454 -387950.6606 79 80 81 82 83 84 -436595.0258 -367091.7018 -363079.5547 -334945.5696 -223681.0639 -124558.3154 85 86 87 88 89 90 -38034.0202 -96188.3917 -310384.3227 -528872.8766 -436963.4732 36858.4885 91 92 93 94 95 96 7546.4705 -6599.7699 129338.5928 546159.8051 55773.5195 -200626.6150 97 98 99 100 101 102 -34646.8423 961511.0860 109362.2650 -69463.1884 565300.9076 -153875.5060 103 104 105 106 107 108 236332.8105 97736.6035 144216.7709 56071.9127 -357344.1502 291596.9482 109 110 111 112 113 114 447100.8265 232025.1394 299433.8588 179853.5037 232965.4781 8920.8604 115 116 117 118 119 120 51484.2179 509778.5942 80856.1319 176596.7493 57279.6542 -315652.9378 121 122 123 124 125 126 -148985.5570 -320895.9547 -251570.6028 217873.6210 -52560.6396 -292466.3307 127 128 129 130 -256436.3794 -223650.8940 -253319.4714 78318.8018 > postscript(file="/var/fisher/rcomp/tmp/6uzc71353434897.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 = 130 Frequency = 1 lag(myerror, k = 1) myerror 0 490928.4047 NA 1 291425.6126 490928.4047 2 172803.8493 291425.6126 3 100933.2501 172803.8493 4 52525.9549 100933.2501 5 182132.8478 52525.9549 6 -39699.8407 182132.8478 7 85117.9597 -39699.8407 8 315972.9264 85117.9597 9 4602.9396 315972.9264 10 -114043.6378 4602.9396 11 -270316.9008 -114043.6378 12 113824.9462 -270316.9008 13 -77963.1924 113824.9462 14 -76152.9255 -77963.1924 15 -47494.0454 -76152.9255 16 -54673.4524 -47494.0454 17 -77055.7515 -54673.4524 18 380360.7224 -77055.7515 19 139209.8883 380360.7224 20 -291335.0795 139209.8883 21 -477795.8026 -291335.0795 22 -538042.6276 -477795.8026 23 -282942.7340 -538042.6276 24 -234537.2486 -282942.7340 25 242.4432 -234537.2486 26 -7550.8225 242.4432 27 -26980.8273 -7550.8225 28 -191262.2132 -26980.8273 29 128983.5523 -191262.2132 30 -218808.1666 128983.5523 31 -152232.1351 -218808.1666 32 -178991.6589 -152232.1351 33 -25626.5197 -178991.6589 34 22827.3797 -25626.5197 35 -455117.7009 22827.3797 36 -526824.4835 -455117.7009 37 4069.0357 -526824.4835 38 -384611.4336 4069.0357 39 -152689.5341 -384611.4336 40 -52313.6162 -152689.5341 41 -112319.2052 -52313.6162 42 205514.4498 -112319.2052 43 190393.1822 205514.4498 44 -33551.3533 190393.1822 45 -13582.3558 -33551.3533 46 106627.0910 -13582.3558 47 216310.8405 106627.0910 48 210532.9486 216310.8405 49 531108.1455 210532.9486 50 936261.7476 531108.1455 51 1253738.1649 936261.7476 52 560884.5252 1253738.1649 53 214294.4292 560884.5252 54 207522.5610 214294.4292 55 644457.3336 207522.5610 56 569778.1612 644457.3336 57 371809.6844 569778.1612 58 51780.3666 371809.6844 59 210626.0152 51780.3666 60 159722.8911 210626.0152 61 149382.4325 159722.8911 62 61243.2154 149382.4325 63 371455.2499 61243.2154 64 173516.2499 371455.2499 65 -231400.7230 173516.2499 66 -152470.0389 -231400.7230 67 49811.6712 -152470.0389 68 4200.3267 49811.6712 69 -145563.1329 4200.3267 70 -157852.1765 -145563.1329 71 -143833.1672 -157852.1765 72 -128837.3933 -143833.1672 73 -760845.3253 -128837.3933 74 -964330.3137 -760845.3253 75 -787202.7175 -964330.3137 76 -573936.9454 -787202.7175 77 -387950.6606 -573936.9454 78 -436595.0258 -387950.6606 79 -367091.7018 -436595.0258 80 -363079.5547 -367091.7018 81 -334945.5696 -363079.5547 82 -223681.0639 -334945.5696 83 -124558.3154 -223681.0639 84 -38034.0202 -124558.3154 85 -96188.3917 -38034.0202 86 -310384.3227 -96188.3917 87 -528872.8766 -310384.3227 88 -436963.4732 -528872.8766 89 36858.4885 -436963.4732 90 7546.4705 36858.4885 91 -6599.7699 7546.4705 92 129338.5928 -6599.7699 93 546159.8051 129338.5928 94 55773.5195 546159.8051 95 -200626.6150 55773.5195 96 -34646.8423 -200626.6150 97 961511.0860 -34646.8423 98 109362.2650 961511.0860 99 -69463.1884 109362.2650 100 565300.9076 -69463.1884 101 -153875.5060 565300.9076 102 236332.8105 -153875.5060 103 97736.6035 236332.8105 104 144216.7709 97736.6035 105 56071.9127 144216.7709 106 -357344.1502 56071.9127 107 291596.9482 -357344.1502 108 447100.8265 291596.9482 109 232025.1394 447100.8265 110 299433.8588 232025.1394 111 179853.5037 299433.8588 112 232965.4781 179853.5037 113 8920.8604 232965.4781 114 51484.2179 8920.8604 115 509778.5942 51484.2179 116 80856.1319 509778.5942 117 176596.7493 80856.1319 118 57279.6542 176596.7493 119 -315652.9378 57279.6542 120 -148985.5570 -315652.9378 121 -320895.9547 -148985.5570 122 -251570.6028 -320895.9547 123 217873.6210 -251570.6028 124 -52560.6396 217873.6210 125 -292466.3307 -52560.6396 126 -256436.3794 -292466.3307 127 -223650.8940 -256436.3794 128 -253319.4714 -223650.8940 129 78318.8018 -253319.4714 130 NA 78318.8018 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 291425.6126 490928.4047 [2,] 172803.8493 291425.6126 [3,] 100933.2501 172803.8493 [4,] 52525.9549 100933.2501 [5,] 182132.8478 52525.9549 [6,] -39699.8407 182132.8478 [7,] 85117.9597 -39699.8407 [8,] 315972.9264 85117.9597 [9,] 4602.9396 315972.9264 [10,] -114043.6378 4602.9396 [11,] -270316.9008 -114043.6378 [12,] 113824.9462 -270316.9008 [13,] -77963.1924 113824.9462 [14,] -76152.9255 -77963.1924 [15,] -47494.0454 -76152.9255 [16,] -54673.4524 -47494.0454 [17,] -77055.7515 -54673.4524 [18,] 380360.7224 -77055.7515 [19,] 139209.8883 380360.7224 [20,] -291335.0795 139209.8883 [21,] -477795.8026 -291335.0795 [22,] -538042.6276 -477795.8026 [23,] -282942.7340 -538042.6276 [24,] -234537.2486 -282942.7340 [25,] 242.4432 -234537.2486 [26,] -7550.8225 242.4432 [27,] -26980.8273 -7550.8225 [28,] -191262.2132 -26980.8273 [29,] 128983.5523 -191262.2132 [30,] -218808.1666 128983.5523 [31,] -152232.1351 -218808.1666 [32,] -178991.6589 -152232.1351 [33,] -25626.5197 -178991.6589 [34,] 22827.3797 -25626.5197 [35,] -455117.7009 22827.3797 [36,] -526824.4835 -455117.7009 [37,] 4069.0357 -526824.4835 [38,] -384611.4336 4069.0357 [39,] -152689.5341 -384611.4336 [40,] -52313.6162 -152689.5341 [41,] -112319.2052 -52313.6162 [42,] 205514.4498 -112319.2052 [43,] 190393.1822 205514.4498 [44,] -33551.3533 190393.1822 [45,] -13582.3558 -33551.3533 [46,] 106627.0910 -13582.3558 [47,] 216310.8405 106627.0910 [48,] 210532.9486 216310.8405 [49,] 531108.1455 210532.9486 [50,] 936261.7476 531108.1455 [51,] 1253738.1649 936261.7476 [52,] 560884.5252 1253738.1649 [53,] 214294.4292 560884.5252 [54,] 207522.5610 214294.4292 [55,] 644457.3336 207522.5610 [56,] 569778.1612 644457.3336 [57,] 371809.6844 569778.1612 [58,] 51780.3666 371809.6844 [59,] 210626.0152 51780.3666 [60,] 159722.8911 210626.0152 [61,] 149382.4325 159722.8911 [62,] 61243.2154 149382.4325 [63,] 371455.2499 61243.2154 [64,] 173516.2499 371455.2499 [65,] -231400.7230 173516.2499 [66,] -152470.0389 -231400.7230 [67,] 49811.6712 -152470.0389 [68,] 4200.3267 49811.6712 [69,] -145563.1329 4200.3267 [70,] -157852.1765 -145563.1329 [71,] -143833.1672 -157852.1765 [72,] -128837.3933 -143833.1672 [73,] -760845.3253 -128837.3933 [74,] -964330.3137 -760845.3253 [75,] -787202.7175 -964330.3137 [76,] -573936.9454 -787202.7175 [77,] -387950.6606 -573936.9454 [78,] -436595.0258 -387950.6606 [79,] -367091.7018 -436595.0258 [80,] -363079.5547 -367091.7018 [81,] -334945.5696 -363079.5547 [82,] -223681.0639 -334945.5696 [83,] -124558.3154 -223681.0639 [84,] -38034.0202 -124558.3154 [85,] -96188.3917 -38034.0202 [86,] -310384.3227 -96188.3917 [87,] -528872.8766 -310384.3227 [88,] -436963.4732 -528872.8766 [89,] 36858.4885 -436963.4732 [90,] 7546.4705 36858.4885 [91,] -6599.7699 7546.4705 [92,] 129338.5928 -6599.7699 [93,] 546159.8051 129338.5928 [94,] 55773.5195 546159.8051 [95,] -200626.6150 55773.5195 [96,] -34646.8423 -200626.6150 [97,] 961511.0860 -34646.8423 [98,] 109362.2650 961511.0860 [99,] -69463.1884 109362.2650 [100,] 565300.9076 -69463.1884 [101,] -153875.5060 565300.9076 [102,] 236332.8105 -153875.5060 [103,] 97736.6035 236332.8105 [104,] 144216.7709 97736.6035 [105,] 56071.9127 144216.7709 [106,] -357344.1502 56071.9127 [107,] 291596.9482 -357344.1502 [108,] 447100.8265 291596.9482 [109,] 232025.1394 447100.8265 [110,] 299433.8588 232025.1394 [111,] 179853.5037 299433.8588 [112,] 232965.4781 179853.5037 [113,] 8920.8604 232965.4781 [114,] 51484.2179 8920.8604 [115,] 509778.5942 51484.2179 [116,] 80856.1319 509778.5942 [117,] 176596.7493 80856.1319 [118,] 57279.6542 176596.7493 [119,] -315652.9378 57279.6542 [120,] -148985.5570 -315652.9378 [121,] -320895.9547 -148985.5570 [122,] -251570.6028 -320895.9547 [123,] 217873.6210 -251570.6028 [124,] -52560.6396 217873.6210 [125,] -292466.3307 -52560.6396 [126,] -256436.3794 -292466.3307 [127,] -223650.8940 -256436.3794 [128,] -253319.4714 -223650.8940 [129,] 78318.8018 -253319.4714 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 291425.6126 490928.4047 2 172803.8493 291425.6126 3 100933.2501 172803.8493 4 52525.9549 100933.2501 5 182132.8478 52525.9549 6 -39699.8407 182132.8478 7 85117.9597 -39699.8407 8 315972.9264 85117.9597 9 4602.9396 315972.9264 10 -114043.6378 4602.9396 11 -270316.9008 -114043.6378 12 113824.9462 -270316.9008 13 -77963.1924 113824.9462 14 -76152.9255 -77963.1924 15 -47494.0454 -76152.9255 16 -54673.4524 -47494.0454 17 -77055.7515 -54673.4524 18 380360.7224 -77055.7515 19 139209.8883 380360.7224 20 -291335.0795 139209.8883 21 -477795.8026 -291335.0795 22 -538042.6276 -477795.8026 23 -282942.7340 -538042.6276 24 -234537.2486 -282942.7340 25 242.4432 -234537.2486 26 -7550.8225 242.4432 27 -26980.8273 -7550.8225 28 -191262.2132 -26980.8273 29 128983.5523 -191262.2132 30 -218808.1666 128983.5523 31 -152232.1351 -218808.1666 32 -178991.6589 -152232.1351 33 -25626.5197 -178991.6589 34 22827.3797 -25626.5197 35 -455117.7009 22827.3797 36 -526824.4835 -455117.7009 37 4069.0357 -526824.4835 38 -384611.4336 4069.0357 39 -152689.5341 -384611.4336 40 -52313.6162 -152689.5341 41 -112319.2052 -52313.6162 42 205514.4498 -112319.2052 43 190393.1822 205514.4498 44 -33551.3533 190393.1822 45 -13582.3558 -33551.3533 46 106627.0910 -13582.3558 47 216310.8405 106627.0910 48 210532.9486 216310.8405 49 531108.1455 210532.9486 50 936261.7476 531108.1455 51 1253738.1649 936261.7476 52 560884.5252 1253738.1649 53 214294.4292 560884.5252 54 207522.5610 214294.4292 55 644457.3336 207522.5610 56 569778.1612 644457.3336 57 371809.6844 569778.1612 58 51780.3666 371809.6844 59 210626.0152 51780.3666 60 159722.8911 210626.0152 61 149382.4325 159722.8911 62 61243.2154 149382.4325 63 371455.2499 61243.2154 64 173516.2499 371455.2499 65 -231400.7230 173516.2499 66 -152470.0389 -231400.7230 67 49811.6712 -152470.0389 68 4200.3267 49811.6712 69 -145563.1329 4200.3267 70 -157852.1765 -145563.1329 71 -143833.1672 -157852.1765 72 -128837.3933 -143833.1672 73 -760845.3253 -128837.3933 74 -964330.3137 -760845.3253 75 -787202.7175 -964330.3137 76 -573936.9454 -787202.7175 77 -387950.6606 -573936.9454 78 -436595.0258 -387950.6606 79 -367091.7018 -436595.0258 80 -363079.5547 -367091.7018 81 -334945.5696 -363079.5547 82 -223681.0639 -334945.5696 83 -124558.3154 -223681.0639 84 -38034.0202 -124558.3154 85 -96188.3917 -38034.0202 86 -310384.3227 -96188.3917 87 -528872.8766 -310384.3227 88 -436963.4732 -528872.8766 89 36858.4885 -436963.4732 90 7546.4705 36858.4885 91 -6599.7699 7546.4705 92 129338.5928 -6599.7699 93 546159.8051 129338.5928 94 55773.5195 546159.8051 95 -200626.6150 55773.5195 96 -34646.8423 -200626.6150 97 961511.0860 -34646.8423 98 109362.2650 961511.0860 99 -69463.1884 109362.2650 100 565300.9076 -69463.1884 101 -153875.5060 565300.9076 102 236332.8105 -153875.5060 103 97736.6035 236332.8105 104 144216.7709 97736.6035 105 56071.9127 144216.7709 106 -357344.1502 56071.9127 107 291596.9482 -357344.1502 108 447100.8265 291596.9482 109 232025.1394 447100.8265 110 299433.8588 232025.1394 111 179853.5037 299433.8588 112 232965.4781 179853.5037 113 8920.8604 232965.4781 114 51484.2179 8920.8604 115 509778.5942 51484.2179 116 80856.1319 509778.5942 117 176596.7493 80856.1319 118 57279.6542 176596.7493 119 -315652.9378 57279.6542 120 -148985.5570 -315652.9378 121 -320895.9547 -148985.5570 122 -251570.6028 -320895.9547 123 217873.6210 -251570.6028 124 -52560.6396 217873.6210 125 -292466.3307 -52560.6396 126 -256436.3794 -292466.3307 127 -223650.8940 -256436.3794 128 -253319.4714 -223650.8940 129 78318.8018 -253319.4714 > 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/7nr3r1353434897.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/81t2o1353434897.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/9lu8d1353434897.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/10vbfy1353434897.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/11xlza1353434897.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/12zcwd1353434897.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/13ry2g1353434897.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/147gn31353434898.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/15u1cv1353434898.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/16488z1353434898.tab") + } > > try(system("convert tmp/15k9p1353434897.ps tmp/15k9p1353434897.png",intern=TRUE)) character(0) > try(system("convert tmp/2d0rn1353434897.ps tmp/2d0rn1353434897.png",intern=TRUE)) character(0) > try(system("convert tmp/3rwy01353434897.ps tmp/3rwy01353434897.png",intern=TRUE)) character(0) > try(system("convert tmp/4epji1353434897.ps tmp/4epji1353434897.png",intern=TRUE)) character(0) > try(system("convert tmp/5megm1353434897.ps tmp/5megm1353434897.png",intern=TRUE)) character(0) > try(system("convert tmp/6uzc71353434897.ps tmp/6uzc71353434897.png",intern=TRUE)) character(0) > try(system("convert tmp/7nr3r1353434897.ps tmp/7nr3r1353434897.png",intern=TRUE)) character(0) > try(system("convert tmp/81t2o1353434897.ps tmp/81t2o1353434897.png",intern=TRUE)) character(0) > try(system("convert tmp/9lu8d1353434897.ps tmp/9lu8d1353434897.png",intern=TRUE)) character(0) > try(system("convert tmp/10vbfy1353434897.ps tmp/10vbfy1353434897.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.718 1.395 9.117