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 = '2' > par3 <- 'No Linear Trend' > par2 <- 'Do not include Seasonal Dummies' > par1 <- '2' > #'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 Separate Connected Learning Software Happiness Depression 1 38 41 13 12 14 12.0 2 32 39 16 11 18 11.0 3 35 30 19 15 11 14.0 4 33 31 15 6 12 12.0 5 37 34 14 13 16 21.0 6 29 35 13 10 18 12.0 7 31 39 19 12 14 22.0 8 36 34 15 14 14 11.0 9 35 36 14 12 15 10.0 10 38 37 15 9 15 13.0 11 31 38 16 10 17 10.0 12 34 36 16 12 19 8.0 13 35 38 16 12 10 15.0 14 38 39 16 11 16 14.0 15 37 33 17 15 18 10.0 16 33 32 15 12 14 14.0 17 32 36 15 10 14 14.0 18 38 38 20 12 17 11.0 19 38 39 18 11 14 10.0 20 32 32 16 12 16 13.0 21 33 32 16 11 18 9.5 22 31 31 16 12 11 14.0 23 38 39 19 13 14 12.0 24 39 37 16 11 12 14.0 25 32 39 17 12 17 11.0 26 32 41 17 13 9 9.0 27 35 36 16 10 16 11.0 28 37 33 15 14 14 15.0 29 33 33 16 12 15 14.0 30 33 34 14 10 11 13.0 31 31 31 15 12 16 9.0 32 32 27 12 8 13 15.0 33 31 37 14 10 17 10.0 34 37 34 16 12 15 11.0 35 30 34 14 12 14 13.0 36 33 32 10 7 16 8.0 37 31 29 10 9 9 20.0 38 33 36 14 12 15 12.0 39 31 29 16 10 17 10.0 40 33 35 16 10 13 10.0 41 32 37 16 10 15 9.0 42 33 34 14 12 16 14.0 43 32 38 20 15 16 8.0 44 33 35 14 10 12 14.0 45 28 38 14 10 15 11.0 46 35 37 11 12 11 13.0 47 39 38 14 13 15 9.0 48 34 33 15 11 15 11.0 49 38 36 16 11 17 15.0 50 32 38 14 12 13 11.0 51 38 32 16 14 16 10.0 52 30 32 14 10 14 14.0 53 33 32 12 12 11 18.0 54 38 34 16 13 12 14.0 55 32 32 9 5 12 11.0 56 35 37 14 6 15 14.5 57 34 39 16 12 16 13.0 58 34 29 16 12 15 9.0 59 36 37 15 11 12 10.0 60 34 35 16 10 12 15.0 61 28 30 12 7 8 20.0 62 34 38 16 12 13 12.0 63 35 34 16 14 11 12.0 64 35 31 14 11 14 14.0 65 31 34 16 12 15 13.0 66 37 35 17 13 10 11.0 67 35 36 18 14 11 17.0 68 27 30 18 11 12 12.0 69 40 39 12 12 15 13.0 70 37 35 16 12 15 14.0 71 36 38 10 8 14 13.0 72 38 31 14 11 16 15.0 73 39 34 18 14 15 13.0 74 41 38 18 14 15 10.0 75 27 34 16 12 13 11.0 76 30 39 17 9 12 19.0 77 37 37 16 13 17 13.0 78 31 34 16 11 13 17.0 79 31 28 13 12 15 13.0 80 27 37 16 12 13 9.0 81 36 33 16 12 15 11.0 82 37 35 16 12 15 9.0 83 33 37 15 12 16 12.0 84 34 32 15 11 15 12.0 85 31 33 16 10 14 13.0 86 39 38 14 9 15 13.0 87 34 33 16 12 14 12.0 88 32 29 16 12 13 15.0 89 33 33 15 12 7 22.0 90 36 31 12 9 17 13.0 91 32 36 17 15 13 15.0 92 41 35 16 12 15 13.0 93 28 32 15 12 14 15.0 94 30 29 13 12 13 12.5 95 36 39 16 10 16 11.0 96 35 37 16 13 12 16.0 97 31 35 16 9 14 11.0 98 34 37 16 12 17 11.0 99 36 32 14 10 15 10.0 100 36 38 16 14 17 10.0 101 35 37 16 11 12 16.0 102 37 36 20 15 16 12.0 103 28 32 15 11 11 11.0 104 39 33 16 11 15 16.0 105 32 40 13 12 9 19.0 106 35 38 17 12 16 11.0 107 39 41 16 12 15 16.0 108 35 36 16 11 10 15.0 109 42 43 12 7 10 24.0 110 34 30 16 12 15 14.0 111 33 31 16 14 11 15.0 112 41 32 17 11 13 11.0 113 33 32 13 11 14 15.0 114 34 37 12 10 18 12.0 115 32 37 18 13 16 10.0 116 40 33 14 13 14 14.0 117 40 34 14 8 14 13.0 118 35 33 13 11 14 9.0 119 36 38 16 12 14 15.0 120 37 33 13 11 12 15.0 121 27 31 16 13 14 14.0 122 39 38 13 12 15 11.0 123 38 37 16 14 15 8.0 124 31 36 15 13 15 11.0 125 33 31 16 15 13 11.0 126 32 39 15 10 17 8.0 127 39 44 17 11 17 10.0 128 36 33 15 9 19 11.0 129 33 35 12 11 15 13.0 130 33 32 16 10 13 11.0 131 32 28 10 11 9 20.0 132 37 40 16 8 15 10.0 133 30 27 12 11 15 15.0 134 38 37 14 12 15 12.0 135 29 32 15 12 16 14.0 136 22 28 13 9 11 23.0 137 35 34 15 11 14 14.0 138 35 30 11 10 11 16.0 139 34 35 12 8 15 11.0 140 35 31 11 9 13 12.0 141 34 32 16 8 15 10.0 142 37 30 15 9 16 14.0 143 35 30 17 15 14 12.0 144 23 31 16 11 15 12.0 145 31 40 10 8 16 11.0 146 27 32 18 13 16 12.0 147 36 36 13 12 11 13.0 148 31 32 16 12 12 11.0 149 32 35 13 9 9 19.0 150 39 38 10 7 16 12.0 151 37 42 15 13 13 17.0 152 38 34 16 9 16 9.0 153 39 35 16 6 12 12.0 154 34 38 14 8 9 19.0 155 31 33 10 8 13 18.0 156 32 36 17 15 13 15.0 157 37 32 13 6 14 14.0 158 36 33 15 9 19 11.0 159 32 34 16 11 13 9.0 160 38 32 12 8 12 18.0 161 36 34 13 8 13 16.0 162 26 27 13 10 10 24.0 163 26 31 12 8 14 14.0 164 33 38 17 14 16 20.0 165 39 34 15 10 10 18.0 166 30 24 10 8 11 23.0 167 33 30 14 11 14 12.0 168 25 26 11 12 12 14.0 169 38 34 13 12 9 16.0 170 37 27 16 12 9 18.0 171 31 37 12 5 11 20.0 172 37 36 16 12 16 12.0 173 35 41 12 10 9 12.0 174 25 29 9 7 13 17.0 175 28 36 12 12 16 13.0 176 35 32 15 11 13 9.0 177 33 37 12 8 9 16.0 178 30 30 12 9 12 18.0 179 31 31 14 10 16 10.0 180 37 38 12 9 11 14.0 181 36 36 16 12 14 11.0 182 30 35 11 6 13 9.0 183 36 31 19 15 15 11.0 184 32 38 15 12 14 10.0 185 28 22 8 12 16 11.0 186 36 32 16 12 13 19.0 187 34 36 17 11 14 14.0 188 31 39 12 7 15 12.0 189 28 28 11 7 13 14.0 190 36 32 11 5 11 21.0 191 36 32 14 12 11 13.0 192 40 38 16 12 14 10.0 193 33 32 12 3 15 15.0 194 37 35 16 11 11 16.0 195 32 32 13 10 15 14.0 196 38 37 15 12 12 12.0 197 31 34 16 9 14 19.0 198 37 33 16 12 14 15.0 199 33 33 14 9 8 19.0 200 32 26 16 12 13 13.0 201 30 30 16 12 9 17.0 202 30 24 14 10 15 12.0 203 31 34 11 9 17 11.0 204 32 34 12 12 13 14.0 205 34 33 15 8 15 11.0 206 36 34 15 11 15 13.0 207 37 35 16 11 14 12.0 208 36 35 16 12 16 15.0 209 33 36 11 10 13 14.0 210 33 34 15 10 16 12.0 211 33 34 12 12 9 17.0 212 44 41 12 12 16 11.0 213 39 32 15 11 11 18.0 214 32 30 15 8 10 13.0 215 35 35 16 12 11 17.0 216 25 28 14 10 15 13.0 217 35 33 17 11 17 11.0 218 34 39 14 10 14 12.0 219 35 36 13 8 8 22.0 220 39 36 15 12 15 14.0 221 33 35 13 12 11 12.0 222 36 38 14 10 16 12.0 223 32 33 15 12 10 17.0 224 32 31 12 9 15 9.0 225 36 34 13 9 9 21.0 226 36 32 8 6 16 10.0 227 32 31 14 10 19 11.0 228 34 33 14 9 12 12.0 229 33 34 11 9 8 23.0 230 35 34 12 9 11 13.0 231 30 34 13 6 14 12.0 232 38 33 10 10 9 16.0 233 34 32 16 6 15 9.0 234 33 41 18 14 13 17.0 235 32 34 13 10 16 9.0 236 31 36 11 10 11 14.0 237 30 37 4 6 12 17.0 238 27 36 13 12 13 13.0 239 31 29 16 12 10 11.0 240 30 37 10 7 11 12.0 241 32 27 12 8 12 10.0 242 35 35 12 11 8 19.0 243 28 28 10 3 12 16.0 244 33 35 13 6 12 16.0 245 31 37 15 10 15 14.0 246 35 29 12 8 11 20.0 247 35 32 14 9 13 15.0 248 32 36 10 9 14 23.0 249 21 19 12 8 10 20.0 250 20 21 12 9 12 16.0 251 34 31 11 7 15 14.0 252 32 33 10 7 13 17.0 253 34 36 12 6 13 11.0 254 32 33 16 9 13 13.0 255 33 37 12 10 12 17.0 256 33 34 14 11 12 15.0 257 37 35 16 12 9 21.0 258 32 31 14 8 9 18.0 259 34 37 13 11 15 15.0 260 30 35 4 3 10 8.0 261 30 27 15 11 14 12.0 262 38 34 11 12 15 12.0 263 36 40 11 7 7 22.0 264 32 29 14 9 14 12.0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Connected Learning Software Happiness Depression 15.934020 0.414995 0.128945 0.122129 0.032086 0.003787 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -9.7321 -1.7592 0.1165 2.2627 7.7919 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 15.934020 2.903033 5.489 9.67e-08 *** Connected 0.414995 0.054723 7.584 6.09e-13 *** Learning 0.128945 0.108559 1.188 0.236 Software 0.122129 0.111659 1.094 0.275 Happiness 0.032086 0.100871 0.318 0.751 Depression 0.003787 0.072382 0.052 0.958 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.283 on 258 degrees of freedom Multiple R-squared: 0.2291, Adjusted R-squared: 0.2142 F-statistic: 15.34 on 5 and 258 DF, p-value: 3.354e-13 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 0.339980797 0.67996159 0.66001920 [2,] 0.574617097 0.85076581 0.42538290 [3,] 0.433930182 0.86786036 0.56606982 [4,] 0.446270593 0.89254119 0.55372941 [5,] 0.379292741 0.75858548 0.62070726 [6,] 0.475120421 0.95024084 0.52487958 [7,] 0.454661458 0.90932292 0.54533854 [8,] 0.391860854 0.78372171 0.60813915 [9,] 0.341213441 0.68242688 0.65878656 [10,] 0.398760463 0.79752093 0.60123954 [11,] 0.355243574 0.71048715 0.64475643 [12,] 0.297456127 0.59491225 0.70254387 [13,] 0.231119146 0.46223829 0.76888085 [14,] 0.230618639 0.46123728 0.76938136 [15,] 0.182665270 0.36533054 0.81733473 [16,] 0.201560481 0.40312096 0.79843952 [17,] 0.225701745 0.45140349 0.77429825 [18,] 0.368480809 0.73696162 0.63151919 [19,] 0.313111519 0.62622304 0.68688848 [20,] 0.285310312 0.57062062 0.71468969 [21,] 0.238779693 0.47755939 0.76122031 [22,] 0.193777904 0.38755581 0.80622210 [23,] 0.175415115 0.35083023 0.82458489 [24,] 0.141696172 0.28339234 0.85830383 [25,] 0.135545708 0.27109142 0.86445429 [26,] 0.131473033 0.26294607 0.86852697 [27,] 0.152847152 0.30569430 0.84715285 [28,] 0.131424137 0.26284827 0.86857586 [29,] 0.105133012 0.21026602 0.89486699 [30,] 0.084906736 0.16981347 0.91509326 [31,] 0.068602167 0.13720433 0.93139783 [32,] 0.053017119 0.10603424 0.94698288 [33,] 0.045642915 0.09128583 0.95435708 [34,] 0.034574526 0.06914905 0.96542547 [35,] 0.042227020 0.08445404 0.95777298 [36,] 0.031942971 0.06388594 0.96805703 [37,] 0.068361757 0.13672351 0.93163824 [38,] 0.054557777 0.10911555 0.94544222 [39,] 0.069897140 0.13979428 0.93010286 [40,] 0.055332308 0.11066462 0.94466769 [41,] 0.064955765 0.12991153 0.93504424 [42,] 0.061323851 0.12264770 0.93867615 [43,] 0.069435581 0.13887116 0.93056442 [44,] 0.067102788 0.13420558 0.93289721 [45,] 0.053463083 0.10692617 0.94653692 [46,] 0.057109428 0.11421886 0.94289057 [47,] 0.048152646 0.09630529 0.95184735 [48,] 0.044596518 0.08919304 0.95540348 [49,] 0.036327996 0.07265599 0.96367200 [50,] 0.028993060 0.05798612 0.97100694 [51,] 0.024232430 0.04846486 0.97576757 [52,] 0.018423452 0.03684690 0.98157655 [53,] 0.020246435 0.04049287 0.97975357 [54,] 0.015860598 0.03172120 0.98413940 [55,] 0.011934942 0.02386988 0.98806506 [56,] 0.010152510 0.02030502 0.98984749 [57,] 0.010396703 0.02079341 0.98960330 [58,] 0.009056241 0.01811248 0.99094376 [59,] 0.006734600 0.01346920 0.99326540 [60,] 0.014843502 0.02968700 0.98515650 [61,] 0.020007002 0.04001400 0.97999300 [62,] 0.018737624 0.03747525 0.98126238 [63,] 0.016078108 0.03215622 0.98392189 [64,] 0.023912088 0.04782418 0.97608791 [65,] 0.028985676 0.05797135 0.97101432 [66,] 0.041506296 0.08301259 0.95849370 [67,] 0.092996172 0.18599234 0.90700383 [68,] 0.110105186 0.22021037 0.88989481 [69,] 0.094818542 0.18963708 0.90518146 [70,] 0.089805413 0.17961083 0.91019459 [71,] 0.080431440 0.16086288 0.91956856 [72,] 0.184703074 0.36940615 0.81529693 [73,] 0.171446063 0.34289213 0.82855394 [74,] 0.164082043 0.32816409 0.83591796 [75,] 0.152018178 0.30403636 0.84798182 [76,] 0.131403274 0.26280655 0.86859673 [77,] 0.119229483 0.23845897 0.88077052 [78,] 0.145829739 0.29165948 0.85417026 [79,] 0.124869814 0.24973963 0.87513019 [80,] 0.106523867 0.21304773 0.89347613 [81,] 0.089929135 0.17985827 0.91007086 [82,] 0.093108060 0.18621612 0.90689194 [83,] 0.098691416 0.19738283 0.90130858 [84,] 0.161804150 0.32360830 0.83819585 [85,] 0.212037299 0.42407460 0.78796270 [86,] 0.201219053 0.40243811 0.79878095 [87,] 0.178735197 0.35747039 0.82126480 [88,] 0.155573343 0.31114669 0.84442666 [89,] 0.147986298 0.29597260 0.85201370 [90,] 0.131239566 0.26247913 0.86876043 [91,] 0.130615073 0.26123015 0.86938493 [92,] 0.112089630 0.22417926 0.88791037 [93,] 0.096867394 0.19373479 0.90313261 [94,] 0.083961489 0.16792298 0.91603851 [95,] 0.101716896 0.20343379 0.89828310 [96,] 0.134528861 0.26905772 0.86547114 [97,] 0.140289438 0.28057888 0.85971056 [98,] 0.122238070 0.24447614 0.87776193 [99,] 0.113856955 0.22771391 0.88614304 [100,] 0.101431025 0.20286205 0.89856898 [101,] 0.149263374 0.29852675 0.85073663 [102,] 0.132069092 0.26413818 0.86793091 [103,] 0.113594803 0.22718961 0.88640520 [104,] 0.233383802 0.46676760 0.76661620 [105,] 0.207581689 0.41516338 0.79241831 [106,] 0.185536512 0.37107302 0.81446349 [107,] 0.192333816 0.38466763 0.80766618 [108,] 0.261502982 0.52300596 0.73849702 [109,] 0.368124848 0.73624970 0.63187515 [110,] 0.344410697 0.68882139 0.65558930 [111,] 0.312262485 0.62452497 0.68773752 [112,] 0.320767659 0.64153532 0.67923234 [113,] 0.412098077 0.82419615 0.58790192 [114,] 0.417804816 0.83560963 0.58219518 [115,] 0.402721136 0.80544227 0.59727886 [116,] 0.421170607 0.84234121 0.57882939 [117,] 0.387077271 0.77415454 0.61292273 [118,] 0.398340863 0.79668173 0.60165914 [119,] 0.371076159 0.74215232 0.62892384 [120,] 0.358461492 0.71692298 0.64153851 [121,] 0.331223660 0.66244732 0.66877634 [122,] 0.300649273 0.60129855 0.69935073 [123,] 0.278114582 0.55622916 0.72188542 [124,] 0.256359165 0.51271833 0.74364083 [125,] 0.236813401 0.47362680 0.76318660 [126,] 0.229866928 0.45973386 0.77013307 [127,] 0.252159775 0.50431955 0.74784022 [128,] 0.454100163 0.90820033 0.54589984 [129,] 0.423146238 0.84629248 0.57685376 [130,] 0.429760193 0.85952039 0.57023981 [131,] 0.395579853 0.79115971 0.60442015 [132,] 0.393972001 0.78794400 0.60602800 [133,] 0.365348370 0.73069674 0.63465163 [134,] 0.410522241 0.82104448 0.58947776 [135,] 0.390585176 0.78117035 0.60941482 [136,] 0.667784638 0.66443072 0.33221536 [137,] 0.695533973 0.60893205 0.30446603 [138,] 0.794256518 0.41148696 0.20574348 [139,] 0.773191444 0.45361711 0.22680856 [140,] 0.761456514 0.47708697 0.23854349 [141,] 0.740828895 0.51834221 0.25917110 [142,] 0.770584153 0.45883169 0.22941585 [143,] 0.743270996 0.51345801 0.25672900 [144,] 0.757935194 0.48412961 0.24206481 [145,] 0.794387378 0.41122524 0.20561262 [146,] 0.772651756 0.45469649 0.22734824 [147,] 0.750151282 0.49969744 0.24984872 [148,] 0.758750832 0.48249834 0.24124917 [149,] 0.791671650 0.41665670 0.20832835 [150,] 0.785692052 0.42861590 0.21430795 [151,] 0.773484482 0.45303104 0.22651552 [152,] 0.832830753 0.33433849 0.16716925 [153,] 0.827784147 0.34443171 0.17221585 [154,] 0.847028874 0.30594225 0.15297113 [155,] 0.889340837 0.22131833 0.11065916 [156,] 0.892690007 0.21461999 0.10730999 [157,] 0.915762359 0.16847528 0.08423764 [158,] 0.907421048 0.18515790 0.09257895 [159,] 0.892281566 0.21543687 0.10771843 [160,] 0.914504696 0.17099061 0.08549530 [161,] 0.923150888 0.15369822 0.07684911 [162,] 0.948328181 0.10334364 0.05167182 [163,] 0.946264067 0.10747187 0.05373593 [164,] 0.938503096 0.12299381 0.06149690 [165,] 0.929216559 0.14156688 0.07078344 [166,] 0.945993786 0.10801243 0.05400621 [167,] 0.972448184 0.05510363 0.02755182 [168,] 0.968182453 0.06363509 0.03181755 [169,] 0.962025610 0.07594878 0.03797439 [170,] 0.954972430 0.09005514 0.04502757 [171,] 0.946831967 0.10633607 0.05316803 [172,] 0.940117641 0.11976472 0.05988236 [173,] 0.928166424 0.14366715 0.07183358 [174,] 0.926006607 0.14798679 0.07399339 [175,] 0.916999282 0.16600144 0.08300072 [176,] 0.926929742 0.14614052 0.07307026 [177,] 0.914503621 0.17099276 0.08549638 [178,] 0.909071315 0.18185737 0.09092868 [179,] 0.895791503 0.20841699 0.10420850 [180,] 0.913671040 0.17265792 0.08632896 [181,] 0.902372096 0.19525581 0.09762790 [182,] 0.922252904 0.15549419 0.07774710 [183,] 0.919550419 0.16089916 0.08044958 [184,] 0.921751871 0.15649626 0.07824813 [185,] 0.910463466 0.17907307 0.08953653 [186,] 0.902171323 0.19565735 0.09782868 [187,] 0.883245112 0.23350978 0.11675489 [188,] 0.872863832 0.25427234 0.12713617 [189,] 0.868621658 0.26275668 0.13137834 [190,] 0.867922624 0.26415475 0.13207738 [191,] 0.843559051 0.31288190 0.15644095 [192,] 0.825741100 0.34851780 0.17425890 [193,] 0.809245719 0.38150856 0.19075428 [194,] 0.786580938 0.42683812 0.21341906 [195,] 0.766600645 0.46679871 0.23339935 [196,] 0.739291557 0.52141689 0.26070844 [197,] 0.704665250 0.59066950 0.29533475 [198,] 0.680375750 0.63924850 0.31962425 [199,] 0.661730336 0.67653933 0.33826966 [200,] 0.626727796 0.74654441 0.37327220 [201,] 0.588253563 0.82349287 0.41174644 [202,] 0.545658199 0.90868360 0.45434180 [203,] 0.500939376 0.99812125 0.49906062 [204,] 0.670534558 0.65893088 0.32946544 [205,] 0.781651092 0.43669782 0.21834891 [206,] 0.745765750 0.50846850 0.25423425 [207,] 0.708191266 0.58361747 0.29180873 [208,] 0.778043732 0.44391254 0.22195627 [209,] 0.749475754 0.50104849 0.25052425 [210,] 0.719759926 0.56048015 0.28024007 [211,] 0.681063583 0.63787283 0.31893642 [212,] 0.726249663 0.54750067 0.27375034 [213,] 0.683922775 0.63215445 0.31607722 [214,] 0.642318627 0.71536275 0.35768137 [215,] 0.597275215 0.80544957 0.40272478 [216,] 0.547770654 0.90445869 0.45222935 [217,] 0.541762521 0.91647496 0.45823748 [218,] 0.623659091 0.75268182 0.37634091 [219,] 0.581193342 0.83761332 0.41880666 [220,] 0.536047874 0.92790425 0.46395213 [221,] 0.480401148 0.96080230 0.51959885 [222,] 0.450390647 0.90078129 0.54960935 [223,] 0.424717813 0.84943563 0.57528219 [224,] 0.595557897 0.80888421 0.40444210 [225,] 0.544129075 0.91174185 0.45587093 [226,] 0.606062178 0.78787564 0.39393782 [227,] 0.547707211 0.90458558 0.45229279 [228,] 0.511905504 0.97618899 0.48809450 [229,] 0.464697215 0.92939443 0.53530278 [230,] 0.746652277 0.50669545 0.25334772 [231,] 0.692315668 0.61536866 0.30768433 [232,] 0.750200736 0.49959853 0.24979926 [233,] 0.745036175 0.50992765 0.25496383 [234,] 0.683690972 0.63261806 0.31630903 [235,] 0.616816003 0.76636799 0.38318400 [236,] 0.539418142 0.92116372 0.46058186 [237,] 0.692243136 0.61551373 0.30775686 [238,] 0.878878566 0.24224287 0.12112143 [239,] 0.867700285 0.26459943 0.13229971 [240,] 0.831010699 0.33797860 0.16898930 [241,] 0.766997933 0.46600413 0.23300207 [242,] 0.932304994 0.13539001 0.06769501 [243,] 0.927711594 0.14457681 0.07228841 [244,] 0.870135536 0.25972893 0.12986446 [245,] 0.865234721 0.26953056 0.13476528 [246,] 0.825476418 0.34904716 0.17452358 [247,] 0.840701229 0.31859754 0.15929877 > postscript(file="/var/fisher/rcomp/tmp/10tbo1383469553.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/2fh7w1383469553.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/32af91383469553.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/4o81v1383469553.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/5jrxf1383469553.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.41469932 -4.14457391 1.92826572 1.10370498 2.97033050 -4.97941658 7 8 9 10 11 12 -5.56685656 1.82130131 0.33621705 3.14730279 -4.57157646 -1.04244252 13 14 15 16 17 18 -0.61017054 1.90823582 2.73171988 -0.11581242 -2.53153315 1.66459622 19 20 21 22 23 24 1.72966646 -1.30514221 -0.23392893 -1.73350516 1.34888774 3.86656918 25 26 27 28 29 30 -4.36356266 -5.05141965 0.28671179 3.22114670 -0.69183851 -0.47255302 31 32 33 34 35 36 -1.74605258 1.86281367 -3.89869096 2.90452874 -3.81306943 1.09811322 37 38 39 40 41 42 0.27799213 -1.67135767 -0.83662282 -1.19824826 -3.08862242 -0.88102862 43 44 45 46 47 48 -4.65834378 -0.92342115 -7.25330134 0.42503974 3.38788539 0.57059824 49 50 51 52 53 54 3.11734709 -3.43338818 4.46196122 -2.74260843 0.35213184 3.86729505 55 56 57 58 59 60 0.58829877 0.63695506 -2.21010615 1.98707770 1.01066395 -0.18509916 61 62 63 64 65 66 -3.11854879 -1.69506619 0.78482636 2.55025708 -3.10304599 2.39888880 67 68 69 70 71 72 -0.32199080 -5.47878281 4.33776107 2.47817180 1.53124981 5.48229789 73 74 75 76 77 78 4.39480469 4.74618739 -7.03129944 -5.86704400 1.46566830 -2.93189429 79 80 81 82 83 84 -0.22624093 -8.26870925 2.31952358 2.49710862 -2.24738376 0.98180573 85 86 87 88 89 90 -2.41170656 3.86125326 0.34782213 0.02852535 -0.33650478 3.95993602 91 92 93 94 95 96 -3.37177191 6.48195916 -5.11959978 -1.57517027 0.04172725 -0.38526422 97 98 99 100 101 102 -3.11199220 -1.40462764 3.24045511 -0.06009378 -0.14100555 1.15649647 103 104 105 106 107 108 -4.88606326 5.42271610 -4.03638780 -0.91648189 1.98062798 0.34194849 109 110 111 112 113 114 5.40719691 1.55314604 0.01844882 7.79187427 0.26042020 -0.68046095 115 116 117 118 119 120 -3.74877434 6.47600872 6.67544790 1.86814953 0.26148580 3.90959718 121 122 123 124 125 126 -5.95189223 3.63138532 2.42664762 -3.91864497 -0.15270289 -3.85005125 127 128 129 130 131 132 0.68737980 2.68651325 -0.88013021 0.04294892 1.44872832 0.90686434 133 134 135 136 137 138 -0.56774615 2.91364748 -4.17998425 -8.76938291 1.17632722 3.56290025 139 140 141 142 143 144 0.49383252 3.22101237 1.22682313 5.01639345 2.09747336 -9.73214475 145 146 147 148 149 150 -4.35533699 -6.68137483 1.58214394 -2.16922383 -1.59502557 4.59299468 151 152 153 154 155 156 -0.36716641 4.24640555 5.31478026 -0.84682610 -1.38062686 -3.37177191 157 158 159 160 161 162 4.87485422 2.68651325 -1.90159538 5.80856326 2.82511705 -4.44821885 163 164 165 166 167 168 -5.82546427 -3.19482683 5.41165075 1.39956179 0.97282666 -5.04589021 169 170 171 172 173 174 4.46494338 5.97549661 -2.87551180 2.03866576 -1.05166712 -5.46578544 175 176 177 178 179 180 -6.44934030 2.05733964 -1.16257851 -1.48357638 -1.37663596 2.24370021 181 182 183 184 185 186 1.10662495 -3.06121694 2.39628931 -3.59063205 -0.11605640 2.76839135 187 188 189 190 191 192 -0.91155313 -4.04780491 -2.29731915 4.32462040 3.11317801 4.28042262 193 194 195 196 197 198 1.33431427 2.72107006 -0.64574902 2.88095989 -2.72729626 3.33646004 199 200 201 202 203 204 0.13810472 1.28108462 -2.26570057 0.55283917 -2.14852847 -1.52688023 205 206 207 208 209 210 0.93698624 2.14802867 2.63996177 1.44229852 -0.98366593 -0.75814055 211 212 213 214 215 216 -0.40989866 7.48326019 6.08742520 0.33482562 0.59515336 -6.11092759 217 218 219 220 221 222 1.24853576 -1.63999764 1.13283274 4.19212227 -0.99907385 0.71082538 223 224 225 226 227 228 -1.41382570 0.03925730 2.81239455 4.47055847 -0.47668106 1.03627261 229 230 231 232 233 234 0.09479639 1.90746696 -2.94756074 5.51103286 1.47486915 -4.46113687 235 236 237 238 239 240 -1.48888781 -2.91949411 -2.98680236 -7.48202789 -0.86006745 -3.83158091 241 242 243 244 245 246 1.91383641 1.32174701 -1.65534531 -0.31353322 -3.97861391 4.07805899 247 248 249 250 251 252 2.40781945 -1.79876346 -5.73990662 -7.74104802 2.39352448 -0.25471016 253 254 255 256 257 258 0.38726816 -1.25749132 -1.50688228 -0.63434300 2.64417573 0.06192520 259 260 261 262 263 264 -0.84663996 -1.69216656 -0.91113412 4.54546800 0.88495924 0.63208017 > postscript(file="/var/fisher/rcomp/tmp/6aa681383469553.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.41469932 NA 1 -4.14457391 1.41469932 2 1.92826572 -4.14457391 3 1.10370498 1.92826572 4 2.97033050 1.10370498 5 -4.97941658 2.97033050 6 -5.56685656 -4.97941658 7 1.82130131 -5.56685656 8 0.33621705 1.82130131 9 3.14730279 0.33621705 10 -4.57157646 3.14730279 11 -1.04244252 -4.57157646 12 -0.61017054 -1.04244252 13 1.90823582 -0.61017054 14 2.73171988 1.90823582 15 -0.11581242 2.73171988 16 -2.53153315 -0.11581242 17 1.66459622 -2.53153315 18 1.72966646 1.66459622 19 -1.30514221 1.72966646 20 -0.23392893 -1.30514221 21 -1.73350516 -0.23392893 22 1.34888774 -1.73350516 23 3.86656918 1.34888774 24 -4.36356266 3.86656918 25 -5.05141965 -4.36356266 26 0.28671179 -5.05141965 27 3.22114670 0.28671179 28 -0.69183851 3.22114670 29 -0.47255302 -0.69183851 30 -1.74605258 -0.47255302 31 1.86281367 -1.74605258 32 -3.89869096 1.86281367 33 2.90452874 -3.89869096 34 -3.81306943 2.90452874 35 1.09811322 -3.81306943 36 0.27799213 1.09811322 37 -1.67135767 0.27799213 38 -0.83662282 -1.67135767 39 -1.19824826 -0.83662282 40 -3.08862242 -1.19824826 41 -0.88102862 -3.08862242 42 -4.65834378 -0.88102862 43 -0.92342115 -4.65834378 44 -7.25330134 -0.92342115 45 0.42503974 -7.25330134 46 3.38788539 0.42503974 47 0.57059824 3.38788539 48 3.11734709 0.57059824 49 -3.43338818 3.11734709 50 4.46196122 -3.43338818 51 -2.74260843 4.46196122 52 0.35213184 -2.74260843 53 3.86729505 0.35213184 54 0.58829877 3.86729505 55 0.63695506 0.58829877 56 -2.21010615 0.63695506 57 1.98707770 -2.21010615 58 1.01066395 1.98707770 59 -0.18509916 1.01066395 60 -3.11854879 -0.18509916 61 -1.69506619 -3.11854879 62 0.78482636 -1.69506619 63 2.55025708 0.78482636 64 -3.10304599 2.55025708 65 2.39888880 -3.10304599 66 -0.32199080 2.39888880 67 -5.47878281 -0.32199080 68 4.33776107 -5.47878281 69 2.47817180 4.33776107 70 1.53124981 2.47817180 71 5.48229789 1.53124981 72 4.39480469 5.48229789 73 4.74618739 4.39480469 74 -7.03129944 4.74618739 75 -5.86704400 -7.03129944 76 1.46566830 -5.86704400 77 -2.93189429 1.46566830 78 -0.22624093 -2.93189429 79 -8.26870925 -0.22624093 80 2.31952358 -8.26870925 81 2.49710862 2.31952358 82 -2.24738376 2.49710862 83 0.98180573 -2.24738376 84 -2.41170656 0.98180573 85 3.86125326 -2.41170656 86 0.34782213 3.86125326 87 0.02852535 0.34782213 88 -0.33650478 0.02852535 89 3.95993602 -0.33650478 90 -3.37177191 3.95993602 91 6.48195916 -3.37177191 92 -5.11959978 6.48195916 93 -1.57517027 -5.11959978 94 0.04172725 -1.57517027 95 -0.38526422 0.04172725 96 -3.11199220 -0.38526422 97 -1.40462764 -3.11199220 98 3.24045511 -1.40462764 99 -0.06009378 3.24045511 100 -0.14100555 -0.06009378 101 1.15649647 -0.14100555 102 -4.88606326 1.15649647 103 5.42271610 -4.88606326 104 -4.03638780 5.42271610 105 -0.91648189 -4.03638780 106 1.98062798 -0.91648189 107 0.34194849 1.98062798 108 5.40719691 0.34194849 109 1.55314604 5.40719691 110 0.01844882 1.55314604 111 7.79187427 0.01844882 112 0.26042020 7.79187427 113 -0.68046095 0.26042020 114 -3.74877434 -0.68046095 115 6.47600872 -3.74877434 116 6.67544790 6.47600872 117 1.86814953 6.67544790 118 0.26148580 1.86814953 119 3.90959718 0.26148580 120 -5.95189223 3.90959718 121 3.63138532 -5.95189223 122 2.42664762 3.63138532 123 -3.91864497 2.42664762 124 -0.15270289 -3.91864497 125 -3.85005125 -0.15270289 126 0.68737980 -3.85005125 127 2.68651325 0.68737980 128 -0.88013021 2.68651325 129 0.04294892 -0.88013021 130 1.44872832 0.04294892 131 0.90686434 1.44872832 132 -0.56774615 0.90686434 133 2.91364748 -0.56774615 134 -4.17998425 2.91364748 135 -8.76938291 -4.17998425 136 1.17632722 -8.76938291 137 3.56290025 1.17632722 138 0.49383252 3.56290025 139 3.22101237 0.49383252 140 1.22682313 3.22101237 141 5.01639345 1.22682313 142 2.09747336 5.01639345 143 -9.73214475 2.09747336 144 -4.35533699 -9.73214475 145 -6.68137483 -4.35533699 146 1.58214394 -6.68137483 147 -2.16922383 1.58214394 148 -1.59502557 -2.16922383 149 4.59299468 -1.59502557 150 -0.36716641 4.59299468 151 4.24640555 -0.36716641 152 5.31478026 4.24640555 153 -0.84682610 5.31478026 154 -1.38062686 -0.84682610 155 -3.37177191 -1.38062686 156 4.87485422 -3.37177191 157 2.68651325 4.87485422 158 -1.90159538 2.68651325 159 5.80856326 -1.90159538 160 2.82511705 5.80856326 161 -4.44821885 2.82511705 162 -5.82546427 -4.44821885 163 -3.19482683 -5.82546427 164 5.41165075 -3.19482683 165 1.39956179 5.41165075 166 0.97282666 1.39956179 167 -5.04589021 0.97282666 168 4.46494338 -5.04589021 169 5.97549661 4.46494338 170 -2.87551180 5.97549661 171 2.03866576 -2.87551180 172 -1.05166712 2.03866576 173 -5.46578544 -1.05166712 174 -6.44934030 -5.46578544 175 2.05733964 -6.44934030 176 -1.16257851 2.05733964 177 -1.48357638 -1.16257851 178 -1.37663596 -1.48357638 179 2.24370021 -1.37663596 180 1.10662495 2.24370021 181 -3.06121694 1.10662495 182 2.39628931 -3.06121694 183 -3.59063205 2.39628931 184 -0.11605640 -3.59063205 185 2.76839135 -0.11605640 186 -0.91155313 2.76839135 187 -4.04780491 -0.91155313 188 -2.29731915 -4.04780491 189 4.32462040 -2.29731915 190 3.11317801 4.32462040 191 4.28042262 3.11317801 192 1.33431427 4.28042262 193 2.72107006 1.33431427 194 -0.64574902 2.72107006 195 2.88095989 -0.64574902 196 -2.72729626 2.88095989 197 3.33646004 -2.72729626 198 0.13810472 3.33646004 199 1.28108462 0.13810472 200 -2.26570057 1.28108462 201 0.55283917 -2.26570057 202 -2.14852847 0.55283917 203 -1.52688023 -2.14852847 204 0.93698624 -1.52688023 205 2.14802867 0.93698624 206 2.63996177 2.14802867 207 1.44229852 2.63996177 208 -0.98366593 1.44229852 209 -0.75814055 -0.98366593 210 -0.40989866 -0.75814055 211 7.48326019 -0.40989866 212 6.08742520 7.48326019 213 0.33482562 6.08742520 214 0.59515336 0.33482562 215 -6.11092759 0.59515336 216 1.24853576 -6.11092759 217 -1.63999764 1.24853576 218 1.13283274 -1.63999764 219 4.19212227 1.13283274 220 -0.99907385 4.19212227 221 0.71082538 -0.99907385 222 -1.41382570 0.71082538 223 0.03925730 -1.41382570 224 2.81239455 0.03925730 225 4.47055847 2.81239455 226 -0.47668106 4.47055847 227 1.03627261 -0.47668106 228 0.09479639 1.03627261 229 1.90746696 0.09479639 230 -2.94756074 1.90746696 231 5.51103286 -2.94756074 232 1.47486915 5.51103286 233 -4.46113687 1.47486915 234 -1.48888781 -4.46113687 235 -2.91949411 -1.48888781 236 -2.98680236 -2.91949411 237 -7.48202789 -2.98680236 238 -0.86006745 -7.48202789 239 -3.83158091 -0.86006745 240 1.91383641 -3.83158091 241 1.32174701 1.91383641 242 -1.65534531 1.32174701 243 -0.31353322 -1.65534531 244 -3.97861391 -0.31353322 245 4.07805899 -3.97861391 246 2.40781945 4.07805899 247 -1.79876346 2.40781945 248 -5.73990662 -1.79876346 249 -7.74104802 -5.73990662 250 2.39352448 -7.74104802 251 -0.25471016 2.39352448 252 0.38726816 -0.25471016 253 -1.25749132 0.38726816 254 -1.50688228 -1.25749132 255 -0.63434300 -1.50688228 256 2.64417573 -0.63434300 257 0.06192520 2.64417573 258 -0.84663996 0.06192520 259 -1.69216656 -0.84663996 260 -0.91113412 -1.69216656 261 4.54546800 -0.91113412 262 0.88495924 4.54546800 263 0.63208017 0.88495924 264 NA 0.63208017 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -4.14457391 1.41469932 [2,] 1.92826572 -4.14457391 [3,] 1.10370498 1.92826572 [4,] 2.97033050 1.10370498 [5,] -4.97941658 2.97033050 [6,] -5.56685656 -4.97941658 [7,] 1.82130131 -5.56685656 [8,] 0.33621705 1.82130131 [9,] 3.14730279 0.33621705 [10,] -4.57157646 3.14730279 [11,] -1.04244252 -4.57157646 [12,] -0.61017054 -1.04244252 [13,] 1.90823582 -0.61017054 [14,] 2.73171988 1.90823582 [15,] -0.11581242 2.73171988 [16,] -2.53153315 -0.11581242 [17,] 1.66459622 -2.53153315 [18,] 1.72966646 1.66459622 [19,] -1.30514221 1.72966646 [20,] -0.23392893 -1.30514221 [21,] -1.73350516 -0.23392893 [22,] 1.34888774 -1.73350516 [23,] 3.86656918 1.34888774 [24,] -4.36356266 3.86656918 [25,] -5.05141965 -4.36356266 [26,] 0.28671179 -5.05141965 [27,] 3.22114670 0.28671179 [28,] -0.69183851 3.22114670 [29,] -0.47255302 -0.69183851 [30,] -1.74605258 -0.47255302 [31,] 1.86281367 -1.74605258 [32,] -3.89869096 1.86281367 [33,] 2.90452874 -3.89869096 [34,] -3.81306943 2.90452874 [35,] 1.09811322 -3.81306943 [36,] 0.27799213 1.09811322 [37,] -1.67135767 0.27799213 [38,] -0.83662282 -1.67135767 [39,] -1.19824826 -0.83662282 [40,] -3.08862242 -1.19824826 [41,] -0.88102862 -3.08862242 [42,] -4.65834378 -0.88102862 [43,] -0.92342115 -4.65834378 [44,] -7.25330134 -0.92342115 [45,] 0.42503974 -7.25330134 [46,] 3.38788539 0.42503974 [47,] 0.57059824 3.38788539 [48,] 3.11734709 0.57059824 [49,] -3.43338818 3.11734709 [50,] 4.46196122 -3.43338818 [51,] -2.74260843 4.46196122 [52,] 0.35213184 -2.74260843 [53,] 3.86729505 0.35213184 [54,] 0.58829877 3.86729505 [55,] 0.63695506 0.58829877 [56,] -2.21010615 0.63695506 [57,] 1.98707770 -2.21010615 [58,] 1.01066395 1.98707770 [59,] -0.18509916 1.01066395 [60,] -3.11854879 -0.18509916 [61,] -1.69506619 -3.11854879 [62,] 0.78482636 -1.69506619 [63,] 2.55025708 0.78482636 [64,] -3.10304599 2.55025708 [65,] 2.39888880 -3.10304599 [66,] -0.32199080 2.39888880 [67,] -5.47878281 -0.32199080 [68,] 4.33776107 -5.47878281 [69,] 2.47817180 4.33776107 [70,] 1.53124981 2.47817180 [71,] 5.48229789 1.53124981 [72,] 4.39480469 5.48229789 [73,] 4.74618739 4.39480469 [74,] -7.03129944 4.74618739 [75,] -5.86704400 -7.03129944 [76,] 1.46566830 -5.86704400 [77,] -2.93189429 1.46566830 [78,] -0.22624093 -2.93189429 [79,] -8.26870925 -0.22624093 [80,] 2.31952358 -8.26870925 [81,] 2.49710862 2.31952358 [82,] -2.24738376 2.49710862 [83,] 0.98180573 -2.24738376 [84,] -2.41170656 0.98180573 [85,] 3.86125326 -2.41170656 [86,] 0.34782213 3.86125326 [87,] 0.02852535 0.34782213 [88,] -0.33650478 0.02852535 [89,] 3.95993602 -0.33650478 [90,] -3.37177191 3.95993602 [91,] 6.48195916 -3.37177191 [92,] -5.11959978 6.48195916 [93,] -1.57517027 -5.11959978 [94,] 0.04172725 -1.57517027 [95,] -0.38526422 0.04172725 [96,] -3.11199220 -0.38526422 [97,] -1.40462764 -3.11199220 [98,] 3.24045511 -1.40462764 [99,] -0.06009378 3.24045511 [100,] -0.14100555 -0.06009378 [101,] 1.15649647 -0.14100555 [102,] -4.88606326 1.15649647 [103,] 5.42271610 -4.88606326 [104,] -4.03638780 5.42271610 [105,] -0.91648189 -4.03638780 [106,] 1.98062798 -0.91648189 [107,] 0.34194849 1.98062798 [108,] 5.40719691 0.34194849 [109,] 1.55314604 5.40719691 [110,] 0.01844882 1.55314604 [111,] 7.79187427 0.01844882 [112,] 0.26042020 7.79187427 [113,] -0.68046095 0.26042020 [114,] -3.74877434 -0.68046095 [115,] 6.47600872 -3.74877434 [116,] 6.67544790 6.47600872 [117,] 1.86814953 6.67544790 [118,] 0.26148580 1.86814953 [119,] 3.90959718 0.26148580 [120,] -5.95189223 3.90959718 [121,] 3.63138532 -5.95189223 [122,] 2.42664762 3.63138532 [123,] -3.91864497 2.42664762 [124,] -0.15270289 -3.91864497 [125,] -3.85005125 -0.15270289 [126,] 0.68737980 -3.85005125 [127,] 2.68651325 0.68737980 [128,] -0.88013021 2.68651325 [129,] 0.04294892 -0.88013021 [130,] 1.44872832 0.04294892 [131,] 0.90686434 1.44872832 [132,] -0.56774615 0.90686434 [133,] 2.91364748 -0.56774615 [134,] -4.17998425 2.91364748 [135,] -8.76938291 -4.17998425 [136,] 1.17632722 -8.76938291 [137,] 3.56290025 1.17632722 [138,] 0.49383252 3.56290025 [139,] 3.22101237 0.49383252 [140,] 1.22682313 3.22101237 [141,] 5.01639345 1.22682313 [142,] 2.09747336 5.01639345 [143,] -9.73214475 2.09747336 [144,] -4.35533699 -9.73214475 [145,] -6.68137483 -4.35533699 [146,] 1.58214394 -6.68137483 [147,] -2.16922383 1.58214394 [148,] -1.59502557 -2.16922383 [149,] 4.59299468 -1.59502557 [150,] -0.36716641 4.59299468 [151,] 4.24640555 -0.36716641 [152,] 5.31478026 4.24640555 [153,] -0.84682610 5.31478026 [154,] -1.38062686 -0.84682610 [155,] -3.37177191 -1.38062686 [156,] 4.87485422 -3.37177191 [157,] 2.68651325 4.87485422 [158,] -1.90159538 2.68651325 [159,] 5.80856326 -1.90159538 [160,] 2.82511705 5.80856326 [161,] -4.44821885 2.82511705 [162,] -5.82546427 -4.44821885 [163,] -3.19482683 -5.82546427 [164,] 5.41165075 -3.19482683 [165,] 1.39956179 5.41165075 [166,] 0.97282666 1.39956179 [167,] -5.04589021 0.97282666 [168,] 4.46494338 -5.04589021 [169,] 5.97549661 4.46494338 [170,] -2.87551180 5.97549661 [171,] 2.03866576 -2.87551180 [172,] -1.05166712 2.03866576 [173,] -5.46578544 -1.05166712 [174,] -6.44934030 -5.46578544 [175,] 2.05733964 -6.44934030 [176,] -1.16257851 2.05733964 [177,] -1.48357638 -1.16257851 [178,] -1.37663596 -1.48357638 [179,] 2.24370021 -1.37663596 [180,] 1.10662495 2.24370021 [181,] -3.06121694 1.10662495 [182,] 2.39628931 -3.06121694 [183,] -3.59063205 2.39628931 [184,] -0.11605640 -3.59063205 [185,] 2.76839135 -0.11605640 [186,] -0.91155313 2.76839135 [187,] -4.04780491 -0.91155313 [188,] -2.29731915 -4.04780491 [189,] 4.32462040 -2.29731915 [190,] 3.11317801 4.32462040 [191,] 4.28042262 3.11317801 [192,] 1.33431427 4.28042262 [193,] 2.72107006 1.33431427 [194,] -0.64574902 2.72107006 [195,] 2.88095989 -0.64574902 [196,] -2.72729626 2.88095989 [197,] 3.33646004 -2.72729626 [198,] 0.13810472 3.33646004 [199,] 1.28108462 0.13810472 [200,] -2.26570057 1.28108462 [201,] 0.55283917 -2.26570057 [202,] -2.14852847 0.55283917 [203,] -1.52688023 -2.14852847 [204,] 0.93698624 -1.52688023 [205,] 2.14802867 0.93698624 [206,] 2.63996177 2.14802867 [207,] 1.44229852 2.63996177 [208,] -0.98366593 1.44229852 [209,] -0.75814055 -0.98366593 [210,] -0.40989866 -0.75814055 [211,] 7.48326019 -0.40989866 [212,] 6.08742520 7.48326019 [213,] 0.33482562 6.08742520 [214,] 0.59515336 0.33482562 [215,] -6.11092759 0.59515336 [216,] 1.24853576 -6.11092759 [217,] -1.63999764 1.24853576 [218,] 1.13283274 -1.63999764 [219,] 4.19212227 1.13283274 [220,] -0.99907385 4.19212227 [221,] 0.71082538 -0.99907385 [222,] -1.41382570 0.71082538 [223,] 0.03925730 -1.41382570 [224,] 2.81239455 0.03925730 [225,] 4.47055847 2.81239455 [226,] -0.47668106 4.47055847 [227,] 1.03627261 -0.47668106 [228,] 0.09479639 1.03627261 [229,] 1.90746696 0.09479639 [230,] -2.94756074 1.90746696 [231,] 5.51103286 -2.94756074 [232,] 1.47486915 5.51103286 [233,] -4.46113687 1.47486915 [234,] -1.48888781 -4.46113687 [235,] -2.91949411 -1.48888781 [236,] -2.98680236 -2.91949411 [237,] -7.48202789 -2.98680236 [238,] -0.86006745 -7.48202789 [239,] -3.83158091 -0.86006745 [240,] 1.91383641 -3.83158091 [241,] 1.32174701 1.91383641 [242,] -1.65534531 1.32174701 [243,] -0.31353322 -1.65534531 [244,] -3.97861391 -0.31353322 [245,] 4.07805899 -3.97861391 [246,] 2.40781945 4.07805899 [247,] -1.79876346 2.40781945 [248,] -5.73990662 -1.79876346 [249,] -7.74104802 -5.73990662 [250,] 2.39352448 -7.74104802 [251,] -0.25471016 2.39352448 [252,] 0.38726816 -0.25471016 [253,] -1.25749132 0.38726816 [254,] -1.50688228 -1.25749132 [255,] -0.63434300 -1.50688228 [256,] 2.64417573 -0.63434300 [257,] 0.06192520 2.64417573 [258,] -0.84663996 0.06192520 [259,] -1.69216656 -0.84663996 [260,] -0.91113412 -1.69216656 [261,] 4.54546800 -0.91113412 [262,] 0.88495924 4.54546800 [263,] 0.63208017 0.88495924 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -4.14457391 1.41469932 2 1.92826572 -4.14457391 3 1.10370498 1.92826572 4 2.97033050 1.10370498 5 -4.97941658 2.97033050 6 -5.56685656 -4.97941658 7 1.82130131 -5.56685656 8 0.33621705 1.82130131 9 3.14730279 0.33621705 10 -4.57157646 3.14730279 11 -1.04244252 -4.57157646 12 -0.61017054 -1.04244252 13 1.90823582 -0.61017054 14 2.73171988 1.90823582 15 -0.11581242 2.73171988 16 -2.53153315 -0.11581242 17 1.66459622 -2.53153315 18 1.72966646 1.66459622 19 -1.30514221 1.72966646 20 -0.23392893 -1.30514221 21 -1.73350516 -0.23392893 22 1.34888774 -1.73350516 23 3.86656918 1.34888774 24 -4.36356266 3.86656918 25 -5.05141965 -4.36356266 26 0.28671179 -5.05141965 27 3.22114670 0.28671179 28 -0.69183851 3.22114670 29 -0.47255302 -0.69183851 30 -1.74605258 -0.47255302 31 1.86281367 -1.74605258 32 -3.89869096 1.86281367 33 2.90452874 -3.89869096 34 -3.81306943 2.90452874 35 1.09811322 -3.81306943 36 0.27799213 1.09811322 37 -1.67135767 0.27799213 38 -0.83662282 -1.67135767 39 -1.19824826 -0.83662282 40 -3.08862242 -1.19824826 41 -0.88102862 -3.08862242 42 -4.65834378 -0.88102862 43 -0.92342115 -4.65834378 44 -7.25330134 -0.92342115 45 0.42503974 -7.25330134 46 3.38788539 0.42503974 47 0.57059824 3.38788539 48 3.11734709 0.57059824 49 -3.43338818 3.11734709 50 4.46196122 -3.43338818 51 -2.74260843 4.46196122 52 0.35213184 -2.74260843 53 3.86729505 0.35213184 54 0.58829877 3.86729505 55 0.63695506 0.58829877 56 -2.21010615 0.63695506 57 1.98707770 -2.21010615 58 1.01066395 1.98707770 59 -0.18509916 1.01066395 60 -3.11854879 -0.18509916 61 -1.69506619 -3.11854879 62 0.78482636 -1.69506619 63 2.55025708 0.78482636 64 -3.10304599 2.55025708 65 2.39888880 -3.10304599 66 -0.32199080 2.39888880 67 -5.47878281 -0.32199080 68 4.33776107 -5.47878281 69 2.47817180 4.33776107 70 1.53124981 2.47817180 71 5.48229789 1.53124981 72 4.39480469 5.48229789 73 4.74618739 4.39480469 74 -7.03129944 4.74618739 75 -5.86704400 -7.03129944 76 1.46566830 -5.86704400 77 -2.93189429 1.46566830 78 -0.22624093 -2.93189429 79 -8.26870925 -0.22624093 80 2.31952358 -8.26870925 81 2.49710862 2.31952358 82 -2.24738376 2.49710862 83 0.98180573 -2.24738376 84 -2.41170656 0.98180573 85 3.86125326 -2.41170656 86 0.34782213 3.86125326 87 0.02852535 0.34782213 88 -0.33650478 0.02852535 89 3.95993602 -0.33650478 90 -3.37177191 3.95993602 91 6.48195916 -3.37177191 92 -5.11959978 6.48195916 93 -1.57517027 -5.11959978 94 0.04172725 -1.57517027 95 -0.38526422 0.04172725 96 -3.11199220 -0.38526422 97 -1.40462764 -3.11199220 98 3.24045511 -1.40462764 99 -0.06009378 3.24045511 100 -0.14100555 -0.06009378 101 1.15649647 -0.14100555 102 -4.88606326 1.15649647 103 5.42271610 -4.88606326 104 -4.03638780 5.42271610 105 -0.91648189 -4.03638780 106 1.98062798 -0.91648189 107 0.34194849 1.98062798 108 5.40719691 0.34194849 109 1.55314604 5.40719691 110 0.01844882 1.55314604 111 7.79187427 0.01844882 112 0.26042020 7.79187427 113 -0.68046095 0.26042020 114 -3.74877434 -0.68046095 115 6.47600872 -3.74877434 116 6.67544790 6.47600872 117 1.86814953 6.67544790 118 0.26148580 1.86814953 119 3.90959718 0.26148580 120 -5.95189223 3.90959718 121 3.63138532 -5.95189223 122 2.42664762 3.63138532 123 -3.91864497 2.42664762 124 -0.15270289 -3.91864497 125 -3.85005125 -0.15270289 126 0.68737980 -3.85005125 127 2.68651325 0.68737980 128 -0.88013021 2.68651325 129 0.04294892 -0.88013021 130 1.44872832 0.04294892 131 0.90686434 1.44872832 132 -0.56774615 0.90686434 133 2.91364748 -0.56774615 134 -4.17998425 2.91364748 135 -8.76938291 -4.17998425 136 1.17632722 -8.76938291 137 3.56290025 1.17632722 138 0.49383252 3.56290025 139 3.22101237 0.49383252 140 1.22682313 3.22101237 141 5.01639345 1.22682313 142 2.09747336 5.01639345 143 -9.73214475 2.09747336 144 -4.35533699 -9.73214475 145 -6.68137483 -4.35533699 146 1.58214394 -6.68137483 147 -2.16922383 1.58214394 148 -1.59502557 -2.16922383 149 4.59299468 -1.59502557 150 -0.36716641 4.59299468 151 4.24640555 -0.36716641 152 5.31478026 4.24640555 153 -0.84682610 5.31478026 154 -1.38062686 -0.84682610 155 -3.37177191 -1.38062686 156 4.87485422 -3.37177191 157 2.68651325 4.87485422 158 -1.90159538 2.68651325 159 5.80856326 -1.90159538 160 2.82511705 5.80856326 161 -4.44821885 2.82511705 162 -5.82546427 -4.44821885 163 -3.19482683 -5.82546427 164 5.41165075 -3.19482683 165 1.39956179 5.41165075 166 0.97282666 1.39956179 167 -5.04589021 0.97282666 168 4.46494338 -5.04589021 169 5.97549661 4.46494338 170 -2.87551180 5.97549661 171 2.03866576 -2.87551180 172 -1.05166712 2.03866576 173 -5.46578544 -1.05166712 174 -6.44934030 -5.46578544 175 2.05733964 -6.44934030 176 -1.16257851 2.05733964 177 -1.48357638 -1.16257851 178 -1.37663596 -1.48357638 179 2.24370021 -1.37663596 180 1.10662495 2.24370021 181 -3.06121694 1.10662495 182 2.39628931 -3.06121694 183 -3.59063205 2.39628931 184 -0.11605640 -3.59063205 185 2.76839135 -0.11605640 186 -0.91155313 2.76839135 187 -4.04780491 -0.91155313 188 -2.29731915 -4.04780491 189 4.32462040 -2.29731915 190 3.11317801 4.32462040 191 4.28042262 3.11317801 192 1.33431427 4.28042262 193 2.72107006 1.33431427 194 -0.64574902 2.72107006 195 2.88095989 -0.64574902 196 -2.72729626 2.88095989 197 3.33646004 -2.72729626 198 0.13810472 3.33646004 199 1.28108462 0.13810472 200 -2.26570057 1.28108462 201 0.55283917 -2.26570057 202 -2.14852847 0.55283917 203 -1.52688023 -2.14852847 204 0.93698624 -1.52688023 205 2.14802867 0.93698624 206 2.63996177 2.14802867 207 1.44229852 2.63996177 208 -0.98366593 1.44229852 209 -0.75814055 -0.98366593 210 -0.40989866 -0.75814055 211 7.48326019 -0.40989866 212 6.08742520 7.48326019 213 0.33482562 6.08742520 214 0.59515336 0.33482562 215 -6.11092759 0.59515336 216 1.24853576 -6.11092759 217 -1.63999764 1.24853576 218 1.13283274 -1.63999764 219 4.19212227 1.13283274 220 -0.99907385 4.19212227 221 0.71082538 -0.99907385 222 -1.41382570 0.71082538 223 0.03925730 -1.41382570 224 2.81239455 0.03925730 225 4.47055847 2.81239455 226 -0.47668106 4.47055847 227 1.03627261 -0.47668106 228 0.09479639 1.03627261 229 1.90746696 0.09479639 230 -2.94756074 1.90746696 231 5.51103286 -2.94756074 232 1.47486915 5.51103286 233 -4.46113687 1.47486915 234 -1.48888781 -4.46113687 235 -2.91949411 -1.48888781 236 -2.98680236 -2.91949411 237 -7.48202789 -2.98680236 238 -0.86006745 -7.48202789 239 -3.83158091 -0.86006745 240 1.91383641 -3.83158091 241 1.32174701 1.91383641 242 -1.65534531 1.32174701 243 -0.31353322 -1.65534531 244 -3.97861391 -0.31353322 245 4.07805899 -3.97861391 246 2.40781945 4.07805899 247 -1.79876346 2.40781945 248 -5.73990662 -1.79876346 249 -7.74104802 -5.73990662 250 2.39352448 -7.74104802 251 -0.25471016 2.39352448 252 0.38726816 -0.25471016 253 -1.25749132 0.38726816 254 -1.50688228 -1.25749132 255 -0.63434300 -1.50688228 256 2.64417573 -0.63434300 257 0.06192520 2.64417573 258 -0.84663996 0.06192520 259 -1.69216656 -0.84663996 260 -0.91113412 -1.69216656 261 4.54546800 -0.91113412 262 0.88495924 4.54546800 263 0.63208017 0.88495924 > 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/7msvl1383469553.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/871zl1383469553.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/9687n1383469553.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/10lkwu1383469553.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/11iu7s1383469553.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/12pe2z1383469553.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/13sjgg1383469553.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/14zb371383469553.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/15nio81383469553.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/16szh01383469553.tab") + } > > try(system("convert tmp/10tbo1383469553.ps tmp/10tbo1383469553.png",intern=TRUE)) character(0) > try(system("convert tmp/2fh7w1383469553.ps tmp/2fh7w1383469553.png",intern=TRUE)) character(0) > try(system("convert tmp/32af91383469553.ps tmp/32af91383469553.png",intern=TRUE)) character(0) > try(system("convert tmp/4o81v1383469553.ps tmp/4o81v1383469553.png",intern=TRUE)) character(0) > try(system("convert tmp/5jrxf1383469553.ps tmp/5jrxf1383469553.png",intern=TRUE)) character(0) > try(system("convert tmp/6aa681383469553.ps tmp/6aa681383469553.png",intern=TRUE)) character(0) > try(system("convert tmp/7msvl1383469553.ps tmp/7msvl1383469553.png",intern=TRUE)) character(0) > try(system("convert tmp/871zl1383469553.ps tmp/871zl1383469553.png",intern=TRUE)) character(0) > try(system("convert tmp/9687n1383469553.ps tmp/9687n1383469553.png",intern=TRUE)) character(0) > try(system("convert tmp/10lkwu1383469553.ps tmp/10lkwu1383469553.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 9.819 1.571 11.403