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 = '5' > par3 <- 'No Linear Trend' > par2 <- 'Do not include Seasonal Dummies' > par1 <- '5' > #'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 Happiness Connected Separate Learning Software Depression 1 14 41 38 13 12 12.0 2 18 39 32 16 11 11.0 3 11 30 35 19 15 14.0 4 12 31 33 15 6 12.0 5 16 34 37 14 13 21.0 6 18 35 29 13 10 12.0 7 14 39 31 19 12 22.0 8 14 34 36 15 14 11.0 9 15 36 35 14 12 10.0 10 15 37 38 15 9 13.0 11 17 38 31 16 10 10.0 12 19 36 34 16 12 8.0 13 10 38 35 16 12 15.0 14 16 39 38 16 11 14.0 15 18 33 37 17 15 10.0 16 14 32 33 15 12 14.0 17 14 36 32 15 10 14.0 18 17 38 38 20 12 11.0 19 14 39 38 18 11 10.0 20 16 32 32 16 12 13.0 21 18 32 33 16 11 9.5 22 11 31 31 16 12 14.0 23 14 39 38 19 13 12.0 24 12 37 39 16 11 14.0 25 17 39 32 17 12 11.0 26 9 41 32 17 13 9.0 27 16 36 35 16 10 11.0 28 14 33 37 15 14 15.0 29 15 33 33 16 12 14.0 30 11 34 33 14 10 13.0 31 16 31 31 15 12 9.0 32 13 27 32 12 8 15.0 33 17 37 31 14 10 10.0 34 15 34 37 16 12 11.0 35 14 34 30 14 12 13.0 36 16 32 33 10 7 8.0 37 9 29 31 10 9 20.0 38 15 36 33 14 12 12.0 39 17 29 31 16 10 10.0 40 13 35 33 16 10 10.0 41 15 37 32 16 10 9.0 42 16 34 33 14 12 14.0 43 16 38 32 20 15 8.0 44 12 35 33 14 10 14.0 45 15 38 28 14 10 11.0 46 11 37 35 11 12 13.0 47 15 38 39 14 13 9.0 48 15 33 34 15 11 11.0 49 17 36 38 16 11 15.0 50 13 38 32 14 12 11.0 51 16 32 38 16 14 10.0 52 14 32 30 14 10 14.0 53 11 32 33 12 12 18.0 54 12 34 38 16 13 14.0 55 12 32 32 9 5 11.0 56 15 37 35 14 6 14.5 57 16 39 34 16 12 13.0 58 15 29 34 16 12 9.0 59 12 37 36 15 11 10.0 60 12 35 34 16 10 15.0 61 8 30 28 12 7 20.0 62 13 38 34 16 12 12.0 63 11 34 35 16 14 12.0 64 14 31 35 14 11 14.0 65 15 34 31 16 12 13.0 66 10 35 37 17 13 11.0 67 11 36 35 18 14 17.0 68 12 30 27 18 11 12.0 69 15 39 40 12 12 13.0 70 15 35 37 16 12 14.0 71 14 38 36 10 8 13.0 72 16 31 38 14 11 15.0 73 15 34 39 18 14 13.0 74 15 38 41 18 14 10.0 75 13 34 27 16 12 11.0 76 12 39 30 17 9 19.0 77 17 37 37 16 13 13.0 78 13 34 31 16 11 17.0 79 15 28 31 13 12 13.0 80 13 37 27 16 12 9.0 81 15 33 36 16 12 11.0 82 15 35 37 16 12 9.0 83 16 37 33 15 12 12.0 84 15 32 34 15 11 12.0 85 14 33 31 16 10 13.0 86 15 38 39 14 9 13.0 87 14 33 34 16 12 12.0 88 13 29 32 16 12 15.0 89 7 33 33 15 12 22.0 90 17 31 36 12 9 13.0 91 13 36 32 17 15 15.0 92 15 35 41 16 12 13.0 93 14 32 28 15 12 15.0 94 13 29 30 13 12 12.5 95 16 39 36 16 10 11.0 96 12 37 35 16 13 16.0 97 14 35 31 16 9 11.0 98 17 37 34 16 12 11.0 99 15 32 36 14 10 10.0 100 17 38 36 16 14 10.0 101 12 37 35 16 11 16.0 102 16 36 37 20 15 12.0 103 11 32 28 15 11 11.0 104 15 33 39 16 11 16.0 105 9 40 32 13 12 19.0 106 16 38 35 17 12 11.0 107 15 41 39 16 12 16.0 108 10 36 35 16 11 15.0 109 10 43 42 12 7 24.0 110 15 30 34 16 12 14.0 111 11 31 33 16 14 15.0 112 13 32 41 17 11 11.0 113 14 32 33 13 11 15.0 114 18 37 34 12 10 12.0 115 16 37 32 18 13 10.0 116 14 33 40 14 13 14.0 117 14 34 40 14 8 13.0 118 14 33 35 13 11 9.0 119 14 38 36 16 12 15.0 120 12 33 37 13 11 15.0 121 14 31 27 16 13 14.0 122 15 38 39 13 12 11.0 123 15 37 38 16 14 8.0 124 15 36 31 15 13 11.0 125 13 31 33 16 15 11.0 126 17 39 32 15 10 8.0 127 17 44 39 17 11 10.0 128 19 33 36 15 9 11.0 129 15 35 33 12 11 13.0 130 13 32 33 16 10 11.0 131 9 28 32 10 11 20.0 132 15 40 37 16 8 10.0 133 15 27 30 12 11 15.0 134 15 37 38 14 12 12.0 135 16 32 29 15 12 14.0 136 11 28 22 13 9 23.0 137 14 34 35 15 11 14.0 138 11 30 35 11 10 16.0 139 15 35 34 12 8 11.0 140 13 31 35 11 9 12.0 141 15 32 34 16 8 10.0 142 16 30 37 15 9 14.0 143 14 30 35 17 15 12.0 144 15 31 23 16 11 12.0 145 16 40 31 10 8 11.0 146 16 32 27 18 13 12.0 147 11 36 36 13 12 13.0 148 12 32 31 16 12 11.0 149 9 35 32 13 9 19.0 150 16 38 39 10 7 12.0 151 13 42 37 15 13 17.0 152 16 34 38 16 9 9.0 153 12 35 39 16 6 12.0 154 9 38 34 14 8 19.0 155 13 33 31 10 8 18.0 156 13 36 32 17 15 15.0 157 14 32 37 13 6 14.0 158 19 33 36 15 9 11.0 159 13 34 32 16 11 9.0 160 12 32 38 12 8 18.0 161 13 34 36 13 8 16.0 162 10 27 26 13 10 24.0 163 14 31 26 12 8 14.0 164 16 38 33 17 14 20.0 165 10 34 39 15 10 18.0 166 11 24 30 10 8 23.0 167 14 30 33 14 11 12.0 168 12 26 25 11 12 14.0 169 9 34 38 13 12 16.0 170 9 27 37 16 12 18.0 171 11 37 31 12 5 20.0 172 16 36 37 16 12 12.0 173 9 41 35 12 10 12.0 174 13 29 25 9 7 17.0 175 16 36 28 12 12 13.0 176 13 32 35 15 11 9.0 177 9 37 33 12 8 16.0 178 12 30 30 12 9 18.0 179 16 31 31 14 10 10.0 180 11 38 37 12 9 14.0 181 14 36 36 16 12 11.0 182 13 35 30 11 6 9.0 183 15 31 36 19 15 11.0 184 14 38 32 15 12 10.0 185 16 22 28 8 12 11.0 186 13 32 36 16 12 19.0 187 14 36 34 17 11 14.0 188 15 39 31 12 7 12.0 189 13 28 28 11 7 14.0 190 11 32 36 11 5 21.0 191 11 32 36 14 12 13.0 192 14 38 40 16 12 10.0 193 15 32 33 12 3 15.0 194 11 35 37 16 11 16.0 195 15 32 32 13 10 14.0 196 12 37 38 15 12 12.0 197 14 34 31 16 9 19.0 198 14 33 37 16 12 15.0 199 8 33 33 14 9 19.0 200 13 26 32 16 12 13.0 201 9 30 30 16 12 17.0 202 15 24 30 14 10 12.0 203 17 34 31 11 9 11.0 204 13 34 32 12 12 14.0 205 15 33 34 15 8 11.0 206 15 34 36 15 11 13.0 207 14 35 37 16 11 12.0 208 16 35 36 16 12 15.0 209 13 36 33 11 10 14.0 210 16 34 33 15 10 12.0 211 9 34 33 12 12 17.0 212 16 41 44 12 12 11.0 213 11 32 39 15 11 18.0 214 10 30 32 15 8 13.0 215 11 35 35 16 12 17.0 216 15 28 25 14 10 13.0 217 17 33 35 17 11 11.0 218 14 39 34 14 10 12.0 219 8 36 35 13 8 22.0 220 15 36 39 15 12 14.0 221 11 35 33 13 12 12.0 222 16 38 36 14 10 12.0 223 10 33 32 15 12 17.0 224 15 31 32 12 9 9.0 225 9 34 36 13 9 21.0 226 16 32 36 8 6 10.0 227 19 31 32 14 10 11.0 228 12 33 34 14 9 12.0 229 8 34 33 11 9 23.0 230 11 34 35 12 9 13.0 231 14 34 30 13 6 12.0 232 9 33 38 10 10 16.0 233 15 32 34 16 6 9.0 234 13 41 33 18 14 17.0 235 16 34 32 13 10 9.0 236 11 36 31 11 10 14.0 237 12 37 30 4 6 17.0 238 13 36 27 13 12 13.0 239 10 29 31 16 12 11.0 240 11 37 30 10 7 12.0 241 12 27 32 12 8 10.0 242 8 35 35 12 11 19.0 243 12 28 28 10 3 16.0 244 12 35 33 13 6 16.0 245 15 37 31 15 10 14.0 246 11 29 35 12 8 20.0 247 13 32 35 14 9 15.0 248 14 36 32 10 9 23.0 249 10 19 21 12 8 20.0 250 12 21 20 12 9 16.0 251 15 31 34 11 7 14.0 252 13 33 32 10 7 17.0 253 13 36 34 12 6 11.0 254 13 33 32 16 9 13.0 255 12 37 33 12 10 17.0 256 12 34 33 14 11 15.0 257 9 35 37 16 12 21.0 258 9 31 32 14 8 18.0 259 15 37 34 13 11 15.0 260 10 35 30 4 3 8.0 261 14 27 30 15 11 12.0 262 15 34 38 11 12 12.0 263 7 40 36 11 7 22.0 264 14 29 32 14 9 12.0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Connected Separate Learning Software Depression 16.289892 0.017822 0.012218 0.116518 -0.004848 -0.397333 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -6.7533 -1.4312 0.2307 1.4039 5.4279 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 16.289892 1.598535 10.191 <2e-16 *** Connected 0.017822 0.037326 0.477 0.6334 Separate 0.012218 0.038410 0.318 0.7507 Learning 0.116518 0.066780 1.745 0.0822 . Software -0.004848 0.069061 -0.070 0.9441 Depression -0.397333 0.037190 -10.684 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.026 on 258 degrees of freedom Multiple R-squared: 0.3549, Adjusted R-squared: 0.3424 F-statistic: 28.39 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.5644542 0.871091594 0.435545797 [2,] 0.6121527 0.775694561 0.387847281 [3,] 0.5089213 0.982157401 0.491078701 [4,] 0.7639094 0.472181173 0.236090587 [5,] 0.9449475 0.110104914 0.055052457 [6,] 0.9452679 0.109464216 0.054732108 [7,] 0.9706819 0.058636216 0.029318108 [8,] 0.9552515 0.089496935 0.044748467 [9,] 0.9386284 0.122743259 0.061371630 [10,] 0.9356103 0.128779391 0.064389695 [11,] 0.9225943 0.154811356 0.077405678 [12,] 0.9022768 0.195446321 0.097723160 [13,] 0.9084150 0.183170007 0.091585004 [14,] 0.9455950 0.108810083 0.054405042 [15,] 0.9308823 0.138235449 0.069117725 [16,] 0.9217114 0.156577136 0.078288568 [17,] 0.8986006 0.202798750 0.101399375 [18,] 0.9979086 0.004182726 0.002091363 [19,] 0.9969576 0.006084784 0.003042392 [20,] 0.9953857 0.009228536 0.004614268 [21,] 0.9933690 0.013262013 0.006631006 [22,] 0.9965124 0.006975209 0.003487605 [23,] 0.9948511 0.010297735 0.005148868 [24,] 0.9928506 0.014298800 0.007149400 [25,] 0.9912759 0.017448202 0.008724101 [26,] 0.9876079 0.024784128 0.012392064 [27,] 0.9835337 0.032932534 0.016466267 [28,] 0.9775185 0.044962907 0.022481454 [29,] 0.9825762 0.034847649 0.017423824 [30,] 0.9765671 0.046865887 0.023432944 [31,] 0.9743181 0.051363817 0.025681908 [32,] 0.9754824 0.049035289 0.024517645 [33,] 0.9684552 0.063089539 0.031544770 [34,] 0.9675541 0.064891784 0.032445892 [35,] 0.9582616 0.083476828 0.041738414 [36,] 0.9556475 0.088705037 0.044352519 [37,] 0.9435970 0.112805952 0.056402976 [38,] 0.9539377 0.092124662 0.046062331 [39,] 0.9416065 0.116787041 0.058393521 [40,] 0.9269352 0.146129542 0.073064771 [41,] 0.9481573 0.103685401 0.051842701 [42,] 0.9431589 0.113682183 0.056841091 [43,] 0.9308204 0.138359269 0.069179635 [44,] 0.9151807 0.169638611 0.084819306 [45,] 0.9024087 0.195182511 0.097591256 [46,] 0.8996248 0.200750392 0.100375196 [47,] 0.8950889 0.209822169 0.104911085 [48,] 0.8842744 0.231451184 0.115725592 [49,] 0.8765164 0.246967154 0.123483577 [50,] 0.8542014 0.291597212 0.145798606 [51,] 0.8797972 0.240405530 0.120202765 [52,] 0.8728409 0.254318247 0.127159123 [53,] 0.8992724 0.201455157 0.100727578 [54,] 0.8910068 0.217986377 0.108993188 [55,] 0.9207301 0.158539782 0.079269891 [56,] 0.9057473 0.188505304 0.094252652 [57,] 0.8908062 0.218387603 0.109193802 [58,] 0.9540159 0.091968137 0.045984068 [59,] 0.9526449 0.094710256 0.047355128 [60,] 0.9566435 0.086713045 0.043356522 [61,] 0.9501110 0.099777933 0.049888967 [62,] 0.9432086 0.113582826 0.056791413 [63,] 0.9314189 0.137162214 0.068581107 [64,] 0.9422070 0.115586002 0.057793001 [65,] 0.9310603 0.137879326 0.068939663 [66,] 0.9181255 0.163748952 0.081874476 [67,] 0.9098046 0.180390714 0.090195357 [68,] 0.8931518 0.213696421 0.106848210 [69,] 0.9069842 0.186031659 0.093015829 [70,] 0.8908120 0.218375968 0.109187984 [71,] 0.8828996 0.234200858 0.117100429 [72,] 0.8841704 0.231659170 0.115829585 [73,] 0.8644351 0.271129765 0.135564883 [74,] 0.8440286 0.311942802 0.155971401 [75,] 0.8369392 0.326121664 0.163060832 [76,] 0.8156124 0.368775199 0.184387600 [77,] 0.7891100 0.421780077 0.210890039 [78,] 0.7655020 0.468995935 0.234497968 [79,] 0.7361972 0.527605627 0.263802813 [80,] 0.7045007 0.590998648 0.295499324 [81,] 0.7704333 0.459133381 0.229566691 [82,] 0.8105826 0.378834893 0.189417447 [83,] 0.7843339 0.431332233 0.215666116 [84,] 0.7600454 0.479909104 0.239954552 [85,] 0.7408495 0.518301003 0.259150501 [86,] 0.7123812 0.575237518 0.287618759 [87,] 0.6874747 0.625050581 0.312525290 [88,] 0.6612342 0.677531649 0.338765824 [89,] 0.6311966 0.737606778 0.368803389 [90,] 0.6369796 0.726040899 0.363020450 [91,] 0.6023638 0.795272498 0.397636249 [92,] 0.5939567 0.812086678 0.406043339 [93,] 0.5672707 0.865458583 0.432729291 [94,] 0.5429439 0.914112283 0.457056142 [95,] 0.6017676 0.796464739 0.398232369 [96,] 0.5982342 0.803531679 0.401765840 [97,] 0.6109064 0.778187138 0.389093569 [98,] 0.5845125 0.830974973 0.415487486 [99,] 0.5776654 0.844669100 0.422334550 [100,] 0.6379566 0.724086784 0.362043392 [101,] 0.6123592 0.775281505 0.387640753 [102,] 0.5959493 0.808101426 0.404050713 [103,] 0.5952898 0.809420326 0.404710163 [104,] 0.6054755 0.789048995 0.394524497 [105,] 0.5827301 0.834539772 0.417269886 [106,] 0.6758006 0.648398893 0.324199447 [107,] 0.6474972 0.705005699 0.352502849 [108,] 0.6190453 0.761909436 0.380954718 [109,] 0.5886547 0.822690680 0.411345340 [110,] 0.5674597 0.865080544 0.432540272 [111,] 0.5367283 0.926543423 0.463271712 [112,] 0.5105803 0.978839349 0.489419675 [113,] 0.4815834 0.963166807 0.518416596 [114,] 0.4497877 0.899575417 0.550212291 [115,] 0.4236994 0.847398881 0.576300559 [116,] 0.3907855 0.781570977 0.609214511 [117,] 0.3756840 0.751368045 0.624315977 [118,] 0.3515100 0.703019914 0.648490043 [119,] 0.3363461 0.672692112 0.663653944 [120,] 0.4564711 0.912942259 0.543528871 [121,] 0.4403637 0.880727411 0.559636295 [122,] 0.4297694 0.859538812 0.570230594 [123,] 0.4110893 0.822178581 0.588910709 [124,] 0.3814863 0.762972664 0.618513668 [125,] 0.3996440 0.799288088 0.600355956 [126,] 0.3730319 0.746063837 0.626968081 [127,] 0.4018248 0.803649688 0.598175156 [128,] 0.3862287 0.772457353 0.613771324 [129,] 0.3558928 0.711785525 0.644107237 [130,] 0.3365737 0.673147450 0.663426275 [131,] 0.3084399 0.616879734 0.691560133 [132,] 0.2834742 0.566948467 0.716525766 [133,] 0.2544843 0.508968576 0.745515712 [134,] 0.2738253 0.547650658 0.726174671 [135,] 0.2451038 0.490207556 0.754896222 [136,] 0.2237479 0.447495746 0.776252127 [137,] 0.2178661 0.435732100 0.782133950 [138,] 0.2104188 0.420837540 0.789581230 [139,] 0.2274754 0.454950726 0.772524637 [140,] 0.2436115 0.487222996 0.756388502 [141,] 0.2531751 0.506350195 0.746824902 [142,] 0.2620404 0.524080729 0.737959635 [143,] 0.2383099 0.476619748 0.761690126 [144,] 0.2152752 0.430550500 0.784724750 [145,] 0.2278191 0.455638207 0.772180896 [146,] 0.2410689 0.482137809 0.758931095 [147,] 0.2323065 0.464613021 0.767693489 [148,] 0.2057266 0.411453237 0.794273381 [149,] 0.1862642 0.372528351 0.813735824 [150,] 0.2981775 0.596354998 0.701822501 [151,] 0.3105489 0.621097729 0.689451136 [152,] 0.2857238 0.571447641 0.714276180 [153,] 0.2611689 0.522337769 0.738831115 [154,] 0.2357582 0.471516431 0.764241785 [155,] 0.2130562 0.426112446 0.786943777 [156,] 0.3501984 0.700396746 0.649801627 [157,] 0.3420925 0.684184916 0.657907542 [158,] 0.3370356 0.674071181 0.662964409 [159,] 0.3043222 0.608644421 0.695677790 [160,] 0.2783097 0.556619436 0.721690282 [161,] 0.3283539 0.656707858 0.671646071 [162,] 0.3538438 0.707687635 0.646156183 [163,] 0.3240728 0.648145698 0.675927151 [164,] 0.3188247 0.637649453 0.681175274 [165,] 0.4867415 0.973482941 0.513258530 [166,] 0.4696824 0.939364736 0.530317632 [167,] 0.4937325 0.987464986 0.506267507 [168,] 0.5044048 0.991190351 0.495595176 [169,] 0.5601619 0.879676121 0.439838061 [170,] 0.5273816 0.945236792 0.472618396 [171,] 0.5031481 0.993703849 0.496851924 [172,] 0.5035910 0.992818083 0.496409042 [173,] 0.4688748 0.937749695 0.531125153 [174,] 0.4650916 0.930183115 0.534908442 [175,] 0.4267889 0.853577722 0.573211139 [176,] 0.3974186 0.794837116 0.602581442 [177,] 0.4257156 0.851431143 0.574284429 [178,] 0.4180365 0.836072967 0.581963516 [179,] 0.3811903 0.762380695 0.618809653 [180,] 0.3514455 0.702891027 0.648554487 [181,] 0.3166508 0.633301569 0.683349215 [182,] 0.2930486 0.586097266 0.706951367 [183,] 0.3076187 0.615237400 0.692381300 [184,] 0.2852988 0.570597514 0.714701243 [185,] 0.3057064 0.611412852 0.694293574 [186,] 0.2921933 0.584386526 0.707806737 [187,] 0.2910518 0.582103511 0.708948244 [188,] 0.3012510 0.602501942 0.698749029 [189,] 0.3381594 0.676318735 0.661840633 [190,] 0.3097632 0.619526461 0.690236769 [191,] 0.3465774 0.693154833 0.653422584 [192,] 0.3124306 0.624861140 0.687569430 [193,] 0.3582818 0.716563639 0.641718180 [194,] 0.3335436 0.667087266 0.666456367 [195,] 0.3770390 0.754078030 0.622960985 [196,] 0.3370082 0.674016481 0.662991759 [197,] 0.3015231 0.603046284 0.698476858 [198,] 0.2781888 0.556377624 0.721811188 [199,] 0.2434069 0.486813899 0.756593051 [200,] 0.2818609 0.563721887 0.718139057 [201,] 0.2465354 0.493070865 0.753464568 [202,] 0.2453364 0.490672799 0.754663600 [203,] 0.2699935 0.539986938 0.730006531 [204,] 0.2582757 0.516551498 0.741724251 [205,] 0.2245934 0.449186890 0.775406555 [206,] 0.2859880 0.571976058 0.714011971 [207,] 0.2590139 0.518027791 0.740986105 [208,] 0.2449578 0.489915656 0.755042172 [209,] 0.2594672 0.518934482 0.740532759 [210,] 0.2228782 0.445756374 0.777121813 [211,] 0.2124607 0.424921327 0.787539336 [212,] 0.2082583 0.416516647 0.791741676 [213,] 0.2291532 0.458306364 0.770846818 [214,] 0.2368222 0.473644355 0.763177822 [215,] 0.2309813 0.461962640 0.769018680 [216,] 0.1967358 0.393471668 0.803264166 [217,] 0.1722503 0.344500539 0.827749731 [218,] 0.1995562 0.399112396 0.800443802 [219,] 0.4644938 0.928987614 0.535506193 [220,] 0.4307811 0.861562108 0.569218946 [221,] 0.4093448 0.818689632 0.590655184 [222,] 0.3910844 0.782168701 0.608915649 [223,] 0.3456728 0.691345643 0.654327178 [224,] 0.3805538 0.761107656 0.619446172 [225,] 0.3510350 0.702070076 0.648964962 [226,] 0.2997508 0.599501566 0.700249217 [227,] 0.3042746 0.608549159 0.695725421 [228,] 0.2809711 0.561942273 0.719028863 [229,] 0.2362307 0.472461434 0.763769283 [230,] 0.1901912 0.380382408 0.809808796 [231,] 0.3286763 0.657352640 0.671323680 [232,] 0.3185776 0.637155113 0.681422443 [233,] 0.3015672 0.603134485 0.698432757 [234,] 0.4624767 0.924953353 0.537523323 [235,] 0.4536727 0.907345417 0.546327291 [236,] 0.4057032 0.811406410 0.594296795 [237,] 0.4096341 0.819268156 0.590365922 [238,] 0.3317088 0.663417559 0.668291221 [239,] 0.2644131 0.528826154 0.735586923 [240,] 0.5933978 0.813204474 0.406602237 [241,] 0.4965590 0.993118047 0.503440976 [242,] 0.3976279 0.795255783 0.602372108 [243,] 0.5647391 0.870521738 0.435260869 [244,] 0.9175293 0.164941469 0.082470735 [245,] 0.8512692 0.297461614 0.148730807 [246,] 0.7949903 0.410019481 0.205009740 [247,] 0.6962286 0.607542880 0.303771440 > postscript(file="/var/fisher/rcomp/tmp/1pqtz1383469892.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/2jufu1383469892.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/3t4nd1383469892.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/4vmrp1383469892.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/5qtim1383469892.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 -0.173419158 3.183795954 -2.830626722 -2.196238574 5.427876366 4.033775133 7 8 9 10 11 12 3.221970168 -0.644905423 0.041158336 1.047619701 1.811654390 3.025674080 13 14 15 16 17 18 -3.240856215 2.302487530 2.735177149 0.609694147 0.540929612 1.667085845 19 20 21 22 23 24 -1.519880537 2.108060962 2.700329645 -2.464566616 -0.832036597 -1.674087207 25 26 27 28 29 30 2.072125908 -6.753335105 1.195758959 0.950030117 1.475354465 -2.716459979 31 32 33 34 35 36 0.665286678 0.438514945 2.062512180 0.216662460 0.329889800 0.784046602 37 38 39 40 41 42 -1.360361227 0.860260032 1.972048559 -2.159316658 -0.580074884 2.690569107 43 44 45 46 47 48 -0.437061546 -1.336948591 0.478677225 -2.435110026 -0.435841256 0.382807737 49 50 51 52 53 54 3.753285216 -1.560498194 0.852450884 0.753169788 -0.451419677 -1.598708475 55 56 57 58 59 60 -1.904914639 1.782246724 1.958874171 -0.452241937 -3.110247294 -1.184869730 61 62 63 64 65 66 -2.584261484 -1.420637218 -3.351872683 0.714749997 1.084635699 -4.912829160 67 68 69 70 71 72 -1.633887233 -2.430423703 1.351639290 1.390839774 0.631976376 3.075429304 73 74 75 76 77 78 0.763552522 -0.524168434 -1.661158685 0.260681196 2.962711725 0.669119488 79 80 81 82 83 84 1.541119469 -2.509289334 0.246701920 -0.595825040 1.725920350 0.797962275 85 86 87 88 89 90 0.092761150 1.134098349 -0.331529346 -0.043808390 -3.229463725 3.528539242 91 92 93 94 95 96 -0.270533333 0.944635270 1.068116537 -0.663150702 1.130076351 -0.820853616 97 98 99 100 101 102 -0.742395986 2.199851394 0.090530624 1.769957209 -0.830549739 1.126824027 103 104 105 106 107 108 -3.526063376 2.191865016 -2.300959532 1.053293826 2.054140483 -3.210061128 109 110 111 112 113 114 0.602339505 1.516601302 -2.081973300 -1.917932103 1.235215265 4.053560665 115 116 117 118 119 120 0.598766047 0.627713544 0.188318699 -1.191039858 0.746925900 -0.831477852 121 122 123 124 125 126 0.589152988 0.470494716 -1.031322913 0.375692794 -1.666457090 1.103467112 127 128 129 130 131 132 1.495311814 4.348675843 1.503602724 -1.708518973 -1.345061414 -0.306992195 133 134 135 136 137 138 2.477494901 0.781349031 2.658565689 1.609865881 0.544767166 -1.128056240 139 140 141 142 143 144 0.682174728 -0.740057728 -0.127765944 2.581921569 -0.392256432 0.833662481 145 146 147 148 149 150 1.862756729 1.543629272 -2.662542553 -2.674387078 -2.226395845 2.193141695 151 152 153 154 155 156 0.579453812 0.395234464 -2.457350292 -2.425662509 1.768838489 -0.270533333 157 158 159 160 161 162 0.764770452 4.348675843 -2.521762100 0.468098649 0.545707237 0.980996938 163 164 165 166 167 168 1.043202997 4.663422385 -1.919620586 1.928115357 -0.037658583 -0.719560891 169 170 171 172 173 174 -3.459336287 -2.877255780 0.244637716 1.578352274 -5.029943517 1.627769182 175 176 177 178 179 180 2.551718639 -2.406254499 -3.354585721 0.606332943 1.169441626 -2.211096701 181 182 183 184 185 186 -0.806762803 -1.956797671 -0.052665071 -1.074349265 2.472627186 1.443187197 187 188 189 190 191 192 0.288305687 1.040026988 0.183901996 0.786507231 -2.707774364 -1.288610456 193 194 195 196 197 198 2.312948879 -1.819342362 1.845252126 -2.335169077 2.454089291 0.823815886 199 200 201 202 203 204 -3.319488690 -0.785009592 -3.242528267 1.101076457 2.858016128 -0.064176792 205 206 207 208 209 210 0.368263552 1.135216318 -0.408674213 2.800390623 -0.005215841 1.769688950 211 212 213 214 215 216 -2.884395789 1.472458674 -0.879129376 -3.759170028 -1.392725566 1.488212550 217 218 219 220 221 222 2.137553636 -0.215118699 -2.093720249 1.465100537 -3.005400285 1.778267104 223 224 225 226 227 228 -2.203910653 -0.011921068 -1.462779887 1.770247026 4.554556703 -2.113037315 229 230 231 232 233 234 -1.398424089 -2.512707596 0.019986576 -3.101656512 -0.534795030 0.301440666 235 236 237 238 239 240 0.822944163 -1.980780070 1.001849639 -0.552581584 -4.620922355 -2.679075762 241 242 243 244 245 246 -2.548149869 -3.136835270 0.075693783 -0.445156804 1.535325923 0.352882954 247 248 249 250 251 252 0.084565262 4.694668756 -0.297850907 0.094240041 2.057129960 1.354439579 253 254 255 256 257 258 -1.345342970 -0.924304797 0.052443365 -0.916945992 -1.827829486 -2.673808680 259 260 261 262 263 264 2.133889507 -4.553048062 -0.064058312 1.184368078 -2.949036277 -0.017315247 > postscript(file="/var/fisher/rcomp/tmp/6wamm1383469892.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 -0.173419158 NA 1 3.183795954 -0.173419158 2 -2.830626722 3.183795954 3 -2.196238574 -2.830626722 4 5.427876366 -2.196238574 5 4.033775133 5.427876366 6 3.221970168 4.033775133 7 -0.644905423 3.221970168 8 0.041158336 -0.644905423 9 1.047619701 0.041158336 10 1.811654390 1.047619701 11 3.025674080 1.811654390 12 -3.240856215 3.025674080 13 2.302487530 -3.240856215 14 2.735177149 2.302487530 15 0.609694147 2.735177149 16 0.540929612 0.609694147 17 1.667085845 0.540929612 18 -1.519880537 1.667085845 19 2.108060962 -1.519880537 20 2.700329645 2.108060962 21 -2.464566616 2.700329645 22 -0.832036597 -2.464566616 23 -1.674087207 -0.832036597 24 2.072125908 -1.674087207 25 -6.753335105 2.072125908 26 1.195758959 -6.753335105 27 0.950030117 1.195758959 28 1.475354465 0.950030117 29 -2.716459979 1.475354465 30 0.665286678 -2.716459979 31 0.438514945 0.665286678 32 2.062512180 0.438514945 33 0.216662460 2.062512180 34 0.329889800 0.216662460 35 0.784046602 0.329889800 36 -1.360361227 0.784046602 37 0.860260032 -1.360361227 38 1.972048559 0.860260032 39 -2.159316658 1.972048559 40 -0.580074884 -2.159316658 41 2.690569107 -0.580074884 42 -0.437061546 2.690569107 43 -1.336948591 -0.437061546 44 0.478677225 -1.336948591 45 -2.435110026 0.478677225 46 -0.435841256 -2.435110026 47 0.382807737 -0.435841256 48 3.753285216 0.382807737 49 -1.560498194 3.753285216 50 0.852450884 -1.560498194 51 0.753169788 0.852450884 52 -0.451419677 0.753169788 53 -1.598708475 -0.451419677 54 -1.904914639 -1.598708475 55 1.782246724 -1.904914639 56 1.958874171 1.782246724 57 -0.452241937 1.958874171 58 -3.110247294 -0.452241937 59 -1.184869730 -3.110247294 60 -2.584261484 -1.184869730 61 -1.420637218 -2.584261484 62 -3.351872683 -1.420637218 63 0.714749997 -3.351872683 64 1.084635699 0.714749997 65 -4.912829160 1.084635699 66 -1.633887233 -4.912829160 67 -2.430423703 -1.633887233 68 1.351639290 -2.430423703 69 1.390839774 1.351639290 70 0.631976376 1.390839774 71 3.075429304 0.631976376 72 0.763552522 3.075429304 73 -0.524168434 0.763552522 74 -1.661158685 -0.524168434 75 0.260681196 -1.661158685 76 2.962711725 0.260681196 77 0.669119488 2.962711725 78 1.541119469 0.669119488 79 -2.509289334 1.541119469 80 0.246701920 -2.509289334 81 -0.595825040 0.246701920 82 1.725920350 -0.595825040 83 0.797962275 1.725920350 84 0.092761150 0.797962275 85 1.134098349 0.092761150 86 -0.331529346 1.134098349 87 -0.043808390 -0.331529346 88 -3.229463725 -0.043808390 89 3.528539242 -3.229463725 90 -0.270533333 3.528539242 91 0.944635270 -0.270533333 92 1.068116537 0.944635270 93 -0.663150702 1.068116537 94 1.130076351 -0.663150702 95 -0.820853616 1.130076351 96 -0.742395986 -0.820853616 97 2.199851394 -0.742395986 98 0.090530624 2.199851394 99 1.769957209 0.090530624 100 -0.830549739 1.769957209 101 1.126824027 -0.830549739 102 -3.526063376 1.126824027 103 2.191865016 -3.526063376 104 -2.300959532 2.191865016 105 1.053293826 -2.300959532 106 2.054140483 1.053293826 107 -3.210061128 2.054140483 108 0.602339505 -3.210061128 109 1.516601302 0.602339505 110 -2.081973300 1.516601302 111 -1.917932103 -2.081973300 112 1.235215265 -1.917932103 113 4.053560665 1.235215265 114 0.598766047 4.053560665 115 0.627713544 0.598766047 116 0.188318699 0.627713544 117 -1.191039858 0.188318699 118 0.746925900 -1.191039858 119 -0.831477852 0.746925900 120 0.589152988 -0.831477852 121 0.470494716 0.589152988 122 -1.031322913 0.470494716 123 0.375692794 -1.031322913 124 -1.666457090 0.375692794 125 1.103467112 -1.666457090 126 1.495311814 1.103467112 127 4.348675843 1.495311814 128 1.503602724 4.348675843 129 -1.708518973 1.503602724 130 -1.345061414 -1.708518973 131 -0.306992195 -1.345061414 132 2.477494901 -0.306992195 133 0.781349031 2.477494901 134 2.658565689 0.781349031 135 1.609865881 2.658565689 136 0.544767166 1.609865881 137 -1.128056240 0.544767166 138 0.682174728 -1.128056240 139 -0.740057728 0.682174728 140 -0.127765944 -0.740057728 141 2.581921569 -0.127765944 142 -0.392256432 2.581921569 143 0.833662481 -0.392256432 144 1.862756729 0.833662481 145 1.543629272 1.862756729 146 -2.662542553 1.543629272 147 -2.674387078 -2.662542553 148 -2.226395845 -2.674387078 149 2.193141695 -2.226395845 150 0.579453812 2.193141695 151 0.395234464 0.579453812 152 -2.457350292 0.395234464 153 -2.425662509 -2.457350292 154 1.768838489 -2.425662509 155 -0.270533333 1.768838489 156 0.764770452 -0.270533333 157 4.348675843 0.764770452 158 -2.521762100 4.348675843 159 0.468098649 -2.521762100 160 0.545707237 0.468098649 161 0.980996938 0.545707237 162 1.043202997 0.980996938 163 4.663422385 1.043202997 164 -1.919620586 4.663422385 165 1.928115357 -1.919620586 166 -0.037658583 1.928115357 167 -0.719560891 -0.037658583 168 -3.459336287 -0.719560891 169 -2.877255780 -3.459336287 170 0.244637716 -2.877255780 171 1.578352274 0.244637716 172 -5.029943517 1.578352274 173 1.627769182 -5.029943517 174 2.551718639 1.627769182 175 -2.406254499 2.551718639 176 -3.354585721 -2.406254499 177 0.606332943 -3.354585721 178 1.169441626 0.606332943 179 -2.211096701 1.169441626 180 -0.806762803 -2.211096701 181 -1.956797671 -0.806762803 182 -0.052665071 -1.956797671 183 -1.074349265 -0.052665071 184 2.472627186 -1.074349265 185 1.443187197 2.472627186 186 0.288305687 1.443187197 187 1.040026988 0.288305687 188 0.183901996 1.040026988 189 0.786507231 0.183901996 190 -2.707774364 0.786507231 191 -1.288610456 -2.707774364 192 2.312948879 -1.288610456 193 -1.819342362 2.312948879 194 1.845252126 -1.819342362 195 -2.335169077 1.845252126 196 2.454089291 -2.335169077 197 0.823815886 2.454089291 198 -3.319488690 0.823815886 199 -0.785009592 -3.319488690 200 -3.242528267 -0.785009592 201 1.101076457 -3.242528267 202 2.858016128 1.101076457 203 -0.064176792 2.858016128 204 0.368263552 -0.064176792 205 1.135216318 0.368263552 206 -0.408674213 1.135216318 207 2.800390623 -0.408674213 208 -0.005215841 2.800390623 209 1.769688950 -0.005215841 210 -2.884395789 1.769688950 211 1.472458674 -2.884395789 212 -0.879129376 1.472458674 213 -3.759170028 -0.879129376 214 -1.392725566 -3.759170028 215 1.488212550 -1.392725566 216 2.137553636 1.488212550 217 -0.215118699 2.137553636 218 -2.093720249 -0.215118699 219 1.465100537 -2.093720249 220 -3.005400285 1.465100537 221 1.778267104 -3.005400285 222 -2.203910653 1.778267104 223 -0.011921068 -2.203910653 224 -1.462779887 -0.011921068 225 1.770247026 -1.462779887 226 4.554556703 1.770247026 227 -2.113037315 4.554556703 228 -1.398424089 -2.113037315 229 -2.512707596 -1.398424089 230 0.019986576 -2.512707596 231 -3.101656512 0.019986576 232 -0.534795030 -3.101656512 233 0.301440666 -0.534795030 234 0.822944163 0.301440666 235 -1.980780070 0.822944163 236 1.001849639 -1.980780070 237 -0.552581584 1.001849639 238 -4.620922355 -0.552581584 239 -2.679075762 -4.620922355 240 -2.548149869 -2.679075762 241 -3.136835270 -2.548149869 242 0.075693783 -3.136835270 243 -0.445156804 0.075693783 244 1.535325923 -0.445156804 245 0.352882954 1.535325923 246 0.084565262 0.352882954 247 4.694668756 0.084565262 248 -0.297850907 4.694668756 249 0.094240041 -0.297850907 250 2.057129960 0.094240041 251 1.354439579 2.057129960 252 -1.345342970 1.354439579 253 -0.924304797 -1.345342970 254 0.052443365 -0.924304797 255 -0.916945992 0.052443365 256 -1.827829486 -0.916945992 257 -2.673808680 -1.827829486 258 2.133889507 -2.673808680 259 -4.553048062 2.133889507 260 -0.064058312 -4.553048062 261 1.184368078 -0.064058312 262 -2.949036277 1.184368078 263 -0.017315247 -2.949036277 264 NA -0.017315247 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 3.183795954 -0.173419158 [2,] -2.830626722 3.183795954 [3,] -2.196238574 -2.830626722 [4,] 5.427876366 -2.196238574 [5,] 4.033775133 5.427876366 [6,] 3.221970168 4.033775133 [7,] -0.644905423 3.221970168 [8,] 0.041158336 -0.644905423 [9,] 1.047619701 0.041158336 [10,] 1.811654390 1.047619701 [11,] 3.025674080 1.811654390 [12,] -3.240856215 3.025674080 [13,] 2.302487530 -3.240856215 [14,] 2.735177149 2.302487530 [15,] 0.609694147 2.735177149 [16,] 0.540929612 0.609694147 [17,] 1.667085845 0.540929612 [18,] -1.519880537 1.667085845 [19,] 2.108060962 -1.519880537 [20,] 2.700329645 2.108060962 [21,] -2.464566616 2.700329645 [22,] -0.832036597 -2.464566616 [23,] -1.674087207 -0.832036597 [24,] 2.072125908 -1.674087207 [25,] -6.753335105 2.072125908 [26,] 1.195758959 -6.753335105 [27,] 0.950030117 1.195758959 [28,] 1.475354465 0.950030117 [29,] -2.716459979 1.475354465 [30,] 0.665286678 -2.716459979 [31,] 0.438514945 0.665286678 [32,] 2.062512180 0.438514945 [33,] 0.216662460 2.062512180 [34,] 0.329889800 0.216662460 [35,] 0.784046602 0.329889800 [36,] -1.360361227 0.784046602 [37,] 0.860260032 -1.360361227 [38,] 1.972048559 0.860260032 [39,] -2.159316658 1.972048559 [40,] -0.580074884 -2.159316658 [41,] 2.690569107 -0.580074884 [42,] -0.437061546 2.690569107 [43,] -1.336948591 -0.437061546 [44,] 0.478677225 -1.336948591 [45,] -2.435110026 0.478677225 [46,] -0.435841256 -2.435110026 [47,] 0.382807737 -0.435841256 [48,] 3.753285216 0.382807737 [49,] -1.560498194 3.753285216 [50,] 0.852450884 -1.560498194 [51,] 0.753169788 0.852450884 [52,] -0.451419677 0.753169788 [53,] -1.598708475 -0.451419677 [54,] -1.904914639 -1.598708475 [55,] 1.782246724 -1.904914639 [56,] 1.958874171 1.782246724 [57,] -0.452241937 1.958874171 [58,] -3.110247294 -0.452241937 [59,] -1.184869730 -3.110247294 [60,] -2.584261484 -1.184869730 [61,] -1.420637218 -2.584261484 [62,] -3.351872683 -1.420637218 [63,] 0.714749997 -3.351872683 [64,] 1.084635699 0.714749997 [65,] -4.912829160 1.084635699 [66,] -1.633887233 -4.912829160 [67,] -2.430423703 -1.633887233 [68,] 1.351639290 -2.430423703 [69,] 1.390839774 1.351639290 [70,] 0.631976376 1.390839774 [71,] 3.075429304 0.631976376 [72,] 0.763552522 3.075429304 [73,] -0.524168434 0.763552522 [74,] -1.661158685 -0.524168434 [75,] 0.260681196 -1.661158685 [76,] 2.962711725 0.260681196 [77,] 0.669119488 2.962711725 [78,] 1.541119469 0.669119488 [79,] -2.509289334 1.541119469 [80,] 0.246701920 -2.509289334 [81,] -0.595825040 0.246701920 [82,] 1.725920350 -0.595825040 [83,] 0.797962275 1.725920350 [84,] 0.092761150 0.797962275 [85,] 1.134098349 0.092761150 [86,] -0.331529346 1.134098349 [87,] -0.043808390 -0.331529346 [88,] -3.229463725 -0.043808390 [89,] 3.528539242 -3.229463725 [90,] -0.270533333 3.528539242 [91,] 0.944635270 -0.270533333 [92,] 1.068116537 0.944635270 [93,] -0.663150702 1.068116537 [94,] 1.130076351 -0.663150702 [95,] -0.820853616 1.130076351 [96,] -0.742395986 -0.820853616 [97,] 2.199851394 -0.742395986 [98,] 0.090530624 2.199851394 [99,] 1.769957209 0.090530624 [100,] -0.830549739 1.769957209 [101,] 1.126824027 -0.830549739 [102,] -3.526063376 1.126824027 [103,] 2.191865016 -3.526063376 [104,] -2.300959532 2.191865016 [105,] 1.053293826 -2.300959532 [106,] 2.054140483 1.053293826 [107,] -3.210061128 2.054140483 [108,] 0.602339505 -3.210061128 [109,] 1.516601302 0.602339505 [110,] -2.081973300 1.516601302 [111,] -1.917932103 -2.081973300 [112,] 1.235215265 -1.917932103 [113,] 4.053560665 1.235215265 [114,] 0.598766047 4.053560665 [115,] 0.627713544 0.598766047 [116,] 0.188318699 0.627713544 [117,] -1.191039858 0.188318699 [118,] 0.746925900 -1.191039858 [119,] -0.831477852 0.746925900 [120,] 0.589152988 -0.831477852 [121,] 0.470494716 0.589152988 [122,] -1.031322913 0.470494716 [123,] 0.375692794 -1.031322913 [124,] -1.666457090 0.375692794 [125,] 1.103467112 -1.666457090 [126,] 1.495311814 1.103467112 [127,] 4.348675843 1.495311814 [128,] 1.503602724 4.348675843 [129,] -1.708518973 1.503602724 [130,] -1.345061414 -1.708518973 [131,] -0.306992195 -1.345061414 [132,] 2.477494901 -0.306992195 [133,] 0.781349031 2.477494901 [134,] 2.658565689 0.781349031 [135,] 1.609865881 2.658565689 [136,] 0.544767166 1.609865881 [137,] -1.128056240 0.544767166 [138,] 0.682174728 -1.128056240 [139,] -0.740057728 0.682174728 [140,] -0.127765944 -0.740057728 [141,] 2.581921569 -0.127765944 [142,] -0.392256432 2.581921569 [143,] 0.833662481 -0.392256432 [144,] 1.862756729 0.833662481 [145,] 1.543629272 1.862756729 [146,] -2.662542553 1.543629272 [147,] -2.674387078 -2.662542553 [148,] -2.226395845 -2.674387078 [149,] 2.193141695 -2.226395845 [150,] 0.579453812 2.193141695 [151,] 0.395234464 0.579453812 [152,] -2.457350292 0.395234464 [153,] -2.425662509 -2.457350292 [154,] 1.768838489 -2.425662509 [155,] -0.270533333 1.768838489 [156,] 0.764770452 -0.270533333 [157,] 4.348675843 0.764770452 [158,] -2.521762100 4.348675843 [159,] 0.468098649 -2.521762100 [160,] 0.545707237 0.468098649 [161,] 0.980996938 0.545707237 [162,] 1.043202997 0.980996938 [163,] 4.663422385 1.043202997 [164,] -1.919620586 4.663422385 [165,] 1.928115357 -1.919620586 [166,] -0.037658583 1.928115357 [167,] -0.719560891 -0.037658583 [168,] -3.459336287 -0.719560891 [169,] -2.877255780 -3.459336287 [170,] 0.244637716 -2.877255780 [171,] 1.578352274 0.244637716 [172,] -5.029943517 1.578352274 [173,] 1.627769182 -5.029943517 [174,] 2.551718639 1.627769182 [175,] -2.406254499 2.551718639 [176,] -3.354585721 -2.406254499 [177,] 0.606332943 -3.354585721 [178,] 1.169441626 0.606332943 [179,] -2.211096701 1.169441626 [180,] -0.806762803 -2.211096701 [181,] -1.956797671 -0.806762803 [182,] -0.052665071 -1.956797671 [183,] -1.074349265 -0.052665071 [184,] 2.472627186 -1.074349265 [185,] 1.443187197 2.472627186 [186,] 0.288305687 1.443187197 [187,] 1.040026988 0.288305687 [188,] 0.183901996 1.040026988 [189,] 0.786507231 0.183901996 [190,] -2.707774364 0.786507231 [191,] -1.288610456 -2.707774364 [192,] 2.312948879 -1.288610456 [193,] -1.819342362 2.312948879 [194,] 1.845252126 -1.819342362 [195,] -2.335169077 1.845252126 [196,] 2.454089291 -2.335169077 [197,] 0.823815886 2.454089291 [198,] -3.319488690 0.823815886 [199,] -0.785009592 -3.319488690 [200,] -3.242528267 -0.785009592 [201,] 1.101076457 -3.242528267 [202,] 2.858016128 1.101076457 [203,] -0.064176792 2.858016128 [204,] 0.368263552 -0.064176792 [205,] 1.135216318 0.368263552 [206,] -0.408674213 1.135216318 [207,] 2.800390623 -0.408674213 [208,] -0.005215841 2.800390623 [209,] 1.769688950 -0.005215841 [210,] -2.884395789 1.769688950 [211,] 1.472458674 -2.884395789 [212,] -0.879129376 1.472458674 [213,] -3.759170028 -0.879129376 [214,] -1.392725566 -3.759170028 [215,] 1.488212550 -1.392725566 [216,] 2.137553636 1.488212550 [217,] -0.215118699 2.137553636 [218,] -2.093720249 -0.215118699 [219,] 1.465100537 -2.093720249 [220,] -3.005400285 1.465100537 [221,] 1.778267104 -3.005400285 [222,] -2.203910653 1.778267104 [223,] -0.011921068 -2.203910653 [224,] -1.462779887 -0.011921068 [225,] 1.770247026 -1.462779887 [226,] 4.554556703 1.770247026 [227,] -2.113037315 4.554556703 [228,] -1.398424089 -2.113037315 [229,] -2.512707596 -1.398424089 [230,] 0.019986576 -2.512707596 [231,] -3.101656512 0.019986576 [232,] -0.534795030 -3.101656512 [233,] 0.301440666 -0.534795030 [234,] 0.822944163 0.301440666 [235,] -1.980780070 0.822944163 [236,] 1.001849639 -1.980780070 [237,] -0.552581584 1.001849639 [238,] -4.620922355 -0.552581584 [239,] -2.679075762 -4.620922355 [240,] -2.548149869 -2.679075762 [241,] -3.136835270 -2.548149869 [242,] 0.075693783 -3.136835270 [243,] -0.445156804 0.075693783 [244,] 1.535325923 -0.445156804 [245,] 0.352882954 1.535325923 [246,] 0.084565262 0.352882954 [247,] 4.694668756 0.084565262 [248,] -0.297850907 4.694668756 [249,] 0.094240041 -0.297850907 [250,] 2.057129960 0.094240041 [251,] 1.354439579 2.057129960 [252,] -1.345342970 1.354439579 [253,] -0.924304797 -1.345342970 [254,] 0.052443365 -0.924304797 [255,] -0.916945992 0.052443365 [256,] -1.827829486 -0.916945992 [257,] -2.673808680 -1.827829486 [258,] 2.133889507 -2.673808680 [259,] -4.553048062 2.133889507 [260,] -0.064058312 -4.553048062 [261,] 1.184368078 -0.064058312 [262,] -2.949036277 1.184368078 [263,] -0.017315247 -2.949036277 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 3.183795954 -0.173419158 2 -2.830626722 3.183795954 3 -2.196238574 -2.830626722 4 5.427876366 -2.196238574 5 4.033775133 5.427876366 6 3.221970168 4.033775133 7 -0.644905423 3.221970168 8 0.041158336 -0.644905423 9 1.047619701 0.041158336 10 1.811654390 1.047619701 11 3.025674080 1.811654390 12 -3.240856215 3.025674080 13 2.302487530 -3.240856215 14 2.735177149 2.302487530 15 0.609694147 2.735177149 16 0.540929612 0.609694147 17 1.667085845 0.540929612 18 -1.519880537 1.667085845 19 2.108060962 -1.519880537 20 2.700329645 2.108060962 21 -2.464566616 2.700329645 22 -0.832036597 -2.464566616 23 -1.674087207 -0.832036597 24 2.072125908 -1.674087207 25 -6.753335105 2.072125908 26 1.195758959 -6.753335105 27 0.950030117 1.195758959 28 1.475354465 0.950030117 29 -2.716459979 1.475354465 30 0.665286678 -2.716459979 31 0.438514945 0.665286678 32 2.062512180 0.438514945 33 0.216662460 2.062512180 34 0.329889800 0.216662460 35 0.784046602 0.329889800 36 -1.360361227 0.784046602 37 0.860260032 -1.360361227 38 1.972048559 0.860260032 39 -2.159316658 1.972048559 40 -0.580074884 -2.159316658 41 2.690569107 -0.580074884 42 -0.437061546 2.690569107 43 -1.336948591 -0.437061546 44 0.478677225 -1.336948591 45 -2.435110026 0.478677225 46 -0.435841256 -2.435110026 47 0.382807737 -0.435841256 48 3.753285216 0.382807737 49 -1.560498194 3.753285216 50 0.852450884 -1.560498194 51 0.753169788 0.852450884 52 -0.451419677 0.753169788 53 -1.598708475 -0.451419677 54 -1.904914639 -1.598708475 55 1.782246724 -1.904914639 56 1.958874171 1.782246724 57 -0.452241937 1.958874171 58 -3.110247294 -0.452241937 59 -1.184869730 -3.110247294 60 -2.584261484 -1.184869730 61 -1.420637218 -2.584261484 62 -3.351872683 -1.420637218 63 0.714749997 -3.351872683 64 1.084635699 0.714749997 65 -4.912829160 1.084635699 66 -1.633887233 -4.912829160 67 -2.430423703 -1.633887233 68 1.351639290 -2.430423703 69 1.390839774 1.351639290 70 0.631976376 1.390839774 71 3.075429304 0.631976376 72 0.763552522 3.075429304 73 -0.524168434 0.763552522 74 -1.661158685 -0.524168434 75 0.260681196 -1.661158685 76 2.962711725 0.260681196 77 0.669119488 2.962711725 78 1.541119469 0.669119488 79 -2.509289334 1.541119469 80 0.246701920 -2.509289334 81 -0.595825040 0.246701920 82 1.725920350 -0.595825040 83 0.797962275 1.725920350 84 0.092761150 0.797962275 85 1.134098349 0.092761150 86 -0.331529346 1.134098349 87 -0.043808390 -0.331529346 88 -3.229463725 -0.043808390 89 3.528539242 -3.229463725 90 -0.270533333 3.528539242 91 0.944635270 -0.270533333 92 1.068116537 0.944635270 93 -0.663150702 1.068116537 94 1.130076351 -0.663150702 95 -0.820853616 1.130076351 96 -0.742395986 -0.820853616 97 2.199851394 -0.742395986 98 0.090530624 2.199851394 99 1.769957209 0.090530624 100 -0.830549739 1.769957209 101 1.126824027 -0.830549739 102 -3.526063376 1.126824027 103 2.191865016 -3.526063376 104 -2.300959532 2.191865016 105 1.053293826 -2.300959532 106 2.054140483 1.053293826 107 -3.210061128 2.054140483 108 0.602339505 -3.210061128 109 1.516601302 0.602339505 110 -2.081973300 1.516601302 111 -1.917932103 -2.081973300 112 1.235215265 -1.917932103 113 4.053560665 1.235215265 114 0.598766047 4.053560665 115 0.627713544 0.598766047 116 0.188318699 0.627713544 117 -1.191039858 0.188318699 118 0.746925900 -1.191039858 119 -0.831477852 0.746925900 120 0.589152988 -0.831477852 121 0.470494716 0.589152988 122 -1.031322913 0.470494716 123 0.375692794 -1.031322913 124 -1.666457090 0.375692794 125 1.103467112 -1.666457090 126 1.495311814 1.103467112 127 4.348675843 1.495311814 128 1.503602724 4.348675843 129 -1.708518973 1.503602724 130 -1.345061414 -1.708518973 131 -0.306992195 -1.345061414 132 2.477494901 -0.306992195 133 0.781349031 2.477494901 134 2.658565689 0.781349031 135 1.609865881 2.658565689 136 0.544767166 1.609865881 137 -1.128056240 0.544767166 138 0.682174728 -1.128056240 139 -0.740057728 0.682174728 140 -0.127765944 -0.740057728 141 2.581921569 -0.127765944 142 -0.392256432 2.581921569 143 0.833662481 -0.392256432 144 1.862756729 0.833662481 145 1.543629272 1.862756729 146 -2.662542553 1.543629272 147 -2.674387078 -2.662542553 148 -2.226395845 -2.674387078 149 2.193141695 -2.226395845 150 0.579453812 2.193141695 151 0.395234464 0.579453812 152 -2.457350292 0.395234464 153 -2.425662509 -2.457350292 154 1.768838489 -2.425662509 155 -0.270533333 1.768838489 156 0.764770452 -0.270533333 157 4.348675843 0.764770452 158 -2.521762100 4.348675843 159 0.468098649 -2.521762100 160 0.545707237 0.468098649 161 0.980996938 0.545707237 162 1.043202997 0.980996938 163 4.663422385 1.043202997 164 -1.919620586 4.663422385 165 1.928115357 -1.919620586 166 -0.037658583 1.928115357 167 -0.719560891 -0.037658583 168 -3.459336287 -0.719560891 169 -2.877255780 -3.459336287 170 0.244637716 -2.877255780 171 1.578352274 0.244637716 172 -5.029943517 1.578352274 173 1.627769182 -5.029943517 174 2.551718639 1.627769182 175 -2.406254499 2.551718639 176 -3.354585721 -2.406254499 177 0.606332943 -3.354585721 178 1.169441626 0.606332943 179 -2.211096701 1.169441626 180 -0.806762803 -2.211096701 181 -1.956797671 -0.806762803 182 -0.052665071 -1.956797671 183 -1.074349265 -0.052665071 184 2.472627186 -1.074349265 185 1.443187197 2.472627186 186 0.288305687 1.443187197 187 1.040026988 0.288305687 188 0.183901996 1.040026988 189 0.786507231 0.183901996 190 -2.707774364 0.786507231 191 -1.288610456 -2.707774364 192 2.312948879 -1.288610456 193 -1.819342362 2.312948879 194 1.845252126 -1.819342362 195 -2.335169077 1.845252126 196 2.454089291 -2.335169077 197 0.823815886 2.454089291 198 -3.319488690 0.823815886 199 -0.785009592 -3.319488690 200 -3.242528267 -0.785009592 201 1.101076457 -3.242528267 202 2.858016128 1.101076457 203 -0.064176792 2.858016128 204 0.368263552 -0.064176792 205 1.135216318 0.368263552 206 -0.408674213 1.135216318 207 2.800390623 -0.408674213 208 -0.005215841 2.800390623 209 1.769688950 -0.005215841 210 -2.884395789 1.769688950 211 1.472458674 -2.884395789 212 -0.879129376 1.472458674 213 -3.759170028 -0.879129376 214 -1.392725566 -3.759170028 215 1.488212550 -1.392725566 216 2.137553636 1.488212550 217 -0.215118699 2.137553636 218 -2.093720249 -0.215118699 219 1.465100537 -2.093720249 220 -3.005400285 1.465100537 221 1.778267104 -3.005400285 222 -2.203910653 1.778267104 223 -0.011921068 -2.203910653 224 -1.462779887 -0.011921068 225 1.770247026 -1.462779887 226 4.554556703 1.770247026 227 -2.113037315 4.554556703 228 -1.398424089 -2.113037315 229 -2.512707596 -1.398424089 230 0.019986576 -2.512707596 231 -3.101656512 0.019986576 232 -0.534795030 -3.101656512 233 0.301440666 -0.534795030 234 0.822944163 0.301440666 235 -1.980780070 0.822944163 236 1.001849639 -1.980780070 237 -0.552581584 1.001849639 238 -4.620922355 -0.552581584 239 -2.679075762 -4.620922355 240 -2.548149869 -2.679075762 241 -3.136835270 -2.548149869 242 0.075693783 -3.136835270 243 -0.445156804 0.075693783 244 1.535325923 -0.445156804 245 0.352882954 1.535325923 246 0.084565262 0.352882954 247 4.694668756 0.084565262 248 -0.297850907 4.694668756 249 0.094240041 -0.297850907 250 2.057129960 0.094240041 251 1.354439579 2.057129960 252 -1.345342970 1.354439579 253 -0.924304797 -1.345342970 254 0.052443365 -0.924304797 255 -0.916945992 0.052443365 256 -1.827829486 -0.916945992 257 -2.673808680 -1.827829486 258 2.133889507 -2.673808680 259 -4.553048062 2.133889507 260 -0.064058312 -4.553048062 261 1.184368078 -0.064058312 262 -2.949036277 1.184368078 263 -0.017315247 -2.949036277 > 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/7y8z11383469892.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/8cqi61383469892.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/9rebx1383469892.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/10wk2n1383469892.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/11bfii1383469892.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/12kn3n1383469892.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/135i4y1383469893.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/14z1uc1383469893.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/15f2iw1383469893.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/16jd0y1383469893.tab") + } > > try(system("convert tmp/1pqtz1383469892.ps tmp/1pqtz1383469892.png",intern=TRUE)) character(0) > try(system("convert tmp/2jufu1383469892.ps tmp/2jufu1383469892.png",intern=TRUE)) character(0) > try(system("convert tmp/3t4nd1383469892.ps tmp/3t4nd1383469892.png",intern=TRUE)) character(0) > try(system("convert tmp/4vmrp1383469892.ps tmp/4vmrp1383469892.png",intern=TRUE)) character(0) > try(system("convert tmp/5qtim1383469892.ps tmp/5qtim1383469892.png",intern=TRUE)) character(0) > try(system("convert tmp/6wamm1383469892.ps tmp/6wamm1383469892.png",intern=TRUE)) character(0) > try(system("convert tmp/7y8z11383469892.ps tmp/7y8z11383469892.png",intern=TRUE)) character(0) > try(system("convert tmp/8cqi61383469892.ps tmp/8cqi61383469892.png",intern=TRUE)) character(0) > try(system("convert tmp/9rebx1383469892.ps tmp/9rebx1383469892.png",intern=TRUE)) character(0) > try(system("convert tmp/10wk2n1383469892.ps tmp/10wk2n1383469892.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 10.79 1.77 12.57