R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing 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(41 + ,38 + ,13 + ,12 + ,14 + ,12 + ,39 + ,32 + ,16 + ,11 + ,18 + ,11 + ,30 + ,35 + ,19 + ,15 + ,11 + ,14 + ,31 + ,33 + ,15 + ,6 + ,12 + ,12 + ,34 + ,37 + ,14 + ,13 + ,16 + ,21 + ,35 + ,29 + ,13 + ,10 + ,18 + ,12 + ,39 + ,31 + ,19 + ,12 + ,14 + ,22 + ,34 + ,36 + ,15 + ,14 + ,14 + ,11 + ,36 + ,35 + ,14 + ,12 + ,15 + ,10 + ,37 + ,38 + ,15 + ,9 + ,15 + ,13 + ,38 + ,31 + ,16 + ,10 + ,17 + ,10 + ,36 + ,34 + ,16 + ,12 + ,19 + ,8 + ,38 + ,35 + ,16 + ,12 + ,10 + ,15 + ,39 + ,38 + ,16 + ,11 + ,16 + ,14 + ,33 + ,37 + ,17 + ,15 + ,18 + ,10 + ,32 + ,33 + ,15 + ,12 + ,14 + ,14 + ,36 + ,32 + ,15 + ,10 + ,14 + ,14 + ,38 + ,38 + ,20 + ,12 + ,17 + ,11 + ,39 + ,38 + ,18 + ,11 + ,14 + ,10 + ,32 + ,32 + ,16 + ,12 + ,16 + ,13 + ,32 + ,33 + ,16 + ,11 + ,18 + ,9.5 + ,31 + ,31 + ,16 + ,12 + ,11 + ,14 + ,39 + ,38 + ,19 + ,13 + ,14 + ,12 + ,37 + ,39 + ,16 + ,11 + ,12 + ,14 + ,39 + ,32 + ,17 + ,12 + ,17 + ,11 + ,41 + ,32 + ,17 + ,13 + ,9 + ,9 + ,36 + ,35 + ,16 + ,10 + ,16 + ,11 + ,33 + ,37 + ,15 + ,14 + ,14 + ,15 + ,33 + ,33 + ,16 + ,12 + ,15 + ,14 + ,34 + ,33 + ,14 + ,10 + ,11 + ,13 + ,31 + ,31 + ,15 + ,12 + ,16 + ,9 + ,27 + ,32 + ,12 + ,8 + ,13 + ,15 + ,37 + ,31 + ,14 + ,10 + ,17 + ,10 + ,34 + ,37 + ,16 + ,12 + ,15 + ,11 + ,34 + ,30 + ,14 + ,12 + ,14 + ,13 + ,32 + ,33 + ,10 + ,7 + ,16 + ,8 + ,29 + ,31 + ,10 + ,9 + ,9 + ,20 + ,36 + ,33 + ,14 + ,12 + ,15 + ,12 + ,29 + ,31 + ,16 + ,10 + ,17 + ,10 + ,35 + ,33 + ,16 + ,10 + ,13 + ,10 + ,37 + ,32 + ,16 + ,10 + ,15 + ,9 + ,34 + ,33 + ,14 + ,12 + ,16 + ,14 + ,38 + ,32 + ,20 + ,15 + ,16 + ,8 + ,35 + ,33 + ,14 + ,10 + ,12 + ,14 + ,38 + ,28 + ,14 + ,10 + ,15 + ,11 + ,37 + ,35 + ,11 + ,12 + ,11 + ,13 + ,38 + ,39 + ,14 + ,13 + ,15 + ,9 + ,33 + ,34 + ,15 + ,11 + ,15 + ,11 + ,36 + ,38 + ,16 + ,11 + ,17 + ,15 + ,38 + ,32 + ,14 + ,12 + ,13 + ,11 + ,32 + ,38 + ,16 + ,14 + ,16 + ,10 + ,32 + ,30 + ,14 + ,10 + ,14 + ,14 + ,32 + ,33 + ,12 + ,12 + ,11 + ,18 + ,34 + ,38 + ,16 + ,13 + ,12 + ,14 + ,32 + ,32 + ,9 + ,5 + ,12 + ,11 + ,37 + ,35 + ,14 + ,6 + ,15 + ,14.5 + ,39 + ,34 + ,16 + ,12 + ,16 + ,13 + ,29 + ,34 + ,16 + ,12 + ,15 + ,9 + ,37 + ,36 + ,15 + ,11 + ,12 + ,10 + ,35 + ,34 + ,16 + ,10 + ,12 + ,15 + ,30 + ,28 + ,12 + ,7 + ,8 + ,20 + ,38 + ,34 + ,16 + ,12 + ,13 + ,12 + ,34 + ,35 + ,16 + ,14 + ,11 + ,12 + ,31 + ,35 + ,14 + ,11 + ,14 + ,14 + ,34 + ,31 + ,16 + ,12 + ,15 + ,13 + ,35 + ,37 + ,17 + ,13 + ,10 + ,11 + ,36 + ,35 + ,18 + ,14 + ,11 + ,17 + ,30 + ,27 + ,18 + ,11 + ,12 + ,12 + ,39 + ,40 + ,12 + ,12 + ,15 + ,13 + ,35 + ,37 + ,16 + ,12 + ,15 + ,14 + ,38 + ,36 + ,10 + ,8 + ,14 + ,13 + ,31 + ,38 + ,14 + ,11 + ,16 + ,15 + ,34 + ,39 + ,18 + ,14 + ,15 + ,13 + ,38 + ,41 + ,18 + ,14 + ,15 + ,10 + ,34 + ,27 + ,16 + ,12 + ,13 + ,11 + ,39 + ,30 + ,17 + ,9 + ,12 + ,19 + ,37 + ,37 + ,16 + ,13 + ,17 + ,13 + ,34 + ,31 + ,16 + ,11 + ,13 + ,17 + ,28 + ,31 + ,13 + ,12 + ,15 + ,13 + ,37 + ,27 + ,16 + ,12 + ,13 + ,9 + ,33 + ,36 + ,16 + ,12 + ,15 + ,11 + ,35 + ,37 + ,16 + ,12 + ,15 + ,9 + ,37 + ,33 + ,15 + ,12 + ,16 + ,12 + ,32 + ,34 + ,15 + ,11 + ,15 + ,12 + ,33 + ,31 + ,16 + ,10 + ,14 + ,13 + ,38 + ,39 + ,14 + ,9 + ,15 + ,13 + ,33 + ,34 + ,16 + ,12 + ,14 + ,12 + ,29 + ,32 + ,16 + ,12 + ,13 + ,15 + ,33 + ,33 + ,15 + ,12 + ,7 + ,22 + ,31 + ,36 + ,12 + ,9 + ,17 + ,13 + ,36 + ,32 + ,17 + ,15 + ,13 + ,15 + ,35 + ,41 + ,16 + ,12 + ,15 + ,13 + ,32 + ,28 + ,15 + ,12 + ,14 + ,15 + ,29 + ,30 + ,13 + ,12 + ,13 + ,12.5 + ,39 + ,36 + ,16 + ,10 + ,16 + ,11 + ,37 + ,35 + ,16 + ,13 + ,12 + ,16 + ,35 + ,31 + ,16 + ,9 + ,14 + ,11 + ,37 + ,34 + ,16 + ,12 + ,17 + ,11 + ,32 + ,36 + ,14 + ,10 + ,15 + ,10 + ,38 + ,36 + ,16 + ,14 + ,17 + ,10 + ,37 + ,35 + ,16 + ,11 + ,12 + ,16 + ,36 + ,37 + ,20 + ,15 + ,16 + ,12 + ,32 + ,28 + ,15 + ,11 + ,11 + ,11 + ,33 + ,39 + ,16 + ,11 + ,15 + ,16 + ,40 + ,32 + ,13 + ,12 + ,9 + ,19 + ,38 + ,35 + ,17 + ,12 + ,16 + ,11 + ,41 + ,39 + ,16 + ,12 + ,15 + ,16 + ,36 + ,35 + ,16 + ,11 + ,10 + ,15 + ,43 + ,42 + ,12 + ,7 + ,10 + ,24 + ,30 + ,34 + ,16 + ,12 + ,15 + ,14 + ,31 + ,33 + ,16 + ,14 + ,11 + ,15 + ,32 + ,41 + ,17 + ,11 + ,13 + ,11 + ,32 + ,33 + ,13 + ,11 + ,14 + ,15 + ,37 + ,34 + ,12 + ,10 + ,18 + ,12 + ,37 + ,32 + ,18 + ,13 + ,16 + ,10 + ,33 + ,40 + ,14 + ,13 + ,14 + ,14 + ,34 + ,40 + ,14 + ,8 + ,14 + ,13 + ,33 + ,35 + ,13 + ,11 + ,14 + ,9 + ,38 + ,36 + ,16 + ,12 + ,14 + ,15 + ,33 + ,37 + ,13 + ,11 + ,12 + ,15 + ,31 + ,27 + ,16 + ,13 + ,14 + ,14 + ,38 + ,39 + ,13 + ,12 + ,15 + ,11 + ,37 + ,38 + ,16 + ,14 + ,15 + ,8 + ,36 + ,31 + ,15 + ,13 + ,15 + ,11 + ,31 + ,33 + ,16 + ,15 + ,13 + ,11 + ,39 + ,32 + ,15 + ,10 + ,17 + ,8 + ,44 + ,39 + ,17 + ,11 + ,17 + ,10 + ,33 + ,36 + ,15 + ,9 + ,19 + ,11 + ,35 + ,33 + ,12 + ,11 + ,15 + ,13 + ,32 + ,33 + ,16 + ,10 + ,13 + ,11 + ,28 + ,32 + ,10 + ,11 + ,9 + ,20 + ,40 + ,37 + ,16 + ,8 + ,15 + ,10 + ,27 + ,30 + ,12 + ,11 + ,15 + ,15 + ,37 + ,38 + ,14 + ,12 + ,15 + ,12 + ,32 + ,29 + ,15 + ,12 + ,16 + ,14 + ,28 + ,22 + ,13 + ,9 + ,11 + ,23 + ,34 + ,35 + ,15 + ,11 + ,14 + ,14 + ,30 + ,35 + ,11 + ,10 + ,11 + ,16 + ,35 + ,34 + ,12 + ,8 + ,15 + ,11 + ,31 + ,35 + ,11 + ,9 + ,13 + ,12 + ,32 + ,34 + ,16 + ,8 + ,15 + ,10 + ,30 + ,37 + ,15 + ,9 + ,16 + ,14 + ,30 + ,35 + ,17 + ,15 + ,14 + ,12 + ,31 + ,23 + ,16 + ,11 + ,15 + ,12 + ,40 + ,31 + ,10 + ,8 + ,16 + ,11 + ,32 + ,27 + ,18 + ,13 + ,16 + ,12 + ,36 + ,36 + ,13 + ,12 + ,11 + ,13 + ,32 + ,31 + ,16 + ,12 + ,12 + ,11 + ,35 + ,32 + ,13 + ,9 + ,9 + ,19 + ,38 + ,39 + ,10 + ,7 + ,16 + ,12 + ,42 + ,37 + ,15 + ,13 + ,13 + ,17 + ,34 + ,38 + ,16 + ,9 + ,16 + ,9 + ,35 + ,39 + ,16 + ,6 + ,12 + ,12 + ,38 + ,34 + ,14 + ,8 + ,9 + ,19 + ,33 + ,31 + ,10 + ,8 + ,13 + ,18 + ,36 + ,32 + ,17 + ,15 + ,13 + ,15 + ,32 + ,37 + ,13 + ,6 + ,14 + ,14 + ,33 + ,36 + ,15 + ,9 + ,19 + ,11 + ,34 + ,32 + ,16 + ,11 + ,13 + ,9 + ,32 + ,38 + ,12 + ,8 + ,12 + ,18 + ,34 + ,36 + ,13 + ,8 + ,13 + ,16 + ,27 + ,26 + ,13 + ,10 + ,10 + ,24 + ,31 + ,26 + ,12 + ,8 + ,14 + ,14 + ,38 + ,33 + ,17 + ,14 + ,16 + ,20 + ,34 + ,39 + ,15 + ,10 + ,10 + ,18 + ,24 + ,30 + ,10 + ,8 + ,11 + ,23 + ,30 + ,33 + ,14 + ,11 + ,14 + ,12 + ,26 + ,25 + ,11 + ,12 + ,12 + ,14 + ,34 + ,38 + ,13 + ,12 + ,9 + ,16 + ,27 + ,37 + ,16 + ,12 + ,9 + ,18 + ,37 + ,31 + ,12 + ,5 + ,11 + ,20 + ,36 + ,37 + ,16 + ,12 + ,16 + ,12 + ,41 + ,35 + ,12 + ,10 + ,9 + ,12 + ,29 + ,25 + ,9 + ,7 + ,13 + ,17 + ,36 + ,28 + ,12 + ,12 + ,16 + ,13 + ,32 + ,35 + ,15 + ,11 + ,13 + ,9 + ,37 + ,33 + ,12 + ,8 + ,9 + ,16 + ,30 + ,30 + ,12 + ,9 + ,12 + ,18 + ,31 + ,31 + ,14 + ,10 + ,16 + ,10 + ,38 + ,37 + ,12 + ,9 + ,11 + ,14 + ,36 + ,36 + ,16 + ,12 + ,14 + ,11 + ,35 + ,30 + ,11 + ,6 + ,13 + ,9 + ,31 + ,36 + ,19 + ,15 + ,15 + ,11 + ,38 + ,32 + ,15 + ,12 + ,14 + ,10 + ,22 + ,28 + ,8 + ,12 + ,16 + ,11 + ,32 + ,36 + ,16 + ,12 + ,13 + ,19 + ,36 + ,34 + ,17 + ,11 + ,14 + ,14 + ,39 + ,31 + ,12 + ,7 + ,15 + ,12 + ,28 + ,28 + ,11 + ,7 + ,13 + ,14 + ,32 + ,36 + ,11 + ,5 + ,11 + ,21 + ,32 + ,36 + ,14 + ,12 + ,11 + ,13 + ,38 + ,40 + ,16 + ,12 + ,14 + ,10 + ,32 + ,33 + ,12 + ,3 + ,15 + ,15 + ,35 + ,37 + ,16 + ,11 + ,11 + ,16 + ,32 + ,32 + ,13 + ,10 + ,15 + ,14 + ,37 + ,38 + ,15 + ,12 + ,12 + ,12 + ,34 + ,31 + ,16 + ,9 + ,14 + ,19 + ,33 + ,37 + ,16 + ,12 + ,14 + ,15 + ,33 + ,33 + ,14 + ,9 + ,8 + ,19 + ,26 + ,32 + ,16 + ,12 + ,13 + ,13 + ,30 + ,30 + ,16 + ,12 + ,9 + ,17 + ,24 + ,30 + ,14 + ,10 + ,15 + ,12 + ,34 + ,31 + ,11 + ,9 + ,17 + ,11 + ,34 + ,32 + ,12 + ,12 + ,13 + ,14 + ,33 + ,34 + ,15 + ,8 + ,15 + ,11 + ,34 + ,36 + ,15 + ,11 + ,15 + ,13 + ,35 + ,37 + ,16 + ,11 + ,14 + ,12 + ,35 + ,36 + ,16 + ,12 + ,16 + ,15 + ,36 + ,33 + ,11 + ,10 + ,13 + ,14 + ,34 + ,33 + ,15 + ,10 + ,16 + ,12 + ,34 + ,33 + ,12 + ,12 + ,9 + ,17 + ,41 + ,44 + ,12 + ,12 + ,16 + ,11 + ,32 + ,39 + ,15 + ,11 + ,11 + ,18 + ,30 + ,32 + ,15 + ,8 + ,10 + ,13 + ,35 + ,35 + ,16 + ,12 + ,11 + ,17 + ,28 + ,25 + ,14 + ,10 + ,15 + ,13 + ,33 + ,35 + ,17 + ,11 + ,17 + ,11 + ,39 + ,34 + ,14 + ,10 + ,14 + ,12 + ,36 + ,35 + ,13 + ,8 + ,8 + ,22 + ,36 + ,39 + ,15 + ,12 + ,15 + ,14 + ,35 + ,33 + ,13 + ,12 + ,11 + ,12 + ,38 + ,36 + ,14 + ,10 + ,16 + ,12 + ,33 + ,32 + ,15 + ,12 + ,10 + ,17 + ,31 + ,32 + ,12 + ,9 + ,15 + ,9 + ,34 + ,36 + ,13 + ,9 + ,9 + ,21 + ,32 + ,36 + ,8 + ,6 + ,16 + ,10 + ,31 + ,32 + ,14 + ,10 + ,19 + ,11 + ,33 + ,34 + ,14 + ,9 + ,12 + ,12 + ,34 + ,33 + ,11 + ,9 + ,8 + ,23 + ,34 + ,35 + ,12 + ,9 + ,11 + ,13 + ,34 + ,30 + ,13 + ,6 + ,14 + ,12 + ,33 + ,38 + ,10 + ,10 + ,9 + ,16 + ,32 + ,34 + ,16 + ,6 + ,15 + ,9 + ,41 + ,33 + ,18 + ,14 + ,13 + ,17 + ,34 + ,32 + ,13 + ,10 + ,16 + ,9 + ,36 + ,31 + ,11 + ,10 + ,11 + ,14 + ,37 + ,30 + ,4 + ,6 + ,12 + ,17 + ,36 + ,27 + ,13 + ,12 + ,13 + ,13 + ,29 + ,31 + ,16 + ,12 + ,10 + ,11 + ,37 + ,30 + ,10 + ,7 + ,11 + ,12 + ,27 + ,32 + ,12 + ,8 + ,12 + ,10 + ,35 + ,35 + ,12 + ,11 + ,8 + ,19 + ,28 + ,28 + ,10 + ,3 + ,12 + ,16 + ,35 + ,33 + ,13 + ,6 + ,12 + ,16 + ,37 + ,31 + ,15 + ,10 + ,15 + ,14 + ,29 + ,35 + ,12 + ,8 + ,11 + ,20 + ,32 + ,35 + ,14 + ,9 + ,13 + ,15 + ,36 + ,32 + ,10 + ,9 + ,14 + ,23 + ,19 + ,21 + ,12 + ,8 + ,10 + ,20 + ,21 + ,20 + ,12 + ,9 + ,12 + ,16 + ,31 + ,34 + ,11 + ,7 + ,15 + ,14 + ,33 + ,32 + ,10 + ,7 + ,13 + ,17 + ,36 + ,34 + ,12 + ,6 + ,13 + ,11 + ,33 + ,32 + ,16 + ,9 + ,13 + ,13 + ,37 + ,33 + ,12 + ,10 + ,12 + ,17 + ,34 + ,33 + ,14 + ,11 + ,12 + ,15 + ,35 + ,37 + ,16 + ,12 + ,9 + ,21 + ,31 + ,32 + ,14 + ,8 + ,9 + ,18 + ,37 + ,34 + ,13 + ,11 + ,15 + ,15 + ,35 + ,30 + ,4 + ,3 + ,10 + ,8 + ,27 + ,30 + ,15 + ,11 + ,14 + ,12 + ,34 + ,38 + ,11 + ,12 + ,15 + ,12 + ,40 + ,36 + ,11 + ,7 + ,7 + ,22 + ,29 + ,32 + ,14 + ,9 + ,14 + ,12) + ,dim=c(6 + ,264) + ,dimnames=list(c('Connected' + ,'Separate' + ,'Learning' + ,'Software' + ,'Happiness' + ,'Depression') + ,1:264)) > y <- array(NA,dim=c(6,264),dimnames=list(c('Connected','Separate','Learning','Software','Happiness','Depression'),1:264)) > 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 = '6' > par3 <- 'No Linear Trend' > par2 <- 'Do not include Seasonal Dummies' > par1 <- '6' > #'GNU S' R Code compiled by R2WASP v. 1.2.327 () > #Author: root > #To cite this work: Wessa P., (2013), Multiple Regression (v1.0.29) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_multipleregression.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following objects 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 Depression Connected Separate Learning Software Happiness 1 12.0 41 38 13 12 14 2 11.0 39 32 16 11 18 3 14.0 30 35 19 15 11 4 12.0 31 33 15 6 12 5 21.0 34 37 14 13 16 6 12.0 35 29 13 10 18 7 22.0 39 31 19 12 14 8 11.0 34 36 15 14 14 9 10.0 36 35 14 12 15 10 13.0 37 38 15 9 15 11 10.0 38 31 16 10 17 12 8.0 36 34 16 12 19 13 15.0 38 35 16 12 10 14 14.0 39 38 16 11 16 15 10.0 33 37 17 15 18 16 14.0 32 33 15 12 14 17 14.0 36 32 15 10 14 18 11.0 38 38 20 12 17 19 10.0 39 38 18 11 14 20 13.0 32 32 16 12 16 21 9.5 32 33 16 11 18 22 14.0 31 31 16 12 11 23 12.0 39 38 19 13 14 24 14.0 37 39 16 11 12 25 11.0 39 32 17 12 17 26 9.0 41 32 17 13 9 27 11.0 36 35 16 10 16 28 15.0 33 37 15 14 14 29 14.0 33 33 16 12 15 30 13.0 34 33 14 10 11 31 9.0 31 31 15 12 16 32 15.0 27 32 12 8 13 33 10.0 37 31 14 10 17 34 11.0 34 37 16 12 15 35 13.0 34 30 14 12 14 36 8.0 32 33 10 7 16 37 20.0 29 31 10 9 9 38 12.0 36 33 14 12 15 39 10.0 29 31 16 10 17 40 10.0 35 33 16 10 13 41 9.0 37 32 16 10 15 42 14.0 34 33 14 12 16 43 8.0 38 32 20 15 16 44 14.0 35 33 14 10 12 45 11.0 38 28 14 10 15 46 13.0 37 35 11 12 11 47 9.0 38 39 14 13 15 48 11.0 33 34 15 11 15 49 15.0 36 38 16 11 17 50 11.0 38 32 14 12 13 51 10.0 32 38 16 14 16 52 14.0 32 30 14 10 14 53 18.0 32 33 12 12 11 54 14.0 34 38 16 13 12 55 11.0 32 32 9 5 12 56 14.5 37 35 14 6 15 57 13.0 39 34 16 12 16 58 9.0 29 34 16 12 15 59 10.0 37 36 15 11 12 60 15.0 35 34 16 10 12 61 20.0 30 28 12 7 8 62 12.0 38 34 16 12 13 63 12.0 34 35 16 14 11 64 14.0 31 35 14 11 14 65 13.0 34 31 16 12 15 66 11.0 35 37 17 13 10 67 17.0 36 35 18 14 11 68 12.0 30 27 18 11 12 69 13.0 39 40 12 12 15 70 14.0 35 37 16 12 15 71 13.0 38 36 10 8 14 72 15.0 31 38 14 11 16 73 13.0 34 39 18 14 15 74 10.0 38 41 18 14 15 75 11.0 34 27 16 12 13 76 19.0 39 30 17 9 12 77 13.0 37 37 16 13 17 78 17.0 34 31 16 11 13 79 13.0 28 31 13 12 15 80 9.0 37 27 16 12 13 81 11.0 33 36 16 12 15 82 9.0 35 37 16 12 15 83 12.0 37 33 15 12 16 84 12.0 32 34 15 11 15 85 13.0 33 31 16 10 14 86 13.0 38 39 14 9 15 87 12.0 33 34 16 12 14 88 15.0 29 32 16 12 13 89 22.0 33 33 15 12 7 90 13.0 31 36 12 9 17 91 15.0 36 32 17 15 13 92 13.0 35 41 16 12 15 93 15.0 32 28 15 12 14 94 12.5 29 30 13 12 13 95 11.0 39 36 16 10 16 96 16.0 37 35 16 13 12 97 11.0 35 31 16 9 14 98 11.0 37 34 16 12 17 99 10.0 32 36 14 10 15 100 10.0 38 36 16 14 17 101 16.0 37 35 16 11 12 102 12.0 36 37 20 15 16 103 11.0 32 28 15 11 11 104 16.0 33 39 16 11 15 105 19.0 40 32 13 12 9 106 11.0 38 35 17 12 16 107 16.0 41 39 16 12 15 108 15.0 36 35 16 11 10 109 24.0 43 42 12 7 10 110 14.0 30 34 16 12 15 111 15.0 31 33 16 14 11 112 11.0 32 41 17 11 13 113 15.0 32 33 13 11 14 114 12.0 37 34 12 10 18 115 10.0 37 32 18 13 16 116 14.0 33 40 14 13 14 117 13.0 34 40 14 8 14 118 9.0 33 35 13 11 14 119 15.0 38 36 16 12 14 120 15.0 33 37 13 11 12 121 14.0 31 27 16 13 14 122 11.0 38 39 13 12 15 123 8.0 37 38 16 14 15 124 11.0 36 31 15 13 15 125 11.0 31 33 16 15 13 126 8.0 39 32 15 10 17 127 10.0 44 39 17 11 17 128 11.0 33 36 15 9 19 129 13.0 35 33 12 11 15 130 11.0 32 33 16 10 13 131 20.0 28 32 10 11 9 132 10.0 40 37 16 8 15 133 15.0 27 30 12 11 15 134 12.0 37 38 14 12 15 135 14.0 32 29 15 12 16 136 23.0 28 22 13 9 11 137 14.0 34 35 15 11 14 138 16.0 30 35 11 10 11 139 11.0 35 34 12 8 15 140 12.0 31 35 11 9 13 141 10.0 32 34 16 8 15 142 14.0 30 37 15 9 16 143 12.0 30 35 17 15 14 144 12.0 31 23 16 11 15 145 11.0 40 31 10 8 16 146 12.0 32 27 18 13 16 147 13.0 36 36 13 12 11 148 11.0 32 31 16 12 12 149 19.0 35 32 13 9 9 150 12.0 38 39 10 7 16 151 17.0 42 37 15 13 13 152 9.0 34 38 16 9 16 153 12.0 35 39 16 6 12 154 19.0 38 34 14 8 9 155 18.0 33 31 10 8 13 156 15.0 36 32 17 15 13 157 14.0 32 37 13 6 14 158 11.0 33 36 15 9 19 159 9.0 34 32 16 11 13 160 18.0 32 38 12 8 12 161 16.0 34 36 13 8 13 162 24.0 27 26 13 10 10 163 14.0 31 26 12 8 14 164 20.0 38 33 17 14 16 165 18.0 34 39 15 10 10 166 23.0 24 30 10 8 11 167 12.0 30 33 14 11 14 168 14.0 26 25 11 12 12 169 16.0 34 38 13 12 9 170 18.0 27 37 16 12 9 171 20.0 37 31 12 5 11 172 12.0 36 37 16 12 16 173 12.0 41 35 12 10 9 174 17.0 29 25 9 7 13 175 13.0 36 28 12 12 16 176 9.0 32 35 15 11 13 177 16.0 37 33 12 8 9 178 18.0 30 30 12 9 12 179 10.0 31 31 14 10 16 180 14.0 38 37 12 9 11 181 11.0 36 36 16 12 14 182 9.0 35 30 11 6 13 183 11.0 31 36 19 15 15 184 10.0 38 32 15 12 14 185 11.0 22 28 8 12 16 186 19.0 32 36 16 12 13 187 14.0 36 34 17 11 14 188 12.0 39 31 12 7 15 189 14.0 28 28 11 7 13 190 21.0 32 36 11 5 11 191 13.0 32 36 14 12 11 192 10.0 38 40 16 12 14 193 15.0 32 33 12 3 15 194 16.0 35 37 16 11 11 195 14.0 32 32 13 10 15 196 12.0 37 38 15 12 12 197 19.0 34 31 16 9 14 198 15.0 33 37 16 12 14 199 19.0 33 33 14 9 8 200 13.0 26 32 16 12 13 201 17.0 30 30 16 12 9 202 12.0 24 30 14 10 15 203 11.0 34 31 11 9 17 204 14.0 34 32 12 12 13 205 11.0 33 34 15 8 15 206 13.0 34 36 15 11 15 207 12.0 35 37 16 11 14 208 15.0 35 36 16 12 16 209 14.0 36 33 11 10 13 210 12.0 34 33 15 10 16 211 17.0 34 33 12 12 9 212 11.0 41 44 12 12 16 213 18.0 32 39 15 11 11 214 13.0 30 32 15 8 10 215 17.0 35 35 16 12 11 216 13.0 28 25 14 10 15 217 11.0 33 35 17 11 17 218 12.0 39 34 14 10 14 219 22.0 36 35 13 8 8 220 14.0 36 39 15 12 15 221 12.0 35 33 13 12 11 222 12.0 38 36 14 10 16 223 17.0 33 32 15 12 10 224 9.0 31 32 12 9 15 225 21.0 34 36 13 9 9 226 10.0 32 36 8 6 16 227 11.0 31 32 14 10 19 228 12.0 33 34 14 9 12 229 23.0 34 33 11 9 8 230 13.0 34 35 12 9 11 231 12.0 34 30 13 6 14 232 16.0 33 38 10 10 9 233 9.0 32 34 16 6 15 234 17.0 41 33 18 14 13 235 9.0 34 32 13 10 16 236 14.0 36 31 11 10 11 237 17.0 37 30 4 6 12 238 13.0 36 27 13 12 13 239 11.0 29 31 16 12 10 240 12.0 37 30 10 7 11 241 10.0 27 32 12 8 12 242 19.0 35 35 12 11 8 243 16.0 28 28 10 3 12 244 16.0 35 33 13 6 12 245 14.0 37 31 15 10 15 246 20.0 29 35 12 8 11 247 15.0 32 35 14 9 13 248 23.0 36 32 10 9 14 249 20.0 19 21 12 8 10 250 16.0 21 20 12 9 12 251 14.0 31 34 11 7 15 252 17.0 33 32 10 7 13 253 11.0 36 34 12 6 13 254 13.0 33 32 16 9 13 255 17.0 37 33 12 10 12 256 15.0 34 33 14 11 12 257 21.0 35 37 16 12 9 258 18.0 31 32 14 8 9 259 15.0 37 34 13 11 15 260 8.0 35 30 4 3 10 261 12.0 27 30 15 11 14 262 12.0 34 38 11 12 15 263 22.0 40 36 11 7 7 264 12.0 29 32 14 9 14 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Connected Separate Learning Software Happiness 27.175257 -0.042872 0.002802 -0.098284 -0.034729 -0.771941 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -9.5420 -1.7393 -0.0993 1.6779 9.5012 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 27.175257 2.024928 13.420 <2e-16 *** Connected -0.042872 0.051982 -0.825 0.410 Separate 0.002802 0.053548 0.052 0.958 Learning -0.098284 0.093428 -1.052 0.294 Software -0.034729 0.096238 -0.361 0.718 Happiness -0.771941 0.072254 -10.684 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.824 on 258 degrees of freedom Multiple R-squared: 0.35, Adjusted R-squared: 0.3374 F-statistic: 27.79 on 5 and 258 DF, p-value: < 2.2e-16 > 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.998635161 0.002729678 0.001364839 [2,] 0.997143565 0.005712871 0.002856435 [3,] 0.997434991 0.005130019 0.002565009 [4,] 0.998243736 0.003512529 0.001756264 [5,] 0.996630785 0.006738429 0.003369215 [6,] 0.993842147 0.012315705 0.006157853 [7,] 0.990815055 0.018369889 0.009184945 [8,] 0.985215840 0.029568319 0.014784160 [9,] 0.976053066 0.047893868 0.023946934 [10,] 0.966908899 0.066182202 0.033091101 [11,] 0.966805299 0.066389402 0.033194701 [12,] 0.951365219 0.097269562 0.048634781 [13,] 0.933269168 0.133461665 0.066730832 [14,] 0.913203096 0.173593807 0.086796904 [15,] 0.889314785 0.221370429 0.110685215 [16,] 0.855756130 0.288487739 0.144243870 [17,] 0.828116774 0.343766453 0.171883226 [18,] 0.941599999 0.116800003 0.058400001 [19,] 0.923303858 0.153392283 0.076696142 [20,] 0.906914244 0.186171512 0.093085756 [21,] 0.884360618 0.231278764 0.115639382 [22,] 0.858274985 0.283450030 0.141725015 [23,] 0.867866356 0.264267288 0.132133644 [24,] 0.843289613 0.313420774 0.156710387 [25,] 0.814620752 0.370758497 0.185379248 [26,] 0.787654814 0.424690371 0.212345186 [27,] 0.745426418 0.509147163 0.254573582 [28,] 0.767087017 0.465825966 0.232912983 [29,] 0.823114519 0.353770962 0.176885481 [30,] 0.787621636 0.424756729 0.212378364 [31,] 0.758286566 0.483426867 0.241713434 [32,] 0.761893961 0.476212078 0.238106039 [33,] 0.755452632 0.489094736 0.244547368 [34,] 0.731878354 0.536243292 0.268121646 [35,] 0.740895558 0.518208884 0.259104442 [36,] 0.700645113 0.598709775 0.299354887 [37,] 0.659104515 0.681790971 0.340895485 [38,] 0.637771110 0.724457781 0.362228890 [39,] 0.655872766 0.688254468 0.344127234 [40,] 0.620628152 0.758743696 0.379371848 [41,] 0.660874328 0.678251344 0.339125672 [42,] 0.636627557 0.726744886 0.363372443 [43,] 0.622211601 0.755576799 0.377788399 [44,] 0.585448665 0.829102670 0.414551335 [45,] 0.593095165 0.813809669 0.406904835 [46,] 0.548696474 0.902607053 0.451303526 [47,] 0.560423941 0.879152117 0.439576059 [48,] 0.563155751 0.873688497 0.436844249 [49,] 0.536682532 0.926634935 0.463317468 [50,] 0.564576769 0.870846462 0.435423231 [51,] 0.594950962 0.810098076 0.405049038 [52,] 0.565200906 0.869598189 0.434799094 [53,] 0.591720686 0.816558627 0.408279314 [54,] 0.555884036 0.888231927 0.444115964 [55,] 0.547576464 0.904847073 0.452423536 [56,] 0.508999462 0.982001076 0.491000538 [57,] 0.470464902 0.940929805 0.529535098 [58,] 0.508066406 0.983867188 0.491933594 [59,] 0.514917335 0.970165329 0.485082665 [60,] 0.497045859 0.994091718 0.502954141 [61,] 0.458867780 0.917735560 0.541132220 [62,] 0.435871721 0.871743443 0.564128279 [63,] 0.396173395 0.792346790 0.603826605 [64,] 0.396899361 0.793798723 0.603100639 [65,] 0.361275229 0.722550458 0.638724771 [66,] 0.340763386 0.681526772 0.659236614 [67,] 0.326902602 0.653805205 0.673097398 [68,] 0.441959347 0.883918695 0.558040653 [69,] 0.425767799 0.851535597 0.574232201 [70,] 0.450384142 0.900768284 0.549615858 [71,] 0.411734520 0.823469040 0.588265480 [72,] 0.456560348 0.913120695 0.543439652 [73,] 0.427150432 0.854300864 0.572849568 [74,] 0.439827467 0.879654934 0.560172533 [75,] 0.403131366 0.806262733 0.596868634 [76,] 0.366989656 0.733979312 0.633010344 [77,] 0.331385137 0.662770273 0.668614863 [78,] 0.298570101 0.597140202 0.701429899 [79,] 0.269275395 0.538550791 0.730724605 [80,] 0.245541359 0.491082718 0.754458641 [81,] 0.308984157 0.617968315 0.691015843 [82,] 0.285101540 0.570203081 0.714898460 [83,] 0.268190273 0.536380546 0.731809727 [84,] 0.239617094 0.479234189 0.760382906 [85,] 0.225115556 0.450231112 0.774884444 [86,] 0.206314922 0.412629844 0.793685078 [87,] 0.180873149 0.361746298 0.819126851 [88,] 0.169519884 0.339039767 0.830480116 [89,] 0.157472527 0.314945055 0.842527473 [90,] 0.136138169 0.272276337 0.863861831 [91,] 0.133309266 0.266618531 0.866690734 [92,] 0.115294446 0.230588891 0.884705554 [93,] 0.106181673 0.212363346 0.893818327 [94,] 0.091400102 0.182800204 0.908599898 [95,] 0.110952190 0.221904380 0.889047810 [96,] 0.122173651 0.244347301 0.877826349 [97,] 0.125535625 0.251071249 0.874464375 [98,] 0.107730905 0.215461809 0.892269095 [99,] 0.124905451 0.249810903 0.875094549 [100,] 0.108988617 0.217977234 0.891011383 [101,] 0.251140564 0.502281127 0.748859436 [102,] 0.233881422 0.467762844 0.766118578 [103,] 0.208381693 0.416763386 0.791618307 [104,] 0.212304333 0.424608667 0.787695667 [105,] 0.196430881 0.392861762 0.803569119 [106,] 0.180206145 0.360412290 0.819793855 [107,] 0.160816959 0.321633917 0.839183041 [108,] 0.141314237 0.282628474 0.858685763 [109,] 0.123493655 0.246987310 0.876506345 [110,] 0.150831623 0.301663245 0.849168377 [111,] 0.141107499 0.282214998 0.858892501 [112,] 0.121955605 0.243911210 0.878044395 [113,] 0.109812047 0.219624094 0.890187953 [114,] 0.099267092 0.198534185 0.900732908 [115,] 0.119355215 0.238710430 0.880644785 [116,] 0.105332759 0.210665517 0.894667241 [117,] 0.103645074 0.207290149 0.896354926 [118,] 0.103993966 0.207987931 0.896006034 [119,] 0.090070776 0.180141552 0.909929224 [120,] 0.080430221 0.160860442 0.919569779 [121,] 0.068178880 0.136357760 0.931821120 [122,] 0.068690990 0.137381980 0.931309010 [123,] 0.067837970 0.135675941 0.932162030 [124,] 0.064136423 0.128272846 0.935863577 [125,] 0.060051160 0.120102320 0.939948840 [126,] 0.050396759 0.100793517 0.949603241 [127,] 0.047973126 0.095946252 0.952026874 [128,] 0.118736756 0.237473512 0.881263244 [129,] 0.103257415 0.206514831 0.896742585 [130,] 0.088093601 0.176187202 0.911906399 [131,] 0.079991294 0.159982587 0.920008706 [132,] 0.076926154 0.153852309 0.923073846 [133,] 0.073762569 0.147525137 0.926237431 [134,] 0.068744546 0.137489093 0.931255454 [135,] 0.059135979 0.118271959 0.940864021 [136,] 0.049857572 0.099715143 0.950142428 [137,] 0.042451715 0.084903430 0.957548285 [138,] 0.035357702 0.070715403 0.964642298 [139,] 0.033966331 0.067932663 0.966033669 [140,] 0.039389653 0.078779305 0.960610347 [141,] 0.035277196 0.070554391 0.964722804 [142,] 0.029080913 0.058161827 0.970919087 [143,] 0.031444917 0.062889833 0.968555083 [144,] 0.030261505 0.060523010 0.969738495 [145,] 0.029488767 0.058977533 0.970511233 [146,] 0.026571387 0.053142773 0.973428613 [147,] 0.029360542 0.058721083 0.970639458 [148,] 0.024979250 0.049958500 0.975020750 [149,] 0.020282826 0.040565652 0.979717174 [150,] 0.017410859 0.034821718 0.982589141 [151,] 0.027146925 0.054293851 0.972853075 [152,] 0.027649497 0.055298994 0.972350503 [153,] 0.024410069 0.048820137 0.975589931 [154,] 0.065902354 0.131804708 0.934097646 [155,] 0.055076305 0.110152611 0.944923695 [156,] 0.196731341 0.393462682 0.803268659 [157,] 0.180426494 0.360852989 0.819573506 [158,] 0.303782202 0.607564405 0.696217798 [159,] 0.279589342 0.559178684 0.720410658 [160,] 0.256533902 0.513067805 0.743466098 [161,] 0.232333763 0.464667526 0.767666237 [162,] 0.207190755 0.414381509 0.792809245 [163,] 0.234256578 0.468513157 0.765743422 [164,] 0.207544986 0.415089971 0.792455014 [165,] 0.275985692 0.551971385 0.724014308 [166,] 0.268495116 0.536990231 0.731504884 [167,] 0.245385810 0.490771620 0.754614190 [168,] 0.315935344 0.631870687 0.684064656 [169,] 0.291637020 0.583274040 0.708362980 [170,] 0.292318930 0.584637860 0.707681070 [171,] 0.272476916 0.544953833 0.727523084 [172,] 0.254115580 0.508231160 0.745884420 [173,] 0.242686782 0.485373563 0.757313218 [174,] 0.324696358 0.649392716 0.675303642 [175,] 0.299299237 0.598598473 0.700700763 [176,] 0.313012949 0.626025899 0.686987051 [177,] 0.289382116 0.578764231 0.710617884 [178,] 0.355664650 0.711329301 0.644335350 [179,] 0.322086665 0.644173330 0.677913335 [180,] 0.290624595 0.581249191 0.709375405 [181,] 0.258928690 0.517857381 0.741071310 [182,] 0.337680855 0.675361711 0.662319145 [183,] 0.333692769 0.667385537 0.666307231 [184,] 0.351498523 0.702997047 0.648501477 [185,] 0.350997993 0.701995986 0.649002007 [186,] 0.315354948 0.630709897 0.684645052 [187,] 0.288275910 0.576551820 0.711724090 [188,] 0.301660346 0.603320691 0.698339654 [189,] 0.413744641 0.827489283 0.586255359 [190,] 0.384883396 0.769766791 0.615116604 [191,] 0.347852479 0.695704958 0.652147521 [192,] 0.317116354 0.634232707 0.682883646 [193,] 0.284695575 0.569391150 0.715304425 [194,] 0.252005117 0.504010234 0.747994883 [195,] 0.220431817 0.440863633 0.779568183 [196,] 0.191621897 0.383243794 0.808378103 [197,] 0.168950230 0.337900460 0.831049770 [198,] 0.143518443 0.287036887 0.856481557 [199,] 0.126697247 0.253394495 0.873302753 [200,] 0.129764036 0.259528071 0.870235964 [201,] 0.108272605 0.216545210 0.891727395 [202,] 0.089458913 0.178917827 0.910541087 [203,] 0.075767655 0.151535309 0.924232345 [204,] 0.063333640 0.126667281 0.936666360 [205,] 0.055844419 0.111688838 0.944155581 [206,] 0.061238410 0.122476821 0.938761590 [207,] 0.049890868 0.099781736 0.950109132 [208,] 0.039638071 0.079276141 0.960361929 [209,] 0.030772391 0.061544781 0.969227609 [210,] 0.025281345 0.050562690 0.974718655 [211,] 0.027912321 0.055824642 0.972087679 [212,] 0.022246935 0.044493870 0.977753065 [213,] 0.031200144 0.062400287 0.968799856 [214,] 0.023645045 0.047290089 0.976354955 [215,] 0.017983430 0.035966860 0.982016570 [216,] 0.019867990 0.039735980 0.980132010 [217,] 0.021616488 0.043232975 0.978383512 [218,] 0.017245254 0.034490507 0.982754746 [219,] 0.013856949 0.027713898 0.986143051 [220,] 0.013327792 0.026655584 0.986672208 [221,] 0.018940767 0.037881534 0.981059233 [222,] 0.017998324 0.035996648 0.982001676 [223,] 0.013293719 0.026587438 0.986706281 [224,] 0.010768725 0.021537449 0.989231275 [225,] 0.010455896 0.020911793 0.989544104 [226,] 0.008615483 0.017230966 0.991384517 [227,] 0.008977724 0.017955448 0.991022276 [228,] 0.007324884 0.014649769 0.992675116 [229,] 0.005781094 0.011562189 0.994218906 [230,] 0.004645559 0.009291117 0.995354441 [231,] 0.022439004 0.044878008 0.977560996 [232,] 0.030254414 0.060508827 0.969745586 [233,] 0.055498715 0.110997431 0.944501285 [234,] 0.042795743 0.085591486 0.957204257 [235,] 0.040267731 0.080535463 0.959732269 [236,] 0.031260290 0.062520579 0.968739710 [237,] 0.020689852 0.041379705 0.979310148 [238,] 0.032731946 0.065463893 0.967268054 [239,] 0.021949523 0.043899046 0.978050477 [240,] 0.312674042 0.625348083 0.687325958 [241,] 0.324521279 0.649042559 0.675478721 [242,] 0.377801344 0.755602689 0.622198656 [243,] 0.451637015 0.903274030 0.548362985 [244,] 0.928440557 0.143118886 0.071559443 [245,] 0.876883445 0.246233111 0.123116555 [246,] 0.959292680 0.081414640 0.040707320 [247,] 0.932398212 0.135203576 0.067601788 > postscript(file="/var/fisher/rcomp/tmp/1942a1383469974.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/227n61383469974.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/3ez1d1383469974.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/4qfqy1383469974.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/565jo1383469974.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 = 264 Frequency = 1 1 2 3 4 5 6 -1.02234139 1.25661409 -1.10745956 -2.99274460 9.35725161 1.76394870 7 8 9 10 11 12 9.50123304 -2.05081539 -2.35807107 0.67049139 -0.59012698 -1.07093542 13 14 15 16 17 18 -0.93546468 2.69592024 0.22257380 0.80238695 0.90721860 0.85285595 19 20 21 22 23 24 -2.65139381 1.44735571 -0.54629302 -1.45242112 -0.48365061 -0.48039120 25 26 27 28 29 30 0.61768652 -7.43737010 -0.45902013 1.90351056 1.71548471 -2.59543581 31 32 33 34 35 36 -2.69099887 0.38511596 -0.82956772 -1.25285060 -0.20174736 -4.31879914 37 38 39 40 41 42 2.22405787 -0.35246732 -0.97597656 -3.81211247 -3.17968364 2.33372963 43 44 45 46 47 48 -2.79808574 -0.78062233 -1.32217253 -2.69781694 -3.24880474 -1.42033090 49 50 51 52 53 54 4.33924502 -2.80780371 -1.49999660 0.64304937 2.19171020 -0.53674693 55 56 57 58 59 60 -4.57150569 1.97642434 1.74185719 -3.45880587 -4.57026986 0.41314435 61 62 63 64 65 66 1.63050399 -1.61683889 -3.26555315 0.62089729 0.76396063 -4.93667121 67 68 69 70 71 72 2.01675975 -2.55030540 0.55996754 1.79002157 -0.57912485 3.15637428 73 74 75 76 77 78 1.00757313 -1.82654191 -2.76871449 4.65939536 2.45437799 3.18534856 79 80 81 82 83 84 0.21187474 -4.64009796 -1.29292091 -3.20997843 0.56063044 -0.46320308 85 86 87 88 89 90 -0.12031177 0.61227741 -1.05925847 1.00291527 3.44167000 1.66789185 91 92 93 94 95 96 1.50549316 0.77881408 1.81639631 -1.78633382 -0.33320547 1.60027521 97 98 99 100 101 102 -2.06929689 0.42805415 -2.60182056 -0.46521850 1.53081629 1.10216055 103 104 105 106 107 108 -4.53415706 3.66394401 2.09189115 -0.20553258 4.04165088 -1.05593849 109 110 111 112 113 114 7.69249867 1.58406631 -0.38856594 -2.83013024 1.57108893 1.73739942 115 116 117 118 119 120 -1.10698539 0.76209120 -0.36868393 -4.39164264 2.14949867 0.05887101 121 122 123 124 125 126 0.90933975 -1.38181848 -4.05757703 -1.21384984 -2.80995387 -2.64834096 127 128 129 130 131 132 -0.22229517 1.59237165 0.37336249 -2.94072900 2.24784275 -2.13453540 133 134 135 136 137 138 2.03879070 -0.32360451 2.35747705 7.04513799 0.84779810 -0.06738109 139 140 141 142 143 144 -1.73362777 -2.51535577 -2.46910719 2.14512933 -0.98820420 -0.37697038 145 146 147 148 149 150 -0.93548853 0.69266309 -2.54692243 -3.63760764 1.77334189 -0.07837732 151 152 153 154 155 156 3.48268937 -2.58789956 -2.73978286 1.95990948 3.44858233 1.50549316 157 158 159 160 161 162 0.38623414 1.59237165 -4.81745331 2.81072430 1.77229798 7.25384648 163 164 165 166 167 168 0.34535720 8.86953009 1.71409593 6.52165201 -1.41637114 -1.36945085 169 170 171 172 173 174 -1.18215314 0.81539634 4.16856859 0.60483505 -5.04138549 2.16089112 175 176 177 178 179 180 1.23691479 -5.00988756 -1.27672937 2.78212439 -1.85874207 -1.66645262 181 182 183 184 185 186 -1.93624569 -5.43404609 -0.97962404 -2.93757812 -1.75643278 5.12032431 187 188 189 190 191 192 1.13291288 -0.58846291 -0.69381812 4.84191408 -2.62012686 -2.86170882 193 194 195 196 197 198 1.96691027 0.66752689 1.31110265 -2.54114414 5.88783094 1.93233592 199 200 201 202 203 204 1.01113864 -1.12570126 -0.03637403 -0.92798673 -0.28776654 -0.17586096 205 206 207 208 209 210 -1.52451929 0.61693753 -1.01664920 3.56476475 -0.26066169 0.36255499 211 212 213 214 215 216 -0.26642805 -0.59355429 2.43502234 -3.50723859 1.70786010 0.25751133 217 218 219 220 221 222 0.31731839 -1.06805289 4.00113768 1.72900572 -3.58138899 0.42735379 223 224 225 226 227 228 0.76029578 -3.86478327 3.71926222 -2.55850277 1.45427997 -2.90389802 229 230 231 232 233 234 4.75915798 -2.83233758 -1.50840841 -1.58933707 -3.53856611 3.78060698 235 236 237 238 239 240 -2.83121170 -1.79894055 1.19176701 -0.97782297 -5.31010677 -3.95573917 241 242 243 244 245 246 -5.38682534 0.96416961 0.29703846 0.98217554 1.72483395 3.91857209 247 248 249 250 251 252 0.82236924 9.38106775 2.75713524 0.42429353 0.96186979 2.41105100 253 254 255 256 257 258 -3.30409713 -0.92978441 2.10855346 0.21123495 4.15837374 0.66540800 259 260 261 262 263 264 2.55458924 -9.54204834 -1.43829777 -0.74707387 3.16658519 -1.52590037 > postscript(file="/var/fisher/rcomp/tmp/6lxo11383469974.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 = 264 Frequency = 1 lag(myerror, k = 1) myerror 0 -1.02234139 NA 1 1.25661409 -1.02234139 2 -1.10745956 1.25661409 3 -2.99274460 -1.10745956 4 9.35725161 -2.99274460 5 1.76394870 9.35725161 6 9.50123304 1.76394870 7 -2.05081539 9.50123304 8 -2.35807107 -2.05081539 9 0.67049139 -2.35807107 10 -0.59012698 0.67049139 11 -1.07093542 -0.59012698 12 -0.93546468 -1.07093542 13 2.69592024 -0.93546468 14 0.22257380 2.69592024 15 0.80238695 0.22257380 16 0.90721860 0.80238695 17 0.85285595 0.90721860 18 -2.65139381 0.85285595 19 1.44735571 -2.65139381 20 -0.54629302 1.44735571 21 -1.45242112 -0.54629302 22 -0.48365061 -1.45242112 23 -0.48039120 -0.48365061 24 0.61768652 -0.48039120 25 -7.43737010 0.61768652 26 -0.45902013 -7.43737010 27 1.90351056 -0.45902013 28 1.71548471 1.90351056 29 -2.59543581 1.71548471 30 -2.69099887 -2.59543581 31 0.38511596 -2.69099887 32 -0.82956772 0.38511596 33 -1.25285060 -0.82956772 34 -0.20174736 -1.25285060 35 -4.31879914 -0.20174736 36 2.22405787 -4.31879914 37 -0.35246732 2.22405787 38 -0.97597656 -0.35246732 39 -3.81211247 -0.97597656 40 -3.17968364 -3.81211247 41 2.33372963 -3.17968364 42 -2.79808574 2.33372963 43 -0.78062233 -2.79808574 44 -1.32217253 -0.78062233 45 -2.69781694 -1.32217253 46 -3.24880474 -2.69781694 47 -1.42033090 -3.24880474 48 4.33924502 -1.42033090 49 -2.80780371 4.33924502 50 -1.49999660 -2.80780371 51 0.64304937 -1.49999660 52 2.19171020 0.64304937 53 -0.53674693 2.19171020 54 -4.57150569 -0.53674693 55 1.97642434 -4.57150569 56 1.74185719 1.97642434 57 -3.45880587 1.74185719 58 -4.57026986 -3.45880587 59 0.41314435 -4.57026986 60 1.63050399 0.41314435 61 -1.61683889 1.63050399 62 -3.26555315 -1.61683889 63 0.62089729 -3.26555315 64 0.76396063 0.62089729 65 -4.93667121 0.76396063 66 2.01675975 -4.93667121 67 -2.55030540 2.01675975 68 0.55996754 -2.55030540 69 1.79002157 0.55996754 70 -0.57912485 1.79002157 71 3.15637428 -0.57912485 72 1.00757313 3.15637428 73 -1.82654191 1.00757313 74 -2.76871449 -1.82654191 75 4.65939536 -2.76871449 76 2.45437799 4.65939536 77 3.18534856 2.45437799 78 0.21187474 3.18534856 79 -4.64009796 0.21187474 80 -1.29292091 -4.64009796 81 -3.20997843 -1.29292091 82 0.56063044 -3.20997843 83 -0.46320308 0.56063044 84 -0.12031177 -0.46320308 85 0.61227741 -0.12031177 86 -1.05925847 0.61227741 87 1.00291527 -1.05925847 88 3.44167000 1.00291527 89 1.66789185 3.44167000 90 1.50549316 1.66789185 91 0.77881408 1.50549316 92 1.81639631 0.77881408 93 -1.78633382 1.81639631 94 -0.33320547 -1.78633382 95 1.60027521 -0.33320547 96 -2.06929689 1.60027521 97 0.42805415 -2.06929689 98 -2.60182056 0.42805415 99 -0.46521850 -2.60182056 100 1.53081629 -0.46521850 101 1.10216055 1.53081629 102 -4.53415706 1.10216055 103 3.66394401 -4.53415706 104 2.09189115 3.66394401 105 -0.20553258 2.09189115 106 4.04165088 -0.20553258 107 -1.05593849 4.04165088 108 7.69249867 -1.05593849 109 1.58406631 7.69249867 110 -0.38856594 1.58406631 111 -2.83013024 -0.38856594 112 1.57108893 -2.83013024 113 1.73739942 1.57108893 114 -1.10698539 1.73739942 115 0.76209120 -1.10698539 116 -0.36868393 0.76209120 117 -4.39164264 -0.36868393 118 2.14949867 -4.39164264 119 0.05887101 2.14949867 120 0.90933975 0.05887101 121 -1.38181848 0.90933975 122 -4.05757703 -1.38181848 123 -1.21384984 -4.05757703 124 -2.80995387 -1.21384984 125 -2.64834096 -2.80995387 126 -0.22229517 -2.64834096 127 1.59237165 -0.22229517 128 0.37336249 1.59237165 129 -2.94072900 0.37336249 130 2.24784275 -2.94072900 131 -2.13453540 2.24784275 132 2.03879070 -2.13453540 133 -0.32360451 2.03879070 134 2.35747705 -0.32360451 135 7.04513799 2.35747705 136 0.84779810 7.04513799 137 -0.06738109 0.84779810 138 -1.73362777 -0.06738109 139 -2.51535577 -1.73362777 140 -2.46910719 -2.51535577 141 2.14512933 -2.46910719 142 -0.98820420 2.14512933 143 -0.37697038 -0.98820420 144 -0.93548853 -0.37697038 145 0.69266309 -0.93548853 146 -2.54692243 0.69266309 147 -3.63760764 -2.54692243 148 1.77334189 -3.63760764 149 -0.07837732 1.77334189 150 3.48268937 -0.07837732 151 -2.58789956 3.48268937 152 -2.73978286 -2.58789956 153 1.95990948 -2.73978286 154 3.44858233 1.95990948 155 1.50549316 3.44858233 156 0.38623414 1.50549316 157 1.59237165 0.38623414 158 -4.81745331 1.59237165 159 2.81072430 -4.81745331 160 1.77229798 2.81072430 161 7.25384648 1.77229798 162 0.34535720 7.25384648 163 8.86953009 0.34535720 164 1.71409593 8.86953009 165 6.52165201 1.71409593 166 -1.41637114 6.52165201 167 -1.36945085 -1.41637114 168 -1.18215314 -1.36945085 169 0.81539634 -1.18215314 170 4.16856859 0.81539634 171 0.60483505 4.16856859 172 -5.04138549 0.60483505 173 2.16089112 -5.04138549 174 1.23691479 2.16089112 175 -5.00988756 1.23691479 176 -1.27672937 -5.00988756 177 2.78212439 -1.27672937 178 -1.85874207 2.78212439 179 -1.66645262 -1.85874207 180 -1.93624569 -1.66645262 181 -5.43404609 -1.93624569 182 -0.97962404 -5.43404609 183 -2.93757812 -0.97962404 184 -1.75643278 -2.93757812 185 5.12032431 -1.75643278 186 1.13291288 5.12032431 187 -0.58846291 1.13291288 188 -0.69381812 -0.58846291 189 4.84191408 -0.69381812 190 -2.62012686 4.84191408 191 -2.86170882 -2.62012686 192 1.96691027 -2.86170882 193 0.66752689 1.96691027 194 1.31110265 0.66752689 195 -2.54114414 1.31110265 196 5.88783094 -2.54114414 197 1.93233592 5.88783094 198 1.01113864 1.93233592 199 -1.12570126 1.01113864 200 -0.03637403 -1.12570126 201 -0.92798673 -0.03637403 202 -0.28776654 -0.92798673 203 -0.17586096 -0.28776654 204 -1.52451929 -0.17586096 205 0.61693753 -1.52451929 206 -1.01664920 0.61693753 207 3.56476475 -1.01664920 208 -0.26066169 3.56476475 209 0.36255499 -0.26066169 210 -0.26642805 0.36255499 211 -0.59355429 -0.26642805 212 2.43502234 -0.59355429 213 -3.50723859 2.43502234 214 1.70786010 -3.50723859 215 0.25751133 1.70786010 216 0.31731839 0.25751133 217 -1.06805289 0.31731839 218 4.00113768 -1.06805289 219 1.72900572 4.00113768 220 -3.58138899 1.72900572 221 0.42735379 -3.58138899 222 0.76029578 0.42735379 223 -3.86478327 0.76029578 224 3.71926222 -3.86478327 225 -2.55850277 3.71926222 226 1.45427997 -2.55850277 227 -2.90389802 1.45427997 228 4.75915798 -2.90389802 229 -2.83233758 4.75915798 230 -1.50840841 -2.83233758 231 -1.58933707 -1.50840841 232 -3.53856611 -1.58933707 233 3.78060698 -3.53856611 234 -2.83121170 3.78060698 235 -1.79894055 -2.83121170 236 1.19176701 -1.79894055 237 -0.97782297 1.19176701 238 -5.31010677 -0.97782297 239 -3.95573917 -5.31010677 240 -5.38682534 -3.95573917 241 0.96416961 -5.38682534 242 0.29703846 0.96416961 243 0.98217554 0.29703846 244 1.72483395 0.98217554 245 3.91857209 1.72483395 246 0.82236924 3.91857209 247 9.38106775 0.82236924 248 2.75713524 9.38106775 249 0.42429353 2.75713524 250 0.96186979 0.42429353 251 2.41105100 0.96186979 252 -3.30409713 2.41105100 253 -0.92978441 -3.30409713 254 2.10855346 -0.92978441 255 0.21123495 2.10855346 256 4.15837374 0.21123495 257 0.66540800 4.15837374 258 2.55458924 0.66540800 259 -9.54204834 2.55458924 260 -1.43829777 -9.54204834 261 -0.74707387 -1.43829777 262 3.16658519 -0.74707387 263 -1.52590037 3.16658519 264 NA -1.52590037 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.25661409 -1.02234139 [2,] -1.10745956 1.25661409 [3,] -2.99274460 -1.10745956 [4,] 9.35725161 -2.99274460 [5,] 1.76394870 9.35725161 [6,] 9.50123304 1.76394870 [7,] -2.05081539 9.50123304 [8,] -2.35807107 -2.05081539 [9,] 0.67049139 -2.35807107 [10,] -0.59012698 0.67049139 [11,] -1.07093542 -0.59012698 [12,] -0.93546468 -1.07093542 [13,] 2.69592024 -0.93546468 [14,] 0.22257380 2.69592024 [15,] 0.80238695 0.22257380 [16,] 0.90721860 0.80238695 [17,] 0.85285595 0.90721860 [18,] -2.65139381 0.85285595 [19,] 1.44735571 -2.65139381 [20,] -0.54629302 1.44735571 [21,] -1.45242112 -0.54629302 [22,] -0.48365061 -1.45242112 [23,] -0.48039120 -0.48365061 [24,] 0.61768652 -0.48039120 [25,] -7.43737010 0.61768652 [26,] -0.45902013 -7.43737010 [27,] 1.90351056 -0.45902013 [28,] 1.71548471 1.90351056 [29,] -2.59543581 1.71548471 [30,] -2.69099887 -2.59543581 [31,] 0.38511596 -2.69099887 [32,] -0.82956772 0.38511596 [33,] -1.25285060 -0.82956772 [34,] -0.20174736 -1.25285060 [35,] -4.31879914 -0.20174736 [36,] 2.22405787 -4.31879914 [37,] -0.35246732 2.22405787 [38,] -0.97597656 -0.35246732 [39,] -3.81211247 -0.97597656 [40,] -3.17968364 -3.81211247 [41,] 2.33372963 -3.17968364 [42,] -2.79808574 2.33372963 [43,] -0.78062233 -2.79808574 [44,] -1.32217253 -0.78062233 [45,] -2.69781694 -1.32217253 [46,] -3.24880474 -2.69781694 [47,] -1.42033090 -3.24880474 [48,] 4.33924502 -1.42033090 [49,] -2.80780371 4.33924502 [50,] -1.49999660 -2.80780371 [51,] 0.64304937 -1.49999660 [52,] 2.19171020 0.64304937 [53,] -0.53674693 2.19171020 [54,] -4.57150569 -0.53674693 [55,] 1.97642434 -4.57150569 [56,] 1.74185719 1.97642434 [57,] -3.45880587 1.74185719 [58,] -4.57026986 -3.45880587 [59,] 0.41314435 -4.57026986 [60,] 1.63050399 0.41314435 [61,] -1.61683889 1.63050399 [62,] -3.26555315 -1.61683889 [63,] 0.62089729 -3.26555315 [64,] 0.76396063 0.62089729 [65,] -4.93667121 0.76396063 [66,] 2.01675975 -4.93667121 [67,] -2.55030540 2.01675975 [68,] 0.55996754 -2.55030540 [69,] 1.79002157 0.55996754 [70,] -0.57912485 1.79002157 [71,] 3.15637428 -0.57912485 [72,] 1.00757313 3.15637428 [73,] -1.82654191 1.00757313 [74,] -2.76871449 -1.82654191 [75,] 4.65939536 -2.76871449 [76,] 2.45437799 4.65939536 [77,] 3.18534856 2.45437799 [78,] 0.21187474 3.18534856 [79,] -4.64009796 0.21187474 [80,] -1.29292091 -4.64009796 [81,] -3.20997843 -1.29292091 [82,] 0.56063044 -3.20997843 [83,] -0.46320308 0.56063044 [84,] -0.12031177 -0.46320308 [85,] 0.61227741 -0.12031177 [86,] -1.05925847 0.61227741 [87,] 1.00291527 -1.05925847 [88,] 3.44167000 1.00291527 [89,] 1.66789185 3.44167000 [90,] 1.50549316 1.66789185 [91,] 0.77881408 1.50549316 [92,] 1.81639631 0.77881408 [93,] -1.78633382 1.81639631 [94,] -0.33320547 -1.78633382 [95,] 1.60027521 -0.33320547 [96,] -2.06929689 1.60027521 [97,] 0.42805415 -2.06929689 [98,] -2.60182056 0.42805415 [99,] -0.46521850 -2.60182056 [100,] 1.53081629 -0.46521850 [101,] 1.10216055 1.53081629 [102,] -4.53415706 1.10216055 [103,] 3.66394401 -4.53415706 [104,] 2.09189115 3.66394401 [105,] -0.20553258 2.09189115 [106,] 4.04165088 -0.20553258 [107,] -1.05593849 4.04165088 [108,] 7.69249867 -1.05593849 [109,] 1.58406631 7.69249867 [110,] -0.38856594 1.58406631 [111,] -2.83013024 -0.38856594 [112,] 1.57108893 -2.83013024 [113,] 1.73739942 1.57108893 [114,] -1.10698539 1.73739942 [115,] 0.76209120 -1.10698539 [116,] -0.36868393 0.76209120 [117,] -4.39164264 -0.36868393 [118,] 2.14949867 -4.39164264 [119,] 0.05887101 2.14949867 [120,] 0.90933975 0.05887101 [121,] -1.38181848 0.90933975 [122,] -4.05757703 -1.38181848 [123,] -1.21384984 -4.05757703 [124,] -2.80995387 -1.21384984 [125,] -2.64834096 -2.80995387 [126,] -0.22229517 -2.64834096 [127,] 1.59237165 -0.22229517 [128,] 0.37336249 1.59237165 [129,] -2.94072900 0.37336249 [130,] 2.24784275 -2.94072900 [131,] -2.13453540 2.24784275 [132,] 2.03879070 -2.13453540 [133,] -0.32360451 2.03879070 [134,] 2.35747705 -0.32360451 [135,] 7.04513799 2.35747705 [136,] 0.84779810 7.04513799 [137,] -0.06738109 0.84779810 [138,] -1.73362777 -0.06738109 [139,] -2.51535577 -1.73362777 [140,] -2.46910719 -2.51535577 [141,] 2.14512933 -2.46910719 [142,] -0.98820420 2.14512933 [143,] -0.37697038 -0.98820420 [144,] -0.93548853 -0.37697038 [145,] 0.69266309 -0.93548853 [146,] -2.54692243 0.69266309 [147,] -3.63760764 -2.54692243 [148,] 1.77334189 -3.63760764 [149,] -0.07837732 1.77334189 [150,] 3.48268937 -0.07837732 [151,] -2.58789956 3.48268937 [152,] -2.73978286 -2.58789956 [153,] 1.95990948 -2.73978286 [154,] 3.44858233 1.95990948 [155,] 1.50549316 3.44858233 [156,] 0.38623414 1.50549316 [157,] 1.59237165 0.38623414 [158,] -4.81745331 1.59237165 [159,] 2.81072430 -4.81745331 [160,] 1.77229798 2.81072430 [161,] 7.25384648 1.77229798 [162,] 0.34535720 7.25384648 [163,] 8.86953009 0.34535720 [164,] 1.71409593 8.86953009 [165,] 6.52165201 1.71409593 [166,] -1.41637114 6.52165201 [167,] -1.36945085 -1.41637114 [168,] -1.18215314 -1.36945085 [169,] 0.81539634 -1.18215314 [170,] 4.16856859 0.81539634 [171,] 0.60483505 4.16856859 [172,] -5.04138549 0.60483505 [173,] 2.16089112 -5.04138549 [174,] 1.23691479 2.16089112 [175,] -5.00988756 1.23691479 [176,] -1.27672937 -5.00988756 [177,] 2.78212439 -1.27672937 [178,] -1.85874207 2.78212439 [179,] -1.66645262 -1.85874207 [180,] -1.93624569 -1.66645262 [181,] -5.43404609 -1.93624569 [182,] -0.97962404 -5.43404609 [183,] -2.93757812 -0.97962404 [184,] -1.75643278 -2.93757812 [185,] 5.12032431 -1.75643278 [186,] 1.13291288 5.12032431 [187,] -0.58846291 1.13291288 [188,] -0.69381812 -0.58846291 [189,] 4.84191408 -0.69381812 [190,] -2.62012686 4.84191408 [191,] -2.86170882 -2.62012686 [192,] 1.96691027 -2.86170882 [193,] 0.66752689 1.96691027 [194,] 1.31110265 0.66752689 [195,] -2.54114414 1.31110265 [196,] 5.88783094 -2.54114414 [197,] 1.93233592 5.88783094 [198,] 1.01113864 1.93233592 [199,] -1.12570126 1.01113864 [200,] -0.03637403 -1.12570126 [201,] -0.92798673 -0.03637403 [202,] -0.28776654 -0.92798673 [203,] -0.17586096 -0.28776654 [204,] -1.52451929 -0.17586096 [205,] 0.61693753 -1.52451929 [206,] -1.01664920 0.61693753 [207,] 3.56476475 -1.01664920 [208,] -0.26066169 3.56476475 [209,] 0.36255499 -0.26066169 [210,] -0.26642805 0.36255499 [211,] -0.59355429 -0.26642805 [212,] 2.43502234 -0.59355429 [213,] -3.50723859 2.43502234 [214,] 1.70786010 -3.50723859 [215,] 0.25751133 1.70786010 [216,] 0.31731839 0.25751133 [217,] -1.06805289 0.31731839 [218,] 4.00113768 -1.06805289 [219,] 1.72900572 4.00113768 [220,] -3.58138899 1.72900572 [221,] 0.42735379 -3.58138899 [222,] 0.76029578 0.42735379 [223,] -3.86478327 0.76029578 [224,] 3.71926222 -3.86478327 [225,] -2.55850277 3.71926222 [226,] 1.45427997 -2.55850277 [227,] -2.90389802 1.45427997 [228,] 4.75915798 -2.90389802 [229,] -2.83233758 4.75915798 [230,] -1.50840841 -2.83233758 [231,] -1.58933707 -1.50840841 [232,] -3.53856611 -1.58933707 [233,] 3.78060698 -3.53856611 [234,] -2.83121170 3.78060698 [235,] -1.79894055 -2.83121170 [236,] 1.19176701 -1.79894055 [237,] -0.97782297 1.19176701 [238,] -5.31010677 -0.97782297 [239,] -3.95573917 -5.31010677 [240,] -5.38682534 -3.95573917 [241,] 0.96416961 -5.38682534 [242,] 0.29703846 0.96416961 [243,] 0.98217554 0.29703846 [244,] 1.72483395 0.98217554 [245,] 3.91857209 1.72483395 [246,] 0.82236924 3.91857209 [247,] 9.38106775 0.82236924 [248,] 2.75713524 9.38106775 [249,] 0.42429353 2.75713524 [250,] 0.96186979 0.42429353 [251,] 2.41105100 0.96186979 [252,] -3.30409713 2.41105100 [253,] -0.92978441 -3.30409713 [254,] 2.10855346 -0.92978441 [255,] 0.21123495 2.10855346 [256,] 4.15837374 0.21123495 [257,] 0.66540800 4.15837374 [258,] 2.55458924 0.66540800 [259,] -9.54204834 2.55458924 [260,] -1.43829777 -9.54204834 [261,] -0.74707387 -1.43829777 [262,] 3.16658519 -0.74707387 [263,] -1.52590037 3.16658519 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.25661409 -1.02234139 2 -1.10745956 1.25661409 3 -2.99274460 -1.10745956 4 9.35725161 -2.99274460 5 1.76394870 9.35725161 6 9.50123304 1.76394870 7 -2.05081539 9.50123304 8 -2.35807107 -2.05081539 9 0.67049139 -2.35807107 10 -0.59012698 0.67049139 11 -1.07093542 -0.59012698 12 -0.93546468 -1.07093542 13 2.69592024 -0.93546468 14 0.22257380 2.69592024 15 0.80238695 0.22257380 16 0.90721860 0.80238695 17 0.85285595 0.90721860 18 -2.65139381 0.85285595 19 1.44735571 -2.65139381 20 -0.54629302 1.44735571 21 -1.45242112 -0.54629302 22 -0.48365061 -1.45242112 23 -0.48039120 -0.48365061 24 0.61768652 -0.48039120 25 -7.43737010 0.61768652 26 -0.45902013 -7.43737010 27 1.90351056 -0.45902013 28 1.71548471 1.90351056 29 -2.59543581 1.71548471 30 -2.69099887 -2.59543581 31 0.38511596 -2.69099887 32 -0.82956772 0.38511596 33 -1.25285060 -0.82956772 34 -0.20174736 -1.25285060 35 -4.31879914 -0.20174736 36 2.22405787 -4.31879914 37 -0.35246732 2.22405787 38 -0.97597656 -0.35246732 39 -3.81211247 -0.97597656 40 -3.17968364 -3.81211247 41 2.33372963 -3.17968364 42 -2.79808574 2.33372963 43 -0.78062233 -2.79808574 44 -1.32217253 -0.78062233 45 -2.69781694 -1.32217253 46 -3.24880474 -2.69781694 47 -1.42033090 -3.24880474 48 4.33924502 -1.42033090 49 -2.80780371 4.33924502 50 -1.49999660 -2.80780371 51 0.64304937 -1.49999660 52 2.19171020 0.64304937 53 -0.53674693 2.19171020 54 -4.57150569 -0.53674693 55 1.97642434 -4.57150569 56 1.74185719 1.97642434 57 -3.45880587 1.74185719 58 -4.57026986 -3.45880587 59 0.41314435 -4.57026986 60 1.63050399 0.41314435 61 -1.61683889 1.63050399 62 -3.26555315 -1.61683889 63 0.62089729 -3.26555315 64 0.76396063 0.62089729 65 -4.93667121 0.76396063 66 2.01675975 -4.93667121 67 -2.55030540 2.01675975 68 0.55996754 -2.55030540 69 1.79002157 0.55996754 70 -0.57912485 1.79002157 71 3.15637428 -0.57912485 72 1.00757313 3.15637428 73 -1.82654191 1.00757313 74 -2.76871449 -1.82654191 75 4.65939536 -2.76871449 76 2.45437799 4.65939536 77 3.18534856 2.45437799 78 0.21187474 3.18534856 79 -4.64009796 0.21187474 80 -1.29292091 -4.64009796 81 -3.20997843 -1.29292091 82 0.56063044 -3.20997843 83 -0.46320308 0.56063044 84 -0.12031177 -0.46320308 85 0.61227741 -0.12031177 86 -1.05925847 0.61227741 87 1.00291527 -1.05925847 88 3.44167000 1.00291527 89 1.66789185 3.44167000 90 1.50549316 1.66789185 91 0.77881408 1.50549316 92 1.81639631 0.77881408 93 -1.78633382 1.81639631 94 -0.33320547 -1.78633382 95 1.60027521 -0.33320547 96 -2.06929689 1.60027521 97 0.42805415 -2.06929689 98 -2.60182056 0.42805415 99 -0.46521850 -2.60182056 100 1.53081629 -0.46521850 101 1.10216055 1.53081629 102 -4.53415706 1.10216055 103 3.66394401 -4.53415706 104 2.09189115 3.66394401 105 -0.20553258 2.09189115 106 4.04165088 -0.20553258 107 -1.05593849 4.04165088 108 7.69249867 -1.05593849 109 1.58406631 7.69249867 110 -0.38856594 1.58406631 111 -2.83013024 -0.38856594 112 1.57108893 -2.83013024 113 1.73739942 1.57108893 114 -1.10698539 1.73739942 115 0.76209120 -1.10698539 116 -0.36868393 0.76209120 117 -4.39164264 -0.36868393 118 2.14949867 -4.39164264 119 0.05887101 2.14949867 120 0.90933975 0.05887101 121 -1.38181848 0.90933975 122 -4.05757703 -1.38181848 123 -1.21384984 -4.05757703 124 -2.80995387 -1.21384984 125 -2.64834096 -2.80995387 126 -0.22229517 -2.64834096 127 1.59237165 -0.22229517 128 0.37336249 1.59237165 129 -2.94072900 0.37336249 130 2.24784275 -2.94072900 131 -2.13453540 2.24784275 132 2.03879070 -2.13453540 133 -0.32360451 2.03879070 134 2.35747705 -0.32360451 135 7.04513799 2.35747705 136 0.84779810 7.04513799 137 -0.06738109 0.84779810 138 -1.73362777 -0.06738109 139 -2.51535577 -1.73362777 140 -2.46910719 -2.51535577 141 2.14512933 -2.46910719 142 -0.98820420 2.14512933 143 -0.37697038 -0.98820420 144 -0.93548853 -0.37697038 145 0.69266309 -0.93548853 146 -2.54692243 0.69266309 147 -3.63760764 -2.54692243 148 1.77334189 -3.63760764 149 -0.07837732 1.77334189 150 3.48268937 -0.07837732 151 -2.58789956 3.48268937 152 -2.73978286 -2.58789956 153 1.95990948 -2.73978286 154 3.44858233 1.95990948 155 1.50549316 3.44858233 156 0.38623414 1.50549316 157 1.59237165 0.38623414 158 -4.81745331 1.59237165 159 2.81072430 -4.81745331 160 1.77229798 2.81072430 161 7.25384648 1.77229798 162 0.34535720 7.25384648 163 8.86953009 0.34535720 164 1.71409593 8.86953009 165 6.52165201 1.71409593 166 -1.41637114 6.52165201 167 -1.36945085 -1.41637114 168 -1.18215314 -1.36945085 169 0.81539634 -1.18215314 170 4.16856859 0.81539634 171 0.60483505 4.16856859 172 -5.04138549 0.60483505 173 2.16089112 -5.04138549 174 1.23691479 2.16089112 175 -5.00988756 1.23691479 176 -1.27672937 -5.00988756 177 2.78212439 -1.27672937 178 -1.85874207 2.78212439 179 -1.66645262 -1.85874207 180 -1.93624569 -1.66645262 181 -5.43404609 -1.93624569 182 -0.97962404 -5.43404609 183 -2.93757812 -0.97962404 184 -1.75643278 -2.93757812 185 5.12032431 -1.75643278 186 1.13291288 5.12032431 187 -0.58846291 1.13291288 188 -0.69381812 -0.58846291 189 4.84191408 -0.69381812 190 -2.62012686 4.84191408 191 -2.86170882 -2.62012686 192 1.96691027 -2.86170882 193 0.66752689 1.96691027 194 1.31110265 0.66752689 195 -2.54114414 1.31110265 196 5.88783094 -2.54114414 197 1.93233592 5.88783094 198 1.01113864 1.93233592 199 -1.12570126 1.01113864 200 -0.03637403 -1.12570126 201 -0.92798673 -0.03637403 202 -0.28776654 -0.92798673 203 -0.17586096 -0.28776654 204 -1.52451929 -0.17586096 205 0.61693753 -1.52451929 206 -1.01664920 0.61693753 207 3.56476475 -1.01664920 208 -0.26066169 3.56476475 209 0.36255499 -0.26066169 210 -0.26642805 0.36255499 211 -0.59355429 -0.26642805 212 2.43502234 -0.59355429 213 -3.50723859 2.43502234 214 1.70786010 -3.50723859 215 0.25751133 1.70786010 216 0.31731839 0.25751133 217 -1.06805289 0.31731839 218 4.00113768 -1.06805289 219 1.72900572 4.00113768 220 -3.58138899 1.72900572 221 0.42735379 -3.58138899 222 0.76029578 0.42735379 223 -3.86478327 0.76029578 224 3.71926222 -3.86478327 225 -2.55850277 3.71926222 226 1.45427997 -2.55850277 227 -2.90389802 1.45427997 228 4.75915798 -2.90389802 229 -2.83233758 4.75915798 230 -1.50840841 -2.83233758 231 -1.58933707 -1.50840841 232 -3.53856611 -1.58933707 233 3.78060698 -3.53856611 234 -2.83121170 3.78060698 235 -1.79894055 -2.83121170 236 1.19176701 -1.79894055 237 -0.97782297 1.19176701 238 -5.31010677 -0.97782297 239 -3.95573917 -5.31010677 240 -5.38682534 -3.95573917 241 0.96416961 -5.38682534 242 0.29703846 0.96416961 243 0.98217554 0.29703846 244 1.72483395 0.98217554 245 3.91857209 1.72483395 246 0.82236924 3.91857209 247 9.38106775 0.82236924 248 2.75713524 9.38106775 249 0.42429353 2.75713524 250 0.96186979 0.42429353 251 2.41105100 0.96186979 252 -3.30409713 2.41105100 253 -0.92978441 -3.30409713 254 2.10855346 -0.92978441 255 0.21123495 2.10855346 256 4.15837374 0.21123495 257 0.66540800 4.15837374 258 2.55458924 0.66540800 259 -9.54204834 2.55458924 260 -1.43829777 -9.54204834 261 -0.74707387 -1.43829777 262 3.16658519 -0.74707387 263 -1.52590037 3.16658519 > 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/72odt1383469974.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/8nm8z1383469974.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/94xzs1383469974.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/103zzq1383469974.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, signif(mysum$coefficients[i,1],6), 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/11anvb1383469974.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,signif(mysum$coefficients[i,1],6)) + a<-table.element(a, signif(mysum$coefficients[i,2],6)) + a<-table.element(a, signif(mysum$coefficients[i,3],4)) + a<-table.element(a, signif(mysum$coefficients[i,4],6)) + a<-table.element(a, signif(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/12q0ru1383469974.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, signif(sqrt(mysum$r.squared),6)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, signif(mysum$r.squared,6)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, signif(mysum$adj.r.squared,6)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, signif(mysum$fstatistic[1],6)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, signif(mysum$fstatistic[2],6)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, signif(mysum$fstatistic[3],6)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6)) > 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, signif(mysum$sigma,6)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, signif(sum(myerror*myerror),6)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/13tohj1383469975.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,signif(x[i],6)) + a<-table.element(a,signif(x[i]-mysum$resid[i],6)) + a<-table.element(a,signif(mysum$resid[i],6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/14lb1d1383469975.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,signif(gqarr[mypoint-kp3+1,1],6)) + a<-table.element(a,signif(gqarr[mypoint-kp3+1,2],6)) + a<-table.element(a,signif(gqarr[mypoint-kp3+1,3],6)) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/fisher/rcomp/tmp/15ad9y1383469975.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,signif(numsignificant1,6)) + a<-table.element(a,signif(numsignificant1/numgqtests,6)) + 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,signif(numsignificant5,6)) + a<-table.element(a,signif(numsignificant5/numgqtests,6)) + 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,signif(numsignificant10,6)) + a<-table.element(a,signif(numsignificant10/numgqtests,6)) + 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/16xakq1383469975.tab") + } > > try(system("convert tmp/1942a1383469974.ps tmp/1942a1383469974.png",intern=TRUE)) character(0) > try(system("convert tmp/227n61383469974.ps tmp/227n61383469974.png",intern=TRUE)) character(0) > try(system("convert tmp/3ez1d1383469974.ps tmp/3ez1d1383469974.png",intern=TRUE)) character(0) > try(system("convert tmp/4qfqy1383469974.ps tmp/4qfqy1383469974.png",intern=TRUE)) character(0) > try(system("convert tmp/565jo1383469974.ps tmp/565jo1383469974.png",intern=TRUE)) character(0) > try(system("convert tmp/6lxo11383469974.ps tmp/6lxo11383469974.png",intern=TRUE)) character(0) > try(system("convert tmp/72odt1383469974.ps tmp/72odt1383469974.png",intern=TRUE)) character(0) > try(system("convert tmp/8nm8z1383469974.ps tmp/8nm8z1383469974.png",intern=TRUE)) character(0) > try(system("convert tmp/94xzs1383469974.ps tmp/94xzs1383469974.png",intern=TRUE)) character(0) > try(system("convert tmp/103zzq1383469974.ps tmp/103zzq1383469974.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 10.046 1.639 11.672