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(24
+ ,14
+ ,11
+ ,12
+ ,24
+ ,26
+ ,10
+ ,25
+ ,11
+ ,7
+ ,8
+ ,25
+ ,23
+ ,14
+ ,17
+ ,6
+ ,17
+ ,8
+ ,30
+ ,25
+ ,18
+ ,18
+ ,12
+ ,10
+ ,8
+ ,19
+ ,23
+ ,15
+ ,18
+ ,8
+ ,12
+ ,9
+ ,22
+ ,19
+ ,18
+ ,16
+ ,10
+ ,12
+ ,7
+ ,22
+ ,29
+ ,11
+ ,20
+ ,10
+ ,11
+ ,4
+ ,25
+ ,25
+ ,17
+ ,16
+ ,11
+ ,11
+ ,11
+ ,23
+ ,21
+ ,19
+ ,18
+ ,16
+ ,12
+ ,7
+ ,17
+ ,22
+ ,7
+ ,17
+ ,11
+ ,13
+ ,7
+ ,21
+ ,25
+ ,12
+ ,23
+ ,13
+ ,14
+ ,12
+ ,19
+ ,24
+ ,13
+ ,30
+ ,12
+ ,16
+ ,10
+ ,19
+ ,18
+ ,15
+ ,23
+ ,8
+ ,11
+ ,10
+ ,15
+ ,22
+ ,14
+ ,18
+ ,12
+ ,10
+ ,8
+ ,16
+ ,15
+ ,14
+ ,15
+ ,11
+ ,11
+ ,8
+ ,23
+ ,22
+ ,16
+ ,12
+ ,4
+ ,15
+ ,4
+ ,27
+ ,28
+ ,16
+ ,21
+ ,9
+ ,9
+ ,9
+ ,22
+ ,20
+ ,12
+ ,15
+ ,8
+ ,11
+ ,8
+ ,14
+ ,12
+ ,12
+ ,20
+ ,8
+ ,17
+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,11
+ ,6
+ ,27
+ ,24
+ ,14
+ ,31
+ ,9
+ ,17
+ ,9
+ ,25
+ ,19
+ ,13
+ ,20
+ ,9
+ ,11
+ ,7
+ ,21
+ ,20
+ ,15
+ ,16
+ ,9
+ ,12
+ ,9
+ ,10
+ ,13
+ ,13
+ ,22
+ ,8
+ ,14
+ ,10
+ ,20
+ ,20
+ ,14
+ ,20
+ ,7
+ ,11
+ ,9
+ ,26
+ ,22
+ ,19
+ ,28
+ ,16
+ ,16
+ ,8
+ ,24
+ ,24
+ ,17
+ ,38
+ ,11
+ ,21
+ ,7
+ ,29
+ ,29
+ ,16
+ ,22
+ ,9
+ ,14
+ ,6
+ ,19
+ ,12
+ ,16
+ ,20
+ ,11
+ ,20
+ ,13
+ ,24
+ ,20
+ ,14
+ ,17
+ ,9
+ ,13
+ ,6
+ ,19
+ ,21
+ ,12
+ ,28
+ ,14
+ ,11
+ ,8
+ ,24
+ ,24
+ ,13
+ ,22
+ ,13
+ ,15
+ ,10
+ ,22
+ ,22
+ ,14
+ ,31
+ ,16
+ ,19
+ ,16
+ ,17
+ ,20
+ ,15)
+ ,dim=c(7
+ ,159)
+ ,dimnames=list(c('CM'
+ ,'D'
+ ,'PE'
+ ,'PC'
+ ,'PS'
+ ,'O'
+ ,'H
')
+ ,1:159))
> y <- array(NA,dim=c(7,159),dimnames=list(c('CM','D','PE','PC','PS','O','H
'),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 = 'No Linear Trend'
> par2 = 'Include Monthly Dummies'
> par1 = '5'
> #'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
PS CM D PE PC O H\r M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11
1 24 24 14 11 12 26 10 1 0 0 0 0 0 0 0 0 0 0
2 25 25 11 7 8 23 14 0 1 0 0 0 0 0 0 0 0 0
3 30 17 6 17 8 25 18 0 0 1 0 0 0 0 0 0 0 0
4 19 18 12 10 8 23 15 0 0 0 1 0 0 0 0 0 0 0
5 22 18 8 12 9 19 18 0 0 0 0 1 0 0 0 0 0 0
6 22 16 10 12 7 29 11 0 0 0 0 0 1 0 0 0 0 0
7 25 20 10 11 4 25 17 0 0 0 0 0 0 1 0 0 0 0
8 23 16 11 11 11 21 19 0 0 0 0 0 0 0 1 0 0 0
9 17 18 16 12 7 22 7 0 0 0 0 0 0 0 0 1 0 0
10 21 17 11 13 7 25 12 0 0 0 0 0 0 0 0 0 1 0
11 19 23 13 14 12 24 13 0 0 0 0 0 0 0 0 0 0 1
12 19 30 12 16 10 18 15 0 0 0 0 0 0 0 0 0 0 0
13 15 23 8 11 10 22 14 1 0 0 0 0 0 0 0 0 0 0
14 16 18 12 10 8 15 14 0 1 0 0 0 0 0 0 0 0 0
15 23 15 11 11 8 22 16 0 0 1 0 0 0 0 0 0 0 0
16 27 12 4 15 4 28 16 0 0 0 1 0 0 0 0 0 0 0
17 22 21 9 9 9 20 12 0 0 0 0 1 0 0 0 0 0 0
18 14 15 8 11 8 12 12 0 0 0 0 0 1 0 0 0 0 0
19 22 20 8 17 7 24 13 0 0 0 0 0 0 1 0 0 0 0
20 23 31 14 17 11 20 16 0 0 0 0 0 0 0 1 0 0 0
21 23 27 15 11 9 21 9 0 0 0 0 0 0 0 0 1 0 0
22 19 21 9 14 13 21 11 0 0 0 0 0 0 0 0 0 1 0
23 18 31 14 10 8 23 12 0 0 0 0 0 0 0 0 0 0 1
24 20 19 11 11 8 28 11 0 0 0 0 0 0 0 0 0 0 0
25 23 16 8 15 9 24 14 1 0 0 0 0 0 0 0 0 0 0
26 25 20 9 15 6 24 18 0 1 0 0 0 0 0 0 0 0 0
27 19 21 9 13 9 24 11 0 0 1 0 0 0 0 0 0 0 0
28 24 22 9 16 9 23 14 0 0 0 1 0 0 0 0 0 0 0
29 22 17 9 13 6 23 17 0 0 0 0 1 0 0 0 0 0 0
30 26 25 16 18 16 24 12 0 0 0 0 0 1 0 0 0 0 0
31 29 26 11 18 5 18 14 0 0 0 0 0 0 1 0 0 0 0
32 32 25 8 12 7 25 14 0 0 0 0 0 0 0 1 0 0 0
33 25 17 9 17 9 21 15 0 0 0 0 0 0 0 0 1 0 0
34 29 32 16 9 6 26 11 0 0 0 0 0 0 0 0 0 1 0
35 28 33 11 9 6 22 15 0 0 0 0 0 0 0 0 0 0 1
36 17 13 16 12 5 22 14 0 0 0 0 0 0 0 0 0 0 0
37 28 32 12 18 12 22 11 1 0 0 0 0 0 0 0 0 0 0
38 29 25 12 12 7 23 12 0 1 0 0 0 0 0 0 0 0 0
39 26 29 14 18 10 30 17 0 0 1 0 0 0 0 0 0 0 0
40 25 22 9 14 9 23 15 0 0 0 1 0 0 0 0 0 0 0
41 14 18 10 15 8 17 9 0 0 0 0 1 0 0 0 0 0 0
42 25 17 9 16 5 23 16 0 0 0 0 0 1 0 0 0 0 0
43 26 20 10 10 8 23 13 0 0 0 0 0 0 1 0 0 0 0
44 20 15 12 11 8 25 15 0 0 0 0 0 0 0 1 0 0 0
45 18 20 14 14 10 24 11 0 0 0 0 0 0 0 0 1 0 0
46 32 33 14 9 6 24 10 0 0 0 0 0 0 0 0 0 1 0
47 25 29 10 12 8 23 16 0 0 0 0 0 0 0 0 0 0 1
48 25 23 14 17 7 21 13 0 0 0 0 0 0 0 0 0 0 0
49 23 26 16 5 4 24 9 1 0 0 0 0 0 0 0 0 0 0
50 21 18 9 12 8 24 14 0 1 0 0 0 0 0 0 0 0 0
51 20 20 10 12 8 28 16 0 0 1 0 0 0 0 0 0 0 0
52 15 11 6 6 4 16 15 0 0 0 1 0 0 0 0 0 0 0
53 30 28 8 24 20 20 14 0 0 0 0 1 0 0 0 0 0 0
54 24 26 13 12 8 29 13 0 0 0 0 0 1 0 0 0 0 0
55 26 22 10 12 8 27 14 0 0 0 0 0 0 1 0 0 0 0
56 24 17 8 14 6 22 16 0 0 0 0 0 0 0 1 0 0 0
57 22 12 7 7 4 28 15 0 0 0 0 0 0 0 0 1 0 0
58 14 14 15 13 8 16 16 0 0 0 0 0 0 0 0 0 1 0
59 24 17 9 12 9 25 15 0 0 0 0 0 0 0 0 0 0 1
60 24 21 10 13 6 24 13 0 0 0 0 0 0 0 0 0 0 0
61 24 19 12 14 7 28 11 1 0 0 0 0 0 0 0 0 0 0
62 24 18 13 8 9 24 16 0 1 0 0 0 0 0 0 0 0 0
63 19 10 10 11 5 23 17 0 0 1 0 0 0 0 0 0 0 0
64 31 29 11 9 5 30 10 0 0 0 1 0 0 0 0 0 0 0
65 22 31 8 11 8 24 17 0 0 0 0 1 0 0 0 0 0 0
66 27 19 9 13 8 21 11 0 0 0 0 0 1 0 0 0 0 0
67 19 9 13 10 6 25 14 0 0 0 0 0 0 1 0 0 0 0
68 25 20 11 11 8 25 15 0 0 0 0 0 0 0 1 0 0 0
69 20 28 8 12 7 22 16 0 0 0 0 0 0 0 0 1 0 0
70 21 19 9 9 7 23 15 0 0 0 0 0 0 0 0 0 1 0
71 27 30 9 15 9 26 16 0 0 0 0 0 0 0 0 0 0 1
72 23 29 15 18 11 23 15 0 0 0 0 0 0 0 0 0 0 0
73 25 26 9 15 6 25 14 1 0 0 0 0 0 0 0 0 0 0
74 20 23 10 12 8 21 17 0 1 0 0 0 0 0 0 0 0 0
75 22 21 12 14 9 24 12 0 0 1 0 0 0 0 0 0 0 0
76 23 19 12 10 8 29 12 0 0 0 1 0 0 0 0 0 0 0
77 25 28 11 13 6 22 9 0 0 0 0 1 0 0 0 0 0 0
78 25 23 14 13 10 27 12 0 0 0 0 0 1 0 0 0 0 0
79 17 18 6 11 8 26 17 0 0 0 0 0 0 1 0 0 0 0
80 19 21 12 13 8 22 11 0 0 0 0 0 0 0 1 0 0 0
81 25 20 8 16 10 24 16 0 0 0 0 0 0 0 0 1 0 0
82 19 23 14 8 5 27 9 0 0 0 0 0 0 0 0 0 1 0
83 20 21 11 16 7 24 15 0 0 0 0 0 0 0 0 0 0 1
84 26 21 10 11 5 24 17 0 0 0 0 0 0 0 0 0 0 0
85 23 15 14 9 8 29 17 1 0 0 0 0 0 0 0 0 0 0
86 27 28 12 16 14 22 12 0 1 0 0 0 0 0 0 0 0 0
87 17 19 10 12 7 21 15 0 0 1 0 0 0 0 0 0 0 0
88 17 26 14 14 8 24 18 0 0 0 1 0 0 0 0 0 0 0
89 17 16 11 9 5 23 13 0 0 0 0 1 0 0 0 0 0 0
90 22 22 10 15 6 20 15 0 0 0 0 0 1 0 0 0 0 0
91 21 19 9 11 10 27 16 0 0 0 0 0 0 1 0 0 0 0
92 32 31 10 21 12 26 17 0 0 0 0 0 0 0 1 0 0 0
93 21 31 16 14 9 25 15 0 0 0 0 0 0 0 0 1 0 0
94 21 29 13 18 12 21 13 0 0 0 0 0 0 0 0 0 1 0
95 18 19 9 12 7 21 12 0 0 0 0 0 0 0 0 0 0 1
96 18 22 10 13 8 19 11 0 0 0 0 0 0 0 0 0 0 0
97 23 23 10 15 10 21 15 1 0 0 0 0 0 0 0 0 0 0
98 19 15 7 12 6 21 15 0 1 0 0 0 0 0 0 0 0 0
99 20 20 9 19 10 16 15 0 0 1 0 0 0 0 0 0 0 0
100 21 18 8 15 10 22 18 0 0 0 1 0 0 0 0 0 0 0
101 20 23 14 11 10 29 16 0 0 0 0 1 0 0 0 0 0 0
102 17 25 14 11 5 15 12 0 0 0 0 0 1 0 0 0 0 0
103 18 21 8 10 7 17 16 0 0 0 0 0 0 1 0 0 0 0
104 19 24 9 13 10 15 15 0 0 0 0 0 0 0 1 0 0 0
105 22 25 14 15 11 21 15 0 0 0 0 0 0 0 0 1 0 0
106 15 17 14 12 6 21 15 0 0 0 0 0 0 0 0 0 1 0
107 14 13 8 12 7 19 17 0 0 0 0 0 0 0 0 0 0 1
108 18 28 8 16 12 24 15 0 0 0 0 0 0 0 0 0 0 0
109 24 21 8 9 11 20 13 1 0 0 0 0 0 0 0 0 0 0
110 35 25 7 18 11 17 16 0 1 0 0 0 0 0 0 0 0 0
111 29 9 6 8 11 23 13 0 0 1 0 0 0 0 0 0 0 0
112 21 16 8 13 5 24 13 0 0 0 1 0 0 0 0 0 0 0
113 20 17 11 9 6 19 15 0 0 0 0 1 0 0 0 0 0 0
114 22 25 14 15 9 24 13 0 0 0 0 0 1 0 0 0 0 0
115 13 20 11 8 4 13 16 0 0 0 0 0 0 1 0 0 0 0
116 26 29 11 7 4 22 14 0 0 0 0 0 0 0 1 0 0 0
117 17 14 11 12 7 16 15 0 0 0 0 0 0 0 0 1 0 0
118 25 22 14 14 11 19 11 0 0 0 0 0 0 0 0 0 1 0
119 20 15 8 6 6 25 15 0 0 0 0 0 0 0 0 0 0 1
120 19 19 20 8 7 25 14 0 0 0 0 0 0 0 0 0 0 0
121 21 20 11 17 8 23 14 1 0 0 0 0 0 0 0 0 0 0
122 22 15 8 10 4 24 17 0 1 0 0 0 0 0 0 0 0 0
123 24 20 11 11 8 26 15 0 0 1 0 0 0 0 0 0 0 0
124 21 18 10 14 9 26 14 0 0 0 1 0 0 0 0 0 0 0
125 26 33 14 11 8 25 15 0 0 0 0 1 0 0 0 0 0 0
126 24 22 11 13 11 18 13 0 0 0 0 0 1 0 0 0 0 0
127 16 16 9 12 8 21 15 0 0 0 0 0 0 1 0 0 0 0
128 23 17 9 11 5 26 16 0 0 0 0 0 0 0 1 0 0 0
129 18 16 8 9 4 23 12 0 0 0 0 0 0 0 0 1 0 0
130 16 21 10 12 8 23 14 0 0 0 0 0 0 0 0 0 1 0
131 26 26 13 20 10 22 12 0 0 0 0 0 0 0 0 0 0 1
132 19 18 13 12 6 20 14 0 0 0 0 0 0 0 0 0 0 0
133 21 18 12 13 9 13 14 1 0 0 0 0 0 0 0 0 0 0
134 21 17 8 12 9 24 15 0 1 0 0 0 0 0 0 0 0 0
135 22 22 13 12 13 15 13 0 0 1 0 0 0 0 0 0 0 0
136 23 30 14 9 9 14 15 0 0 0 1 0 0 0 0 0 0 0
137 29 30 12 15 10 22 16 0 0 0 0 1 0 0 0 0 0 0
138 21 24 14 24 20 10 10 0 0 0 0 0 1 0 0 0 0 0
139 21 21 15 7 5 24 8 0 0 0 0 0 0 1 0 0 0 0
140 23 21 13 17 11 22 15 0 0 0 0 0 0 0 1 0 0 0
141 27 29 16 11 6 24 14 0 0 0 0 0 0 0 0 1 0 0
142 25 31 9 17 9 19 13 0 0 0 0 0 0 0 0 0 1 0
143 21 20 9 11 7 20 15 0 0 0 0 0 0 0 0 0 0 1
144 10 16 9 12 9 13 13 0 0 0 0 0 0 0 0 0 0 0
145 20 22 8 14 10 20 14 1 0 0 0 0 0 0 0 0 0 0
146 26 20 7 11 9 22 19 0 1 0 0 0 0 0 0 0 0 0
147 24 28 16 16 8 24 17 0 0 1 0 0 0 0 0 0 0 0
148 29 38 11 21 7 29 16 0 0 0 1 0 0 0 0 0 0 0
149 19 22 9 14 6 12 16 0 0 0 0 1 0 0 0 0 0 0
150 24 20 11 20 13 20 14 0 0 0 0 0 1 0 0 0 0 0
151 19 17 9 13 6 21 12 0 0 0 0 0 0 1 0 0 0 0
152 24 28 14 11 8 24 13 0 0 0 0 0 0 0 1 0 0 0
153 22 22 13 15 10 22 14 0 0 0 0 0 0 0 0 1 0 0
154 17 31 16 19 16 20 15 0 0 0 0 0 0 0 0 0 1 0
155 24 24 14 11 12 26 10 0 0 0 0 0 0 0 0 0 0 1
156 25 25 11 7 8 23 14 0 0 0 0 0 0 0 0 0 0 0
157 30 17 6 17 8 25 18 1 0 0 0 0 0 0 0 0 0 0
158 19 18 12 10 8 23 15 0 1 0 0 0 0 0 0 0 0 0
159 22 18 8 12 9 19 18 0 0 1 0 0 0 0 0 0 0 0
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) CM D PE PC O
6.14877 0.35391 -0.34014 0.18755 -0.02186 0.41451
`H\r` M1 M2 M3 M4 M5
-0.05579 1.91304 3.20749 2.29146 1.04230 1.11537
M6 M7 M8 M9 M10 M11
2.25591 0.86668 2.79260 0.81606 0.18294 0.20677
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-8.6632 -2.4335 0.3945 1.9711 9.8875
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 6.14877 3.26365 1.884 0.06162 .
CM 0.35391 0.05876 6.023 1.41e-08 ***
D -0.34014 0.12035 -2.826 0.00539 **
PE 0.18755 0.10396 1.804 0.07337 .
PC -0.02186 0.13077 -0.167 0.86748
O 0.41451 0.07432 5.577 1.21e-07 ***
`H\r` -0.05579 0.13254 -0.421 0.67445
M1 1.91304 1.33692 1.431 0.15466
M2 3.20749 1.35449 2.368 0.01924 *
M3 2.29146 1.34483 1.704 0.09060 .
M4 1.04230 1.36951 0.761 0.44788
M5 1.11537 1.36376 0.818 0.41481
M6 2.25591 1.36392 1.654 0.10035
M7 0.86668 1.36002 0.637 0.52499
M8 2.79260 1.35475 2.061 0.04111 *
M9 0.81606 1.33510 0.611 0.54203
M10 0.18294 1.34470 0.136 0.89198
M11 0.20677 1.36200 0.152 0.87955
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 3.396 on 141 degrees of freedom
Multiple R-squared: 0.4322, Adjusted R-squared: 0.3637
F-statistic: 6.313 on 17 and 141 DF, p-value: 8.036e-11
> 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.8349193 0.3301614 0.1650807
[2,] 0.7358218 0.5283565 0.2641782
[3,] 0.6307489 0.7385023 0.3692511
[4,] 0.5280373 0.9439254 0.4719627
[5,] 0.4881765 0.9763530 0.5118235
[6,] 0.3935521 0.7871042 0.6064479
[7,] 0.4824546 0.9649091 0.5175454
[8,] 0.3986295 0.7972590 0.6013705
[9,] 0.3543229 0.7086458 0.6456771
[10,] 0.2753310 0.5506620 0.7246690
[11,] 0.5402652 0.9194695 0.4597348
[12,] 0.7060391 0.5879218 0.2939609
[13,] 0.6621494 0.6757012 0.3378506
[14,] 0.6744987 0.6510026 0.3255013
[15,] 0.7151117 0.5697766 0.2848883
[16,] 0.6720317 0.6559365 0.3279683
[17,] 0.6562735 0.6874530 0.3437265
[18,] 0.6827458 0.6345083 0.3172542
[19,] 0.7686382 0.4627235 0.2313618
[20,] 0.7256792 0.5486417 0.2743208
[21,] 0.7395954 0.5208092 0.2604046
[22,] 0.6984658 0.6030683 0.3015342
[23,] 0.7115531 0.5768937 0.2884469
[24,] 0.6798680 0.6402640 0.3201320
[25,] 0.6935178 0.6129643 0.3064822
[26,] 0.7783579 0.4432843 0.2216421
[27,] 0.7360569 0.5278862 0.2639431
[28,] 0.7837105 0.4325790 0.2162895
[29,] 0.7387327 0.5225347 0.2612673
[30,] 0.7131142 0.5737715 0.2868858
[31,] 0.7654325 0.4691350 0.2345675
[32,] 0.7263859 0.5472282 0.2736141
[33,] 0.7701976 0.4596047 0.2298024
[34,] 0.7705221 0.4589559 0.2294779
[35,] 0.7471392 0.5057215 0.2528608
[36,] 0.7072735 0.5854530 0.2927265
[37,] 0.6601820 0.6796361 0.3398180
[38,] 0.6287911 0.7424179 0.3712089
[39,] 0.6576985 0.6846029 0.3423015
[40,] 0.6288325 0.7423351 0.3711675
[41,] 0.5805520 0.8388960 0.4194480
[42,] 0.5552385 0.8895229 0.4447615
[43,] 0.5072588 0.9854824 0.4927412
[44,] 0.5010776 0.9978448 0.4989224
[45,] 0.6118812 0.7762376 0.3881188
[46,] 0.6727229 0.6545542 0.3272771
[47,] 0.6545356 0.6909289 0.3454644
[48,] 0.6127701 0.7744598 0.3872299
[49,] 0.6749801 0.6500397 0.3250199
[50,] 0.6387135 0.7225730 0.3612865
[51,] 0.5909878 0.8180245 0.4090122
[52,] 0.5437992 0.9124017 0.4562008
[53,] 0.5031114 0.9937773 0.4968886
[54,] 0.5243152 0.9513697 0.4756848
[55,] 0.4814636 0.9629272 0.5185364
[56,] 0.4352082 0.8704163 0.5647918
[57,] 0.3857292 0.7714583 0.6142708
[58,] 0.3389235 0.6778471 0.6610765
[59,] 0.4371319 0.8742638 0.5628681
[60,] 0.4641343 0.9282686 0.5358657
[61,] 0.4294526 0.8589051 0.5705474
[62,] 0.4272370 0.8544739 0.5727630
[63,] 0.3980649 0.7961298 0.6019351
[64,] 0.4878070 0.9756140 0.5121930
[65,] 0.4502403 0.9004806 0.5497597
[66,] 0.4118530 0.8237059 0.5881470
[67,] 0.4566220 0.9132441 0.5433780
[68,] 0.5745710 0.8508580 0.4254290
[69,] 0.5562000 0.8876000 0.4438000
[70,] 0.5106733 0.9786533 0.4893267
[71,] 0.4708264 0.9416528 0.5291736
[72,] 0.4590944 0.9181889 0.5409056
[73,] 0.4639928 0.9279856 0.5360072
[74,] 0.4335923 0.8671847 0.5664077
[75,] 0.4070360 0.8140721 0.5929640
[76,] 0.3692431 0.7384862 0.6307569
[77,] 0.3254257 0.6508515 0.6745743
[78,] 0.3323863 0.6647726 0.6676137
[79,] 0.3145659 0.6291319 0.6854341
[80,] 0.2704736 0.5409472 0.7295264
[81,] 0.2871192 0.5742384 0.7128808
[82,] 0.2817647 0.5635294 0.7182353
[83,] 0.2423970 0.4847941 0.7576030
[84,] 0.2261764 0.4523527 0.7738236
[85,] 0.1887782 0.3775564 0.8112218
[86,] 0.1650919 0.3301839 0.8349081
[87,] 0.1564535 0.3129070 0.8435465
[88,] 0.2643245 0.5286491 0.7356755
[89,] 0.2426483 0.4852967 0.7573517
[90,] 0.6341171 0.7317658 0.3658829
[91,] 0.8507484 0.2985031 0.1492516
[92,] 0.8139915 0.3720171 0.1860085
[93,] 0.7759616 0.4480768 0.2240384
[94,] 0.7855356 0.4289289 0.2144644
[95,] 0.7769470 0.4461061 0.2230530
[96,] 0.7264542 0.5470917 0.2735458
[97,] 0.6716286 0.6567427 0.3283714
[98,] 0.9005331 0.1989338 0.0994669
[99,] 0.8786092 0.2427816 0.1213908
[100,] 0.8470527 0.3058947 0.1529473
[101,] 0.8367373 0.3265253 0.1632627
[102,] 0.7899531 0.4200939 0.2100469
[103,] 0.7326148 0.5347705 0.2673852
[104,] 0.6881551 0.6236899 0.3118449
[105,] 0.6699037 0.6601926 0.3300963
[106,] 0.6104719 0.7790562 0.3895281
[107,] 0.6127006 0.7745988 0.3872994
[108,] 0.5334112 0.9331777 0.4665888
[109,] 0.4675908 0.9351816 0.5324092
[110,] 0.4240527 0.8481055 0.5759473
[111,] 0.4422978 0.8845957 0.5577022
[112,] 0.4311349 0.8622698 0.5688651
[113,] 0.4306333 0.8612665 0.5693667
[114,] 0.3376698 0.6753397 0.6623302
[115,] 0.2915120 0.5830240 0.7084880
[116,] 0.4148616 0.8297232 0.5851384
[117,] 0.3061108 0.6122217 0.6938892
[118,] 0.7292574 0.5414852 0.2707426
> postscript(file="/var/www/html/freestat/rcomp/tmp/1fna71291897534.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/2qe9s1291897534.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/3qe9s1291897534.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/4qe9s1291897534.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/5069v1291897534.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
0.1862203751 0.6468919367 5.2121553853 -0.8772607017 2.1612888249
6 7 8 9 10
-2.1705249670 2.9178310636 2.6703317114 -1.7192363779 0.4149639719
11 12 13 14 15
-2.6599863943 -3.0908852372 -8.6632219875 -2.7821513979 2.8779160326
16 17 18 19 20
3.4831271963 1.2530884659 -3.1849983435 -1.6308076260 -2.4960347075
21 22 23 24 25
1.5127993271 -2.1350869195 -5.1296481379 -2.0122834049 0.2130693931
26 27 28 29 30
0.0007076328 -5.3870333911 0.5274635184 0.8883737826 1.8849334406
31 32 33 34 35
6.5777509037 5.2527392271 4.2205087872 5.0650536795 3.8678241377
36 37 38 39 40
1.2131898031 1.0756682124 3.9158524100 -2.5858122280 1.9583496765
41 42 43 44 45
-5.4160261152 2.1075386554 4.7986787167 -1.5824076019 -3.0227127085
46 47 48 49 50
7.8040965071 1.0656765747 4.4585173504 0.8823233151 -2.9082735221
51 52 53 54 55
-4.9063893658 -0.8764028453 3.9744052657 -2.5557566660 2.1135081700
56 57 58 59 60
1.0421755400 1.1743713750 -0.1871184964 3.1094943727 2.2905708241
61 62 63 64 65
-0.1696883005 2.3359198058 -0.1169778064 3.8310287085 -4.4021944756
66 67 68 69 70
4.5780125987 1.8951503905 1.3079052169 -4.4773365505 0.7734510842
71 72 73 74 75
0.5873082005 -0.1423493749 -1.4659751165 -3.9267728341 -1.4983695363
76 77 78 79 80
0.1143874355 0.6438376553 0.4755163950 -6.0619840644 -4.0605867842
81 82 83 84 85
1.8403033088 -2.7904476894 -2.0052612872 4.8669692205 1.8060605909
86 87 88 89 90
0.6714634915 -4.7285482193 -6.0255857842 -2.5722677138 -0.9247158231
91 92 93 94 95
-1.8220553771 1.9837930573 -3.4486440457 -2.2662700860 -2.1513689602
96 97 98 99 100
-2.0586416129 -0.2628299259 -3.2712196602 -1.5972940495 -0.5499573417
101 102 103 104 105
-3.6147074741 -2.9923647999 -1.6029285634 -2.9742713767 0.5087503747
106 107 108 109 110
-2.5735081372 -3.2600761737 -7.1869786456 2.2147848439 9.8875366697
111 112 113 114 115
9.3470095331 -0.6843188351 1.8653110134 -2.3299317083 -3.2610351212
116 117 118 119 120
0.9732172812 0.9290954211 5.9970091897 0.5368799444 2.0006700804
121 122 123 124 125
-2.1645906951 -0.7316573108 0.3945315062 -1.5851984251 0.4047355402
126 127 128 129 130
2.6172610011 -3.5603147468 -0.7349476799 -2.3710345867 -5.1908014812
131 132 133 134 135
2.8825122901 1.2741052715 3.8005365685 -2.8168540090 2.7367923713
136 137 138 139 140
3.4961206527 4.3790375331 1.2122979378 0.9490696854 -0.1818954345
141 142 143 144 145
4.1149596792 0.6163418359 1.2641531687 -5.4672663388 -3.0429323517
146 147 148 149 150
2.0210114792 -0.7331758274 -2.8117532549 0.4351176977 1.2827322791
151 152 153 154 155
-1.3128634311 -1.2000184494 0.7381759961 -5.5276834587 1.8924922644
156 157 158 159
3.8543820643 5.5905750783 -3.0424546916 0.9851955952
> postscript(file="/var/www/html/freestat/rcomp/tmp/6069v1291897534.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 0.1862203751 NA
1 0.6468919367 0.1862203751
2 5.2121553853 0.6468919367
3 -0.8772607017 5.2121553853
4 2.1612888249 -0.8772607017
5 -2.1705249670 2.1612888249
6 2.9178310636 -2.1705249670
7 2.6703317114 2.9178310636
8 -1.7192363779 2.6703317114
9 0.4149639719 -1.7192363779
10 -2.6599863943 0.4149639719
11 -3.0908852372 -2.6599863943
12 -8.6632219875 -3.0908852372
13 -2.7821513979 -8.6632219875
14 2.8779160326 -2.7821513979
15 3.4831271963 2.8779160326
16 1.2530884659 3.4831271963
17 -3.1849983435 1.2530884659
18 -1.6308076260 -3.1849983435
19 -2.4960347075 -1.6308076260
20 1.5127993271 -2.4960347075
21 -2.1350869195 1.5127993271
22 -5.1296481379 -2.1350869195
23 -2.0122834049 -5.1296481379
24 0.2130693931 -2.0122834049
25 0.0007076328 0.2130693931
26 -5.3870333911 0.0007076328
27 0.5274635184 -5.3870333911
28 0.8883737826 0.5274635184
29 1.8849334406 0.8883737826
30 6.5777509037 1.8849334406
31 5.2527392271 6.5777509037
32 4.2205087872 5.2527392271
33 5.0650536795 4.2205087872
34 3.8678241377 5.0650536795
35 1.2131898031 3.8678241377
36 1.0756682124 1.2131898031
37 3.9158524100 1.0756682124
38 -2.5858122280 3.9158524100
39 1.9583496765 -2.5858122280
40 -5.4160261152 1.9583496765
41 2.1075386554 -5.4160261152
42 4.7986787167 2.1075386554
43 -1.5824076019 4.7986787167
44 -3.0227127085 -1.5824076019
45 7.8040965071 -3.0227127085
46 1.0656765747 7.8040965071
47 4.4585173504 1.0656765747
48 0.8823233151 4.4585173504
49 -2.9082735221 0.8823233151
50 -4.9063893658 -2.9082735221
51 -0.8764028453 -4.9063893658
52 3.9744052657 -0.8764028453
53 -2.5557566660 3.9744052657
54 2.1135081700 -2.5557566660
55 1.0421755400 2.1135081700
56 1.1743713750 1.0421755400
57 -0.1871184964 1.1743713750
58 3.1094943727 -0.1871184964
59 2.2905708241 3.1094943727
60 -0.1696883005 2.2905708241
61 2.3359198058 -0.1696883005
62 -0.1169778064 2.3359198058
63 3.8310287085 -0.1169778064
64 -4.4021944756 3.8310287085
65 4.5780125987 -4.4021944756
66 1.8951503905 4.5780125987
67 1.3079052169 1.8951503905
68 -4.4773365505 1.3079052169
69 0.7734510842 -4.4773365505
70 0.5873082005 0.7734510842
71 -0.1423493749 0.5873082005
72 -1.4659751165 -0.1423493749
73 -3.9267728341 -1.4659751165
74 -1.4983695363 -3.9267728341
75 0.1143874355 -1.4983695363
76 0.6438376553 0.1143874355
77 0.4755163950 0.6438376553
78 -6.0619840644 0.4755163950
79 -4.0605867842 -6.0619840644
80 1.8403033088 -4.0605867842
81 -2.7904476894 1.8403033088
82 -2.0052612872 -2.7904476894
83 4.8669692205 -2.0052612872
84 1.8060605909 4.8669692205
85 0.6714634915 1.8060605909
86 -4.7285482193 0.6714634915
87 -6.0255857842 -4.7285482193
88 -2.5722677138 -6.0255857842
89 -0.9247158231 -2.5722677138
90 -1.8220553771 -0.9247158231
91 1.9837930573 -1.8220553771
92 -3.4486440457 1.9837930573
93 -2.2662700860 -3.4486440457
94 -2.1513689602 -2.2662700860
95 -2.0586416129 -2.1513689602
96 -0.2628299259 -2.0586416129
97 -3.2712196602 -0.2628299259
98 -1.5972940495 -3.2712196602
99 -0.5499573417 -1.5972940495
100 -3.6147074741 -0.5499573417
101 -2.9923647999 -3.6147074741
102 -1.6029285634 -2.9923647999
103 -2.9742713767 -1.6029285634
104 0.5087503747 -2.9742713767
105 -2.5735081372 0.5087503747
106 -3.2600761737 -2.5735081372
107 -7.1869786456 -3.2600761737
108 2.2147848439 -7.1869786456
109 9.8875366697 2.2147848439
110 9.3470095331 9.8875366697
111 -0.6843188351 9.3470095331
112 1.8653110134 -0.6843188351
113 -2.3299317083 1.8653110134
114 -3.2610351212 -2.3299317083
115 0.9732172812 -3.2610351212
116 0.9290954211 0.9732172812
117 5.9970091897 0.9290954211
118 0.5368799444 5.9970091897
119 2.0006700804 0.5368799444
120 -2.1645906951 2.0006700804
121 -0.7316573108 -2.1645906951
122 0.3945315062 -0.7316573108
123 -1.5851984251 0.3945315062
124 0.4047355402 -1.5851984251
125 2.6172610011 0.4047355402
126 -3.5603147468 2.6172610011
127 -0.7349476799 -3.5603147468
128 -2.3710345867 -0.7349476799
129 -5.1908014812 -2.3710345867
130 2.8825122901 -5.1908014812
131 1.2741052715 2.8825122901
132 3.8005365685 1.2741052715
133 -2.8168540090 3.8005365685
134 2.7367923713 -2.8168540090
135 3.4961206527 2.7367923713
136 4.3790375331 3.4961206527
137 1.2122979378 4.3790375331
138 0.9490696854 1.2122979378
139 -0.1818954345 0.9490696854
140 4.1149596792 -0.1818954345
141 0.6163418359 4.1149596792
142 1.2641531687 0.6163418359
143 -5.4672663388 1.2641531687
144 -3.0429323517 -5.4672663388
145 2.0210114792 -3.0429323517
146 -0.7331758274 2.0210114792
147 -2.8117532549 -0.7331758274
148 0.4351176977 -2.8117532549
149 1.2827322791 0.4351176977
150 -1.3128634311 1.2827322791
151 -1.2000184494 -1.3128634311
152 0.7381759961 -1.2000184494
153 -5.5276834587 0.7381759961
154 1.8924922644 -5.5276834587
155 3.8543820643 1.8924922644
156 5.5905750783 3.8543820643
157 -3.0424546916 5.5905750783
158 0.9851955952 -3.0424546916
159 NA 0.9851955952
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.6468919367 0.1862203751
[2,] 5.2121553853 0.6468919367
[3,] -0.8772607017 5.2121553853
[4,] 2.1612888249 -0.8772607017
[5,] -2.1705249670 2.1612888249
[6,] 2.9178310636 -2.1705249670
[7,] 2.6703317114 2.9178310636
[8,] -1.7192363779 2.6703317114
[9,] 0.4149639719 -1.7192363779
[10,] -2.6599863943 0.4149639719
[11,] -3.0908852372 -2.6599863943
[12,] -8.6632219875 -3.0908852372
[13,] -2.7821513979 -8.6632219875
[14,] 2.8779160326 -2.7821513979
[15,] 3.4831271963 2.8779160326
[16,] 1.2530884659 3.4831271963
[17,] -3.1849983435 1.2530884659
[18,] -1.6308076260 -3.1849983435
[19,] -2.4960347075 -1.6308076260
[20,] 1.5127993271 -2.4960347075
[21,] -2.1350869195 1.5127993271
[22,] -5.1296481379 -2.1350869195
[23,] -2.0122834049 -5.1296481379
[24,] 0.2130693931 -2.0122834049
[25,] 0.0007076328 0.2130693931
[26,] -5.3870333911 0.0007076328
[27,] 0.5274635184 -5.3870333911
[28,] 0.8883737826 0.5274635184
[29,] 1.8849334406 0.8883737826
[30,] 6.5777509037 1.8849334406
[31,] 5.2527392271 6.5777509037
[32,] 4.2205087872 5.2527392271
[33,] 5.0650536795 4.2205087872
[34,] 3.8678241377 5.0650536795
[35,] 1.2131898031 3.8678241377
[36,] 1.0756682124 1.2131898031
[37,] 3.9158524100 1.0756682124
[38,] -2.5858122280 3.9158524100
[39,] 1.9583496765 -2.5858122280
[40,] -5.4160261152 1.9583496765
[41,] 2.1075386554 -5.4160261152
[42,] 4.7986787167 2.1075386554
[43,] -1.5824076019 4.7986787167
[44,] -3.0227127085 -1.5824076019
[45,] 7.8040965071 -3.0227127085
[46,] 1.0656765747 7.8040965071
[47,] 4.4585173504 1.0656765747
[48,] 0.8823233151 4.4585173504
[49,] -2.9082735221 0.8823233151
[50,] -4.9063893658 -2.9082735221
[51,] -0.8764028453 -4.9063893658
[52,] 3.9744052657 -0.8764028453
[53,] -2.5557566660 3.9744052657
[54,] 2.1135081700 -2.5557566660
[55,] 1.0421755400 2.1135081700
[56,] 1.1743713750 1.0421755400
[57,] -0.1871184964 1.1743713750
[58,] 3.1094943727 -0.1871184964
[59,] 2.2905708241 3.1094943727
[60,] -0.1696883005 2.2905708241
[61,] 2.3359198058 -0.1696883005
[62,] -0.1169778064 2.3359198058
[63,] 3.8310287085 -0.1169778064
[64,] -4.4021944756 3.8310287085
[65,] 4.5780125987 -4.4021944756
[66,] 1.8951503905 4.5780125987
[67,] 1.3079052169 1.8951503905
[68,] -4.4773365505 1.3079052169
[69,] 0.7734510842 -4.4773365505
[70,] 0.5873082005 0.7734510842
[71,] -0.1423493749 0.5873082005
[72,] -1.4659751165 -0.1423493749
[73,] -3.9267728341 -1.4659751165
[74,] -1.4983695363 -3.9267728341
[75,] 0.1143874355 -1.4983695363
[76,] 0.6438376553 0.1143874355
[77,] 0.4755163950 0.6438376553
[78,] -6.0619840644 0.4755163950
[79,] -4.0605867842 -6.0619840644
[80,] 1.8403033088 -4.0605867842
[81,] -2.7904476894 1.8403033088
[82,] -2.0052612872 -2.7904476894
[83,] 4.8669692205 -2.0052612872
[84,] 1.8060605909 4.8669692205
[85,] 0.6714634915 1.8060605909
[86,] -4.7285482193 0.6714634915
[87,] -6.0255857842 -4.7285482193
[88,] -2.5722677138 -6.0255857842
[89,] -0.9247158231 -2.5722677138
[90,] -1.8220553771 -0.9247158231
[91,] 1.9837930573 -1.8220553771
[92,] -3.4486440457 1.9837930573
[93,] -2.2662700860 -3.4486440457
[94,] -2.1513689602 -2.2662700860
[95,] -2.0586416129 -2.1513689602
[96,] -0.2628299259 -2.0586416129
[97,] -3.2712196602 -0.2628299259
[98,] -1.5972940495 -3.2712196602
[99,] -0.5499573417 -1.5972940495
[100,] -3.6147074741 -0.5499573417
[101,] -2.9923647999 -3.6147074741
[102,] -1.6029285634 -2.9923647999
[103,] -2.9742713767 -1.6029285634
[104,] 0.5087503747 -2.9742713767
[105,] -2.5735081372 0.5087503747
[106,] -3.2600761737 -2.5735081372
[107,] -7.1869786456 -3.2600761737
[108,] 2.2147848439 -7.1869786456
[109,] 9.8875366697 2.2147848439
[110,] 9.3470095331 9.8875366697
[111,] -0.6843188351 9.3470095331
[112,] 1.8653110134 -0.6843188351
[113,] -2.3299317083 1.8653110134
[114,] -3.2610351212 -2.3299317083
[115,] 0.9732172812 -3.2610351212
[116,] 0.9290954211 0.9732172812
[117,] 5.9970091897 0.9290954211
[118,] 0.5368799444 5.9970091897
[119,] 2.0006700804 0.5368799444
[120,] -2.1645906951 2.0006700804
[121,] -0.7316573108 -2.1645906951
[122,] 0.3945315062 -0.7316573108
[123,] -1.5851984251 0.3945315062
[124,] 0.4047355402 -1.5851984251
[125,] 2.6172610011 0.4047355402
[126,] -3.5603147468 2.6172610011
[127,] -0.7349476799 -3.5603147468
[128,] -2.3710345867 -0.7349476799
[129,] -5.1908014812 -2.3710345867
[130,] 2.8825122901 -5.1908014812
[131,] 1.2741052715 2.8825122901
[132,] 3.8005365685 1.2741052715
[133,] -2.8168540090 3.8005365685
[134,] 2.7367923713 -2.8168540090
[135,] 3.4961206527 2.7367923713
[136,] 4.3790375331 3.4961206527
[137,] 1.2122979378 4.3790375331
[138,] 0.9490696854 1.2122979378
[139,] -0.1818954345 0.9490696854
[140,] 4.1149596792 -0.1818954345
[141,] 0.6163418359 4.1149596792
[142,] 1.2641531687 0.6163418359
[143,] -5.4672663388 1.2641531687
[144,] -3.0429323517 -5.4672663388
[145,] 2.0210114792 -3.0429323517
[146,] -0.7331758274 2.0210114792
[147,] -2.8117532549 -0.7331758274
[148,] 0.4351176977 -2.8117532549
[149,] 1.2827322791 0.4351176977
[150,] -1.3128634311 1.2827322791
[151,] -1.2000184494 -1.3128634311
[152,] 0.7381759961 -1.2000184494
[153,] -5.5276834587 0.7381759961
[154,] 1.8924922644 -5.5276834587
[155,] 3.8543820643 1.8924922644
[156,] 5.5905750783 3.8543820643
[157,] -3.0424546916 5.5905750783
[158,] 0.9851955952 -3.0424546916
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.6468919367 0.1862203751
2 5.2121553853 0.6468919367
3 -0.8772607017 5.2121553853
4 2.1612888249 -0.8772607017
5 -2.1705249670 2.1612888249
6 2.9178310636 -2.1705249670
7 2.6703317114 2.9178310636
8 -1.7192363779 2.6703317114
9 0.4149639719 -1.7192363779
10 -2.6599863943 0.4149639719
11 -3.0908852372 -2.6599863943
12 -8.6632219875 -3.0908852372
13 -2.7821513979 -8.6632219875
14 2.8779160326 -2.7821513979
15 3.4831271963 2.8779160326
16 1.2530884659 3.4831271963
17 -3.1849983435 1.2530884659
18 -1.6308076260 -3.1849983435
19 -2.4960347075 -1.6308076260
20 1.5127993271 -2.4960347075
21 -2.1350869195 1.5127993271
22 -5.1296481379 -2.1350869195
23 -2.0122834049 -5.1296481379
24 0.2130693931 -2.0122834049
25 0.0007076328 0.2130693931
26 -5.3870333911 0.0007076328
27 0.5274635184 -5.3870333911
28 0.8883737826 0.5274635184
29 1.8849334406 0.8883737826
30 6.5777509037 1.8849334406
31 5.2527392271 6.5777509037
32 4.2205087872 5.2527392271
33 5.0650536795 4.2205087872
34 3.8678241377 5.0650536795
35 1.2131898031 3.8678241377
36 1.0756682124 1.2131898031
37 3.9158524100 1.0756682124
38 -2.5858122280 3.9158524100
39 1.9583496765 -2.5858122280
40 -5.4160261152 1.9583496765
41 2.1075386554 -5.4160261152
42 4.7986787167 2.1075386554
43 -1.5824076019 4.7986787167
44 -3.0227127085 -1.5824076019
45 7.8040965071 -3.0227127085
46 1.0656765747 7.8040965071
47 4.4585173504 1.0656765747
48 0.8823233151 4.4585173504
49 -2.9082735221 0.8823233151
50 -4.9063893658 -2.9082735221
51 -0.8764028453 -4.9063893658
52 3.9744052657 -0.8764028453
53 -2.5557566660 3.9744052657
54 2.1135081700 -2.5557566660
55 1.0421755400 2.1135081700
56 1.1743713750 1.0421755400
57 -0.1871184964 1.1743713750
58 3.1094943727 -0.1871184964
59 2.2905708241 3.1094943727
60 -0.1696883005 2.2905708241
61 2.3359198058 -0.1696883005
62 -0.1169778064 2.3359198058
63 3.8310287085 -0.1169778064
64 -4.4021944756 3.8310287085
65 4.5780125987 -4.4021944756
66 1.8951503905 4.5780125987
67 1.3079052169 1.8951503905
68 -4.4773365505 1.3079052169
69 0.7734510842 -4.4773365505
70 0.5873082005 0.7734510842
71 -0.1423493749 0.5873082005
72 -1.4659751165 -0.1423493749
73 -3.9267728341 -1.4659751165
74 -1.4983695363 -3.9267728341
75 0.1143874355 -1.4983695363
76 0.6438376553 0.1143874355
77 0.4755163950 0.6438376553
78 -6.0619840644 0.4755163950
79 -4.0605867842 -6.0619840644
80 1.8403033088 -4.0605867842
81 -2.7904476894 1.8403033088
82 -2.0052612872 -2.7904476894
83 4.8669692205 -2.0052612872
84 1.8060605909 4.8669692205
85 0.6714634915 1.8060605909
86 -4.7285482193 0.6714634915
87 -6.0255857842 -4.7285482193
88 -2.5722677138 -6.0255857842
89 -0.9247158231 -2.5722677138
90 -1.8220553771 -0.9247158231
91 1.9837930573 -1.8220553771
92 -3.4486440457 1.9837930573
93 -2.2662700860 -3.4486440457
94 -2.1513689602 -2.2662700860
95 -2.0586416129 -2.1513689602
96 -0.2628299259 -2.0586416129
97 -3.2712196602 -0.2628299259
98 -1.5972940495 -3.2712196602
99 -0.5499573417 -1.5972940495
100 -3.6147074741 -0.5499573417
101 -2.9923647999 -3.6147074741
102 -1.6029285634 -2.9923647999
103 -2.9742713767 -1.6029285634
104 0.5087503747 -2.9742713767
105 -2.5735081372 0.5087503747
106 -3.2600761737 -2.5735081372
107 -7.1869786456 -3.2600761737
108 2.2147848439 -7.1869786456
109 9.8875366697 2.2147848439
110 9.3470095331 9.8875366697
111 -0.6843188351 9.3470095331
112 1.8653110134 -0.6843188351
113 -2.3299317083 1.8653110134
114 -3.2610351212 -2.3299317083
115 0.9732172812 -3.2610351212
116 0.9290954211 0.9732172812
117 5.9970091897 0.9290954211
118 0.5368799444 5.9970091897
119 2.0006700804 0.5368799444
120 -2.1645906951 2.0006700804
121 -0.7316573108 -2.1645906951
122 0.3945315062 -0.7316573108
123 -1.5851984251 0.3945315062
124 0.4047355402 -1.5851984251
125 2.6172610011 0.4047355402
126 -3.5603147468 2.6172610011
127 -0.7349476799 -3.5603147468
128 -2.3710345867 -0.7349476799
129 -5.1908014812 -2.3710345867
130 2.8825122901 -5.1908014812
131 1.2741052715 2.8825122901
132 3.8005365685 1.2741052715
133 -2.8168540090 3.8005365685
134 2.7367923713 -2.8168540090
135 3.4961206527 2.7367923713
136 4.3790375331 3.4961206527
137 1.2122979378 4.3790375331
138 0.9490696854 1.2122979378
139 -0.1818954345 0.9490696854
140 4.1149596792 -0.1818954345
141 0.6163418359 4.1149596792
142 1.2641531687 0.6163418359
143 -5.4672663388 1.2641531687
144 -3.0429323517 -5.4672663388
145 2.0210114792 -3.0429323517
146 -0.7331758274 2.0210114792
147 -2.8117532549 -0.7331758274
148 0.4351176977 -2.8117532549
149 1.2827322791 0.4351176977
150 -1.3128634311 1.2827322791
151 -1.2000184494 -1.3128634311
152 0.7381759961 -1.2000184494
153 -5.5276834587 0.7381759961
154 1.8924922644 -5.5276834587
155 3.8543820643 1.8924922644
156 5.5905750783 3.8543820643
157 -3.0424546916 5.5905750783
158 0.9851955952 -3.0424546916
> 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/7bf8g1291897534.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/8mop11291897534.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/9mop11291897534.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/10mop11291897534.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/11iy5r1291897534.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/12lhlx1291897534.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/13a0091291897534.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/14j36l1291897534.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/1521w91291897534.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/16gtci1291897534.tab")
+ }
>
> try(system("convert tmp/1fna71291897534.ps tmp/1fna71291897534.png",intern=TRUE))
character(0)
> try(system("convert tmp/2qe9s1291897534.ps tmp/2qe9s1291897534.png",intern=TRUE))
character(0)
> try(system("convert tmp/3qe9s1291897534.ps tmp/3qe9s1291897534.png",intern=TRUE))
character(0)
> try(system("convert tmp/4qe9s1291897534.ps tmp/4qe9s1291897534.png",intern=TRUE))
character(0)
> try(system("convert tmp/5069v1291897534.ps tmp/5069v1291897534.png",intern=TRUE))
character(0)
> try(system("convert tmp/6069v1291897534.ps tmp/6069v1291897534.png",intern=TRUE))
character(0)
> try(system("convert tmp/7bf8g1291897534.ps tmp/7bf8g1291897534.png",intern=TRUE))
character(0)
> try(system("convert tmp/8mop11291897534.ps tmp/8mop11291897534.png",intern=TRUE))
character(0)
> try(system("convert tmp/9mop11291897534.ps tmp/9mop11291897534.png",intern=TRUE))
character(0)
> try(system("convert tmp/10mop11291897534.ps tmp/10mop11291897534.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.984 2.656 6.373