R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(13 + ,14 + ,13 + ,3 + ,25 + ,55 + ,147 + ,12 + ,8 + ,13 + ,5 + ,158 + ,7 + ,71 + ,10 + ,12 + ,16 + ,6 + ,0 + ,0 + ,0 + ,9 + ,7 + ,12 + ,6 + ,143 + ,10 + ,0 + ,10 + ,10 + ,11 + ,5 + ,67 + ,74 + ,43 + ,12 + ,7 + ,12 + ,3 + ,0 + ,0 + ,0 + ,13 + ,16 + ,18 + ,8 + ,148 + ,138 + ,8 + ,12 + ,11 + ,11 + ,4 + ,28 + ,0 + ,0 + ,12 + ,14 + ,14 + ,4 + ,114 + ,113 + ,34 + ,6 + ,6 + ,9 + ,4 + ,0 + ,0 + ,0 + ,5 + ,16 + ,14 + ,6 + ,123 + ,115 + ,103 + ,12 + ,11 + ,12 + ,6 + ,145 + ,9 + ,0 + ,11 + ,16 + ,11 + ,5 + ,113 + ,114 + ,73 + ,14 + ,12 + ,12 + ,4 + ,152 + ,59 + ,159 + ,14 + ,7 + ,13 + ,6 + ,0 + ,0 + ,0 + ,12 + ,13 + ,11 + ,4 + ,36 + ,114 + ,113 + ,12 + ,11 + ,12 + ,6 + ,0 + ,0 + ,0 + ,11 + ,15 + ,16 + ,6 + ,8 + ,102 + ,44 + ,11 + ,7 + ,9 + ,4 + ,108 + ,0 + ,0 + ,7 + ,9 + ,11 + ,4 + ,112 + ,86 + ,0 + ,9 + ,7 + ,13 + ,2 + ,51 + ,17 + ,41 + ,11 + ,14 + ,15 + ,7 + ,43 + ,45 + ,74 + ,11 + ,15 + ,10 + ,5 + ,120 + ,123 + ,0 + ,12 + ,7 + ,11 + ,4 + ,13 + ,24 + ,0 + ,12 + ,15 + ,13 + ,6 + ,55 + ,5 + ,0 + ,11 + ,17 + ,16 + ,6 + ,103 + ,123 + ,32 + ,11 + ,15 + ,15 + ,7 + ,127 + ,136 + ,126 + ,8 + ,14 + ,14 + ,5 + ,14 + ,4 + ,154 + ,9 + ,14 + ,14 + ,6 + ,135 + ,76 + ,129 + ,12 + ,8 + ,14 + ,4 + ,38 + ,99 + ,98 + ,10 + ,8 + ,8 + ,4 + ,11 + ,98 + ,82 + ,10 + ,14 + ,13 + ,7 + ,43 + ,67 + ,45 + ,12 + ,14 + ,15 + ,7 + ,141 + ,92 + ,8 + ,8 + ,8 + ,13 + ,4 + ,62 + ,13 + ,0 + ,12 + ,11 + ,11 + ,4 + ,62 + ,24 + ,129 + ,11 + ,16 + ,15 + ,6 + ,135 + ,129 + ,31 + ,12 + ,10 + ,15 + ,6 + ,117 + ,117 + ,117 + ,7 + ,8 + ,9 + ,5 + ,82 + ,11 + ,99 + ,11 + ,14 + ,13 + ,6 + ,145 + ,20 + ,55 + ,11 + ,16 + ,16 + ,7 + ,87 + ,91 + ,132 + ,12 + ,13 + ,13 + ,6 + ,76 + ,111 + ,58 + ,9 + ,5 + ,11 + ,3 + ,124 + ,0 + ,0 + ,15 + ,8 + ,12 + ,3 + ,151 + ,58 + ,0 + ,11 + ,10 + ,12 + ,4 + ,131 + ,0 + ,0 + ,11 + ,8 + ,12 + ,6 + ,127 + ,146 + ,101 + ,11 + ,13 + ,14 + ,7 + ,76 + ,129 + ,31 + ,11 + ,15 + ,14 + ,5 + ,25 + ,48 + ,147 + ,15 + ,6 + ,8 + ,4 + ,0 + ,0 + ,0 + ,11 + ,12 + ,13 + ,5 + ,58 + ,111 + ,132 + ,12 + ,16 + ,16 + ,6 + ,115 + ,32 + ,123 + ,12 + ,5 + ,13 + ,6 + ,130 + ,112 + ,39 + ,9 + ,15 + ,11 + ,6 + ,17 + ,51 + ,136 + ,12 + ,12 + ,14 + ,5 + ,102 + ,53 + ,141 + ,12 + ,8 + ,13 + ,4 + ,21 + ,131 + ,0 + ,13 + ,13 + ,13 + ,5 + ,0 + ,0 + ,0 + ,11 + ,14 + ,13 + ,5 + ,14 + ,76 + ,135 + ,9 + ,12 + ,12 + ,4 + ,110 + ,106 + ,118 + ,9 + ,16 + ,16 + ,6 + ,133 + ,26 + ,154 + ,11 + ,10 + ,15 + ,2 + ,83 + ,44 + ,0 + ,11 + ,15 + ,15 + ,8 + ,56 + ,63 + ,116 + ,12 + ,8 + ,12 + ,3 + ,0 + ,0 + ,0 + ,12 + ,16 + ,14 + ,6 + ,44 + ,116 + ,88 + ,9 + ,19 + ,12 + ,6 + ,70 + ,119 + ,25 + ,11 + ,14 + ,15 + ,6 + ,36 + ,18 + ,113 + ,9 + ,6 + ,12 + ,5 + ,5 + ,134 + ,157 + ,12 + ,13 + ,13 + ,5 + ,118 + ,138 + ,26 + ,12 + ,15 + ,12 + ,6 + ,17 + ,41 + ,38 + ,12 + ,7 + ,12 + ,5 + ,79 + ,0 + ,0 + ,12 + ,13 + ,13 + ,6 + ,122 + ,57 + ,53 + ,14 + ,4 + ,5 + ,2 + ,119 + ,101 + ,0 + ,11 + ,14 + ,13 + ,5 + ,36 + ,114 + ,106 + ,12 + ,13 + ,13 + ,5 + ,36 + ,113 + ,106 + ,11 + ,11 + ,14 + ,5 + ,141 + ,122 + ,102 + ,6 + ,14 + ,17 + ,6 + ,0 + ,14 + ,138 + ,10 + ,12 + ,13 + ,6 + ,37 + ,10 + ,142 + ,12 + ,15 + ,13 + ,6 + ,110 + ,27 + ,73 + ,13 + ,14 + ,12 + ,5 + ,10 + ,39 + ,130 + ,8 + ,13 + ,13 + ,5 + ,14 + ,133 + ,86 + ,12 + ,8 + ,14 + ,4 + ,157 + ,42 + ,78 + ,12 + ,6 + ,11 + ,2 + ,59 + ,0 + ,0 + ,12 + ,7 + ,12 + ,4 + ,77 + ,58 + ,0 + ,6 + ,13 + ,12 + ,6 + ,129 + ,133 + ,4 + ,11 + ,13 + ,16 + ,6 + ,125 + ,151 + ,91 + ,10 + ,11 + ,12 + ,5 + ,87 + ,111 + ,132 + ,12 + ,5 + ,12 + ,3 + ,61 + ,139 + ,0 + ,13 + ,12 + ,12 + ,6 + ,146 + ,126 + ,0 + ,11 + ,8 + ,10 + ,4 + ,96 + ,139 + ,0 + ,7 + ,11 + ,15 + ,5 + ,133 + ,138 + ,14 + ,11 + ,14 + ,15 + ,8 + ,47 + ,52 + ,97 + ,11 + ,9 + ,12 + ,4 + ,74 + ,67 + ,45 + ,11 + ,10 + ,16 + ,6 + ,109 + ,97 + ,0 + ,11 + ,13 + ,15 + ,6 + ,30 + ,137 + ,149 + ,12 + ,16 + ,16 + ,7 + ,116 + ,56 + ,57 + ,10 + ,16 + ,13 + ,6 + ,149 + ,3 + ,105 + ,11 + ,11 + ,12 + ,5 + ,19 + ,78 + ,0 + ,12 + ,8 + ,11 + ,4 + ,96 + ,0 + ,0 + ,7 + ,4 + ,13 + ,6 + ,0 + ,0 + ,0 + ,13 + ,7 + ,10 + ,3 + ,21 + ,0 + ,0 + ,8 + ,14 + ,15 + ,5 + ,26 + ,118 + ,128 + ,12 + ,11 + ,13 + ,6 + ,156 + ,39 + ,29 + ,11 + ,17 + ,16 + ,7 + ,53 + ,63 + ,148 + ,12 + ,15 + ,15 + ,7 + ,72 + ,78 + ,93 + ,14 + ,17 + ,18 + ,6 + ,27 + ,26 + ,4 + ,10 + ,5 + ,13 + ,3 + ,66 + ,50 + ,0 + ,10 + ,4 + ,10 + ,2 + ,71 + ,104 + ,158 + ,13 + ,10 + ,16 + ,8 + ,66 + ,54 + ,144 + ,10 + ,11 + ,13 + ,3 + ,40 + ,104 + ,0 + ,11 + ,15 + ,15 + ,8 + ,57 + ,148 + ,122 + ,10 + ,10 + ,14 + ,3 + ,3 + ,30 + ,149 + ,7 + ,9 + ,15 + ,4 + ,12 + ,38 + ,17 + ,10 + ,12 + ,14 + ,5 + ,107 + ,132 + ,91 + ,8 + ,15 + ,13 + ,7 + ,80 + ,132 + ,111 + ,12 + ,7 + ,13 + ,6 + ,98 + ,84 + ,99 + ,12 + ,13 + ,15 + ,6 + ,155 + ,71 + ,40 + ,12 + ,12 + ,16 + ,7 + ,111 + ,125 + ,132 + ,11 + ,14 + ,14 + ,6 + ,81 + ,25 + ,123 + ,12 + ,14 + ,14 + ,6 + ,50 + ,66 + ,54 + ,12 + ,8 + ,16 + ,6 + ,49 + ,86 + ,90 + ,12 + ,15 + ,14 + ,6 + ,96 + ,61 + ,86 + ,11 + ,12 + ,12 + ,4 + ,2 + ,60 + ,152 + ,12 + ,12 + ,13 + ,4 + ,1 + ,144 + ,152 + ,11 + ,16 + ,12 + ,5 + ,22 + ,120 + ,123 + ,11 + ,9 + ,12 + ,4 + ,64 + ,139 + ,100 + ,13 + ,15 + ,14 + ,6 + ,56 + ,131 + ,116 + ,12 + ,15 + ,14 + ,6 + ,144 + ,159 + ,59 + ,12 + ,6 + ,14 + ,5 + ,0 + ,0 + ,0 + ,12 + ,14 + ,16 + ,8 + ,94 + ,18 + ,5 + ,12 + ,15 + ,13 + ,6 + ,25 + ,123 + ,147 + ,8 + ,10 + ,14 + ,5 + ,93 + ,18 + ,139 + ,8 + ,6 + ,4 + ,4 + ,0 + ,0 + ,0 + ,12 + ,14 + ,16 + ,8 + ,48 + ,123 + ,81 + ,11 + ,12 + ,13 + ,6 + ,30 + ,105 + ,3 + ,12 + ,8 + ,16 + ,4 + ,19 + ,0 + ,0 + ,13 + ,11 + ,15 + ,6 + ,0 + ,0 + ,0 + ,12 + ,13 + ,14 + ,6 + ,10 + ,68 + ,37 + ,12 + ,9 + ,13 + ,4 + ,78 + ,157 + ,5 + ,11 + ,15 + ,14 + ,6 + ,93 + ,94 + ,69 + ,12 + ,13 + ,12 + ,3 + ,0 + ,0 + ,0 + ,12 + ,15 + ,15 + ,6 + ,95 + ,87 + ,0 + ,10 + ,14 + ,14 + ,5 + ,50 + ,156 + ,142 + ,11 + ,16 + ,13 + ,4 + ,86 + ,139 + ,17 + ,12 + ,14 + ,14 + ,6 + ,33 + ,145 + ,100 + ,12 + ,14 + ,16 + ,4 + ,152 + ,55 + ,70 + ,10 + ,10 + ,6 + ,4 + ,51 + ,41 + ,0 + ,12 + ,10 + ,13 + ,4 + ,48 + ,25 + ,123 + ,13 + ,4 + ,13 + ,6 + ,97 + ,47 + ,109 + ,12 + ,8 + ,14 + ,5 + ,77 + ,0 + ,0 + ,15 + ,15 + ,15 + ,6 + ,130 + ,143 + ,37 + ,11 + ,16 + ,14 + ,6 + ,8 + ,102 + ,44 + ,12 + ,12 + ,15 + ,8 + ,84 + ,148 + ,98 + ,11 + ,12 + ,13 + ,7 + ,51 + ,153 + ,11 + ,12 + ,15 + ,16 + ,7 + ,33 + ,32 + ,9 + ,11 + ,9 + ,12 + ,4 + ,6 + ,106 + ,0 + ,10 + ,12 + ,15 + ,6 + ,116 + ,63 + ,57 + ,11 + ,14 + ,12 + ,6 + ,88 + ,56 + ,63 + ,11 + ,11 + ,14 + ,2 + ,142 + ,39 + ,66) + ,dim=c(7 + ,156) + ,dimnames=list(c('findingfriends' + ,'knowingpeople' + ,'liked' + ,'celebrity' + ,'selectfbf' + ,'selectsbf' + ,'selecttbf ') + ,1:156)) > y <- array(NA,dim=c(7,156),dimnames=list(c('findingfriends','knowingpeople','liked','celebrity','selectfbf','selectsbf','selecttbf '),1:156)) > 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 = 'Do not include Seasonal 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.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 liked findingfriends knowingpeople celebrity selectfbf selectsbf 1 13 13 14 3 25 55 2 13 12 8 5 158 7 3 16 10 12 6 0 0 4 12 9 7 6 143 10 5 11 10 10 5 67 74 6 12 12 7 3 0 0 7 18 13 16 8 148 138 8 11 12 11 4 28 0 9 14 12 14 4 114 113 10 9 6 6 4 0 0 11 14 5 16 6 123 115 12 12 12 11 6 145 9 13 11 11 16 5 113 114 14 12 14 12 4 152 59 15 13 14 7 6 0 0 16 11 12 13 4 36 114 17 12 12 11 6 0 0 18 16 11 15 6 8 102 19 9 11 7 4 108 0 20 11 7 9 4 112 86 21 13 9 7 2 51 17 22 15 11 14 7 43 45 23 10 11 15 5 120 123 24 11 12 7 4 13 24 25 13 12 15 6 55 5 26 16 11 17 6 103 123 27 15 11 15 7 127 136 28 14 8 14 5 14 4 29 14 9 14 6 135 76 30 14 12 8 4 38 99 31 8 10 8 4 11 98 32 13 10 14 7 43 67 33 15 12 14 7 141 92 34 13 8 8 4 62 13 35 11 12 11 4 62 24 36 15 11 16 6 135 129 37 15 12 10 6 117 117 38 9 7 8 5 82 11 39 13 11 14 6 145 20 40 16 11 16 7 87 91 41 13 12 13 6 76 111 42 11 9 5 3 124 0 43 12 15 8 3 151 58 44 12 11 10 4 131 0 45 12 11 8 6 127 146 46 14 11 13 7 76 129 47 14 11 15 5 25 48 48 8 15 6 4 0 0 49 13 11 12 5 58 111 50 16 12 16 6 115 32 51 13 12 5 6 130 112 52 11 9 15 6 17 51 53 14 12 12 5 102 53 54 13 12 8 4 21 131 55 13 13 13 5 0 0 56 13 11 14 5 14 76 57 12 9 12 4 110 106 58 16 9 16 6 133 26 59 15 11 10 2 83 44 60 15 11 15 8 56 63 61 12 12 8 3 0 0 62 14 12 16 6 44 116 63 12 9 19 6 70 119 64 15 11 14 6 36 18 65 12 9 6 5 5 134 66 13 12 13 5 118 138 67 12 12 15 6 17 41 68 12 12 7 5 79 0 69 13 12 13 6 122 57 70 5 14 4 2 119 101 71 13 11 14 5 36 114 72 13 12 13 5 36 113 73 14 11 11 5 141 122 74 17 6 14 6 0 14 75 13 10 12 6 37 10 76 13 12 15 6 110 27 77 12 13 14 5 10 39 78 13 8 13 5 14 133 79 14 12 8 4 157 42 80 11 12 6 2 59 0 81 12 12 7 4 77 58 82 12 6 13 6 129 133 83 16 11 13 6 125 151 84 12 10 11 5 87 111 85 12 12 5 3 61 139 86 12 13 12 6 146 126 87 10 11 8 4 96 139 88 15 7 11 5 133 138 89 15 11 14 8 47 52 90 12 11 9 4 74 67 91 16 11 10 6 109 97 92 15 11 13 6 30 137 93 16 12 16 7 116 56 94 13 10 16 6 149 3 95 12 11 11 5 19 78 96 11 12 8 4 96 0 97 13 7 4 6 0 0 98 10 13 7 3 21 0 99 15 8 14 5 26 118 100 13 12 11 6 156 39 101 16 11 17 7 53 63 102 15 12 15 7 72 78 103 18 14 17 6 27 26 104 13 10 5 3 66 50 105 10 10 4 2 71 104 106 16 13 10 8 66 54 107 13 10 11 3 40 104 108 15 11 15 8 57 148 109 14 10 10 3 3 30 110 15 7 9 4 12 38 111 14 10 12 5 107 132 112 13 8 15 7 80 132 113 13 12 7 6 98 84 114 15 12 13 6 155 71 115 16 12 12 7 111 125 116 14 11 14 6 81 25 117 14 12 14 6 50 66 118 16 12 8 6 49 86 119 14 12 15 6 96 61 120 12 11 12 4 2 60 121 13 12 12 4 1 144 122 12 11 16 5 22 120 123 12 11 9 4 64 139 124 14 13 15 6 56 131 125 14 12 15 6 144 159 126 14 12 6 5 0 0 127 16 12 14 8 94 18 128 13 12 15 6 25 123 129 14 8 10 5 93 18 130 4 8 6 4 0 0 131 16 12 14 8 48 123 132 13 11 12 6 30 105 133 16 12 8 4 19 0 134 15 13 11 6 0 0 135 14 12 13 6 10 68 136 13 12 9 4 78 157 137 14 11 15 6 93 94 138 12 12 13 3 0 0 139 15 12 15 6 95 87 140 14 10 14 5 50 156 141 13 11 16 4 86 139 142 14 12 14 6 33 145 143 16 12 14 4 152 55 144 6 10 10 4 51 41 145 13 12 10 4 48 25 146 13 13 4 6 97 47 147 14 12 8 5 77 0 148 15 15 15 6 130 143 149 14 11 16 6 8 102 150 15 12 12 8 84 148 151 13 11 12 7 51 153 152 16 12 15 7 33 32 153 12 11 9 4 6 106 154 15 10 12 6 116 63 155 12 11 14 6 88 56 156 14 11 11 2 142 39 selecttbf\r t 1 147 1 2 71 2 3 0 3 4 0 4 5 43 5 6 0 6 7 8 7 8 0 8 9 34 9 10 0 10 11 103 11 12 0 12 13 73 13 14 159 14 15 0 15 16 113 16 17 0 17 18 44 18 19 0 19 20 0 20 21 41 21 22 74 22 23 0 23 24 0 24 25 0 25 26 32 26 27 126 27 28 154 28 29 129 29 30 98 30 31 82 31 32 45 32 33 8 33 34 0 34 35 129 35 36 31 36 37 117 37 38 99 38 39 55 39 40 132 40 41 58 41 42 0 42 43 0 43 44 0 44 45 101 45 46 31 46 47 147 47 48 0 48 49 132 49 50 123 50 51 39 51 52 136 52 53 141 53 54 0 54 55 0 55 56 135 56 57 118 57 58 154 58 59 0 59 60 116 60 61 0 61 62 88 62 63 25 63 64 113 64 65 157 65 66 26 66 67 38 67 68 0 68 69 53 69 70 0 70 71 106 71 72 106 72 73 102 73 74 138 74 75 142 75 76 73 76 77 130 77 78 86 78 79 78 79 80 0 80 81 0 81 82 4 82 83 91 83 84 132 84 85 0 85 86 0 86 87 0 87 88 14 88 89 97 89 90 45 90 91 0 91 92 149 92 93 57 93 94 105 94 95 0 95 96 0 96 97 0 97 98 0 98 99 128 99 100 29 100 101 148 101 102 93 102 103 4 103 104 0 104 105 158 105 106 144 106 107 0 107 108 122 108 109 149 109 110 17 110 111 91 111 112 111 112 113 99 113 114 40 114 115 132 115 116 123 116 117 54 117 118 90 118 119 86 119 120 152 120 121 152 121 122 123 122 123 100 123 124 116 124 125 59 125 126 0 126 127 5 127 128 147 128 129 139 129 130 0 130 131 81 131 132 3 132 133 0 133 134 0 134 135 37 135 136 5 136 137 69 137 138 0 138 139 0 139 140 142 140 141 17 141 142 100 142 143 70 143 144 0 144 145 123 145 146 109 146 147 0 147 148 37 148 149 44 149 150 98 150 151 11 151 152 9 152 153 0 153 154 57 154 155 63 155 156 66 156 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) findingfriends knowingpeople celebrity selectfbf 6.684876 0.080478 0.171089 0.554953 0.003307 selectsbf `selecttbf\r` t -0.002360 0.003342 0.005902 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.34233 -0.90025 -0.02911 0.92487 4.09016 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.684876 1.062645 6.291 3.38e-09 *** findingfriends 0.080478 0.081404 0.989 0.32446 knowingpeople 0.171089 0.051901 3.296 0.00123 ** celebrity 0.554953 0.122991 4.512 1.30e-05 *** selectfbf 0.003307 0.003029 1.092 0.27659 selectsbf -0.002360 0.003057 -0.772 0.44139 `selecttbf\r` 0.003342 0.002762 1.210 0.22821 t 0.005902 0.003247 1.818 0.07111 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.763 on 148 degrees of freedom Multiple R-squared: 0.3733, Adjusted R-squared: 0.3436 F-statistic: 12.59 on 7 and 148 DF, p-value: 1.304e-12 > 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.61418325 0.77163350 0.3858167 [2,] 0.45700436 0.91400871 0.5429956 [3,] 0.42348730 0.84697461 0.5765127 [4,] 0.51883933 0.96232134 0.4811607 [5,] 0.40899765 0.81799530 0.5910023 [6,] 0.31238041 0.62476082 0.6876196 [7,] 0.23121244 0.46242488 0.7687876 [8,] 0.31235724 0.62471449 0.6876428 [9,] 0.25248337 0.50496675 0.7475166 [10,] 0.27682493 0.55364987 0.7231751 [11,] 0.73702828 0.52594344 0.2629717 [12,] 0.68939373 0.62121254 0.3106063 [13,] 0.75943099 0.48113802 0.2405690 [14,] 0.69815581 0.60368838 0.3018442 [15,] 0.63225791 0.73548419 0.3677421 [16,] 0.67556684 0.64886632 0.3244332 [17,] 0.61427658 0.77144685 0.3857234 [18,] 0.56379989 0.87240022 0.4362001 [19,] 0.50113856 0.99772288 0.4988614 [20,] 0.52119195 0.95761610 0.4788080 [21,] 0.70183979 0.59632041 0.2981602 [22,] 0.66501206 0.66997588 0.3349879 [23,] 0.63266554 0.73466893 0.3673345 [24,] 0.67749996 0.64500008 0.3225000 [25,] 0.64187920 0.71624160 0.3581208 [26,] 0.60764965 0.78470070 0.3923504 [27,] 0.60212975 0.79574050 0.3978703 [28,] 0.66126764 0.67746473 0.3387324 [29,] 0.61315877 0.77368246 0.3868412 [30,] 0.57719304 0.84561392 0.4228070 [31,] 0.52837373 0.94325254 0.4716263 [32,] 0.51867837 0.96264326 0.4813216 [33,] 0.47552590 0.95105179 0.5244741 [34,] 0.42420505 0.84841010 0.5757949 [35,] 0.38188430 0.76376860 0.6181157 [36,] 0.33147130 0.66294260 0.6685287 [37,] 0.28749677 0.57499355 0.7125032 [38,] 0.39087790 0.78175580 0.6091221 [39,] 0.34198631 0.68397262 0.6580137 [40,] 0.32863637 0.65727274 0.6713636 [41,] 0.29899095 0.59798189 0.7010091 [42,] 0.36446153 0.72892305 0.6355385 [43,] 0.33127801 0.66255602 0.6687220 [44,] 0.33206715 0.66413430 0.6679329 [45,] 0.28746144 0.57492288 0.7125386 [46,] 0.24623866 0.49247733 0.7537613 [47,] 0.20973274 0.41946549 0.7902673 [48,] 0.20632493 0.41264986 0.7936751 [49,] 0.38104920 0.76209840 0.6189508 [50,] 0.33517062 0.67034124 0.6648294 [51,] 0.30211227 0.60422454 0.6978877 [52,] 0.26396981 0.52793962 0.7360302 [53,] 0.31430239 0.62860478 0.6856976 [54,] 0.28703686 0.57407372 0.7129631 [55,] 0.24982713 0.49965426 0.7501729 [56,] 0.21441774 0.42883549 0.7855823 [57,] 0.22030735 0.44061469 0.7796927 [58,] 0.18646707 0.37293415 0.8135329 [59,] 0.16403122 0.32806244 0.8359688 [60,] 0.45493284 0.90986568 0.5450672 [61,] 0.40981278 0.81962555 0.5901872 [62,] 0.36639895 0.73279790 0.6336011 [63,] 0.33758458 0.67516916 0.6624154 [64,] 0.45799132 0.91598264 0.5420087 [65,] 0.41997731 0.83995462 0.5800227 [66,] 0.40790375 0.81580751 0.5920962 [67,] 0.41378580 0.82757161 0.5862142 [68,] 0.36842479 0.73684958 0.6315752 [69,] 0.36703524 0.73407048 0.6329648 [70,] 0.33186100 0.66372200 0.6681390 [71,] 0.29533612 0.59067224 0.7046639 [72,] 0.27209788 0.54419577 0.7279021 [73,] 0.28139880 0.56279760 0.7186012 [74,] 0.25939294 0.51878589 0.7406071 [75,] 0.24221949 0.48443898 0.7577805 [76,] 0.25769752 0.51539504 0.7423025 [77,] 0.27592291 0.55184581 0.7240771 [78,] 0.30555174 0.61110347 0.6944483 [79,] 0.26735754 0.53471507 0.7326425 [80,] 0.23457113 0.46914227 0.7654289 [81,] 0.27014625 0.54029250 0.7298537 [82,] 0.24063353 0.48126706 0.7593665 [83,] 0.20806029 0.41612058 0.7919397 [84,] 0.21890281 0.43780562 0.7810972 [85,] 0.19433944 0.38867887 0.8056606 [86,] 0.19907452 0.39814903 0.8009255 [87,] 0.18326810 0.36653619 0.8167319 [88,] 0.21751539 0.43503078 0.7824846 [89,] 0.22841216 0.45682431 0.7715878 [90,] 0.24877057 0.49754115 0.7512294 [91,] 0.21293228 0.42586457 0.7870677 [92,] 0.18509811 0.37019622 0.8149019 [93,] 0.21012269 0.42024538 0.7898773 [94,] 0.20425165 0.40850330 0.7957484 [95,] 0.18247620 0.36495241 0.8175238 [96,] 0.15454761 0.30909522 0.8454524 [97,] 0.13454653 0.26909305 0.8654535 [98,] 0.11011674 0.22023348 0.8898833 [99,] 0.11195845 0.22391690 0.8880416 [100,] 0.34013195 0.68026391 0.6598680 [101,] 0.31815952 0.63631903 0.6818405 [102,] 0.31053526 0.62107053 0.6894647 [103,] 0.27765947 0.55531894 0.7223405 [104,] 0.23543833 0.47087665 0.7645617 [105,] 0.20414662 0.40829323 0.7958534 [106,] 0.17097407 0.34194815 0.8290259 [107,] 0.13927378 0.27854756 0.8607262 [108,] 0.17138084 0.34276168 0.8286192 [109,] 0.15001975 0.30003950 0.8499802 [110,] 0.12421747 0.24843494 0.8757825 [111,] 0.09790993 0.19581985 0.9020901 [112,] 0.09192492 0.18384984 0.9080751 [113,] 0.07057266 0.14114531 0.9294273 [114,] 0.06336891 0.12673782 0.9366311 [115,] 0.05305020 0.10610039 0.9469498 [116,] 0.05266212 0.10532423 0.9473379 [117,] 0.03778446 0.07556892 0.9622155 [118,] 0.04626000 0.09251999 0.9537400 [119,] 0.06020302 0.12040603 0.9397970 [120,] 0.32234828 0.64469655 0.6776517 [121,] 0.26427057 0.52854114 0.7357294 [122,] 0.20955380 0.41910761 0.7904462 [123,] 0.38849437 0.77698874 0.6115056 [124,] 0.36298750 0.72597500 0.6370125 [125,] 0.30362454 0.60724908 0.6963755 [126,] 0.28280599 0.56561198 0.7171940 [127,] 0.21564539 0.43129078 0.7843546 [128,] 0.15805155 0.31610309 0.8419485 [129,] 0.13021124 0.26042247 0.8697888 [130,] 0.10050710 0.20101420 0.8994929 [131,] 0.07270701 0.14541403 0.9272930 [132,] 0.04863361 0.09726723 0.9513664 [133,] 0.14701801 0.29403602 0.8529820 [134,] 0.59189882 0.81620236 0.4081012 [135,] 0.42824726 0.85649452 0.5717527 > postscript(file="/var/www/html/rcomp/tmp/1z2dn1291121911.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/www/html/rcomp/tmp/2z2dn1291121911.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/www/html/rcomp/tmp/3z2dn1291121911.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/www/html/rcomp/tmp/4auup1291121911.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/www/html/rcomp/tmp/5auup1291121911.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 = 156 Frequency = 1 1 2 3 4 5 0.7587235490 0.4507489547 3.1098483458 -0.4095002420 -1.1954898338 6 7 8 9 10 1.4514901438 2.8599927275 -0.8922340919 1.4572121680 -1.4731134123 11 12 13 14 15 0.3010160889 -1.3914843781 -2.5077253284 -1.0619744150 0.5725562875 16 17 18 19 20 -1.4166973188 -0.9626491506 2.4947880954 -2.4569226874 -0.2933506640 21 22 23 24 25 2.8937564798 0.7367626382 -3.1535936044 -0.1960564531 -0.8643356966 26 27 28 29 30 1.8808477761 0.2993127029 0.7844709630 -0.0035872018 2.3642337789 31 32 33 34 35 -3.3402957712 -1.0929366237 0.5987321179 1.7077159661 -1.5385402893 36 37 38 39 40 0.9045781272 1.5885238199 -3.1921086961 -1.1414892414 1.0575366165 41 42 43 44 45 -0.6297203365 0.4124944913 0.4580404263 -0.1938177720 -0.9471943005 46 47 48 49 50 -0.0009860747 0.3506636154 -3.4216993576 -0.0582006172 1.2712113737 51 52 53 54 55 0.5672280081 -3.0025399922 0.5252163641 1.6818616402 -0.0546363292 56 57 58 59 60 -0.3887952815 -0.5265099395 1.2881263340 4.0901600127 -0.3544473217 61 62 63 64 65 0.9557805164 -0.2495576324 -2.3956537173 0.8729094534 0.1808833254 66 67 68 69 70 -0.1905657650 -2.0285792972 -0.2856431791 -1.0578624192 -5.1742054615 71 72 73 74 75 -0.3634865891 -0.2811376780 0.8229391468 3.2423541701 -0.8884682146 76 77 78 79 80 -1.5393126769 -1.7310812472 0.1921716096 1.6137500025 0.5456278347 81 82 83 84 85 0.3360830980 -1.3317410554 2.0249129474 -1.1091272321 1.4536954608 86 87 88 89 90 -1.8069869235 -1.6616138613 2.4146483015 -0.2872147832 -0.0979694999 91 92 93 94 95 2.7205708532 1.0591202064 0.7363808214 -1.9482687823 -0.6663420065 96 97 98 99 100 -1.1232685519 1.1651914765 -1.2414466685 1.6816749839 -0.9733775621 101 102 103 104 105 0.5193112788 -0.0685137263 3.3009628473 2.2759217587 -0.4210863328 106 107 108 109 110 0.9206466323 1.4451208559 -0.4605022774 2.0541564657 3.3361001950 111 112 113 114 115 0.6808644183 -1.7647950427 -0.3016576607 0.6438811223 1.2196158791 116 117 118 119 120 -0.5997422004 -0.2562178903 2.6946089462 -0.7100053530 -0.9242922225 121 122 123 124 125 0.1908852174 -2.0030273252 -0.2735552408 -0.6227499101 -0.5826488948 126 127 128 129 130 1.8044116226 0.4798036414 -1.5858352056 0.6945885868 -7.3423321021 131 132 133 134 135 0.6021505101 -0.5934505145 3.9130278808 1.2663168132 0.0024684766 136 137 138 139 140 0.8829180429 -0.5911438736 -0.3541344821 0.5240449635 0.2422439181 141 142 143 144 145 -0.3727877506 -0.3148335969 2.2834302655 -6.3421935818 0.0520262838 146 147 148 149 150 -0.1810783374 1.0836096886 0.1222364667 -0.4494877871 -0.2846955848 151 152 153 154 155 -1.2434534268 0.9375428751 -0.0024567157 0.7931343200 -2.5793882745 156 1.9190347432 > postscript(file="/var/www/html/rcomp/tmp/6auup1291121911.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 = 156 Frequency = 1 lag(myerror, k = 1) myerror 0 0.7587235490 NA 1 0.4507489547 0.7587235490 2 3.1098483458 0.4507489547 3 -0.4095002420 3.1098483458 4 -1.1954898338 -0.4095002420 5 1.4514901438 -1.1954898338 6 2.8599927275 1.4514901438 7 -0.8922340919 2.8599927275 8 1.4572121680 -0.8922340919 9 -1.4731134123 1.4572121680 10 0.3010160889 -1.4731134123 11 -1.3914843781 0.3010160889 12 -2.5077253284 -1.3914843781 13 -1.0619744150 -2.5077253284 14 0.5725562875 -1.0619744150 15 -1.4166973188 0.5725562875 16 -0.9626491506 -1.4166973188 17 2.4947880954 -0.9626491506 18 -2.4569226874 2.4947880954 19 -0.2933506640 -2.4569226874 20 2.8937564798 -0.2933506640 21 0.7367626382 2.8937564798 22 -3.1535936044 0.7367626382 23 -0.1960564531 -3.1535936044 24 -0.8643356966 -0.1960564531 25 1.8808477761 -0.8643356966 26 0.2993127029 1.8808477761 27 0.7844709630 0.2993127029 28 -0.0035872018 0.7844709630 29 2.3642337789 -0.0035872018 30 -3.3402957712 2.3642337789 31 -1.0929366237 -3.3402957712 32 0.5987321179 -1.0929366237 33 1.7077159661 0.5987321179 34 -1.5385402893 1.7077159661 35 0.9045781272 -1.5385402893 36 1.5885238199 0.9045781272 37 -3.1921086961 1.5885238199 38 -1.1414892414 -3.1921086961 39 1.0575366165 -1.1414892414 40 -0.6297203365 1.0575366165 41 0.4124944913 -0.6297203365 42 0.4580404263 0.4124944913 43 -0.1938177720 0.4580404263 44 -0.9471943005 -0.1938177720 45 -0.0009860747 -0.9471943005 46 0.3506636154 -0.0009860747 47 -3.4216993576 0.3506636154 48 -0.0582006172 -3.4216993576 49 1.2712113737 -0.0582006172 50 0.5672280081 1.2712113737 51 -3.0025399922 0.5672280081 52 0.5252163641 -3.0025399922 53 1.6818616402 0.5252163641 54 -0.0546363292 1.6818616402 55 -0.3887952815 -0.0546363292 56 -0.5265099395 -0.3887952815 57 1.2881263340 -0.5265099395 58 4.0901600127 1.2881263340 59 -0.3544473217 4.0901600127 60 0.9557805164 -0.3544473217 61 -0.2495576324 0.9557805164 62 -2.3956537173 -0.2495576324 63 0.8729094534 -2.3956537173 64 0.1808833254 0.8729094534 65 -0.1905657650 0.1808833254 66 -2.0285792972 -0.1905657650 67 -0.2856431791 -2.0285792972 68 -1.0578624192 -0.2856431791 69 -5.1742054615 -1.0578624192 70 -0.3634865891 -5.1742054615 71 -0.2811376780 -0.3634865891 72 0.8229391468 -0.2811376780 73 3.2423541701 0.8229391468 74 -0.8884682146 3.2423541701 75 -1.5393126769 -0.8884682146 76 -1.7310812472 -1.5393126769 77 0.1921716096 -1.7310812472 78 1.6137500025 0.1921716096 79 0.5456278347 1.6137500025 80 0.3360830980 0.5456278347 81 -1.3317410554 0.3360830980 82 2.0249129474 -1.3317410554 83 -1.1091272321 2.0249129474 84 1.4536954608 -1.1091272321 85 -1.8069869235 1.4536954608 86 -1.6616138613 -1.8069869235 87 2.4146483015 -1.6616138613 88 -0.2872147832 2.4146483015 89 -0.0979694999 -0.2872147832 90 2.7205708532 -0.0979694999 91 1.0591202064 2.7205708532 92 0.7363808214 1.0591202064 93 -1.9482687823 0.7363808214 94 -0.6663420065 -1.9482687823 95 -1.1232685519 -0.6663420065 96 1.1651914765 -1.1232685519 97 -1.2414466685 1.1651914765 98 1.6816749839 -1.2414466685 99 -0.9733775621 1.6816749839 100 0.5193112788 -0.9733775621 101 -0.0685137263 0.5193112788 102 3.3009628473 -0.0685137263 103 2.2759217587 3.3009628473 104 -0.4210863328 2.2759217587 105 0.9206466323 -0.4210863328 106 1.4451208559 0.9206466323 107 -0.4605022774 1.4451208559 108 2.0541564657 -0.4605022774 109 3.3361001950 2.0541564657 110 0.6808644183 3.3361001950 111 -1.7647950427 0.6808644183 112 -0.3016576607 -1.7647950427 113 0.6438811223 -0.3016576607 114 1.2196158791 0.6438811223 115 -0.5997422004 1.2196158791 116 -0.2562178903 -0.5997422004 117 2.6946089462 -0.2562178903 118 -0.7100053530 2.6946089462 119 -0.9242922225 -0.7100053530 120 0.1908852174 -0.9242922225 121 -2.0030273252 0.1908852174 122 -0.2735552408 -2.0030273252 123 -0.6227499101 -0.2735552408 124 -0.5826488948 -0.6227499101 125 1.8044116226 -0.5826488948 126 0.4798036414 1.8044116226 127 -1.5858352056 0.4798036414 128 0.6945885868 -1.5858352056 129 -7.3423321021 0.6945885868 130 0.6021505101 -7.3423321021 131 -0.5934505145 0.6021505101 132 3.9130278808 -0.5934505145 133 1.2663168132 3.9130278808 134 0.0024684766 1.2663168132 135 0.8829180429 0.0024684766 136 -0.5911438736 0.8829180429 137 -0.3541344821 -0.5911438736 138 0.5240449635 -0.3541344821 139 0.2422439181 0.5240449635 140 -0.3727877506 0.2422439181 141 -0.3148335969 -0.3727877506 142 2.2834302655 -0.3148335969 143 -6.3421935818 2.2834302655 144 0.0520262838 -6.3421935818 145 -0.1810783374 0.0520262838 146 1.0836096886 -0.1810783374 147 0.1222364667 1.0836096886 148 -0.4494877871 0.1222364667 149 -0.2846955848 -0.4494877871 150 -1.2434534268 -0.2846955848 151 0.9375428751 -1.2434534268 152 -0.0024567157 0.9375428751 153 0.7931343200 -0.0024567157 154 -2.5793882745 0.7931343200 155 1.9190347432 -2.5793882745 156 NA 1.9190347432 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.4507489547 0.7587235490 [2,] 3.1098483458 0.4507489547 [3,] -0.4095002420 3.1098483458 [4,] -1.1954898338 -0.4095002420 [5,] 1.4514901438 -1.1954898338 [6,] 2.8599927275 1.4514901438 [7,] -0.8922340919 2.8599927275 [8,] 1.4572121680 -0.8922340919 [9,] -1.4731134123 1.4572121680 [10,] 0.3010160889 -1.4731134123 [11,] -1.3914843781 0.3010160889 [12,] -2.5077253284 -1.3914843781 [13,] -1.0619744150 -2.5077253284 [14,] 0.5725562875 -1.0619744150 [15,] -1.4166973188 0.5725562875 [16,] -0.9626491506 -1.4166973188 [17,] 2.4947880954 -0.9626491506 [18,] -2.4569226874 2.4947880954 [19,] -0.2933506640 -2.4569226874 [20,] 2.8937564798 -0.2933506640 [21,] 0.7367626382 2.8937564798 [22,] -3.1535936044 0.7367626382 [23,] -0.1960564531 -3.1535936044 [24,] -0.8643356966 -0.1960564531 [25,] 1.8808477761 -0.8643356966 [26,] 0.2993127029 1.8808477761 [27,] 0.7844709630 0.2993127029 [28,] -0.0035872018 0.7844709630 [29,] 2.3642337789 -0.0035872018 [30,] -3.3402957712 2.3642337789 [31,] -1.0929366237 -3.3402957712 [32,] 0.5987321179 -1.0929366237 [33,] 1.7077159661 0.5987321179 [34,] -1.5385402893 1.7077159661 [35,] 0.9045781272 -1.5385402893 [36,] 1.5885238199 0.9045781272 [37,] -3.1921086961 1.5885238199 [38,] -1.1414892414 -3.1921086961 [39,] 1.0575366165 -1.1414892414 [40,] -0.6297203365 1.0575366165 [41,] 0.4124944913 -0.6297203365 [42,] 0.4580404263 0.4124944913 [43,] -0.1938177720 0.4580404263 [44,] -0.9471943005 -0.1938177720 [45,] -0.0009860747 -0.9471943005 [46,] 0.3506636154 -0.0009860747 [47,] -3.4216993576 0.3506636154 [48,] -0.0582006172 -3.4216993576 [49,] 1.2712113737 -0.0582006172 [50,] 0.5672280081 1.2712113737 [51,] -3.0025399922 0.5672280081 [52,] 0.5252163641 -3.0025399922 [53,] 1.6818616402 0.5252163641 [54,] -0.0546363292 1.6818616402 [55,] -0.3887952815 -0.0546363292 [56,] -0.5265099395 -0.3887952815 [57,] 1.2881263340 -0.5265099395 [58,] 4.0901600127 1.2881263340 [59,] -0.3544473217 4.0901600127 [60,] 0.9557805164 -0.3544473217 [61,] -0.2495576324 0.9557805164 [62,] -2.3956537173 -0.2495576324 [63,] 0.8729094534 -2.3956537173 [64,] 0.1808833254 0.8729094534 [65,] -0.1905657650 0.1808833254 [66,] -2.0285792972 -0.1905657650 [67,] -0.2856431791 -2.0285792972 [68,] -1.0578624192 -0.2856431791 [69,] -5.1742054615 -1.0578624192 [70,] -0.3634865891 -5.1742054615 [71,] -0.2811376780 -0.3634865891 [72,] 0.8229391468 -0.2811376780 [73,] 3.2423541701 0.8229391468 [74,] -0.8884682146 3.2423541701 [75,] -1.5393126769 -0.8884682146 [76,] -1.7310812472 -1.5393126769 [77,] 0.1921716096 -1.7310812472 [78,] 1.6137500025 0.1921716096 [79,] 0.5456278347 1.6137500025 [80,] 0.3360830980 0.5456278347 [81,] -1.3317410554 0.3360830980 [82,] 2.0249129474 -1.3317410554 [83,] -1.1091272321 2.0249129474 [84,] 1.4536954608 -1.1091272321 [85,] -1.8069869235 1.4536954608 [86,] -1.6616138613 -1.8069869235 [87,] 2.4146483015 -1.6616138613 [88,] -0.2872147832 2.4146483015 [89,] -0.0979694999 -0.2872147832 [90,] 2.7205708532 -0.0979694999 [91,] 1.0591202064 2.7205708532 [92,] 0.7363808214 1.0591202064 [93,] -1.9482687823 0.7363808214 [94,] -0.6663420065 -1.9482687823 [95,] -1.1232685519 -0.6663420065 [96,] 1.1651914765 -1.1232685519 [97,] -1.2414466685 1.1651914765 [98,] 1.6816749839 -1.2414466685 [99,] -0.9733775621 1.6816749839 [100,] 0.5193112788 -0.9733775621 [101,] -0.0685137263 0.5193112788 [102,] 3.3009628473 -0.0685137263 [103,] 2.2759217587 3.3009628473 [104,] -0.4210863328 2.2759217587 [105,] 0.9206466323 -0.4210863328 [106,] 1.4451208559 0.9206466323 [107,] -0.4605022774 1.4451208559 [108,] 2.0541564657 -0.4605022774 [109,] 3.3361001950 2.0541564657 [110,] 0.6808644183 3.3361001950 [111,] -1.7647950427 0.6808644183 [112,] -0.3016576607 -1.7647950427 [113,] 0.6438811223 -0.3016576607 [114,] 1.2196158791 0.6438811223 [115,] -0.5997422004 1.2196158791 [116,] -0.2562178903 -0.5997422004 [117,] 2.6946089462 -0.2562178903 [118,] -0.7100053530 2.6946089462 [119,] -0.9242922225 -0.7100053530 [120,] 0.1908852174 -0.9242922225 [121,] -2.0030273252 0.1908852174 [122,] -0.2735552408 -2.0030273252 [123,] -0.6227499101 -0.2735552408 [124,] -0.5826488948 -0.6227499101 [125,] 1.8044116226 -0.5826488948 [126,] 0.4798036414 1.8044116226 [127,] -1.5858352056 0.4798036414 [128,] 0.6945885868 -1.5858352056 [129,] -7.3423321021 0.6945885868 [130,] 0.6021505101 -7.3423321021 [131,] -0.5934505145 0.6021505101 [132,] 3.9130278808 -0.5934505145 [133,] 1.2663168132 3.9130278808 [134,] 0.0024684766 1.2663168132 [135,] 0.8829180429 0.0024684766 [136,] -0.5911438736 0.8829180429 [137,] -0.3541344821 -0.5911438736 [138,] 0.5240449635 -0.3541344821 [139,] 0.2422439181 0.5240449635 [140,] -0.3727877506 0.2422439181 [141,] -0.3148335969 -0.3727877506 [142,] 2.2834302655 -0.3148335969 [143,] -6.3421935818 2.2834302655 [144,] 0.0520262838 -6.3421935818 [145,] -0.1810783374 0.0520262838 [146,] 1.0836096886 -0.1810783374 [147,] 0.1222364667 1.0836096886 [148,] -0.4494877871 0.1222364667 [149,] -0.2846955848 -0.4494877871 [150,] -1.2434534268 -0.2846955848 [151,] 0.9375428751 -1.2434534268 [152,] -0.0024567157 0.9375428751 [153,] 0.7931343200 -0.0024567157 [154,] -2.5793882745 0.7931343200 [155,] 1.9190347432 -2.5793882745 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.4507489547 0.7587235490 2 3.1098483458 0.4507489547 3 -0.4095002420 3.1098483458 4 -1.1954898338 -0.4095002420 5 1.4514901438 -1.1954898338 6 2.8599927275 1.4514901438 7 -0.8922340919 2.8599927275 8 1.4572121680 -0.8922340919 9 -1.4731134123 1.4572121680 10 0.3010160889 -1.4731134123 11 -1.3914843781 0.3010160889 12 -2.5077253284 -1.3914843781 13 -1.0619744150 -2.5077253284 14 0.5725562875 -1.0619744150 15 -1.4166973188 0.5725562875 16 -0.9626491506 -1.4166973188 17 2.4947880954 -0.9626491506 18 -2.4569226874 2.4947880954 19 -0.2933506640 -2.4569226874 20 2.8937564798 -0.2933506640 21 0.7367626382 2.8937564798 22 -3.1535936044 0.7367626382 23 -0.1960564531 -3.1535936044 24 -0.8643356966 -0.1960564531 25 1.8808477761 -0.8643356966 26 0.2993127029 1.8808477761 27 0.7844709630 0.2993127029 28 -0.0035872018 0.7844709630 29 2.3642337789 -0.0035872018 30 -3.3402957712 2.3642337789 31 -1.0929366237 -3.3402957712 32 0.5987321179 -1.0929366237 33 1.7077159661 0.5987321179 34 -1.5385402893 1.7077159661 35 0.9045781272 -1.5385402893 36 1.5885238199 0.9045781272 37 -3.1921086961 1.5885238199 38 -1.1414892414 -3.1921086961 39 1.0575366165 -1.1414892414 40 -0.6297203365 1.0575366165 41 0.4124944913 -0.6297203365 42 0.4580404263 0.4124944913 43 -0.1938177720 0.4580404263 44 -0.9471943005 -0.1938177720 45 -0.0009860747 -0.9471943005 46 0.3506636154 -0.0009860747 47 -3.4216993576 0.3506636154 48 -0.0582006172 -3.4216993576 49 1.2712113737 -0.0582006172 50 0.5672280081 1.2712113737 51 -3.0025399922 0.5672280081 52 0.5252163641 -3.0025399922 53 1.6818616402 0.5252163641 54 -0.0546363292 1.6818616402 55 -0.3887952815 -0.0546363292 56 -0.5265099395 -0.3887952815 57 1.2881263340 -0.5265099395 58 4.0901600127 1.2881263340 59 -0.3544473217 4.0901600127 60 0.9557805164 -0.3544473217 61 -0.2495576324 0.9557805164 62 -2.3956537173 -0.2495576324 63 0.8729094534 -2.3956537173 64 0.1808833254 0.8729094534 65 -0.1905657650 0.1808833254 66 -2.0285792972 -0.1905657650 67 -0.2856431791 -2.0285792972 68 -1.0578624192 -0.2856431791 69 -5.1742054615 -1.0578624192 70 -0.3634865891 -5.1742054615 71 -0.2811376780 -0.3634865891 72 0.8229391468 -0.2811376780 73 3.2423541701 0.8229391468 74 -0.8884682146 3.2423541701 75 -1.5393126769 -0.8884682146 76 -1.7310812472 -1.5393126769 77 0.1921716096 -1.7310812472 78 1.6137500025 0.1921716096 79 0.5456278347 1.6137500025 80 0.3360830980 0.5456278347 81 -1.3317410554 0.3360830980 82 2.0249129474 -1.3317410554 83 -1.1091272321 2.0249129474 84 1.4536954608 -1.1091272321 85 -1.8069869235 1.4536954608 86 -1.6616138613 -1.8069869235 87 2.4146483015 -1.6616138613 88 -0.2872147832 2.4146483015 89 -0.0979694999 -0.2872147832 90 2.7205708532 -0.0979694999 91 1.0591202064 2.7205708532 92 0.7363808214 1.0591202064 93 -1.9482687823 0.7363808214 94 -0.6663420065 -1.9482687823 95 -1.1232685519 -0.6663420065 96 1.1651914765 -1.1232685519 97 -1.2414466685 1.1651914765 98 1.6816749839 -1.2414466685 99 -0.9733775621 1.6816749839 100 0.5193112788 -0.9733775621 101 -0.0685137263 0.5193112788 102 3.3009628473 -0.0685137263 103 2.2759217587 3.3009628473 104 -0.4210863328 2.2759217587 105 0.9206466323 -0.4210863328 106 1.4451208559 0.9206466323 107 -0.4605022774 1.4451208559 108 2.0541564657 -0.4605022774 109 3.3361001950 2.0541564657 110 0.6808644183 3.3361001950 111 -1.7647950427 0.6808644183 112 -0.3016576607 -1.7647950427 113 0.6438811223 -0.3016576607 114 1.2196158791 0.6438811223 115 -0.5997422004 1.2196158791 116 -0.2562178903 -0.5997422004 117 2.6946089462 -0.2562178903 118 -0.7100053530 2.6946089462 119 -0.9242922225 -0.7100053530 120 0.1908852174 -0.9242922225 121 -2.0030273252 0.1908852174 122 -0.2735552408 -2.0030273252 123 -0.6227499101 -0.2735552408 124 -0.5826488948 -0.6227499101 125 1.8044116226 -0.5826488948 126 0.4798036414 1.8044116226 127 -1.5858352056 0.4798036414 128 0.6945885868 -1.5858352056 129 -7.3423321021 0.6945885868 130 0.6021505101 -7.3423321021 131 -0.5934505145 0.6021505101 132 3.9130278808 -0.5934505145 133 1.2663168132 3.9130278808 134 0.0024684766 1.2663168132 135 0.8829180429 0.0024684766 136 -0.5911438736 0.8829180429 137 -0.3541344821 -0.5911438736 138 0.5240449635 -0.3541344821 139 0.2422439181 0.5240449635 140 -0.3727877506 0.2422439181 141 -0.3148335969 -0.3727877506 142 2.2834302655 -0.3148335969 143 -6.3421935818 2.2834302655 144 0.0520262838 -6.3421935818 145 -0.1810783374 0.0520262838 146 1.0836096886 -0.1810783374 147 0.1222364667 1.0836096886 148 -0.4494877871 0.1222364667 149 -0.2846955848 -0.4494877871 150 -1.2434534268 -0.2846955848 151 0.9375428751 -1.2434534268 152 -0.0024567157 0.9375428751 153 0.7931343200 -0.0024567157 154 -2.5793882745 0.7931343200 155 1.9190347432 -2.5793882745 > 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/www/html/rcomp/tmp/7llca1291121911.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/www/html/rcomp/tmp/8dcbd1291121911.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/www/html/rcomp/tmp/9dcbd1291121911.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/www/html/rcomp/tmp/10dcbd1291121911.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/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/www/html/rcomp/tmp/11s4941291121911.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/www/html/rcomp/tmp/12v47a1291121911.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/www/html/rcomp/tmp/13re511291121911.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/www/html/rcomp/tmp/14dx4p1291121911.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/www/html/rcomp/tmp/15yxku1291121911.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/www/html/rcomp/tmp/161gi01291121911.tab") + } > > try(system("convert tmp/1z2dn1291121911.ps tmp/1z2dn1291121911.png",intern=TRUE)) character(0) > try(system("convert tmp/2z2dn1291121911.ps tmp/2z2dn1291121911.png",intern=TRUE)) character(0) > try(system("convert tmp/3z2dn1291121911.ps tmp/3z2dn1291121911.png",intern=TRUE)) character(0) > try(system("convert tmp/4auup1291121911.ps tmp/4auup1291121911.png",intern=TRUE)) character(0) > try(system("convert tmp/5auup1291121911.ps tmp/5auup1291121911.png",intern=TRUE)) character(0) > try(system("convert tmp/6auup1291121911.ps tmp/6auup1291121911.png",intern=TRUE)) character(0) > try(system("convert tmp/7llca1291121911.ps tmp/7llca1291121911.png",intern=TRUE)) character(0) > try(system("convert tmp/8dcbd1291121911.ps tmp/8dcbd1291121911.png",intern=TRUE)) character(0) > try(system("convert tmp/9dcbd1291121911.ps tmp/9dcbd1291121911.png",intern=TRUE)) character(0) > try(system("convert tmp/10dcbd1291121911.ps tmp/10dcbd1291121911.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.148 1.816 9.889