R version 2.8.0 (2008-10-20) Copyright (C) 2008 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. Natural language support but running in an English locale 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(9 + ,24 + ,14 + ,11 + ,12 + ,24 + ,26 + ,9 + ,25 + ,11 + ,7 + ,8 + ,25 + ,23 + ,9 + ,17 + ,6 + ,17 + ,8 + ,30 + ,25 + ,9 + ,18 + ,12 + ,10 + ,8 + ,19 + ,23 + ,9 + ,18 + ,8 + ,12 + ,9 + ,22 + ,19 + ,9 + ,16 + ,10 + ,12 + ,7 + ,22 + ,29 + ,10 + ,20 + ,10 + ,11 + ,4 + ,25 + ,25 + ,10 + ,16 + ,11 + ,11 + ,11 + ,23 + ,21 + ,10 + ,18 + ,16 + ,12 + ,7 + ,17 + ,22 + ,10 + ,17 + ,11 + ,13 + ,7 + ,21 + ,25 + ,10 + ,23 + ,13 + ,14 + ,12 + ,19 + ,24 + ,10 + ,30 + ,12 + ,16 + ,10 + ,19 + ,18 + ,10 + ,23 + ,8 + ,11 + ,10 + ,15 + ,22 + ,10 + ,18 + ,12 + ,10 + ,8 + ,16 + ,15 + ,10 + ,15 + ,11 + ,11 + ,8 + ,23 + ,22 + ,10 + ,12 + ,4 + ,15 + ,4 + ,27 + ,28 + ,10 + ,21 + ,9 + ,9 + ,9 + ,22 + ,20 + ,10 + ,15 + ,8 + ,11 + ,8 + ,14 + ,12 + ,10 + ,20 + ,8 + ,17 + ,7 + ,22 + ,24 + ,10 + ,31 + ,14 + ,17 + ,11 + ,23 + ,20 + ,10 + ,27 + ,15 + ,11 + ,9 + ,23 + ,21 + ,10 + ,34 + ,16 + ,18 + ,11 + ,21 + ,20 + ,10 + ,21 + ,9 + ,14 + ,13 + ,19 + ,21 + ,10 + ,31 + ,14 + ,10 + ,8 + ,18 + ,23 + ,10 + ,19 + ,11 + ,11 + ,8 + ,20 + ,28 + ,10 + ,16 + ,8 + ,15 + ,9 + ,23 + ,24 + ,10 + ,20 + ,9 + ,15 + ,6 + ,25 + ,24 + ,10 + ,21 + ,9 + ,13 + ,9 + ,19 + ,24 + ,10 + ,22 + ,9 + ,16 + ,9 + ,24 + ,23 + ,10 + ,17 + ,9 + ,13 + ,6 + ,22 + ,23 + ,10 + ,24 + ,10 + ,9 + ,6 + ,25 + ,29 + ,10 + ,25 + ,16 + ,18 + ,16 + ,26 + ,24 + ,10 + ,26 + ,11 + ,18 + ,5 + ,29 + ,18 + ,10 + ,25 + ,8 + ,12 + ,7 + ,32 + ,25 + ,10 + ,17 + ,9 + ,17 + ,9 + ,25 + ,21 + ,10 + ,32 + ,16 + ,9 + ,6 + ,29 + ,26 + ,10 + ,33 + ,11 + ,9 + ,6 + ,28 + ,22 + ,10 + ,13 + ,16 + ,12 + ,5 + ,17 + ,22 + ,10 + ,32 + ,12 + ,18 + ,12 + ,28 + ,22 + ,10 + ,25 + ,12 + ,12 + ,7 + ,29 + ,23 + ,10 + ,29 + ,14 + ,18 + ,10 + ,26 + ,30 + ,10 + ,22 + ,9 + ,14 + ,9 + ,25 + ,23 + ,10 + ,18 + ,10 + ,15 + ,8 + ,14 + ,17 + ,10 + ,17 + ,9 + ,16 + ,5 + ,25 + ,23 + ,10 + ,20 + ,10 + ,10 + ,8 + ,26 + ,23 + ,10 + ,15 + ,12 + ,11 + ,8 + ,20 + ,25 + ,10 + ,20 + ,14 + ,14 + ,10 + ,18 + ,24 + ,10 + ,33 + ,14 + ,9 + ,6 + ,32 + ,24 + ,10 + ,29 + ,10 + ,12 + ,8 + ,25 + ,23 + ,10 + ,23 + ,14 + ,17 + ,7 + ,25 + ,21 + ,10 + ,26 + ,16 + ,5 + ,4 + ,23 + ,24 + ,10 + ,18 + ,9 + ,12 + ,8 + ,21 + ,24 + ,10 + ,20 + ,10 + ,12 + ,8 + ,20 + ,28 + ,10 + ,11 + ,6 + ,6 + ,4 + ,15 + ,16 + ,10 + ,28 + ,8 + ,24 + ,20 + ,30 + ,20 + ,10 + ,26 + ,13 + ,12 + ,8 + ,24 + ,29 + ,10 + ,22 + ,10 + ,12 + ,8 + ,26 + ,27 + ,10 + ,17 + ,8 + ,14 + ,6 + ,24 + ,22 + ,10 + ,12 + ,7 + ,7 + ,4 + ,22 + ,28 + ,10 + ,14 + ,15 + ,13 + ,8 + ,14 + ,16 + ,10 + ,17 + ,9 + ,12 + ,9 + ,24 + ,25 + ,10 + ,21 + ,10 + ,13 + ,6 + ,24 + ,24 + ,10 + ,19 + ,12 + ,14 + ,7 + ,24 + ,28 + ,10 + ,18 + ,13 + ,8 + ,9 + ,24 + ,24 + ,10 + ,10 + ,10 + ,11 + ,5 + ,19 + ,23 + ,10 + ,29 + ,11 + ,9 + ,5 + ,31 + ,30 + ,10 + ,31 + ,8 + ,11 + ,8 + ,22 + ,24 + ,10 + ,19 + ,9 + ,13 + ,8 + ,27 + ,21 + ,10 + ,9 + ,13 + ,10 + ,6 + ,19 + ,25 + ,10 + ,20 + ,11 + ,11 + ,8 + ,25 + ,25 + ,10 + ,28 + ,8 + ,12 + ,7 + ,20 + ,22 + ,10 + ,19 + ,9 + ,9 + ,7 + ,21 + ,23 + ,10 + ,30 + ,9 + ,15 + ,9 + ,27 + ,26 + ,10 + ,29 + ,15 + ,18 + ,11 + ,23 + ,23 + ,10 + ,26 + ,9 + ,15 + ,6 + ,25 + ,25 + ,10 + ,23 + ,10 + ,12 + ,8 + ,20 + ,21 + ,10 + ,13 + ,14 + ,13 + ,6 + ,21 + ,25 + ,10 + ,21 + ,12 + ,14 + ,9 + ,22 + ,24 + ,10 + ,19 + ,12 + ,10 + ,8 + ,23 + ,29 + ,10 + ,28 + ,11 + ,13 + ,6 + ,25 + ,22 + ,10 + ,23 + ,14 + ,13 + ,10 + ,25 + ,27 + ,10 + ,18 + ,6 + ,11 + ,8 + ,17 + ,26 + ,10 + ,21 + ,12 + ,13 + ,8 + ,19 + ,22 + ,10 + ,20 + ,8 + ,16 + ,10 + ,25 + ,24 + ,10 + ,23 + ,14 + ,8 + ,5 + ,19 + ,27 + ,10 + ,21 + ,11 + ,16 + ,7 + ,20 + ,24 + ,10 + ,21 + ,10 + ,11 + ,5 + ,26 + ,24 + ,10 + ,15 + ,14 + ,9 + ,8 + ,23 + ,29 + ,10 + ,28 + ,12 + ,16 + ,14 + ,27 + ,22 + ,10 + ,19 + ,10 + ,12 + ,7 + ,17 + ,21 + ,10 + ,26 + ,14 + ,14 + ,8 + ,17 + ,24 + ,10 + ,10 + ,5 + ,8 + ,6 + ,19 + ,24 + ,10 + ,16 + ,11 + ,9 + ,5 + ,17 + ,23 + ,10 + ,22 + ,10 + ,15 + ,6 + ,22 + ,20 + ,10 + ,19 + ,9 + ,11 + ,10 + ,21 + ,27 + ,10 + ,31 + ,10 + ,21 + ,12 + ,32 + ,26 + ,10 + ,31 + ,16 + ,14 + ,9 + ,21 + ,25 + ,10 + ,29 + ,13 + ,18 + ,12 + ,21 + ,21 + ,10 + ,19 + ,9 + ,12 + ,7 + ,18 + ,21 + ,10 + ,22 + ,10 + ,13 + ,8 + ,18 + ,19 + ,10 + ,23 + ,10 + ,15 + ,10 + ,23 + ,21 + ,10 + ,15 + ,7 + ,12 + ,6 + ,19 + ,21 + ,10 + ,20 + ,9 + ,19 + ,10 + ,20 + ,16 + ,10 + ,18 + ,8 + ,15 + ,10 + ,21 + ,22 + ,10 + ,23 + ,14 + ,11 + ,10 + ,20 + ,29 + ,10 + ,25 + ,14 + ,11 + ,5 + ,17 + ,15 + ,10 + ,21 + ,8 + ,10 + ,7 + ,18 + ,17 + ,10 + ,24 + ,9 + ,13 + ,10 + ,19 + ,15 + ,10 + ,25 + ,14 + ,15 + ,11 + ,22 + ,21 + ,10 + ,17 + ,14 + ,12 + ,6 + ,15 + ,21 + ,10 + ,13 + ,8 + ,12 + ,7 + ,14 + ,19 + ,10 + ,28 + ,8 + ,16 + ,12 + ,18 + ,24 + ,10 + ,21 + ,8 + ,9 + ,11 + ,24 + ,20 + ,10 + ,25 + ,7 + ,18 + ,11 + ,35 + ,17 + ,10 + ,9 + ,6 + ,8 + ,11 + ,29 + ,23 + ,10 + ,16 + ,8 + ,13 + ,5 + ,21 + ,24 + ,10 + ,19 + ,6 + ,17 + ,8 + ,25 + ,14 + ,10 + ,17 + ,11 + ,9 + ,6 + ,20 + ,19 + ,10 + ,25 + ,14 + ,15 + ,9 + ,22 + ,24 + ,10 + ,20 + ,11 + ,8 + ,4 + ,13 + ,13 + ,10 + ,29 + ,11 + ,7 + ,4 + ,26 + ,22 + ,10 + ,14 + ,11 + ,12 + ,7 + ,17 + ,16 + ,10 + ,22 + ,14 + ,14 + ,11 + ,25 + ,19 + ,10 + ,15 + ,8 + ,6 + ,6 + ,20 + ,25 + ,10 + ,19 + ,20 + ,8 + ,7 + ,19 + ,25 + ,10 + ,20 + ,11 + ,17 + ,8 + ,21 + ,23 + ,10 + ,15 + ,8 + ,10 + ,4 + ,22 + ,24 + ,10 + ,20 + ,11 + ,11 + ,8 + ,24 + ,26 + ,10 + ,18 + ,10 + ,14 + ,9 + ,21 + ,26 + ,10 + ,33 + ,14 + ,11 + ,8 + ,26 + ,25 + ,10 + ,22 + ,11 + ,13 + ,11 + ,24 + ,18 + ,10 + ,16 + ,9 + ,12 + ,8 + ,16 + ,21 + ,10 + ,17 + ,9 + ,11 + ,5 + ,23 + ,26 + ,10 + ,16 + ,8 + ,9 + ,4 + ,18 + ,23 + ,10 + ,21 + ,10 + ,12 + ,8 + ,16 + ,23 + ,10 + ,26 + ,13 + ,20 + ,10 + ,26 + ,22 + ,10 + ,18 + ,13 + ,12 + ,6 + ,19 + ,20 + ,10 + ,18 + ,12 + ,13 + ,9 + ,21 + ,13 + ,10 + ,17 + ,8 + ,12 + ,9 + ,21 + ,24 + ,10 + ,22 + ,13 + ,12 + ,13 + ,22 + ,15 + ,10 + ,30 + ,14 + ,9 + ,9 + ,23 + ,14 + ,10 + ,30 + ,12 + ,15 + ,10 + ,29 + ,22 + ,10 + ,24 + ,14 + ,24 + ,20 + ,21 + ,10 + ,10 + ,21 + ,15 + ,7 + ,5 + ,21 + ,24 + ,10 + ,21 + ,13 + ,17 + ,11 + ,23 + ,22 + ,10 + ,29 + ,16 + ,11 + ,6 + ,27 + ,24 + ,10 + ,31 + ,9 + ,17 + ,9 + ,25 + ,19 + ,10 + ,20 + ,9 + ,11 + ,7 + ,21 + ,20 + ,10 + ,16 + ,9 + ,12 + ,9 + ,10 + ,13 + ,10 + ,22 + ,8 + ,14 + ,10 + ,20 + ,20 + ,10 + ,20 + ,7 + ,11 + ,9 + ,26 + ,22 + ,10 + ,28 + ,16 + ,16 + ,8 + ,24 + ,24 + ,10 + ,38 + ,11 + ,21 + ,7 + ,29 + ,29 + ,10 + ,22 + ,9 + ,14 + ,6 + ,19 + ,12 + ,10 + ,20 + ,11 + ,20 + ,13 + ,24 + ,20 + ,10 + ,17 + ,9 + ,13 + ,6 + ,19 + ,21 + ,10 + ,28 + ,14 + ,11 + ,8 + ,24 + ,24 + ,10 + ,22 + ,13 + ,15 + ,10 + ,22 + ,22 + ,10 + ,31 + ,16 + ,19 + ,16 + ,17 + ,20) + ,dim=c(7 + ,159) + ,dimnames=list(c('Month' + ,'Concern.over.Mistakes' + ,'Doubts.about.actions' + ,'Parental.Expectations' + ,'Parental.Criticism' + ,'Personal.Standards' + ,'Organization') + ,1:159)) > y <- array(NA,dim=c(7,159),dimnames=list(c('Month','Concern.over.Mistakes','Doubts.about.actions','Parental.Expectations','Parental.Criticism','Personal.Standards','Organization'),1:159)) > 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 = '4' > #'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 Parental.Expectations Month Concern.over.Mistakes Doubts.about.actions 1 11 9 24 14 2 7 9 25 11 3 17 9 17 6 4 10 9 18 12 5 12 9 18 8 6 12 9 16 10 7 11 10 20 10 8 11 10 16 11 9 12 10 18 16 10 13 10 17 11 11 14 10 23 13 12 16 10 30 12 13 11 10 23 8 14 10 10 18 12 15 11 10 15 11 16 15 10 12 4 17 9 10 21 9 18 11 10 15 8 19 17 10 20 8 20 17 10 31 14 21 11 10 27 15 22 18 10 34 16 23 14 10 21 9 24 10 10 31 14 25 11 10 19 11 26 15 10 16 8 27 15 10 20 9 28 13 10 21 9 29 16 10 22 9 30 13 10 17 9 31 9 10 24 10 32 18 10 25 16 33 18 10 26 11 34 12 10 25 8 35 17 10 17 9 36 9 10 32 16 37 9 10 33 11 38 12 10 13 16 39 18 10 32 12 40 12 10 25 12 41 18 10 29 14 42 14 10 22 9 43 15 10 18 10 44 16 10 17 9 45 10 10 20 10 46 11 10 15 12 47 14 10 20 14 48 9 10 33 14 49 12 10 29 10 50 17 10 23 14 51 5 10 26 16 52 12 10 18 9 53 12 10 20 10 54 6 10 11 6 55 24 10 28 8 56 12 10 26 13 57 12 10 22 10 58 14 10 17 8 59 7 10 12 7 60 13 10 14 15 61 12 10 17 9 62 13 10 21 10 63 14 10 19 12 64 8 10 18 13 65 11 10 10 10 66 9 10 29 11 67 11 10 31 8 68 13 10 19 9 69 10 10 9 13 70 11 10 20 11 71 12 10 28 8 72 9 10 19 9 73 15 10 30 9 74 18 10 29 15 75 15 10 26 9 76 12 10 23 10 77 13 10 13 14 78 14 10 21 12 79 10 10 19 12 80 13 10 28 11 81 13 10 23 14 82 11 10 18 6 83 13 10 21 12 84 16 10 20 8 85 8 10 23 14 86 16 10 21 11 87 11 10 21 10 88 9 10 15 14 89 16 10 28 12 90 12 10 19 10 91 14 10 26 14 92 8 10 10 5 93 9 10 16 11 94 15 10 22 10 95 11 10 19 9 96 21 10 31 10 97 14 10 31 16 98 18 10 29 13 99 12 10 19 9 100 13 10 22 10 101 15 10 23 10 102 12 10 15 7 103 19 10 20 9 104 15 10 18 8 105 11 10 23 14 106 11 10 25 14 107 10 10 21 8 108 13 10 24 9 109 15 10 25 14 110 12 10 17 14 111 12 10 13 8 112 16 10 28 8 113 9 10 21 8 114 18 10 25 7 115 8 10 9 6 116 13 10 16 8 117 17 10 19 6 118 9 10 17 11 119 15 10 25 14 120 8 10 20 11 121 7 10 29 11 122 12 10 14 11 123 14 10 22 14 124 6 10 15 8 125 8 10 19 20 126 17 10 20 11 127 10 10 15 8 128 11 10 20 11 129 14 10 18 10 130 11 10 33 14 131 13 10 22 11 132 12 10 16 9 133 11 10 17 9 134 9 10 16 8 135 12 10 21 10 136 20 10 26 13 137 12 10 18 13 138 13 10 18 12 139 12 10 17 8 140 12 10 22 13 141 9 10 30 14 142 15 10 30 12 143 24 10 24 14 144 7 10 21 15 145 17 10 21 13 146 11 10 29 16 147 17 10 31 9 148 11 10 20 9 149 12 10 16 9 150 14 10 22 8 151 11 10 20 7 152 16 10 28 16 153 21 10 38 11 154 14 10 22 9 155 20 10 20 11 156 13 10 17 9 157 11 10 28 14 158 15 10 22 13 159 19 10 31 16 Parental.Criticism Personal.Standards Organization t 1 12 24 26 1 2 8 25 23 2 3 8 30 25 3 4 8 19 23 4 5 9 22 19 5 6 7 22 29 6 7 4 25 25 7 8 11 23 21 8 9 7 17 22 9 10 7 21 25 10 11 12 19 24 11 12 10 19 18 12 13 10 15 22 13 14 8 16 15 14 15 8 23 22 15 16 4 27 28 16 17 9 22 20 17 18 8 14 12 18 19 7 22 24 19 20 11 23 20 20 21 9 23 21 21 22 11 21 20 22 23 13 19 21 23 24 8 18 23 24 25 8 20 28 25 26 9 23 24 26 27 6 25 24 27 28 9 19 24 28 29 9 24 23 29 30 6 22 23 30 31 6 25 29 31 32 16 26 24 32 33 5 29 18 33 34 7 32 25 34 35 9 25 21 35 36 6 29 26 36 37 6 28 22 37 38 5 17 22 38 39 12 28 22 39 40 7 29 23 40 41 10 26 30 41 42 9 25 23 42 43 8 14 17 43 44 5 25 23 44 45 8 26 23 45 46 8 20 25 46 47 10 18 24 47 48 6 32 24 48 49 8 25 23 49 50 7 25 21 50 51 4 23 24 51 52 8 21 24 52 53 8 20 28 53 54 4 15 16 54 55 20 30 20 55 56 8 24 29 56 57 8 26 27 57 58 6 24 22 58 59 4 22 28 59 60 8 14 16 60 61 9 24 25 61 62 6 24 24 62 63 7 24 28 63 64 9 24 24 64 65 5 19 23 65 66 5 31 30 66 67 8 22 24 67 68 8 27 21 68 69 6 19 25 69 70 8 25 25 70 71 7 20 22 71 72 7 21 23 72 73 9 27 26 73 74 11 23 23 74 75 6 25 25 75 76 8 20 21 76 77 6 21 25 77 78 9 22 24 78 79 8 23 29 79 80 6 25 22 80 81 10 25 27 81 82 8 17 26 82 83 8 19 22 83 84 10 25 24 84 85 5 19 27 85 86 7 20 24 86 87 5 26 24 87 88 8 23 29 88 89 14 27 22 89 90 7 17 21 90 91 8 17 24 91 92 6 19 24 92 93 5 17 23 93 94 6 22 20 94 95 10 21 27 95 96 12 32 26 96 97 9 21 25 97 98 12 21 21 98 99 7 18 21 99 100 8 18 19 100 101 10 23 21 101 102 6 19 21 102 103 10 20 16 103 104 10 21 22 104 105 10 20 29 105 106 5 17 15 106 107 7 18 17 107 108 10 19 15 108 109 11 22 21 109 110 6 15 21 110 111 7 14 19 111 112 12 18 24 112 113 11 24 20 113 114 11 35 17 114 115 11 29 23 115 116 5 21 24 116 117 8 25 14 117 118 6 20 19 118 119 9 22 24 119 120 4 13 13 120 121 4 26 22 121 122 7 17 16 122 123 11 25 19 123 124 6 20 25 124 125 7 19 25 125 126 8 21 23 126 127 4 22 24 127 128 8 24 26 128 129 9 21 26 129 130 8 26 25 130 131 11 24 18 131 132 8 16 21 132 133 5 23 26 133 134 4 18 23 134 135 8 16 23 135 136 10 26 22 136 137 6 19 20 137 138 9 21 13 138 139 9 21 24 139 140 13 22 15 140 141 9 23 14 141 142 10 29 22 142 143 20 21 10 143 144 5 21 24 144 145 11 23 22 145 146 6 27 24 146 147 9 25 19 147 148 7 21 20 148 149 9 10 13 149 150 10 20 20 150 151 9 26 22 151 152 8 24 24 152 153 7 29 29 153 154 6 19 12 154 155 13 24 20 155 156 6 19 21 156 157 8 24 24 157 158 10 22 22 158 159 16 17 20 159 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Month Concern.over.Mistakes -1.072e+01 1.672e+00 8.400e-02 Doubts.about.actions Parental.Criticism Personal.Standards -1.272e-01 6.750e-01 1.229e-01 Organization t -8.061e-02 1.835e-04 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.15120 -1.90721 -0.02066 1.81103 7.22547 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.072e+01 1.199e+01 -0.894 0.3729 Month 1.672e+00 1.196e+00 1.398 0.1640 Concern.over.Mistakes 8.400e-02 4.833e-02 1.738 0.0843 . Doubts.about.actions -1.272e-01 8.719e-02 -1.458 0.1468 Parental.Criticism 6.750e-01 8.651e-02 7.803 9.3e-13 *** Personal.Standards 1.229e-01 6.334e-02 1.941 0.0541 . Organization -8.061e-02 6.312e-02 -1.277 0.2035 t 1.835e-04 5.064e-03 0.036 0.9711 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 2.694 on 151 degrees of freedom Multiple R-squared: 0.4159, Adjusted R-squared: 0.3888 F-statistic: 15.36 on 7 and 151 DF, p-value: 4.314e-15 > 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.65865876 0.68268249 0.34134124 [2,] 0.54907762 0.90184477 0.45092238 [3,] 0.42649657 0.85299315 0.57350343 [4,] 0.60063394 0.79873212 0.39936606 [5,] 0.71970849 0.56058303 0.28029151 [6,] 0.64382871 0.71234257 0.35617129 [7,] 0.74055658 0.51888684 0.25944342 [8,] 0.66513259 0.66973483 0.33486741 [9,] 0.72018193 0.55963614 0.27981807 [10,] 0.67851880 0.64296241 0.32148120 [11,] 0.70178317 0.59643365 0.29821683 [12,] 0.71194412 0.57611176 0.28805588 [13,] 0.66282992 0.67434016 0.33717008 [14,] 0.74181581 0.51636839 0.25818419 [15,] 0.71190352 0.57619295 0.28809648 [16,] 0.65672774 0.68654453 0.34327226 [17,] 0.60818245 0.78363509 0.39181755 [18,] 0.54403278 0.91193443 0.45596722 [19,] 0.48577646 0.97155291 0.51422354 [20,] 0.42502731 0.85005461 0.57497269 [21,] 0.57591462 0.84817076 0.42408538 [22,] 0.52282641 0.95434718 0.47717359 [23,] 0.55700473 0.88599054 0.44299527 [24,] 0.66611028 0.66777945 0.33388972 [25,] 0.65093329 0.69813343 0.34906671 [26,] 0.72314901 0.55370197 0.27685099 [27,] 0.79040131 0.41919739 0.20959869 [28,] 0.77342449 0.45315102 0.22657551 [29,] 0.74518830 0.50962339 0.25481170 [30,] 0.72188933 0.55622133 0.27811067 [31,] 0.75924286 0.48151428 0.24075714 [32,] 0.72068664 0.55862673 0.27931336 [33,] 0.70484403 0.59031193 0.29515597 [34,] 0.74531339 0.50937322 0.25468661 [35,] 0.81513765 0.36972469 0.18486235 [36,] 0.79990731 0.40018537 0.20009269 [37,] 0.76294396 0.47411208 0.23705604 [38,] 0.80765508 0.38468984 0.19234492 [39,] 0.78623324 0.42753352 0.21376676 [40,] 0.83814328 0.32371343 0.16185672 [41,] 0.90102914 0.19794172 0.09897086 [42,] 0.88276743 0.23446513 0.11723257 [43,] 0.85678705 0.28642591 0.14321295 [44,] 0.88605877 0.22788245 0.11394123 [45,] 0.86381809 0.27236382 0.13618191 [46,] 0.83573247 0.32853506 0.16426753 [47,] 0.81003961 0.37992078 0.18996039 [48,] 0.79881423 0.40237155 0.20118577 [49,] 0.80076967 0.39846065 0.19923033 [50,] 0.78148253 0.43703494 0.21851747 [51,] 0.75729504 0.48540992 0.24270496 [52,] 0.73202507 0.53594985 0.26797493 [53,] 0.72641626 0.54716748 0.27358374 [54,] 0.81729555 0.36540890 0.18270445 [55,] 0.79870175 0.40259651 0.20129825 [56,] 0.79154720 0.41690561 0.20845280 [57,] 0.78734079 0.42531843 0.21265921 [58,] 0.75304661 0.49390677 0.24695339 [59,] 0.72292299 0.55415402 0.27707701 [60,] 0.69362427 0.61275146 0.30637573 [61,] 0.66586243 0.66827514 0.33413757 [62,] 0.66238506 0.67522988 0.33761494 [63,] 0.63165829 0.73668341 0.36834171 [64,] 0.66409749 0.67180502 0.33590251 [65,] 0.67654903 0.64690195 0.32345097 [66,] 0.63743562 0.72512875 0.36256438 [67,] 0.67026502 0.65946997 0.32973498 [68,] 0.63392727 0.73214546 0.36607273 [69,] 0.60749252 0.78501497 0.39250748 [70,] 0.56755006 0.86489987 0.43244994 [71,] 0.52263147 0.95473706 0.47736853 [72,] 0.48510360 0.97020720 0.51489640 [73,] 0.44427087 0.88854173 0.55572913 [74,] 0.41275131 0.82550262 0.58724869 [75,] 0.38231126 0.76462252 0.61768874 [76,] 0.46671967 0.93343935 0.53328033 [77,] 0.42180848 0.84361697 0.57819152 [78,] 0.40288484 0.80576969 0.59711516 [79,] 0.37862719 0.75725438 0.62137281 [80,] 0.33651291 0.67302582 0.66348709 [81,] 0.32117368 0.64234736 0.67882632 [82,] 0.31473458 0.62946916 0.68526542 [83,] 0.27408100 0.54816199 0.72591900 [84,] 0.29782339 0.59564678 0.70217661 [85,] 0.29183166 0.58366333 0.70816834 [86,] 0.32658340 0.65316680 0.67341660 [87,] 0.28922773 0.57845546 0.71077227 [88,] 0.27128659 0.54257317 0.72871341 [89,] 0.23332865 0.46665731 0.76667135 [90,] 0.19807390 0.39614780 0.80192610 [91,] 0.16781037 0.33562074 0.83218963 [92,] 0.14619788 0.29239576 0.85380212 [93,] 0.21646407 0.43292815 0.78353593 [94,] 0.19492742 0.38985483 0.80507258 [95,] 0.17376698 0.34753397 0.82623302 [96,] 0.14845276 0.29690552 0.85154724 [97,] 0.13685550 0.27371101 0.86314450 [98,] 0.11979363 0.23958726 0.88020637 [99,] 0.09772587 0.19545174 0.90227413 [100,] 0.09959941 0.19919881 0.90040059 [101,] 0.08860833 0.17721665 0.91139167 [102,] 0.07048583 0.14097165 0.92951417 [103,] 0.17466392 0.34932784 0.82533608 [104,] 0.15266083 0.30532166 0.84733917 [105,] 0.33918722 0.67837443 0.66081278 [106,] 0.34778014 0.69556028 0.65221986 [107,] 0.40222680 0.80445361 0.59777320 [108,] 0.35988556 0.71977112 0.64011444 [109,] 0.34497281 0.68994563 0.65502719 [110,] 0.31096069 0.62192138 0.68903931 [111,] 0.31924811 0.63849622 0.68075189 [112,] 0.31565914 0.63131827 0.68434086 [113,] 0.26786295 0.53572589 0.73213705 [114,] 0.34594374 0.69188749 0.65405626 [115,] 0.29887564 0.59775128 0.70112436 [116,] 0.43473945 0.86947890 0.56526055 [117,] 0.38835995 0.77671990 0.61164005 [118,] 0.34056815 0.68113630 0.65943185 [119,] 0.29276180 0.58552359 0.70723820 [120,] 0.28791464 0.57582928 0.71208536 [121,] 0.25767439 0.51534878 0.74232561 [122,] 0.20690429 0.41380858 0.79309571 [123,] 0.16407175 0.32814350 0.83592825 [124,] 0.12491039 0.24982077 0.87508961 [125,] 0.09248219 0.18496438 0.90751781 [126,] 0.19760478 0.39520956 0.80239522 [127,] 0.24371781 0.48743563 0.75628219 [128,] 0.24363190 0.48726381 0.75636810 [129,] 0.18516225 0.37032450 0.81483775 [130,] 0.18336026 0.36672052 0.81663974 [131,] 0.32297433 0.64594866 0.67702567 [132,] 0.27802788 0.55605576 0.72197212 [133,] 0.21381819 0.42763638 0.78618181 [134,] 0.17029544 0.34059087 0.82970456 [135,] 0.18706818 0.37413636 0.81293182 [136,] 0.12952868 0.25905736 0.87047132 [137,] 0.07545850 0.15091700 0.92454150 [138,] 0.04135692 0.08271384 0.95864308 > postscript(file="/var/www/html/freestat/rcomp/tmp/1g4jf1291136512.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/freestat/rcomp/tmp/2g4jf1291136512.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/freestat/rcomp/tmp/39v001291136512.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/freestat/rcomp/tmp/49v001291136512.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/freestat/rcomp/tmp/59v001291136512.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 = 159 Frequency = 1 1 2 3 4 5 6 -2.519273192 -4.649680524 4.932848980 -0.197331286 -0.072408219 2.505844241 7 8 9 10 11 12 0.831313063 -3.507348749 1.478511925 1.676618797 -0.782986491 1.368047948 13 14 15 16 17 18 -2.738650008 -2.147406139 -1.319010299 4.734617553 -4.790968269 -1.400774552 19 20 21 22 23 24 4.837952683 1.531399997 -2.575018785 2.779235571 -2.042686592 -2.587826712 25 26 27 28 29 30 -0.804365080 1.699705372 3.269858221 -0.101748488 2.118804652 1.809476153 31 32 33 34 35 36 -2.536638563 -0.133886113 5.718725625 -1.733478712 3.253525216 -3.180100987 37 38 39 40 41 42 -4.099603735 3.243176584 1.061152601 -1.018357953 3.807857521 -0.006512427 43 44 45 46 47 48 3.000032346 5.113118295 -3.159836381 -0.586909332 1.062497397 -4.050639184 49 50 51 52 53 54 -1.793594065 4.732625576 -4.752505364 -0.425024921 -0.020660675 -3.426190326 55 56 57 58 59 60 1.078416871 -0.554809128 -1.007584543 2.350701641 -2.277128924 1.888093495 61 62 63 64 65 66 -1.305870568 1.429534229 2.499103737 -4.962377714 1.561980873 -2.817846234 67 68 69 70 71 72 -2.769806536 -0.491377859 0.512945206 -1.753108293 -0.758908905 -2.918295426 73 74 75 76 77 78 0.311808742 3.058475890 2.837690729 -0.841143348 3.056796493 0.901768721 79 80 81 82 83 84 -1.975295605 0.681274878 -0.814414240 -1.159069351 0.783429272 1.432213224 85 86 87 88 89 90 -1.702531118 4.369012582 -0.145910752 -2.386642435 -1.839122633 0.536067663 91 92 93 94 95 96 2.023395752 -2.673180260 -0.574102157 3.263085920 -2.625089157 3.711081031 97 98 99 100 101 102 0.770523773 2.209382284 0.284322272 0.323088419 0.435463198 0.917501307 103 104 105 106 107 108 4.525658326 0.927036977 -2.042939113 0.404156220 -2.334742133 -1.768918791 109 110 111 112 113 114 0.222580289 2.129905512 0.989431800 0.265623832 -6.531621697 0.410973259 115 116 117 118 119 120 -7.151197618 2.629075225 2.799729190 -2.028928922 1.812589515 -1.554415307 121 122 123 124 125 126 -4.183164114 0.674277850 -1.058020179 -4.759861036 -2.122150644 4.567119131 127 128 129 130 131 132 0.263125845 -1.560209320 1.174223592 -2.597498402 -2.398654806 0.101108805 133 134 135 136 137 138 0.584481959 -0.411038842 -0.031032458 5.270358985 1.341456557 -0.621046179 139 140 141 142 143 144 -1.159163153 -4.491963061 -5.540464120 -0.562678873 2.461495570 -2.905901655 145 146 147 148 149 150 2.382471216 -0.863660916 1.895820105 -1.258070053 -0.484315621 -0.455674976 151 152 153 154 155 156 -3.316391969 3.238016119 7.225474026 1.848819546 3.576141665 1.993926518 157 158 159 -2.017226115 1.094027731 1.122777497 > postscript(file="/var/www/html/freestat/rcomp/tmp/62mz21291136512.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 = 159 Frequency = 1 lag(myerror, k = 1) myerror 0 -2.519273192 NA 1 -4.649680524 -2.519273192 2 4.932848980 -4.649680524 3 -0.197331286 4.932848980 4 -0.072408219 -0.197331286 5 2.505844241 -0.072408219 6 0.831313063 2.505844241 7 -3.507348749 0.831313063 8 1.478511925 -3.507348749 9 1.676618797 1.478511925 10 -0.782986491 1.676618797 11 1.368047948 -0.782986491 12 -2.738650008 1.368047948 13 -2.147406139 -2.738650008 14 -1.319010299 -2.147406139 15 4.734617553 -1.319010299 16 -4.790968269 4.734617553 17 -1.400774552 -4.790968269 18 4.837952683 -1.400774552 19 1.531399997 4.837952683 20 -2.575018785 1.531399997 21 2.779235571 -2.575018785 22 -2.042686592 2.779235571 23 -2.587826712 -2.042686592 24 -0.804365080 -2.587826712 25 1.699705372 -0.804365080 26 3.269858221 1.699705372 27 -0.101748488 3.269858221 28 2.118804652 -0.101748488 29 1.809476153 2.118804652 30 -2.536638563 1.809476153 31 -0.133886113 -2.536638563 32 5.718725625 -0.133886113 33 -1.733478712 5.718725625 34 3.253525216 -1.733478712 35 -3.180100987 3.253525216 36 -4.099603735 -3.180100987 37 3.243176584 -4.099603735 38 1.061152601 3.243176584 39 -1.018357953 1.061152601 40 3.807857521 -1.018357953 41 -0.006512427 3.807857521 42 3.000032346 -0.006512427 43 5.113118295 3.000032346 44 -3.159836381 5.113118295 45 -0.586909332 -3.159836381 46 1.062497397 -0.586909332 47 -4.050639184 1.062497397 48 -1.793594065 -4.050639184 49 4.732625576 -1.793594065 50 -4.752505364 4.732625576 51 -0.425024921 -4.752505364 52 -0.020660675 -0.425024921 53 -3.426190326 -0.020660675 54 1.078416871 -3.426190326 55 -0.554809128 1.078416871 56 -1.007584543 -0.554809128 57 2.350701641 -1.007584543 58 -2.277128924 2.350701641 59 1.888093495 -2.277128924 60 -1.305870568 1.888093495 61 1.429534229 -1.305870568 62 2.499103737 1.429534229 63 -4.962377714 2.499103737 64 1.561980873 -4.962377714 65 -2.817846234 1.561980873 66 -2.769806536 -2.817846234 67 -0.491377859 -2.769806536 68 0.512945206 -0.491377859 69 -1.753108293 0.512945206 70 -0.758908905 -1.753108293 71 -2.918295426 -0.758908905 72 0.311808742 -2.918295426 73 3.058475890 0.311808742 74 2.837690729 3.058475890 75 -0.841143348 2.837690729 76 3.056796493 -0.841143348 77 0.901768721 3.056796493 78 -1.975295605 0.901768721 79 0.681274878 -1.975295605 80 -0.814414240 0.681274878 81 -1.159069351 -0.814414240 82 0.783429272 -1.159069351 83 1.432213224 0.783429272 84 -1.702531118 1.432213224 85 4.369012582 -1.702531118 86 -0.145910752 4.369012582 87 -2.386642435 -0.145910752 88 -1.839122633 -2.386642435 89 0.536067663 -1.839122633 90 2.023395752 0.536067663 91 -2.673180260 2.023395752 92 -0.574102157 -2.673180260 93 3.263085920 -0.574102157 94 -2.625089157 3.263085920 95 3.711081031 -2.625089157 96 0.770523773 3.711081031 97 2.209382284 0.770523773 98 0.284322272 2.209382284 99 0.323088419 0.284322272 100 0.435463198 0.323088419 101 0.917501307 0.435463198 102 4.525658326 0.917501307 103 0.927036977 4.525658326 104 -2.042939113 0.927036977 105 0.404156220 -2.042939113 106 -2.334742133 0.404156220 107 -1.768918791 -2.334742133 108 0.222580289 -1.768918791 109 2.129905512 0.222580289 110 0.989431800 2.129905512 111 0.265623832 0.989431800 112 -6.531621697 0.265623832 113 0.410973259 -6.531621697 114 -7.151197618 0.410973259 115 2.629075225 -7.151197618 116 2.799729190 2.629075225 117 -2.028928922 2.799729190 118 1.812589515 -2.028928922 119 -1.554415307 1.812589515 120 -4.183164114 -1.554415307 121 0.674277850 -4.183164114 122 -1.058020179 0.674277850 123 -4.759861036 -1.058020179 124 -2.122150644 -4.759861036 125 4.567119131 -2.122150644 126 0.263125845 4.567119131 127 -1.560209320 0.263125845 128 1.174223592 -1.560209320 129 -2.597498402 1.174223592 130 -2.398654806 -2.597498402 131 0.101108805 -2.398654806 132 0.584481959 0.101108805 133 -0.411038842 0.584481959 134 -0.031032458 -0.411038842 135 5.270358985 -0.031032458 136 1.341456557 5.270358985 137 -0.621046179 1.341456557 138 -1.159163153 -0.621046179 139 -4.491963061 -1.159163153 140 -5.540464120 -4.491963061 141 -0.562678873 -5.540464120 142 2.461495570 -0.562678873 143 -2.905901655 2.461495570 144 2.382471216 -2.905901655 145 -0.863660916 2.382471216 146 1.895820105 -0.863660916 147 -1.258070053 1.895820105 148 -0.484315621 -1.258070053 149 -0.455674976 -0.484315621 150 -3.316391969 -0.455674976 151 3.238016119 -3.316391969 152 7.225474026 3.238016119 153 1.848819546 7.225474026 154 3.576141665 1.848819546 155 1.993926518 3.576141665 156 -2.017226115 1.993926518 157 1.094027731 -2.017226115 158 1.122777497 1.094027731 159 NA 1.122777497 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -4.649680524 -2.519273192 [2,] 4.932848980 -4.649680524 [3,] -0.197331286 4.932848980 [4,] -0.072408219 -0.197331286 [5,] 2.505844241 -0.072408219 [6,] 0.831313063 2.505844241 [7,] -3.507348749 0.831313063 [8,] 1.478511925 -3.507348749 [9,] 1.676618797 1.478511925 [10,] -0.782986491 1.676618797 [11,] 1.368047948 -0.782986491 [12,] -2.738650008 1.368047948 [13,] -2.147406139 -2.738650008 [14,] -1.319010299 -2.147406139 [15,] 4.734617553 -1.319010299 [16,] -4.790968269 4.734617553 [17,] -1.400774552 -4.790968269 [18,] 4.837952683 -1.400774552 [19,] 1.531399997 4.837952683 [20,] -2.575018785 1.531399997 [21,] 2.779235571 -2.575018785 [22,] -2.042686592 2.779235571 [23,] -2.587826712 -2.042686592 [24,] -0.804365080 -2.587826712 [25,] 1.699705372 -0.804365080 [26,] 3.269858221 1.699705372 [27,] -0.101748488 3.269858221 [28,] 2.118804652 -0.101748488 [29,] 1.809476153 2.118804652 [30,] -2.536638563 1.809476153 [31,] -0.133886113 -2.536638563 [32,] 5.718725625 -0.133886113 [33,] -1.733478712 5.718725625 [34,] 3.253525216 -1.733478712 [35,] -3.180100987 3.253525216 [36,] -4.099603735 -3.180100987 [37,] 3.243176584 -4.099603735 [38,] 1.061152601 3.243176584 [39,] -1.018357953 1.061152601 [40,] 3.807857521 -1.018357953 [41,] -0.006512427 3.807857521 [42,] 3.000032346 -0.006512427 [43,] 5.113118295 3.000032346 [44,] -3.159836381 5.113118295 [45,] -0.586909332 -3.159836381 [46,] 1.062497397 -0.586909332 [47,] -4.050639184 1.062497397 [48,] -1.793594065 -4.050639184 [49,] 4.732625576 -1.793594065 [50,] -4.752505364 4.732625576 [51,] -0.425024921 -4.752505364 [52,] -0.020660675 -0.425024921 [53,] -3.426190326 -0.020660675 [54,] 1.078416871 -3.426190326 [55,] -0.554809128 1.078416871 [56,] -1.007584543 -0.554809128 [57,] 2.350701641 -1.007584543 [58,] -2.277128924 2.350701641 [59,] 1.888093495 -2.277128924 [60,] -1.305870568 1.888093495 [61,] 1.429534229 -1.305870568 [62,] 2.499103737 1.429534229 [63,] -4.962377714 2.499103737 [64,] 1.561980873 -4.962377714 [65,] -2.817846234 1.561980873 [66,] -2.769806536 -2.817846234 [67,] -0.491377859 -2.769806536 [68,] 0.512945206 -0.491377859 [69,] -1.753108293 0.512945206 [70,] -0.758908905 -1.753108293 [71,] -2.918295426 -0.758908905 [72,] 0.311808742 -2.918295426 [73,] 3.058475890 0.311808742 [74,] 2.837690729 3.058475890 [75,] -0.841143348 2.837690729 [76,] 3.056796493 -0.841143348 [77,] 0.901768721 3.056796493 [78,] -1.975295605 0.901768721 [79,] 0.681274878 -1.975295605 [80,] -0.814414240 0.681274878 [81,] -1.159069351 -0.814414240 [82,] 0.783429272 -1.159069351 [83,] 1.432213224 0.783429272 [84,] -1.702531118 1.432213224 [85,] 4.369012582 -1.702531118 [86,] -0.145910752 4.369012582 [87,] -2.386642435 -0.145910752 [88,] -1.839122633 -2.386642435 [89,] 0.536067663 -1.839122633 [90,] 2.023395752 0.536067663 [91,] -2.673180260 2.023395752 [92,] -0.574102157 -2.673180260 [93,] 3.263085920 -0.574102157 [94,] -2.625089157 3.263085920 [95,] 3.711081031 -2.625089157 [96,] 0.770523773 3.711081031 [97,] 2.209382284 0.770523773 [98,] 0.284322272 2.209382284 [99,] 0.323088419 0.284322272 [100,] 0.435463198 0.323088419 [101,] 0.917501307 0.435463198 [102,] 4.525658326 0.917501307 [103,] 0.927036977 4.525658326 [104,] -2.042939113 0.927036977 [105,] 0.404156220 -2.042939113 [106,] -2.334742133 0.404156220 [107,] -1.768918791 -2.334742133 [108,] 0.222580289 -1.768918791 [109,] 2.129905512 0.222580289 [110,] 0.989431800 2.129905512 [111,] 0.265623832 0.989431800 [112,] -6.531621697 0.265623832 [113,] 0.410973259 -6.531621697 [114,] -7.151197618 0.410973259 [115,] 2.629075225 -7.151197618 [116,] 2.799729190 2.629075225 [117,] -2.028928922 2.799729190 [118,] 1.812589515 -2.028928922 [119,] -1.554415307 1.812589515 [120,] -4.183164114 -1.554415307 [121,] 0.674277850 -4.183164114 [122,] -1.058020179 0.674277850 [123,] -4.759861036 -1.058020179 [124,] -2.122150644 -4.759861036 [125,] 4.567119131 -2.122150644 [126,] 0.263125845 4.567119131 [127,] -1.560209320 0.263125845 [128,] 1.174223592 -1.560209320 [129,] -2.597498402 1.174223592 [130,] -2.398654806 -2.597498402 [131,] 0.101108805 -2.398654806 [132,] 0.584481959 0.101108805 [133,] -0.411038842 0.584481959 [134,] -0.031032458 -0.411038842 [135,] 5.270358985 -0.031032458 [136,] 1.341456557 5.270358985 [137,] -0.621046179 1.341456557 [138,] -1.159163153 -0.621046179 [139,] -4.491963061 -1.159163153 [140,] -5.540464120 -4.491963061 [141,] -0.562678873 -5.540464120 [142,] 2.461495570 -0.562678873 [143,] -2.905901655 2.461495570 [144,] 2.382471216 -2.905901655 [145,] -0.863660916 2.382471216 [146,] 1.895820105 -0.863660916 [147,] -1.258070053 1.895820105 [148,] -0.484315621 -1.258070053 [149,] -0.455674976 -0.484315621 [150,] -3.316391969 -0.455674976 [151,] 3.238016119 -3.316391969 [152,] 7.225474026 3.238016119 [153,] 1.848819546 7.225474026 [154,] 3.576141665 1.848819546 [155,] 1.993926518 3.576141665 [156,] -2.017226115 1.993926518 [157,] 1.094027731 -2.017226115 [158,] 1.122777497 1.094027731 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -4.649680524 -2.519273192 2 4.932848980 -4.649680524 3 -0.197331286 4.932848980 4 -0.072408219 -0.197331286 5 2.505844241 -0.072408219 6 0.831313063 2.505844241 7 -3.507348749 0.831313063 8 1.478511925 -3.507348749 9 1.676618797 1.478511925 10 -0.782986491 1.676618797 11 1.368047948 -0.782986491 12 -2.738650008 1.368047948 13 -2.147406139 -2.738650008 14 -1.319010299 -2.147406139 15 4.734617553 -1.319010299 16 -4.790968269 4.734617553 17 -1.400774552 -4.790968269 18 4.837952683 -1.400774552 19 1.531399997 4.837952683 20 -2.575018785 1.531399997 21 2.779235571 -2.575018785 22 -2.042686592 2.779235571 23 -2.587826712 -2.042686592 24 -0.804365080 -2.587826712 25 1.699705372 -0.804365080 26 3.269858221 1.699705372 27 -0.101748488 3.269858221 28 2.118804652 -0.101748488 29 1.809476153 2.118804652 30 -2.536638563 1.809476153 31 -0.133886113 -2.536638563 32 5.718725625 -0.133886113 33 -1.733478712 5.718725625 34 3.253525216 -1.733478712 35 -3.180100987 3.253525216 36 -4.099603735 -3.180100987 37 3.243176584 -4.099603735 38 1.061152601 3.243176584 39 -1.018357953 1.061152601 40 3.807857521 -1.018357953 41 -0.006512427 3.807857521 42 3.000032346 -0.006512427 43 5.113118295 3.000032346 44 -3.159836381 5.113118295 45 -0.586909332 -3.159836381 46 1.062497397 -0.586909332 47 -4.050639184 1.062497397 48 -1.793594065 -4.050639184 49 4.732625576 -1.793594065 50 -4.752505364 4.732625576 51 -0.425024921 -4.752505364 52 -0.020660675 -0.425024921 53 -3.426190326 -0.020660675 54 1.078416871 -3.426190326 55 -0.554809128 1.078416871 56 -1.007584543 -0.554809128 57 2.350701641 -1.007584543 58 -2.277128924 2.350701641 59 1.888093495 -2.277128924 60 -1.305870568 1.888093495 61 1.429534229 -1.305870568 62 2.499103737 1.429534229 63 -4.962377714 2.499103737 64 1.561980873 -4.962377714 65 -2.817846234 1.561980873 66 -2.769806536 -2.817846234 67 -0.491377859 -2.769806536 68 0.512945206 -0.491377859 69 -1.753108293 0.512945206 70 -0.758908905 -1.753108293 71 -2.918295426 -0.758908905 72 0.311808742 -2.918295426 73 3.058475890 0.311808742 74 2.837690729 3.058475890 75 -0.841143348 2.837690729 76 3.056796493 -0.841143348 77 0.901768721 3.056796493 78 -1.975295605 0.901768721 79 0.681274878 -1.975295605 80 -0.814414240 0.681274878 81 -1.159069351 -0.814414240 82 0.783429272 -1.159069351 83 1.432213224 0.783429272 84 -1.702531118 1.432213224 85 4.369012582 -1.702531118 86 -0.145910752 4.369012582 87 -2.386642435 -0.145910752 88 -1.839122633 -2.386642435 89 0.536067663 -1.839122633 90 2.023395752 0.536067663 91 -2.673180260 2.023395752 92 -0.574102157 -2.673180260 93 3.263085920 -0.574102157 94 -2.625089157 3.263085920 95 3.711081031 -2.625089157 96 0.770523773 3.711081031 97 2.209382284 0.770523773 98 0.284322272 2.209382284 99 0.323088419 0.284322272 100 0.435463198 0.323088419 101 0.917501307 0.435463198 102 4.525658326 0.917501307 103 0.927036977 4.525658326 104 -2.042939113 0.927036977 105 0.404156220 -2.042939113 106 -2.334742133 0.404156220 107 -1.768918791 -2.334742133 108 0.222580289 -1.768918791 109 2.129905512 0.222580289 110 0.989431800 2.129905512 111 0.265623832 0.989431800 112 -6.531621697 0.265623832 113 0.410973259 -6.531621697 114 -7.151197618 0.410973259 115 2.629075225 -7.151197618 116 2.799729190 2.629075225 117 -2.028928922 2.799729190 118 1.812589515 -2.028928922 119 -1.554415307 1.812589515 120 -4.183164114 -1.554415307 121 0.674277850 -4.183164114 122 -1.058020179 0.674277850 123 -4.759861036 -1.058020179 124 -2.122150644 -4.759861036 125 4.567119131 -2.122150644 126 0.263125845 4.567119131 127 -1.560209320 0.263125845 128 1.174223592 -1.560209320 129 -2.597498402 1.174223592 130 -2.398654806 -2.597498402 131 0.101108805 -2.398654806 132 0.584481959 0.101108805 133 -0.411038842 0.584481959 134 -0.031032458 -0.411038842 135 5.270358985 -0.031032458 136 1.341456557 5.270358985 137 -0.621046179 1.341456557 138 -1.159163153 -0.621046179 139 -4.491963061 -1.159163153 140 -5.540464120 -4.491963061 141 -0.562678873 -5.540464120 142 2.461495570 -0.562678873 143 -2.905901655 2.461495570 144 2.382471216 -2.905901655 145 -0.863660916 2.382471216 146 1.895820105 -0.863660916 147 -1.258070053 1.895820105 148 -0.484315621 -1.258070053 149 -0.455674976 -0.484315621 150 -3.316391969 -0.455674976 151 3.238016119 -3.316391969 152 7.225474026 3.238016119 153 1.848819546 7.225474026 154 3.576141665 1.848819546 155 1.993926518 3.576141665 156 -2.017226115 1.993926518 157 1.094027731 -2.017226115 158 1.122777497 1.094027731 > 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/freestat/rcomp/tmp/7uvyn1291136512.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/freestat/rcomp/tmp/8uvyn1291136512.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/freestat/rcomp/tmp/9uvyn1291136512.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/freestat/rcomp/tmp/10nng81291136512.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/1185ee1291136512.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/freestat/rcomp/tmp/12uov21291136512.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/freestat/rcomp/tmp/138xsb1291136512.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/freestat/rcomp/tmp/14tg9h1291136512.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/freestat/rcomp/tmp/15fh751291136512.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/freestat/rcomp/tmp/16iz6a1291136512.tab") + } > > try(system("convert tmp/1g4jf1291136512.ps tmp/1g4jf1291136512.png",intern=TRUE)) character(0) > try(system("convert tmp/2g4jf1291136512.ps tmp/2g4jf1291136512.png",intern=TRUE)) character(0) > try(system("convert tmp/39v001291136512.ps tmp/39v001291136512.png",intern=TRUE)) character(0) > try(system("convert tmp/49v001291136512.ps tmp/49v001291136512.png",intern=TRUE)) character(0) > try(system("convert tmp/59v001291136512.ps tmp/59v001291136512.png",intern=TRUE)) character(0) > try(system("convert tmp/62mz21291136512.ps tmp/62mz21291136512.png",intern=TRUE)) character(0) > try(system("convert tmp/7uvyn1291136512.ps tmp/7uvyn1291136512.png",intern=TRUE)) character(0) > try(system("convert tmp/8uvyn1291136512.ps tmp/8uvyn1291136512.png",intern=TRUE)) character(0) > try(system("convert tmp/9uvyn1291136512.ps tmp/9uvyn1291136512.png",intern=TRUE)) character(0) > try(system("convert tmp/10nng81291136512.ps tmp/10nng81291136512.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.847 2.712 6.195