R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(41 + ,38 + ,13 + ,12 + ,14 + ,12 + ,53 + ,32 + ,39 + ,32 + ,16 + ,11 + ,18 + ,11 + ,86 + ,51 + ,30 + ,35 + ,19 + ,15 + ,11 + ,14 + ,66 + ,42 + ,31 + ,33 + ,15 + ,6 + ,12 + ,12 + ,67 + ,41 + ,34 + ,37 + ,14 + ,13 + ,16 + ,21 + ,76 + ,46 + ,35 + ,29 + ,13 + ,10 + ,18 + ,12 + ,78 + ,47 + ,39 + ,31 + ,19 + ,12 + ,14 + ,22 + ,53 + ,37 + ,34 + ,36 + ,15 + ,14 + ,14 + ,11 + ,80 + ,49 + ,36 + ,35 + ,14 + ,12 + ,15 + ,10 + ,74 + ,45 + ,37 + ,38 + ,15 + ,6 + ,15 + ,13 + ,76 + ,47 + ,38 + ,31 + ,16 + ,10 + ,17 + ,10 + ,79 + ,49 + ,36 + ,34 + ,16 + ,12 + ,19 + ,8 + ,54 + ,33 + ,38 + ,35 + ,16 + ,12 + ,10 + ,15 + ,67 + ,42 + ,39 + ,38 + ,16 + ,11 + ,16 + ,14 + ,54 + ,33 + ,33 + ,37 + ,17 + ,15 + ,18 + ,10 + ,87 + ,53 + ,32 + ,33 + ,15 + ,12 + ,14 + ,14 + ,58 + ,36 + ,36 + ,32 + ,15 + ,10 + ,14 + ,14 + ,75 + ,45 + ,38 + ,38 + ,20 + ,12 + ,17 + ,11 + ,88 + ,54 + ,39 + ,38 + ,18 + ,11 + ,14 + ,10 + ,64 + ,41 + ,32 + ,32 + ,16 + ,12 + ,16 + ,13 + ,57 + ,36 + ,32 + ,33 + ,16 + ,11 + ,18 + ,7 + ,66 + ,41 + ,31 + ,31 + ,16 + ,12 + ,11 + ,14 + ,68 + ,44 + ,39 + ,38 + ,19 + ,13 + ,14 + ,12 + ,54 + ,33 + ,37 + ,39 + ,16 + ,11 + ,12 + ,14 + ,56 + ,37 + ,39 + ,32 + ,17 + ,9 + ,17 + ,11 + ,86 + ,52 + ,41 + ,32 + ,17 + ,13 + ,9 + ,9 + ,80 + ,47 + ,36 + ,35 + ,16 + ,10 + ,16 + ,11 + ,76 + ,43 + ,33 + ,37 + ,15 + ,14 + ,14 + ,15 + ,69 + ,44 + ,33 + ,33 + ,16 + ,12 + ,15 + ,14 + ,78 + ,45 + ,34 + ,33 + ,14 + ,10 + ,11 + ,13 + ,67 + ,44 + ,31 + ,28 + ,15 + ,12 + ,16 + ,9 + ,80 + ,49 + ,27 + ,32 + ,12 + ,8 + ,13 + ,15 + ,54 + ,33 + ,37 + ,31 + ,14 + ,10 + ,17 + ,10 + ,71 + ,43 + ,34 + ,37 + ,16 + ,12 + ,15 + ,11 + ,84 + ,54 + ,34 + ,30 + ,14 + ,12 + ,14 + ,13 + ,74 + ,42 + ,32 + ,33 + ,7 + ,7 + ,16 + ,8 + ,71 + ,44 + ,29 + ,31 + ,10 + ,6 + ,9 + ,20 + ,63 + ,37 + ,36 + ,33 + ,14 + ,12 + ,15 + ,12 + ,71 + ,43 + ,29 + ,31 + ,16 + ,10 + ,17 + ,10 + ,76 + ,46 + ,35 + ,33 + ,16 + ,10 + ,13 + ,10 + ,69 + ,42 + ,37 + ,32 + ,16 + ,10 + ,15 + ,9 + ,74 + ,45 + ,34 + ,33 + ,14 + ,12 + ,16 + ,14 + ,75 + ,44 + ,38 + ,32 + ,20 + ,15 + ,16 + ,8 + ,54 + ,33 + ,35 + ,33 + ,14 + ,10 + ,12 + ,14 + ,52 + ,31 + ,38 + ,28 + ,14 + ,10 + ,12 + ,11 + ,69 + ,42 + ,37 + ,35 + ,11 + ,12 + ,11 + ,13 + ,68 + ,40 + ,38 + ,39 + ,14 + ,13 + ,15 + ,9 + ,65 + ,43 + ,33 + ,34 + ,15 + ,11 + ,15 + ,11 + ,75 + ,46 + ,36 + ,38 + ,16 + ,11 + ,17 + ,15 + ,74 + ,42 + ,38 + ,32 + ,14 + ,12 + ,13 + ,11 + ,75 + ,45 + ,32 + ,38 + ,16 + ,14 + ,16 + ,10 + ,72 + ,44 + ,32 + ,30 + ,14 + ,10 + ,14 + ,14 + ,67 + ,40 + ,32 + ,33 + ,12 + ,12 + ,11 + ,18 + ,63 + ,37 + ,34 + ,38 + ,16 + ,13 + ,12 + ,14 + ,62 + ,46 + ,32 + ,32 + ,9 + ,5 + ,12 + ,11 + ,63 + ,36 + ,37 + ,32 + ,14 + ,6 + ,15 + ,12 + ,76 + ,47 + ,39 + ,34 + ,16 + ,12 + ,16 + ,13 + ,74 + ,45 + ,29 + ,34 + ,16 + ,12 + ,15 + ,9 + ,67 + ,42 + ,37 + ,36 + ,15 + ,11 + ,12 + ,10 + ,73 + ,43 + ,35 + ,34 + ,16 + ,10 + ,12 + ,15 + ,70 + ,43 + ,30 + ,28 + ,12 + ,7 + ,8 + ,20 + ,53 + ,32 + ,38 + ,34 + ,16 + ,12 + ,13 + ,12 + ,77 + ,45 + ,34 + ,35 + ,16 + ,14 + ,11 + ,12 + ,77 + ,45 + ,31 + ,35 + ,14 + ,11 + ,14 + ,14 + ,52 + ,31 + ,34 + ,31 + ,16 + ,12 + ,15 + ,13 + ,54 + ,33 + ,35 + ,37 + ,17 + ,13 + ,10 + ,11 + ,80 + ,49 + ,36 + ,35 + ,18 + ,14 + ,11 + ,17 + ,66 + ,42 + ,30 + ,27 + ,18 + ,11 + ,12 + ,12 + ,73 + ,41 + ,39 + ,40 + ,12 + ,12 + ,15 + ,13 + ,63 + ,38 + ,35 + ,37 + ,16 + ,12 + ,15 + ,14 + ,69 + ,42 + ,38 + ,36 + ,10 + ,8 + ,14 + ,13 + ,67 + ,44 + ,31 + ,38 + ,14 + ,11 + ,16 + ,15 + ,54 + ,33 + ,34 + ,39 + ,18 + ,14 + ,15 + ,13 + ,81 + ,48 + ,38 + ,41 + ,18 + ,14 + ,15 + ,10 + ,69 + ,40 + ,34 + ,27 + ,16 + ,12 + ,13 + ,11 + ,84 + ,50 + ,39 + ,30 + ,17 + ,9 + ,12 + ,19 + ,80 + ,49 + ,37 + ,37 + ,16 + ,13 + ,17 + ,13 + ,70 + ,43 + ,34 + ,31 + ,16 + ,11 + ,13 + ,17 + ,69 + ,44 + ,28 + ,31 + ,13 + ,12 + ,15 + ,13 + ,77 + ,47 + ,37 + ,27 + ,16 + ,12 + ,13 + ,9 + ,54 + ,33 + ,33 + ,36 + ,16 + ,12 + ,15 + ,11 + ,79 + ,46 + ,37 + ,38 + ,20 + ,12 + ,16 + ,10 + ,30 + ,0 + ,35 + ,37 + ,16 + ,12 + ,15 + ,9 + ,71 + ,45 + ,37 + ,33 + ,15 + ,12 + ,16 + ,12 + ,73 + ,43 + ,32 + ,34 + ,15 + ,11 + ,15 + ,12 + ,72 + ,44 + ,33 + ,31 + ,16 + ,10 + ,14 + ,13 + ,77 + ,47 + ,38 + ,39 + ,14 + ,9 + ,15 + ,13 + ,75 + ,45 + ,33 + ,34 + ,16 + ,12 + ,14 + ,12 + ,69 + ,42 + ,29 + ,32 + ,16 + ,12 + ,13 + ,15 + ,54 + ,33 + ,33 + ,33 + ,15 + ,12 + ,7 + ,22 + ,70 + ,43 + ,31 + ,36 + ,12 + ,9 + ,17 + ,13 + ,73 + ,46 + ,36 + ,32 + ,17 + ,15 + ,13 + ,15 + ,54 + ,33 + ,35 + ,41 + ,16 + ,12 + ,15 + ,13 + ,77 + ,46 + ,32 + ,28 + ,15 + ,12 + ,14 + ,15 + ,82 + ,48 + ,29 + ,30 + ,13 + ,12 + ,13 + ,10 + ,80 + ,47 + ,39 + ,36 + ,16 + ,10 + ,16 + ,11 + ,80 + ,47 + ,37 + ,35 + ,16 + ,13 + ,12 + ,16 + ,69 + ,43 + ,35 + ,31 + ,16 + ,9 + ,14 + ,11 + ,78 + ,46 + ,37 + ,34 + ,16 + ,12 + ,17 + ,11 + ,81 + ,48 + ,32 + ,36 + ,14 + ,10 + ,15 + ,10 + ,76 + ,46 + ,38 + ,36 + ,16 + ,14 + ,17 + ,10 + ,76 + ,45 + ,37 + ,35 + ,16 + ,11 + ,12 + ,16 + ,73 + ,45 + ,36 + ,37 + ,20 + ,15 + ,16 + ,12 + ,85 + ,52 + ,32 + ,28 + ,15 + ,11 + ,11 + ,11 + ,66 + ,42 + ,33 + ,39 + ,16 + ,11 + ,15 + ,16 + ,79 + ,47 + ,40 + ,32 + ,13 + ,12 + ,9 + ,19 + ,68 + ,41 + ,38 + ,35 + ,17 + ,12 + ,16 + ,11 + ,76 + ,47 + ,41 + ,39 + ,16 + ,12 + ,15 + ,16 + ,71 + ,43 + ,36 + ,35 + ,16 + ,11 + ,10 + ,15 + ,54 + ,33 + ,43 + ,42 + ,12 + ,7 + ,10 + ,24 + ,46 + ,30 + ,30 + ,34 + ,16 + ,12 + ,15 + ,14 + ,82 + ,49 + ,31 + ,33 + ,16 + ,14 + ,11 + ,15 + ,74 + ,44 + ,32 + ,41 + ,17 + ,11 + ,13 + ,11 + ,88 + ,55 + ,32 + ,33 + ,13 + ,11 + ,14 + ,15 + ,38 + ,11 + ,37 + ,34 + ,12 + ,10 + ,18 + ,12 + ,76 + ,47 + ,37 + ,32 + ,18 + ,13 + ,16 + ,10 + ,86 + ,53 + ,33 + ,40 + ,14 + ,13 + ,14 + ,14 + ,54 + ,33 + ,34 + ,40 + ,14 + ,8 + ,14 + ,13 + ,70 + ,44 + ,33 + ,35 + ,13 + ,11 + ,14 + ,9 + ,69 + ,42 + ,38 + ,36 + ,16 + ,12 + ,14 + ,15 + ,90 + ,55 + ,33 + ,37 + ,13 + ,11 + ,12 + ,15 + ,54 + ,33 + ,31 + ,27 + ,16 + ,13 + ,14 + ,14 + ,76 + ,46 + ,38 + ,39 + ,13 + ,12 + ,15 + ,11 + ,89 + ,54 + ,37 + ,38 + ,16 + ,14 + ,15 + ,8 + ,76 + ,47 + ,33 + ,31 + ,15 + ,13 + ,15 + ,11 + ,73 + ,45 + ,31 + ,33 + ,16 + ,15 + ,13 + ,11 + ,79 + ,47 + ,39 + ,32 + ,15 + ,10 + ,17 + ,8 + ,90 + ,55 + ,44 + ,39 + ,17 + ,11 + ,17 + ,10 + ,74 + ,44 + ,33 + ,36 + ,15 + ,9 + ,19 + ,11 + ,81 + ,53 + ,35 + ,33 + ,12 + ,11 + ,15 + ,13 + ,72 + ,44 + ,32 + ,33 + ,16 + ,10 + ,13 + ,11 + ,71 + ,42 + ,28 + ,32 + ,10 + ,11 + ,9 + ,20 + ,66 + ,40 + ,40 + ,37 + ,16 + ,8 + ,15 + ,10 + ,77 + ,46 + ,27 + ,30 + ,12 + ,11 + ,15 + ,15 + ,65 + ,40 + ,37 + ,38 + ,14 + ,12 + ,15 + ,12 + ,74 + ,46 + ,32 + ,29 + ,15 + ,12 + ,16 + ,14 + ,82 + ,53 + ,28 + ,22 + ,13 + ,9 + ,11 + ,23 + ,54 + ,33 + ,34 + ,35 + ,15 + ,11 + ,14 + ,14 + ,63 + ,42 + ,30 + ,35 + ,11 + ,10 + ,11 + ,16 + ,54 + ,35 + ,35 + ,34 + ,12 + ,8 + ,15 + ,11 + ,64 + ,40 + ,31 + ,35 + ,8 + ,9 + ,13 + ,12 + ,69 + ,41 + ,32 + ,34 + ,16 + ,8 + ,15 + ,10 + ,54 + ,33 + ,30 + ,34 + ,15 + ,9 + ,16 + ,14 + ,84 + ,51 + ,30 + ,35 + ,17 + ,15 + ,14 + ,12 + ,86 + ,53 + ,31 + ,23 + ,16 + ,11 + ,15 + ,12 + ,77 + ,46 + ,40 + ,31 + ,10 + ,8 + ,16 + ,11 + ,89 + ,55 + ,32 + ,27 + ,18 + ,13 + ,16 + ,12 + ,76 + ,47 + ,36 + ,36 + ,13 + ,12 + ,11 + ,13 + ,60 + ,38 + ,32 + ,31 + ,16 + ,12 + ,12 + ,11 + ,75 + ,46 + ,35 + ,32 + ,13 + ,9 + ,9 + ,19 + ,73 + ,46 + ,38 + ,39 + ,10 + ,7 + ,16 + ,12 + ,85 + ,53 + ,42 + ,37 + ,15 + ,13 + ,13 + ,17 + ,79 + ,47 + ,34 + ,38 + ,16 + ,9 + ,16 + ,9 + ,71 + ,41 + ,35 + ,39 + ,16 + ,6 + ,12 + ,12 + ,72 + ,44 + ,35 + ,34 + ,14 + ,8 + ,9 + ,19 + ,69 + ,43 + ,33 + ,31 + ,10 + ,8 + ,13 + ,18 + ,78 + ,51 + ,36 + ,32 + ,17 + ,15 + ,13 + ,15 + ,54 + ,33 + ,32 + ,37 + ,13 + ,6 + ,14 + ,14 + ,69 + ,43 + ,33 + ,36 + ,15 + ,9 + ,19 + ,11 + ,81 + ,53 + ,34 + ,32 + ,16 + ,11 + ,13 + ,9 + ,84 + ,51 + ,32 + ,35 + ,12 + ,8 + ,12 + ,18 + ,84 + ,50 + ,34 + ,36 + ,13 + ,8 + ,13 + ,16 + ,69 + ,46) + ,dim=c(8 + ,162) + ,dimnames=list(c('Connected' + ,'Separate' + ,'Learning' + ,'Software' + ,'Happiness' + ,'Depression' + ,'Belonging' + ,'Belonging_Final') + ,1:162)) > y <- array(NA,dim=c(8,162),dimnames=list(c('Connected','Separate','Learning','Software','Happiness','Depression','Belonging','Belonging_Final'),1:162)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Linear Trend' > par2 = 'Include Monthly Dummies' > par1 = '3' > par3 <- 'Linear Trend' > par2 <- 'Include Monthly Dummies' > par1 <- '3' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Learning Connected Separate Software Happiness Depression Belonging 1 13 41 38 12 14 12 53 2 16 39 32 11 18 11 86 3 19 30 35 15 11 14 66 4 15 31 33 6 12 12 67 5 14 34 37 13 16 21 76 6 13 35 29 10 18 12 78 7 19 39 31 12 14 22 53 8 15 34 36 14 14 11 80 9 14 36 35 12 15 10 74 10 15 37 38 6 15 13 76 11 16 38 31 10 17 10 79 12 16 36 34 12 19 8 54 13 16 38 35 12 10 15 67 14 16 39 38 11 16 14 54 15 17 33 37 15 18 10 87 16 15 32 33 12 14 14 58 17 15 36 32 10 14 14 75 18 20 38 38 12 17 11 88 19 18 39 38 11 14 10 64 20 16 32 32 12 16 13 57 21 16 32 33 11 18 7 66 22 16 31 31 12 11 14 68 23 19 39 38 13 14 12 54 24 16 37 39 11 12 14 56 25 17 39 32 9 17 11 86 26 17 41 32 13 9 9 80 27 16 36 35 10 16 11 76 28 15 33 37 14 14 15 69 29 16 33 33 12 15 14 78 30 14 34 33 10 11 13 67 31 15 31 28 12 16 9 80 32 12 27 32 8 13 15 54 33 14 37 31 10 17 10 71 34 16 34 37 12 15 11 84 35 14 34 30 12 14 13 74 36 7 32 33 7 16 8 71 37 10 29 31 6 9 20 63 38 14 36 33 12 15 12 71 39 16 29 31 10 17 10 76 40 16 35 33 10 13 10 69 41 16 37 32 10 15 9 74 42 14 34 33 12 16 14 75 43 20 38 32 15 16 8 54 44 14 35 33 10 12 14 52 45 14 38 28 10 12 11 69 46 11 37 35 12 11 13 68 47 14 38 39 13 15 9 65 48 15 33 34 11 15 11 75 49 16 36 38 11 17 15 74 50 14 38 32 12 13 11 75 51 16 32 38 14 16 10 72 52 14 32 30 10 14 14 67 53 12 32 33 12 11 18 63 54 16 34 38 13 12 14 62 55 9 32 32 5 12 11 63 56 14 37 32 6 15 12 76 57 16 39 34 12 16 13 74 58 16 29 34 12 15 9 67 59 15 37 36 11 12 10 73 60 16 35 34 10 12 15 70 61 12 30 28 7 8 20 53 62 16 38 34 12 13 12 77 63 16 34 35 14 11 12 77 64 14 31 35 11 14 14 52 65 16 34 31 12 15 13 54 66 17 35 37 13 10 11 80 67 18 36 35 14 11 17 66 68 18 30 27 11 12 12 73 69 12 39 40 12 15 13 63 70 16 35 37 12 15 14 69 71 10 38 36 8 14 13 67 72 14 31 38 11 16 15 54 73 18 34 39 14 15 13 81 74 18 38 41 14 15 10 69 75 16 34 27 12 13 11 84 76 17 39 30 9 12 19 80 77 16 37 37 13 17 13 70 78 16 34 31 11 13 17 69 79 13 28 31 12 15 13 77 80 16 37 27 12 13 9 54 81 16 33 36 12 15 11 79 82 20 37 38 12 16 10 30 83 16 35 37 12 15 9 71 84 15 37 33 12 16 12 73 85 15 32 34 11 15 12 72 86 16 33 31 10 14 13 77 87 14 38 39 9 15 13 75 88 16 33 34 12 14 12 69 89 16 29 32 12 13 15 54 90 15 33 33 12 7 22 70 91 12 31 36 9 17 13 73 92 17 36 32 15 13 15 54 93 16 35 41 12 15 13 77 94 15 32 28 12 14 15 82 95 13 29 30 12 13 10 80 96 16 39 36 10 16 11 80 97 16 37 35 13 12 16 69 98 16 35 31 9 14 11 78 99 16 37 34 12 17 11 81 100 14 32 36 10 15 10 76 101 16 38 36 14 17 10 76 102 16 37 35 11 12 16 73 103 20 36 37 15 16 12 85 104 15 32 28 11 11 11 66 105 16 33 39 11 15 16 79 106 13 40 32 12 9 19 68 107 17 38 35 12 16 11 76 108 16 41 39 12 15 16 71 109 16 36 35 11 10 15 54 110 12 43 42 7 10 24 46 111 16 30 34 12 15 14 82 112 16 31 33 14 11 15 74 113 17 32 41 11 13 11 88 114 13 32 33 11 14 15 38 115 12 37 34 10 18 12 76 116 18 37 32 13 16 10 86 117 14 33 40 13 14 14 54 118 14 34 40 8 14 13 70 119 13 33 35 11 14 9 69 120 16 38 36 12 14 15 90 121 13 33 37 11 12 15 54 122 16 31 27 13 14 14 76 123 13 38 39 12 15 11 89 124 16 37 38 14 15 8 76 125 15 33 31 13 15 11 73 126 16 31 33 15 13 11 79 127 15 39 32 10 17 8 90 128 17 44 39 11 17 10 74 129 15 33 36 9 19 11 81 130 12 35 33 11 15 13 72 131 16 32 33 10 13 11 71 132 10 28 32 11 9 20 66 133 16 40 37 8 15 10 77 134 12 27 30 11 15 15 65 135 14 37 38 12 15 12 74 136 15 32 29 12 16 14 82 137 13 28 22 9 11 23 54 138 15 34 35 11 14 14 63 139 11 30 35 10 11 16 54 140 12 35 34 8 15 11 64 141 8 31 35 9 13 12 69 142 16 32 34 8 15 10 54 143 15 30 34 9 16 14 84 144 17 30 35 15 14 12 86 145 16 31 23 11 15 12 77 146 10 40 31 8 16 11 89 147 18 32 27 13 16 12 76 148 13 36 36 12 11 13 60 149 16 32 31 12 12 11 75 150 13 35 32 9 9 19 73 151 10 38 39 7 16 12 85 152 15 42 37 13 13 17 79 153 16 34 38 9 16 9 71 154 16 35 39 6 12 12 72 155 14 35 34 8 9 19 69 156 10 33 31 8 13 18 78 157 17 36 32 15 13 15 54 158 13 32 37 6 14 14 69 159 15 33 36 9 19 11 81 160 16 34 32 11 13 9 84 161 12 32 35 8 12 18 84 162 13 34 36 8 13 16 69 Belonging_Final M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 32 1 0 0 0 0 0 0 0 0 0 0 1 2 51 0 1 0 0 0 0 0 0 0 0 0 2 3 42 0 0 1 0 0 0 0 0 0 0 0 3 4 41 0 0 0 1 0 0 0 0 0 0 0 4 5 46 0 0 0 0 1 0 0 0 0 0 0 5 6 47 0 0 0 0 0 1 0 0 0 0 0 6 7 37 0 0 0 0 0 0 1 0 0 0 0 7 8 49 0 0 0 0 0 0 0 1 0 0 0 8 9 45 0 0 0 0 0 0 0 0 1 0 0 9 10 47 0 0 0 0 0 0 0 0 0 1 0 10 11 49 0 0 0 0 0 0 0 0 0 0 1 11 12 33 0 0 0 0 0 0 0 0 0 0 0 12 13 42 1 0 0 0 0 0 0 0 0 0 0 13 14 33 0 1 0 0 0 0 0 0 0 0 0 14 15 53 0 0 1 0 0 0 0 0 0 0 0 15 16 36 0 0 0 1 0 0 0 0 0 0 0 16 17 45 0 0 0 0 1 0 0 0 0 0 0 17 18 54 0 0 0 0 0 1 0 0 0 0 0 18 19 41 0 0 0 0 0 0 1 0 0 0 0 19 20 36 0 0 0 0 0 0 0 1 0 0 0 20 21 41 0 0 0 0 0 0 0 0 1 0 0 21 22 44 0 0 0 0 0 0 0 0 0 1 0 22 23 33 0 0 0 0 0 0 0 0 0 0 1 23 24 37 0 0 0 0 0 0 0 0 0 0 0 24 25 52 1 0 0 0 0 0 0 0 0 0 0 25 26 47 0 1 0 0 0 0 0 0 0 0 0 26 27 43 0 0 1 0 0 0 0 0 0 0 0 27 28 44 0 0 0 1 0 0 0 0 0 0 0 28 29 45 0 0 0 0 1 0 0 0 0 0 0 29 30 44 0 0 0 0 0 1 0 0 0 0 0 30 31 49 0 0 0 0 0 0 1 0 0 0 0 31 32 33 0 0 0 0 0 0 0 1 0 0 0 32 33 43 0 0 0 0 0 0 0 0 1 0 0 33 34 54 0 0 0 0 0 0 0 0 0 1 0 34 35 42 0 0 0 0 0 0 0 0 0 0 1 35 36 44 0 0 0 0 0 0 0 0 0 0 0 36 37 37 1 0 0 0 0 0 0 0 0 0 0 37 38 43 0 1 0 0 0 0 0 0 0 0 0 38 39 46 0 0 1 0 0 0 0 0 0 0 0 39 40 42 0 0 0 1 0 0 0 0 0 0 0 40 41 45 0 0 0 0 1 0 0 0 0 0 0 41 42 44 0 0 0 0 0 1 0 0 0 0 0 42 43 33 0 0 0 0 0 0 1 0 0 0 0 43 44 31 0 0 0 0 0 0 0 1 0 0 0 44 45 42 0 0 0 0 0 0 0 0 1 0 0 45 46 40 0 0 0 0 0 0 0 0 0 1 0 46 47 43 0 0 0 0 0 0 0 0 0 0 1 47 48 46 0 0 0 0 0 0 0 0 0 0 0 48 49 42 1 0 0 0 0 0 0 0 0 0 0 49 50 45 0 1 0 0 0 0 0 0 0 0 0 50 51 44 0 0 1 0 0 0 0 0 0 0 0 51 52 40 0 0 0 1 0 0 0 0 0 0 0 52 53 37 0 0 0 0 1 0 0 0 0 0 0 53 54 46 0 0 0 0 0 1 0 0 0 0 0 54 55 36 0 0 0 0 0 0 1 0 0 0 0 55 56 47 0 0 0 0 0 0 0 1 0 0 0 56 57 45 0 0 0 0 0 0 0 0 1 0 0 57 58 42 0 0 0 0 0 0 0 0 0 1 0 58 59 43 0 0 0 0 0 0 0 0 0 0 1 59 60 43 0 0 0 0 0 0 0 0 0 0 0 60 61 32 1 0 0 0 0 0 0 0 0 0 0 61 62 45 0 1 0 0 0 0 0 0 0 0 0 62 63 45 0 0 1 0 0 0 0 0 0 0 0 63 64 31 0 0 0 1 0 0 0 0 0 0 0 64 65 33 0 0 0 0 1 0 0 0 0 0 0 65 66 49 0 0 0 0 0 1 0 0 0 0 0 66 67 42 0 0 0 0 0 0 1 0 0 0 0 67 68 41 0 0 0 0 0 0 0 1 0 0 0 68 69 38 0 0 0 0 0 0 0 0 1 0 0 69 70 42 0 0 0 0 0 0 0 0 0 1 0 70 71 44 0 0 0 0 0 0 0 0 0 0 1 71 72 33 0 0 0 0 0 0 0 0 0 0 0 72 73 48 1 0 0 0 0 0 0 0 0 0 0 73 74 40 0 1 0 0 0 0 0 0 0 0 0 74 75 50 0 0 1 0 0 0 0 0 0 0 0 75 76 49 0 0 0 1 0 0 0 0 0 0 0 76 77 43 0 0 0 0 1 0 0 0 0 0 0 77 78 44 0 0 0 0 0 1 0 0 0 0 0 78 79 47 0 0 0 0 0 0 1 0 0 0 0 79 80 33 0 0 0 0 0 0 0 1 0 0 0 80 81 46 0 0 0 0 0 0 0 0 1 0 0 81 82 0 0 0 0 0 0 0 0 0 0 1 0 82 83 45 0 0 0 0 0 0 0 0 0 0 1 83 84 43 0 0 0 0 0 0 0 0 0 0 0 84 85 44 1 0 0 0 0 0 0 0 0 0 0 85 86 47 0 1 0 0 0 0 0 0 0 0 0 86 87 45 0 0 1 0 0 0 0 0 0 0 0 87 88 42 0 0 0 1 0 0 0 0 0 0 0 88 89 33 0 0 0 0 1 0 0 0 0 0 0 89 90 43 0 0 0 0 0 1 0 0 0 0 0 90 91 46 0 0 0 0 0 0 1 0 0 0 0 91 92 33 0 0 0 0 0 0 0 1 0 0 0 92 93 46 0 0 0 0 0 0 0 0 1 0 0 93 94 48 0 0 0 0 0 0 0 0 0 1 0 94 95 47 0 0 0 0 0 0 0 0 0 0 1 95 96 47 0 0 0 0 0 0 0 0 0 0 0 96 97 43 1 0 0 0 0 0 0 0 0 0 0 97 98 46 0 1 0 0 0 0 0 0 0 0 0 98 99 48 0 0 1 0 0 0 0 0 0 0 0 99 100 46 0 0 0 1 0 0 0 0 0 0 0 100 101 45 0 0 0 0 1 0 0 0 0 0 0 101 102 45 0 0 0 0 0 1 0 0 0 0 0 102 103 52 0 0 0 0 0 0 1 0 0 0 0 103 104 42 0 0 0 0 0 0 0 1 0 0 0 104 105 47 0 0 0 0 0 0 0 0 1 0 0 105 106 41 0 0 0 0 0 0 0 0 0 1 0 106 107 47 0 0 0 0 0 0 0 0 0 0 1 107 108 43 0 0 0 0 0 0 0 0 0 0 0 108 109 33 1 0 0 0 0 0 0 0 0 0 0 109 110 30 0 1 0 0 0 0 0 0 0 0 0 110 111 49 0 0 1 0 0 0 0 0 0 0 0 111 112 44 0 0 0 1 0 0 0 0 0 0 0 112 113 55 0 0 0 0 1 0 0 0 0 0 0 113 114 11 0 0 0 0 0 1 0 0 0 0 0 114 115 47 0 0 0 0 0 0 1 0 0 0 0 115 116 53 0 0 0 0 0 0 0 1 0 0 0 116 117 33 0 0 0 0 0 0 0 0 1 0 0 117 118 44 0 0 0 0 0 0 0 0 0 1 0 118 119 42 0 0 0 0 0 0 0 0 0 0 1 119 120 55 0 0 0 0 0 0 0 0 0 0 0 120 121 33 1 0 0 0 0 0 0 0 0 0 0 121 122 46 0 1 0 0 0 0 0 0 0 0 0 122 123 54 0 0 1 0 0 0 0 0 0 0 0 123 124 47 0 0 0 1 0 0 0 0 0 0 0 124 125 45 0 0 0 0 1 0 0 0 0 0 0 125 126 47 0 0 0 0 0 1 0 0 0 0 0 126 127 55 0 0 0 0 0 0 1 0 0 0 0 127 128 44 0 0 0 0 0 0 0 1 0 0 0 128 129 53 0 0 0 0 0 0 0 0 1 0 0 129 130 44 0 0 0 0 0 0 0 0 0 1 0 130 131 42 0 0 0 0 0 0 0 0 0 0 1 131 132 40 0 0 0 0 0 0 0 0 0 0 0 132 133 46 1 0 0 0 0 0 0 0 0 0 0 133 134 40 0 1 0 0 0 0 0 0 0 0 0 134 135 46 0 0 1 0 0 0 0 0 0 0 0 135 136 53 0 0 0 1 0 0 0 0 0 0 0 136 137 33 0 0 0 0 1 0 0 0 0 0 0 137 138 42 0 0 0 0 0 1 0 0 0 0 0 138 139 35 0 0 0 0 0 0 1 0 0 0 0 139 140 40 0 0 0 0 0 0 0 1 0 0 0 140 141 41 0 0 0 0 0 0 0 0 1 0 0 141 142 33 0 0 0 0 0 0 0 0 0 1 0 142 143 51 0 0 0 0 0 0 0 0 0 0 1 143 144 53 0 0 0 0 0 0 0 0 0 0 0 144 145 46 1 0 0 0 0 0 0 0 0 0 0 145 146 55 0 1 0 0 0 0 0 0 0 0 0 146 147 47 0 0 1 0 0 0 0 0 0 0 0 147 148 38 0 0 0 1 0 0 0 0 0 0 0 148 149 46 0 0 0 0 1 0 0 0 0 0 0 149 150 46 0 0 0 0 0 1 0 0 0 0 0 150 151 53 0 0 0 0 0 0 1 0 0 0 0 151 152 47 0 0 0 0 0 0 0 1 0 0 0 152 153 41 0 0 0 0 0 0 0 0 1 0 0 153 154 44 0 0 0 0 0 0 0 0 0 1 0 154 155 43 0 0 0 0 0 0 0 0 0 0 1 155 156 51 0 0 0 0 0 0 0 0 0 0 0 156 157 33 1 0 0 0 0 0 0 0 0 0 0 157 158 43 0 1 0 0 0 0 0 0 0 0 0 158 159 53 0 0 1 0 0 0 0 0 0 0 0 159 160 51 0 0 0 1 0 0 0 0 0 0 0 160 161 50 0 0 0 0 1 0 0 0 0 0 0 161 162 46 0 0 0 0 0 1 0 0 0 0 0 162 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Connected Separate Software 4.275662 0.108355 -0.006354 0.522519 Happiness Depression Belonging Belonging_Final 0.086678 -0.063024 0.036434 -0.045841 M1 M2 M3 M4 1.080967 0.439346 0.893787 0.994745 M5 M6 M7 M8 0.722759 0.987732 0.485424 0.964874 M9 M10 M11 t -0.041603 1.201586 0.498842 -0.004088 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -5.4963 -1.1819 0.1867 1.1023 3.9066 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4.275662 2.805251 1.524 0.1297 Connected 0.108355 0.050373 2.151 0.0332 * Separate -0.006354 0.047723 -0.133 0.8943 Software 0.522519 0.072168 7.240 2.59e-11 *** Happiness 0.086678 0.080633 1.075 0.2842 Depression -0.063024 0.060277 -1.046 0.2975 Belonging 0.036434 0.046771 0.779 0.4373 Belonging_Final -0.045841 0.066661 -0.688 0.4928 M1 1.080967 0.733800 1.473 0.1429 M2 0.439346 0.736031 0.597 0.5515 M3 0.893787 0.739425 1.209 0.2288 M4 0.994745 0.731433 1.360 0.1760 M5 0.722759 0.731102 0.989 0.3245 M6 0.987732 0.731018 1.351 0.1788 M7 0.485424 0.740870 0.655 0.5134 M8 0.964874 0.757147 1.274 0.2046 M9 -0.041603 0.743176 -0.056 0.9554 M10 1.201586 0.747865 1.607 0.1103 M11 0.498842 0.747253 0.668 0.5055 t -0.004088 0.003308 -1.236 0.2186 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.873 on 142 degrees of freedom Multiple R-squared: 0.3921, Adjusted R-squared: 0.3107 F-statistic: 4.82 on 19 and 142 DF, p-value: 1.507e-08 > 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.69730269 0.6053946 0.30269731 [2,] 0.86358914 0.2728217 0.13641086 [3,] 0.82465880 0.3506824 0.17534120 [4,] 0.73532832 0.5293434 0.26467168 [5,] 0.63640575 0.7271885 0.36359425 [6,] 0.64674389 0.7065122 0.35325611 [7,] 0.55840837 0.8831833 0.44159163 [8,] 0.72022265 0.5595547 0.27977735 [9,] 0.77136116 0.4572777 0.22863884 [10,] 0.71999868 0.5600026 0.28000132 [11,] 0.66229181 0.6754164 0.33770819 [12,] 0.60525205 0.7894959 0.39474795 [13,] 0.54248916 0.9150217 0.45751084 [14,] 0.90849051 0.1830190 0.09150949 [15,] 0.88314227 0.2337155 0.11685773 [16,] 0.85945097 0.2810981 0.14054903 [17,] 0.82765158 0.3446968 0.17234842 [18,] 0.78572039 0.4285592 0.21427961 [19,] 0.73499126 0.5300175 0.26500874 [20,] 0.69829260 0.6034148 0.30170740 [21,] 0.70240222 0.5951956 0.29759778 [22,] 0.65070537 0.6985893 0.34929463 [23,] 0.59562851 0.8087430 0.40437149 [24,] 0.79319772 0.4136046 0.20680228 [25,] 0.86821082 0.2635784 0.13178918 [26,] 0.88717448 0.2256510 0.11282552 [27,] 0.89609109 0.2078178 0.10390891 [28,] 0.88180213 0.2363957 0.11819787 [29,] 0.85817954 0.2836409 0.14182046 [30,] 0.82444716 0.3511057 0.17555284 [31,] 0.83180315 0.3363937 0.16819685 [32,] 0.79512536 0.4097493 0.20487464 [33,] 0.82790529 0.3441894 0.17209471 [34,] 0.79136871 0.4172626 0.20863129 [35,] 0.75571962 0.4885608 0.24428038 [36,] 0.76046483 0.4790703 0.23953517 [37,] 0.72736775 0.5452645 0.27263225 [38,] 0.77851770 0.4429646 0.22148230 [39,] 0.74931164 0.5013767 0.25068836 [40,] 0.71860531 0.5627894 0.28139469 [41,] 0.67707980 0.6458404 0.32292020 [42,] 0.63142578 0.7371484 0.36857422 [43,] 0.59229857 0.8154029 0.40770143 [44,] 0.57835547 0.8432891 0.42164453 [45,] 0.60641146 0.7871771 0.39358854 [46,] 0.72590394 0.5481921 0.27409606 [47,] 0.77132513 0.4573497 0.22867487 [48,] 0.73581793 0.5283641 0.26418207 [49,] 0.83830616 0.3233877 0.16169384 [50,] 0.81331639 0.3733672 0.18668361 [51,] 0.79841398 0.4031720 0.20158602 [52,] 0.78649991 0.4270002 0.21350009 [53,] 0.74964751 0.5007050 0.25035249 [54,] 0.76382884 0.4723423 0.23617116 [55,] 0.73130782 0.5373844 0.26869218 [56,] 0.70057424 0.5988515 0.29942576 [57,] 0.68659920 0.6268016 0.31340080 [58,] 0.64545107 0.7090979 0.35454893 [59,] 0.63109288 0.7378142 0.36890712 [60,] 0.71459181 0.5708164 0.28540819 [61,] 0.68475218 0.6304956 0.31524782 [62,] 0.64283244 0.7143351 0.35716756 [63,] 0.61202574 0.7759485 0.38797426 [64,] 0.61470408 0.7705918 0.38529592 [65,] 0.57500945 0.8499811 0.42499055 [66,] 0.52764060 0.9447188 0.47235940 [67,] 0.51053666 0.9789267 0.48946334 [68,] 0.46543123 0.9308625 0.53456877 [69,] 0.43862481 0.8772496 0.56137519 [70,] 0.39750442 0.7950088 0.60249558 [71,] 0.36635494 0.7327099 0.63364506 [72,] 0.32675757 0.6535151 0.67324243 [73,] 0.35335617 0.7067123 0.64664383 [74,] 0.32530680 0.6506136 0.67469320 [75,] 0.28456019 0.5691204 0.71543981 [76,] 0.29972394 0.5994479 0.70027606 [77,] 0.25965270 0.5193054 0.74034730 [78,] 0.22427006 0.4485401 0.77572994 [79,] 0.20913200 0.4182640 0.79086800 [80,] 0.18072323 0.3614465 0.81927677 [81,] 0.27991015 0.5598203 0.72008985 [82,] 0.23979660 0.4795932 0.76020340 [83,] 0.25114492 0.5022898 0.74885508 [84,] 0.26716848 0.5343370 0.73283152 [85,] 0.23217425 0.4643485 0.76782575 [86,] 0.21204046 0.4240809 0.78795954 [87,] 0.19049929 0.3809986 0.80950071 [88,] 0.22069639 0.4413928 0.77930361 [89,] 0.19450527 0.3890105 0.80549473 [90,] 0.17821644 0.3564329 0.82178356 [91,] 0.19796133 0.3959227 0.80203867 [92,] 0.17620150 0.3524030 0.82379850 [93,] 0.17538665 0.3507733 0.82461335 [94,] 0.17375971 0.3475194 0.82624029 [95,] 0.14517748 0.2903550 0.85482252 [96,] 0.11970852 0.2394170 0.88029148 [97,] 0.14248230 0.2849646 0.85751770 [98,] 0.16729035 0.3345807 0.83270965 [99,] 0.13476728 0.2695346 0.86523272 [100,] 0.18464495 0.3692899 0.81535505 [101,] 0.17859335 0.3571867 0.82140665 [102,] 0.14137248 0.2827450 0.85862752 [103,] 0.11532528 0.2306506 0.88467472 [104,] 0.08828815 0.1765763 0.91171185 [105,] 0.08525385 0.1705077 0.91474615 [106,] 0.08382646 0.1676529 0.91617354 [107,] 0.20160585 0.4032117 0.79839415 [108,] 0.29793077 0.5958615 0.70206923 [109,] 0.24329162 0.4865832 0.75670838 [110,] 0.22611093 0.4522219 0.77388907 [111,] 0.31570879 0.6314176 0.68429121 [112,] 0.30358884 0.6071777 0.69641116 [113,] 0.22548927 0.4509785 0.77451073 [114,] 0.32361695 0.6472339 0.67638305 [115,] 0.43935833 0.8787167 0.56064167 [116,] 0.48436476 0.9687295 0.51563524 [117,] 0.45746607 0.9149321 0.54253393 > postscript(file="/var/wessaorg/rcomp/tmp/1r4q71352118659.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/wessaorg/rcomp/tmp/2dsam1352118659.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/wessaorg/rcomp/tmp/3mgqz1352118659.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/wessaorg/rcomp/tmp/46ph61352118659.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/wessaorg/rcomp/tmp/5med11352118659.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 = 162 Frequency = 1 1 2 3 4 5 6 -3.74518964 -0.13947442 2.42629202 2.61603031 -1.94337682 -2.56349568 7 8 9 10 11 12 3.90655848 -2.16720701 -1.44912616 1.56548140 0.64935091 0.22102027 13 14 15 16 17 18 0.09397350 0.65089995 -0.95673018 -0.52698893 0.14752978 3.15283305 19 20 21 22 23 24 2.54889896 0.31293325 1.20216314 0.64875714 2.63045998 1.81139084 25 26 27 28 29 30 1.49047680 0.38617374 0.54589579 -1.57694324 0.28698106 -0.39859622 31 32 33 34 35 36 -0.57387479 -0.64829975 -0.59548950 -0.24945960 -1.56012505 -5.49631887 37 38 39 40 41 42 -1.40469467 -1.68057140 1.31583634 0.99993282 0.77191243 -2.05642271 43 44 45 46 47 48 2.32536970 -0.49993250 -0.15041457 -5.12424099 -2.37485041 0.58234917 49 50 51 52 53 54 0.13763520 -1.79830962 -0.86504152 -0.49840532 -2.72796149 0.41392016 55 56 57 58 59 60 -2.40485952 0.88907485 0.51805630 0.31460452 -0.15988590 2.49399063 61 62 63 64 65 66 0.26529020 0.25360570 -0.62865695 -0.69779708 0.57438607 0.81424651 67 68 69 70 71 72 2.15772582 3.14653667 -3.22819581 -0.02515868 -3.37146611 0.25719306 73 74 75 76 77 78 0.95855429 1.06496543 0.15238282 2.79112769 -0.48392136 1.26825588 79 80 81 82 83 84 -1.67714377 -0.03563866 1.10329527 2.97039463 0.48025513 -0.32109639 85 86 87 88 89 90 -0.15837411 1.98748851 -0.53677842 0.41353586 1.52002276 0.66876434 91 92 93 94 95 96 -1.42728711 -0.03587267 1.16632512 -0.70807908 -1.86489078 1.44064329 97 98 99 100 101 102 -0.11418902 2.13402516 -0.35918906 -0.65571548 -1.33904535 0.99046642 103 104 105 106 107 108 2.81271165 0.40787041 2.10394292 -2.62576828 1.18946514 0.79335551 109 110 111 112 113 114 1.28669655 0.02964933 0.82018280 0.03557178 2.39039396 -1.95117357 115 116 117 118 119 120 -2.72770669 1.17467082 -0.65597003 0.46744229 -1.62404474 1.02989715 121 122 123 124 125 126 -1.49983375 0.81199701 -3.18074635 -1.25696475 -0.86273524 -0.89281062 127 128 129 130 131 132 -0.21685017 0.49272367 1.76836486 -3.36344459 2.18303049 -2.40507152 133 134 135 136 137 138 1.54107210 -1.53934881 -1.78687846 -0.33037994 1.00615125 0.39010442 139 140 141 142 143 144 -1.75445350 -1.52988066 -4.50201256 2.54708301 1.84562457 1.28591181 145 146 147 148 149 150 1.03485235 -3.85059248 2.09782781 -2.18595883 1.09924695 -0.07569416 151 152 153 154 155 156 -2.96908905 -1.50697844 2.71906103 3.58238823 1.97707676 -1.69326495 157 158 159 160 161 162 0.11373020 1.68949189 0.95560335 0.87295512 -0.43958399 0.23960219 > postscript(file="/var/wessaorg/rcomp/tmp/6tm8l1352118659.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 = 162 Frequency = 1 lag(myerror, k = 1) myerror 0 -3.74518964 NA 1 -0.13947442 -3.74518964 2 2.42629202 -0.13947442 3 2.61603031 2.42629202 4 -1.94337682 2.61603031 5 -2.56349568 -1.94337682 6 3.90655848 -2.56349568 7 -2.16720701 3.90655848 8 -1.44912616 -2.16720701 9 1.56548140 -1.44912616 10 0.64935091 1.56548140 11 0.22102027 0.64935091 12 0.09397350 0.22102027 13 0.65089995 0.09397350 14 -0.95673018 0.65089995 15 -0.52698893 -0.95673018 16 0.14752978 -0.52698893 17 3.15283305 0.14752978 18 2.54889896 3.15283305 19 0.31293325 2.54889896 20 1.20216314 0.31293325 21 0.64875714 1.20216314 22 2.63045998 0.64875714 23 1.81139084 2.63045998 24 1.49047680 1.81139084 25 0.38617374 1.49047680 26 0.54589579 0.38617374 27 -1.57694324 0.54589579 28 0.28698106 -1.57694324 29 -0.39859622 0.28698106 30 -0.57387479 -0.39859622 31 -0.64829975 -0.57387479 32 -0.59548950 -0.64829975 33 -0.24945960 -0.59548950 34 -1.56012505 -0.24945960 35 -5.49631887 -1.56012505 36 -1.40469467 -5.49631887 37 -1.68057140 -1.40469467 38 1.31583634 -1.68057140 39 0.99993282 1.31583634 40 0.77191243 0.99993282 41 -2.05642271 0.77191243 42 2.32536970 -2.05642271 43 -0.49993250 2.32536970 44 -0.15041457 -0.49993250 45 -5.12424099 -0.15041457 46 -2.37485041 -5.12424099 47 0.58234917 -2.37485041 48 0.13763520 0.58234917 49 -1.79830962 0.13763520 50 -0.86504152 -1.79830962 51 -0.49840532 -0.86504152 52 -2.72796149 -0.49840532 53 0.41392016 -2.72796149 54 -2.40485952 0.41392016 55 0.88907485 -2.40485952 56 0.51805630 0.88907485 57 0.31460452 0.51805630 58 -0.15988590 0.31460452 59 2.49399063 -0.15988590 60 0.26529020 2.49399063 61 0.25360570 0.26529020 62 -0.62865695 0.25360570 63 -0.69779708 -0.62865695 64 0.57438607 -0.69779708 65 0.81424651 0.57438607 66 2.15772582 0.81424651 67 3.14653667 2.15772582 68 -3.22819581 3.14653667 69 -0.02515868 -3.22819581 70 -3.37146611 -0.02515868 71 0.25719306 -3.37146611 72 0.95855429 0.25719306 73 1.06496543 0.95855429 74 0.15238282 1.06496543 75 2.79112769 0.15238282 76 -0.48392136 2.79112769 77 1.26825588 -0.48392136 78 -1.67714377 1.26825588 79 -0.03563866 -1.67714377 80 1.10329527 -0.03563866 81 2.97039463 1.10329527 82 0.48025513 2.97039463 83 -0.32109639 0.48025513 84 -0.15837411 -0.32109639 85 1.98748851 -0.15837411 86 -0.53677842 1.98748851 87 0.41353586 -0.53677842 88 1.52002276 0.41353586 89 0.66876434 1.52002276 90 -1.42728711 0.66876434 91 -0.03587267 -1.42728711 92 1.16632512 -0.03587267 93 -0.70807908 1.16632512 94 -1.86489078 -0.70807908 95 1.44064329 -1.86489078 96 -0.11418902 1.44064329 97 2.13402516 -0.11418902 98 -0.35918906 2.13402516 99 -0.65571548 -0.35918906 100 -1.33904535 -0.65571548 101 0.99046642 -1.33904535 102 2.81271165 0.99046642 103 0.40787041 2.81271165 104 2.10394292 0.40787041 105 -2.62576828 2.10394292 106 1.18946514 -2.62576828 107 0.79335551 1.18946514 108 1.28669655 0.79335551 109 0.02964933 1.28669655 110 0.82018280 0.02964933 111 0.03557178 0.82018280 112 2.39039396 0.03557178 113 -1.95117357 2.39039396 114 -2.72770669 -1.95117357 115 1.17467082 -2.72770669 116 -0.65597003 1.17467082 117 0.46744229 -0.65597003 118 -1.62404474 0.46744229 119 1.02989715 -1.62404474 120 -1.49983375 1.02989715 121 0.81199701 -1.49983375 122 -3.18074635 0.81199701 123 -1.25696475 -3.18074635 124 -0.86273524 -1.25696475 125 -0.89281062 -0.86273524 126 -0.21685017 -0.89281062 127 0.49272367 -0.21685017 128 1.76836486 0.49272367 129 -3.36344459 1.76836486 130 2.18303049 -3.36344459 131 -2.40507152 2.18303049 132 1.54107210 -2.40507152 133 -1.53934881 1.54107210 134 -1.78687846 -1.53934881 135 -0.33037994 -1.78687846 136 1.00615125 -0.33037994 137 0.39010442 1.00615125 138 -1.75445350 0.39010442 139 -1.52988066 -1.75445350 140 -4.50201256 -1.52988066 141 2.54708301 -4.50201256 142 1.84562457 2.54708301 143 1.28591181 1.84562457 144 1.03485235 1.28591181 145 -3.85059248 1.03485235 146 2.09782781 -3.85059248 147 -2.18595883 2.09782781 148 1.09924695 -2.18595883 149 -0.07569416 1.09924695 150 -2.96908905 -0.07569416 151 -1.50697844 -2.96908905 152 2.71906103 -1.50697844 153 3.58238823 2.71906103 154 1.97707676 3.58238823 155 -1.69326495 1.97707676 156 0.11373020 -1.69326495 157 1.68949189 0.11373020 158 0.95560335 1.68949189 159 0.87295512 0.95560335 160 -0.43958399 0.87295512 161 0.23960219 -0.43958399 162 NA 0.23960219 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.13947442 -3.74518964 [2,] 2.42629202 -0.13947442 [3,] 2.61603031 2.42629202 [4,] -1.94337682 2.61603031 [5,] -2.56349568 -1.94337682 [6,] 3.90655848 -2.56349568 [7,] -2.16720701 3.90655848 [8,] -1.44912616 -2.16720701 [9,] 1.56548140 -1.44912616 [10,] 0.64935091 1.56548140 [11,] 0.22102027 0.64935091 [12,] 0.09397350 0.22102027 [13,] 0.65089995 0.09397350 [14,] -0.95673018 0.65089995 [15,] -0.52698893 -0.95673018 [16,] 0.14752978 -0.52698893 [17,] 3.15283305 0.14752978 [18,] 2.54889896 3.15283305 [19,] 0.31293325 2.54889896 [20,] 1.20216314 0.31293325 [21,] 0.64875714 1.20216314 [22,] 2.63045998 0.64875714 [23,] 1.81139084 2.63045998 [24,] 1.49047680 1.81139084 [25,] 0.38617374 1.49047680 [26,] 0.54589579 0.38617374 [27,] -1.57694324 0.54589579 [28,] 0.28698106 -1.57694324 [29,] -0.39859622 0.28698106 [30,] -0.57387479 -0.39859622 [31,] -0.64829975 -0.57387479 [32,] -0.59548950 -0.64829975 [33,] -0.24945960 -0.59548950 [34,] -1.56012505 -0.24945960 [35,] -5.49631887 -1.56012505 [36,] -1.40469467 -5.49631887 [37,] -1.68057140 -1.40469467 [38,] 1.31583634 -1.68057140 [39,] 0.99993282 1.31583634 [40,] 0.77191243 0.99993282 [41,] -2.05642271 0.77191243 [42,] 2.32536970 -2.05642271 [43,] -0.49993250 2.32536970 [44,] -0.15041457 -0.49993250 [45,] -5.12424099 -0.15041457 [46,] -2.37485041 -5.12424099 [47,] 0.58234917 -2.37485041 [48,] 0.13763520 0.58234917 [49,] -1.79830962 0.13763520 [50,] -0.86504152 -1.79830962 [51,] -0.49840532 -0.86504152 [52,] -2.72796149 -0.49840532 [53,] 0.41392016 -2.72796149 [54,] -2.40485952 0.41392016 [55,] 0.88907485 -2.40485952 [56,] 0.51805630 0.88907485 [57,] 0.31460452 0.51805630 [58,] -0.15988590 0.31460452 [59,] 2.49399063 -0.15988590 [60,] 0.26529020 2.49399063 [61,] 0.25360570 0.26529020 [62,] -0.62865695 0.25360570 [63,] -0.69779708 -0.62865695 [64,] 0.57438607 -0.69779708 [65,] 0.81424651 0.57438607 [66,] 2.15772582 0.81424651 [67,] 3.14653667 2.15772582 [68,] -3.22819581 3.14653667 [69,] -0.02515868 -3.22819581 [70,] -3.37146611 -0.02515868 [71,] 0.25719306 -3.37146611 [72,] 0.95855429 0.25719306 [73,] 1.06496543 0.95855429 [74,] 0.15238282 1.06496543 [75,] 2.79112769 0.15238282 [76,] -0.48392136 2.79112769 [77,] 1.26825588 -0.48392136 [78,] -1.67714377 1.26825588 [79,] -0.03563866 -1.67714377 [80,] 1.10329527 -0.03563866 [81,] 2.97039463 1.10329527 [82,] 0.48025513 2.97039463 [83,] -0.32109639 0.48025513 [84,] -0.15837411 -0.32109639 [85,] 1.98748851 -0.15837411 [86,] -0.53677842 1.98748851 [87,] 0.41353586 -0.53677842 [88,] 1.52002276 0.41353586 [89,] 0.66876434 1.52002276 [90,] -1.42728711 0.66876434 [91,] -0.03587267 -1.42728711 [92,] 1.16632512 -0.03587267 [93,] -0.70807908 1.16632512 [94,] -1.86489078 -0.70807908 [95,] 1.44064329 -1.86489078 [96,] -0.11418902 1.44064329 [97,] 2.13402516 -0.11418902 [98,] -0.35918906 2.13402516 [99,] -0.65571548 -0.35918906 [100,] -1.33904535 -0.65571548 [101,] 0.99046642 -1.33904535 [102,] 2.81271165 0.99046642 [103,] 0.40787041 2.81271165 [104,] 2.10394292 0.40787041 [105,] -2.62576828 2.10394292 [106,] 1.18946514 -2.62576828 [107,] 0.79335551 1.18946514 [108,] 1.28669655 0.79335551 [109,] 0.02964933 1.28669655 [110,] 0.82018280 0.02964933 [111,] 0.03557178 0.82018280 [112,] 2.39039396 0.03557178 [113,] -1.95117357 2.39039396 [114,] -2.72770669 -1.95117357 [115,] 1.17467082 -2.72770669 [116,] -0.65597003 1.17467082 [117,] 0.46744229 -0.65597003 [118,] -1.62404474 0.46744229 [119,] 1.02989715 -1.62404474 [120,] -1.49983375 1.02989715 [121,] 0.81199701 -1.49983375 [122,] -3.18074635 0.81199701 [123,] -1.25696475 -3.18074635 [124,] -0.86273524 -1.25696475 [125,] -0.89281062 -0.86273524 [126,] -0.21685017 -0.89281062 [127,] 0.49272367 -0.21685017 [128,] 1.76836486 0.49272367 [129,] -3.36344459 1.76836486 [130,] 2.18303049 -3.36344459 [131,] -2.40507152 2.18303049 [132,] 1.54107210 -2.40507152 [133,] -1.53934881 1.54107210 [134,] -1.78687846 -1.53934881 [135,] -0.33037994 -1.78687846 [136,] 1.00615125 -0.33037994 [137,] 0.39010442 1.00615125 [138,] -1.75445350 0.39010442 [139,] -1.52988066 -1.75445350 [140,] -4.50201256 -1.52988066 [141,] 2.54708301 -4.50201256 [142,] 1.84562457 2.54708301 [143,] 1.28591181 1.84562457 [144,] 1.03485235 1.28591181 [145,] -3.85059248 1.03485235 [146,] 2.09782781 -3.85059248 [147,] -2.18595883 2.09782781 [148,] 1.09924695 -2.18595883 [149,] -0.07569416 1.09924695 [150,] -2.96908905 -0.07569416 [151,] -1.50697844 -2.96908905 [152,] 2.71906103 -1.50697844 [153,] 3.58238823 2.71906103 [154,] 1.97707676 3.58238823 [155,] -1.69326495 1.97707676 [156,] 0.11373020 -1.69326495 [157,] 1.68949189 0.11373020 [158,] 0.95560335 1.68949189 [159,] 0.87295512 0.95560335 [160,] -0.43958399 0.87295512 [161,] 0.23960219 -0.43958399 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.13947442 -3.74518964 2 2.42629202 -0.13947442 3 2.61603031 2.42629202 4 -1.94337682 2.61603031 5 -2.56349568 -1.94337682 6 3.90655848 -2.56349568 7 -2.16720701 3.90655848 8 -1.44912616 -2.16720701 9 1.56548140 -1.44912616 10 0.64935091 1.56548140 11 0.22102027 0.64935091 12 0.09397350 0.22102027 13 0.65089995 0.09397350 14 -0.95673018 0.65089995 15 -0.52698893 -0.95673018 16 0.14752978 -0.52698893 17 3.15283305 0.14752978 18 2.54889896 3.15283305 19 0.31293325 2.54889896 20 1.20216314 0.31293325 21 0.64875714 1.20216314 22 2.63045998 0.64875714 23 1.81139084 2.63045998 24 1.49047680 1.81139084 25 0.38617374 1.49047680 26 0.54589579 0.38617374 27 -1.57694324 0.54589579 28 0.28698106 -1.57694324 29 -0.39859622 0.28698106 30 -0.57387479 -0.39859622 31 -0.64829975 -0.57387479 32 -0.59548950 -0.64829975 33 -0.24945960 -0.59548950 34 -1.56012505 -0.24945960 35 -5.49631887 -1.56012505 36 -1.40469467 -5.49631887 37 -1.68057140 -1.40469467 38 1.31583634 -1.68057140 39 0.99993282 1.31583634 40 0.77191243 0.99993282 41 -2.05642271 0.77191243 42 2.32536970 -2.05642271 43 -0.49993250 2.32536970 44 -0.15041457 -0.49993250 45 -5.12424099 -0.15041457 46 -2.37485041 -5.12424099 47 0.58234917 -2.37485041 48 0.13763520 0.58234917 49 -1.79830962 0.13763520 50 -0.86504152 -1.79830962 51 -0.49840532 -0.86504152 52 -2.72796149 -0.49840532 53 0.41392016 -2.72796149 54 -2.40485952 0.41392016 55 0.88907485 -2.40485952 56 0.51805630 0.88907485 57 0.31460452 0.51805630 58 -0.15988590 0.31460452 59 2.49399063 -0.15988590 60 0.26529020 2.49399063 61 0.25360570 0.26529020 62 -0.62865695 0.25360570 63 -0.69779708 -0.62865695 64 0.57438607 -0.69779708 65 0.81424651 0.57438607 66 2.15772582 0.81424651 67 3.14653667 2.15772582 68 -3.22819581 3.14653667 69 -0.02515868 -3.22819581 70 -3.37146611 -0.02515868 71 0.25719306 -3.37146611 72 0.95855429 0.25719306 73 1.06496543 0.95855429 74 0.15238282 1.06496543 75 2.79112769 0.15238282 76 -0.48392136 2.79112769 77 1.26825588 -0.48392136 78 -1.67714377 1.26825588 79 -0.03563866 -1.67714377 80 1.10329527 -0.03563866 81 2.97039463 1.10329527 82 0.48025513 2.97039463 83 -0.32109639 0.48025513 84 -0.15837411 -0.32109639 85 1.98748851 -0.15837411 86 -0.53677842 1.98748851 87 0.41353586 -0.53677842 88 1.52002276 0.41353586 89 0.66876434 1.52002276 90 -1.42728711 0.66876434 91 -0.03587267 -1.42728711 92 1.16632512 -0.03587267 93 -0.70807908 1.16632512 94 -1.86489078 -0.70807908 95 1.44064329 -1.86489078 96 -0.11418902 1.44064329 97 2.13402516 -0.11418902 98 -0.35918906 2.13402516 99 -0.65571548 -0.35918906 100 -1.33904535 -0.65571548 101 0.99046642 -1.33904535 102 2.81271165 0.99046642 103 0.40787041 2.81271165 104 2.10394292 0.40787041 105 -2.62576828 2.10394292 106 1.18946514 -2.62576828 107 0.79335551 1.18946514 108 1.28669655 0.79335551 109 0.02964933 1.28669655 110 0.82018280 0.02964933 111 0.03557178 0.82018280 112 2.39039396 0.03557178 113 -1.95117357 2.39039396 114 -2.72770669 -1.95117357 115 1.17467082 -2.72770669 116 -0.65597003 1.17467082 117 0.46744229 -0.65597003 118 -1.62404474 0.46744229 119 1.02989715 -1.62404474 120 -1.49983375 1.02989715 121 0.81199701 -1.49983375 122 -3.18074635 0.81199701 123 -1.25696475 -3.18074635 124 -0.86273524 -1.25696475 125 -0.89281062 -0.86273524 126 -0.21685017 -0.89281062 127 0.49272367 -0.21685017 128 1.76836486 0.49272367 129 -3.36344459 1.76836486 130 2.18303049 -3.36344459 131 -2.40507152 2.18303049 132 1.54107210 -2.40507152 133 -1.53934881 1.54107210 134 -1.78687846 -1.53934881 135 -0.33037994 -1.78687846 136 1.00615125 -0.33037994 137 0.39010442 1.00615125 138 -1.75445350 0.39010442 139 -1.52988066 -1.75445350 140 -4.50201256 -1.52988066 141 2.54708301 -4.50201256 142 1.84562457 2.54708301 143 1.28591181 1.84562457 144 1.03485235 1.28591181 145 -3.85059248 1.03485235 146 2.09782781 -3.85059248 147 -2.18595883 2.09782781 148 1.09924695 -2.18595883 149 -0.07569416 1.09924695 150 -2.96908905 -0.07569416 151 -1.50697844 -2.96908905 152 2.71906103 -1.50697844 153 3.58238823 2.71906103 154 1.97707676 3.58238823 155 -1.69326495 1.97707676 156 0.11373020 -1.69326495 157 1.68949189 0.11373020 158 0.95560335 1.68949189 159 0.87295512 0.95560335 160 -0.43958399 0.87295512 161 0.23960219 -0.43958399 > 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/wessaorg/rcomp/tmp/7p3x21352118659.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/wessaorg/rcomp/tmp/8ipld1352118659.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/wessaorg/rcomp/tmp/997qc1352118659.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/wessaorg/rcomp/tmp/10hwj41352118659.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/113dq81352118660.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/12azig1352118660.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/1376az1352118660.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/14udt71352118660.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/155tgf1352118660.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/16539f1352118660.tab") + } > > try(system("convert tmp/1r4q71352118659.ps tmp/1r4q71352118659.png",intern=TRUE)) character(0) > try(system("convert tmp/2dsam1352118659.ps tmp/2dsam1352118659.png",intern=TRUE)) character(0) > try(system("convert tmp/3mgqz1352118659.ps tmp/3mgqz1352118659.png",intern=TRUE)) character(0) > try(system("convert tmp/46ph61352118659.ps tmp/46ph61352118659.png",intern=TRUE)) character(0) > try(system("convert tmp/5med11352118659.ps tmp/5med11352118659.png",intern=TRUE)) character(0) > try(system("convert tmp/6tm8l1352118659.ps tmp/6tm8l1352118659.png",intern=TRUE)) character(0) > try(system("convert tmp/7p3x21352118659.ps tmp/7p3x21352118659.png",intern=TRUE)) character(0) > try(system("convert tmp/8ipld1352118659.ps tmp/8ipld1352118659.png",intern=TRUE)) character(0) > try(system("convert tmp/997qc1352118659.ps tmp/997qc1352118659.png",intern=TRUE)) character(0) > try(system("convert tmp/10hwj41352118659.ps tmp/10hwj41352118659.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 9.185 0.932 10.114