R version 2.15.2 (2012-10-26) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i686-pc-linux-gnu (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(9
+ ,13
+ ,12
+ ,14
+ ,12
+ ,53
+ ,32
+ ,41
+ ,38
+ ,9
+ ,16
+ ,11
+ ,18
+ ,11
+ ,86
+ ,51
+ ,39
+ ,32
+ ,9
+ ,19
+ ,15
+ ,11
+ ,14
+ ,66
+ ,42
+ ,30
+ ,35
+ ,9
+ ,15
+ ,6
+ ,12
+ ,12
+ ,67
+ ,41
+ ,31
+ ,33
+ ,9
+ ,14
+ ,13
+ ,16
+ ,21
+ ,76
+ ,46
+ ,34
+ ,37
+ ,9
+ ,13
+ ,10
+ ,18
+ ,12
+ ,78
+ ,47
+ ,35
+ ,29
+ ,9
+ ,19
+ ,12
+ ,14
+ ,22
+ ,53
+ ,37
+ ,39
+ ,31
+ ,9
+ ,15
+ ,14
+ ,14
+ ,11
+ ,80
+ ,49
+ ,34
+ ,36
+ ,9
+ ,14
+ ,12
+ ,15
+ ,10
+ ,74
+ ,45
+ ,36
+ ,35
+ ,9
+ ,15
+ ,6
+ ,15
+ ,13
+ ,76
+ ,47
+ ,37
+ ,38
+ ,9
+ ,16
+ ,10
+ ,17
+ ,10
+ ,79
+ ,49
+ ,38
+ ,31
+ ,9
+ ,16
+ ,12
+ ,19
+ ,8
+ ,54
+ ,33
+ ,36
+ ,34
+ ,9
+ ,16
+ ,12
+ ,10
+ ,15
+ ,67
+ ,42
+ ,38
+ ,35
+ ,9
+ ,16
+ ,11
+ ,16
+ ,14
+ ,54
+ ,33
+ ,39
+ ,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,47
+ ,32
+ ,27
+ ,10
+ ,13
+ ,12
+ ,11
+ ,13
+ ,60
+ ,38
+ ,36
+ ,36
+ ,10
+ ,16
+ ,12
+ ,12
+ ,11
+ ,75
+ ,46
+ ,32
+ ,31
+ ,10
+ ,13
+ ,9
+ ,9
+ ,19
+ ,73
+ ,46
+ ,35
+ ,32
+ ,10
+ ,10
+ ,7
+ ,16
+ ,12
+ ,85
+ ,53
+ ,38
+ ,39
+ ,10
+ ,15
+ ,13
+ ,13
+ ,17
+ ,79
+ ,47
+ ,42
+ ,37
+ ,10
+ ,16
+ ,9
+ ,16
+ ,9
+ ,71
+ ,41
+ ,34
+ ,38
+ ,9
+ ,16
+ ,6
+ ,12
+ ,12
+ ,72
+ ,44
+ ,35
+ ,39
+ ,10
+ ,14
+ ,8
+ ,9
+ ,19
+ ,69
+ ,43
+ ,35
+ ,34
+ ,10
+ ,10
+ ,8
+ ,13
+ ,18
+ ,78
+ ,51
+ ,33
+ ,31
+ ,10
+ ,17
+ ,15
+ ,13
+ ,15
+ ,54
+ ,33
+ ,36
+ ,32
+ ,10
+ ,13
+ ,6
+ ,14
+ ,14
+ ,69
+ ,43
+ ,32
+ ,37
+ ,10
+ ,15
+ ,9
+ ,19
+ ,11
+ ,81
+ ,53
+ ,33
+ ,36
+ ,10
+ ,16
+ ,11
+ ,13
+ ,9
+ ,84
+ ,51
+ ,34
+ ,32
+ ,10
+ ,12
+ ,8
+ ,12
+ ,18
+ ,84
+ ,50
+ ,32
+ ,35
+ ,11
+ ,13
+ ,8
+ ,13
+ ,16
+ ,69
+ ,46
+ ,34
+ ,36)
+ ,dim=c(9
+ ,162)
+ ,dimnames=list(c('month'
+ ,'learning'
+ ,'software'
+ ,'happiness'
+ ,'depression'
+ ,'belonging'
+ ,'belonging_final'
+ ,'connected'
+ ,'separate')
+ ,1:162))
> y <- array(NA,dim=c(9,162),dimnames=list(c('month','learning','software','happiness','depression','belonging','belonging_final','connected','separate'),1:162))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '2'
> par3 <- 'No Linear Trend'
> par2 <- 'Do not include Seasonal Dummies'
> par1 <- '2'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following object(s) are masked from 'package:base':
as.Date, as.Date.numeric
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
learning month software happiness depression belonging belonging_final
1 13 9 12 14 12 53 32
2 16 9 11 18 11 86 51
3 19 9 15 11 14 66 42
4 15 9 6 12 12 67 41
5 14 9 13 16 21 76 46
6 13 9 10 18 12 78 47
7 19 9 12 14 22 53 37
8 15 9 14 14 11 80 49
9 14 9 12 15 10 74 45
10 15 9 6 15 13 76 47
11 16 9 10 17 10 79 49
12 16 9 12 19 8 54 33
13 16 9 12 10 15 67 42
14 16 9 11 16 14 54 33
15 17 9 15 18 10 87 53
16 15 9 12 14 14 58 36
17 15 9 10 14 14 75 45
18 20 9 12 17 11 88 54
19 18 9 11 14 10 64 41
20 16 9 12 16 13 57 36
21 16 9 11 18 7 66 41
22 16 9 12 11 14 68 44
23 19 9 13 14 12 54 33
24 16 9 11 12 14 56 37
25 17 9 9 17 11 86 52
26 17 9 13 9 9 80 47
27 16 9 10 16 11 76 43
28 15 9 14 14 15 69 44
29 16 9 12 15 14 78 45
30 14 9 10 11 13 67 44
31 15 9 12 16 9 80 49
32 12 9 8 13 15 54 33
33 14 9 10 17 10 71 43
34 16 9 12 15 11 84 54
35 14 9 12 14 13 74 42
36 7 9 7 16 8 71 44
37 10 9 6 9 20 63 37
38 14 9 12 15 12 71 43
39 16 9 10 17 10 76 46
40 16 9 10 13 10 69 42
41 16 9 10 15 9 74 45
42 14 9 12 16 14 75 44
43 20 9 15 16 8 54 33
44 14 9 10 12 14 52 31
45 14 9 10 12 11 69 42
46 11 9 12 11 13 68 40
47 14 9 13 15 9 65 43
48 15 9 11 15 11 75 46
49 16 9 11 17 15 74 42
50 14 9 12 13 11 75 45
51 16 9 14 16 10 72 44
52 14 9 10 14 14 67 40
53 12 9 12 11 18 63 37
54 16 9 13 12 14 62 46
55 9 9 5 12 11 63 36
56 14 9 6 15 12 76 47
57 16 9 12 16 13 74 45
58 16 9 12 15 9 67 42
59 15 9 11 12 10 73 43
60 16 9 10 12 15 70 43
61 12 9 7 8 20 53 32
62 16 9 12 13 12 77 45
63 16 9 14 11 12 77 45
64 14 9 11 14 14 52 31
65 16 9 12 15 13 54 33
66 17 10 13 10 11 80 49
67 18 10 14 11 17 66 42
68 18 10 11 12 12 73 41
69 12 10 12 15 13 63 38
70 16 10 12 15 14 69 42
71 10 10 8 14 13 67 44
72 14 10 11 16 15 54 33
73 18 10 14 15 13 81 48
74 18 10 14 15 10 69 40
75 16 10 12 13 11 84 50
76 17 10 9 12 19 80 49
77 16 10 13 17 13 70 43
78 16 10 11 13 17 69 44
79 13 10 12 15 13 77 47
80 16 10 12 13 9 54 33
81 16 10 12 15 11 79 46
82 20 10 12 16 10 30 0
83 16 10 12 15 9 71 45
84 15 10 12 16 12 73 43
85 15 10 11 15 12 72 44
86 16 10 10 14 13 77 47
87 14 10 9 15 13 75 45
88 16 10 12 14 12 69 42
89 16 10 12 13 15 54 33
90 15 10 12 7 22 70 43
91 12 10 9 17 13 73 46
92 17 10 15 13 15 54 33
93 16 10 12 15 13 77 46
94 15 10 12 14 15 82 48
95 13 10 12 13 10 80 47
96 16 10 10 16 11 80 47
97 16 10 13 12 16 69 43
98 16 10 9 14 11 78 46
99 16 10 12 17 11 81 48
100 14 10 10 15 10 76 46
101 16 10 14 17 10 76 45
102 16 10 11 12 16 73 45
103 20 10 15 16 12 85 52
104 15 10 11 11 11 66 42
105 16 10 11 15 16 79 47
106 13 10 12 9 19 68 41
107 17 10 12 16 11 76 47
108 16 10 12 15 16 71 43
109 16 10 11 10 15 54 33
110 12 10 7 10 24 46 30
111 16 10 12 15 14 82 49
112 16 10 14 11 15 74 44
113 17 10 11 13 11 88 55
114 13 10 11 14 15 38 11
115 12 10 10 18 12 76 47
116 18 10 13 16 10 86 53
117 14 10 13 14 14 54 33
118 14 10 8 14 13 70 44
119 13 10 11 14 9 69 42
120 16 10 12 14 15 90 55
121 13 10 11 12 15 54 33
122 16 10 13 14 14 76 46
123 13 10 12 15 11 89 54
124 16 10 14 15 8 76 47
125 15 10 13 15 11 73 45
126 16 10 15 13 11 79 47
127 15 10 10 17 8 90 55
128 17 10 11 17 10 74 44
129 15 10 9 19 11 81 53
130 12 10 11 15 13 72 44
131 16 10 10 13 11 71 42
132 10 10 11 9 20 66 40
133 16 10 8 15 10 77 46
134 12 10 11 15 15 65 40
135 14 10 12 15 12 74 46
136 15 10 12 16 14 82 53
137 13 10 9 11 23 54 33
138 15 10 11 14 14 63 42
139 11 10 10 11 16 54 35
140 12 10 8 15 11 64 40
141 8 10 9 13 12 69 41
142 16 10 8 15 10 54 33
143 15 10 9 16 14 84 51
144 17 10 15 14 12 86 53
145 16 10 11 15 12 77 46
146 10 10 8 16 11 89 55
147 18 10 13 16 12 76 47
148 13 10 12 11 13 60 38
149 16 10 12 12 11 75 46
150 13 10 9 9 19 73 46
151 10 10 7 16 12 85 53
152 15 10 13 13 17 79 47
153 16 10 9 16 9 71 41
154 16 9 6 12 12 72 44
155 14 10 8 9 19 69 43
156 10 10 8 13 18 78 51
157 17 10 15 13 15 54 33
158 13 10 6 14 14 69 43
159 15 10 9 19 11 81 53
160 16 10 11 13 9 84 51
161 12 10 8 12 18 84 50
162 13 11 8 13 16 69 46
connected separate
1 41 38
2 39 32
3 30 35
4 31 33
5 34 37
6 35 29
7 39 31
8 34 36
9 36 35
10 37 38
11 38 31
12 36 34
13 38 35
14 39 38
15 33 37
16 32 33
17 36 32
18 38 38
19 39 38
20 32 32
21 32 33
22 31 31
23 39 38
24 37 39
25 39 32
26 41 32
27 36 35
28 33 37
29 33 33
30 34 33
31 31 28
32 27 32
33 37 31
34 34 37
35 34 30
36 32 33
37 29 31
38 36 33
39 29 31
40 35 33
41 37 32
42 34 33
43 38 32
44 35 33
45 38 28
46 37 35
47 38 39
48 33 34
49 36 38
50 38 32
51 32 38
52 32 30
53 32 33
54 34 38
55 32 32
56 37 32
57 39 34
58 29 34
59 37 36
60 35 34
61 30 28
62 38 34
63 34 35
64 31 35
65 34 31
66 35 37
67 36 35
68 30 27
69 39 40
70 35 37
71 38 36
72 31 38
73 34 39
74 38 41
75 34 27
76 39 30
77 37 37
78 34 31
79 28 31
80 37 27
81 33 36
82 37 38
83 35 37
84 37 33
85 32 34
86 33 31
87 38 39
88 33 34
89 29 32
90 33 33
91 31 36
92 36 32
93 35 41
94 32 28
95 29 30
96 39 36
97 37 35
98 35 31
99 37 34
100 32 36
101 38 36
102 37 35
103 36 37
104 32 28
105 33 39
106 40 32
107 38 35
108 41 39
109 36 35
110 43 42
111 30 34
112 31 33
113 32 41
114 32 33
115 37 34
116 37 32
117 33 40
118 34 40
119 33 35
120 38 36
121 33 37
122 31 27
123 38 39
124 37 38
125 33 31
126 31 33
127 39 32
128 44 39
129 33 36
130 35 33
131 32 33
132 28 32
133 40 37
134 27 30
135 37 38
136 32 29
137 28 22
138 34 35
139 30 35
140 35 34
141 31 35
142 32 34
143 30 34
144 30 35
145 31 23
146 40 31
147 32 27
148 36 36
149 32 31
150 35 32
151 38 39
152 42 37
153 34 38
154 35 39
155 35 34
156 33 31
157 36 32
158 32 37
159 33 36
160 34 32
161 32 35
162 34 36
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) month software happiness
7.13849 -0.19541 0.54356 0.05955
depression belonging belonging_final connected
-0.06462 0.04010 -0.05622 0.11112
separate
-0.01713
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-5.9844 -1.1443 0.2567 1.1769 3.8376
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.13849 3.61433 1.975 0.0501 .
month -0.19541 0.30106 -0.649 0.5173
software 0.54356 0.06910 7.866 6.14e-13 ***
happiness 0.05955 0.07653 0.778 0.4376
depression -0.06462 0.05734 -1.127 0.2615
belonging 0.04010 0.04511 0.889 0.3755
belonging_final -0.05622 0.06437 -0.873 0.3838
connected 0.11112 0.04720 2.354 0.0198 *
separate -0.01713 0.04523 -0.379 0.7055
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.854 on 153 degrees of freedom
Multiple R-squared: 0.3585, Adjusted R-squared: 0.3249
F-statistic: 10.69 on 8 and 153 DF, p-value: 7.111e-12
> if (n > n25) {
+ kp3 <- k + 3
+ nmkm3 <- n - k - 3
+ gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
+ numgqtests <- 0
+ numsignificant1 <- 0
+ numsignificant5 <- 0
+ numsignificant10 <- 0
+ for (mypoint in kp3:nmkm3) {
+ j <- 0
+ numgqtests <- numgqtests + 1
+ for (myalt in c('greater', 'two.sided', 'less')) {
+ j <- j + 1
+ gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
+ }
+ if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
+ }
+ gqarr
+ }
[,1] [,2] [,3]
[1,] 0.75966901 0.48066199 0.24033099
[2,] 0.62257922 0.75484156 0.37742078
[3,] 0.58243566 0.83512868 0.41756434
[4,] 0.46254000 0.92508001 0.53746000
[5,] 0.36224090 0.72448179 0.63775910
[6,] 0.29907793 0.59815586 0.70092207
[7,] 0.50597206 0.98805588 0.49402794
[8,] 0.42153291 0.84306583 0.57846709
[9,] 0.33227722 0.66455443 0.66772278
[10,] 0.26225147 0.52450293 0.73774853
[11,] 0.23894339 0.47788678 0.76105661
[12,] 0.43511549 0.87023098 0.56488451
[13,] 0.46990776 0.93981552 0.53009224
[14,] 0.45775483 0.91550965 0.54224517
[15,] 0.41694270 0.83388539 0.58305730
[16,] 0.47661558 0.95323116 0.52338442
[17,] 0.47984533 0.95969067 0.52015467
[18,] 0.45965991 0.91931983 0.54034009
[19,] 0.50048236 0.99903528 0.49951764
[20,] 0.43974930 0.87949860 0.56025070
[21,] 0.39050795 0.78101589 0.60949205
[22,] 0.36411524 0.72823047 0.63588476
[23,] 0.32915047 0.65830095 0.67084953
[24,] 0.28267533 0.56535067 0.71732467
[25,] 0.85041997 0.29916005 0.14958003
[26,] 0.82528666 0.34942667 0.17471334
[27,] 0.81869839 0.36260321 0.18130161
[28,] 0.83798882 0.32402235 0.16201118
[29,] 0.82065771 0.35868458 0.17934229
[30,] 0.78988589 0.42022821 0.21011411
[31,] 0.76446944 0.47106112 0.23553056
[32,] 0.78860040 0.42279920 0.21139960
[33,] 0.74763295 0.50473410 0.25236705
[34,] 0.71920743 0.56158513 0.28079257
[35,] 0.87389211 0.25221578 0.12610789
[36,] 0.91829015 0.16341970 0.08170985
[37,] 0.89668559 0.20662881 0.10331441
[38,] 0.88102643 0.23794715 0.11897357
[39,] 0.88079560 0.23840881 0.11920440
[40,] 0.85453078 0.29093844 0.14546922
[41,] 0.82374023 0.35251955 0.17625977
[42,] 0.84555285 0.30889429 0.15444715
[43,] 0.82975961 0.34048078 0.17024039
[44,] 0.84867205 0.30265590 0.15132795
[45,] 0.82162586 0.35674828 0.17837414
[46,] 0.78941247 0.42117507 0.21058753
[47,] 0.76407191 0.47185618 0.23592809
[48,] 0.73114770 0.53770459 0.26885230
[49,] 0.71979875 0.56040249 0.28020125
[50,] 0.68162038 0.63675925 0.31837962
[51,] 0.64162403 0.71675193 0.35837597
[52,] 0.61174376 0.77651248 0.38825624
[53,] 0.57282944 0.85434113 0.42717056
[54,] 0.52972240 0.94055520 0.47027760
[55,] 0.48515161 0.97030321 0.51484839
[56,] 0.46760226 0.93520453 0.53239774
[57,] 0.52060359 0.95879282 0.47939641
[58,] 0.74381649 0.51236702 0.25618351
[59,] 0.70644143 0.58711713 0.29355857
[60,] 0.82507441 0.34985117 0.17492559
[61,] 0.79295973 0.41408053 0.20704027
[62,] 0.78345284 0.43309432 0.21654716
[63,] 0.76291442 0.47417117 0.23708558
[64,] 0.72578522 0.54842957 0.27421478
[65,] 0.76923115 0.46153770 0.23076885
[66,] 0.73543408 0.52913185 0.26456592
[67,] 0.71971395 0.56057210 0.28028605
[68,] 0.73108297 0.53783406 0.26891703
[69,] 0.69095076 0.61809848 0.30904924
[70,] 0.65146190 0.69707620 0.34853810
[71,] 0.77648964 0.44702071 0.22351036
[72,] 0.74007259 0.51985482 0.25992741
[73,] 0.71455836 0.57088328 0.28544164
[74,] 0.67346207 0.65307585 0.32653793
[75,] 0.66378936 0.67242129 0.33621064
[76,] 0.62073574 0.75852851 0.37926426
[77,] 0.58004517 0.83990965 0.41995483
[78,] 0.55902947 0.88194106 0.44097053
[79,] 0.52514605 0.94970791 0.47485395
[80,] 0.51217139 0.97565722 0.48782861
[81,] 0.47350404 0.94700807 0.52649596
[82,] 0.43014795 0.86029591 0.56985205
[83,] 0.38805197 0.77610394 0.61194803
[84,] 0.40381623 0.80763245 0.59618377
[85,] 0.36816013 0.73632025 0.63183987
[86,] 0.32854790 0.65709580 0.67145210
[87,] 0.32832407 0.65664813 0.67167593
[88,] 0.28683316 0.57366631 0.71316684
[89,] 0.24860215 0.49720431 0.75139785
[90,] 0.22703190 0.45406379 0.77296810
[91,] 0.21054185 0.42108370 0.78945815
[92,] 0.25227104 0.50454208 0.74772896
[93,] 0.21584566 0.43169133 0.78415434
[94,] 0.20795880 0.41591760 0.79204120
[95,] 0.22339725 0.44679450 0.77660275
[96,] 0.20078479 0.40156957 0.79921521
[97,] 0.17799092 0.35598184 0.82200908
[98,] 0.17117165 0.34234331 0.82882835
[99,] 0.15871961 0.31743923 0.84128039
[100,] 0.13961910 0.27923820 0.86038090
[101,] 0.11653575 0.23307151 0.88346425
[102,] 0.13772320 0.27544640 0.86227680
[103,] 0.12420924 0.24841849 0.87579076
[104,] 0.16221742 0.32443484 0.83778258
[105,] 0.15309366 0.30618732 0.84690634
[106,] 0.13377918 0.26755836 0.86622082
[107,] 0.11618046 0.23236092 0.88381954
[108,] 0.11751399 0.23502797 0.88248601
[109,] 0.10830836 0.21661673 0.89169164
[110,] 0.09165090 0.18330181 0.90834910
[111,] 0.07280449 0.14560899 0.92719551
[112,] 0.08166672 0.16333345 0.91833328
[113,] 0.06518883 0.13037767 0.93481117
[114,] 0.05257483 0.10514965 0.94742517
[115,] 0.03985328 0.07970655 0.96014672
[116,] 0.02963180 0.05926359 0.97036820
[117,] 0.02349378 0.04698756 0.97650622
[118,] 0.01808832 0.03617665 0.98191168
[119,] 0.02529722 0.05059444 0.97470278
[120,] 0.02175253 0.04350505 0.97824747
[121,] 0.03329249 0.06658498 0.96670751
[122,] 0.03702455 0.07404911 0.96297545
[123,] 0.05177438 0.10354876 0.94822562
[124,] 0.04124946 0.08249892 0.95875054
[125,] 0.02851823 0.05703646 0.97148177
[126,] 0.01933955 0.03867911 0.98066045
[127,] 0.01277528 0.02555057 0.98722472
[128,] 0.02451277 0.04902555 0.97548723
[129,] 0.02038191 0.04076383 0.97961809
[130,] 0.61474712 0.77050576 0.38525288
[131,] 0.54895230 0.90209541 0.45104770
[132,] 0.46154489 0.92308978 0.53845511
[133,] 0.38553425 0.77106851 0.61446575
[134,] 0.29610471 0.59220941 0.70389529
[135,] 0.29892412 0.59784824 0.70107588
[136,] 0.25502646 0.51005292 0.74497354
[137,] 0.75740244 0.48519513 0.24259756
[138,] 0.74244931 0.51510137 0.25755069
[139,] 0.58270964 0.83458072 0.41729036
> postscript(file="/var/fisher/rcomp/tmp/1n69g1352147489.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/2dovc1352147489.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/3euo81352147489.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/4v8d71352147489.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/57owl1352147489.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
> qqline(mysum$resid)
> grid()
> dev.off()
null device
1
> (myerror <- as.ts(mysum$resid))
Time Series:
Start = 1
End = 162
Frequency = 1
1 2 3 4 5 6
-3.19202847 -0.08676064 2.69710706 3.15869001 -1.64752707 -1.98959693
7 8 9 10 11 12
3.83762756 -1.72699142 -1.98771799 2.44002205 0.71396744 -0.24504613
13 14 15 16 17 18
0.52290969 0.60002616 -0.50092830 -0.12392994 0.32595640 3.73158509
19 20 21 22 23 24
2.50949216 0.71531509 0.68943840 1.18042795 2.50277619 1.22231641
25 26 27 28 29 30
2.11614500 0.02631916 0.91182479 -1.18032939 0.40946885 -0.05607469
31 32 33 34 35 36
-0.69185452 -0.29531662 -1.19148198 0.43843972 -1.76637494 -5.98439605
37 38 39 40 41 42
-1.02222975 -1.88489247 1.66566559 1.32719921 0.87229376 -1.69713844
43 44 45 46 47 48
2.04643869 -0.29159409 -0.96761712 -4.70730679 -2.50120745 -0.04717613
49 50 51 52 53 54
0.64252219 -2.11770564 -0.61457144 -0.22415915 -2.83105978 0.71686472
55 56 57 58 59 60
-2.61134455 1.27265122 -0.20390756 0.82038760 -0.43183717 1.74309241
61 62 63 64 65 66
0.45111600 -0.09903244 -0.60544250 -0.47553536 0.48712200 1.15620793
67 68 69 70 71 72
1.96321196 3.40406780 -3.79868945 0.64334551 -3.34530584 -0.25098522
73 74 75 76 77 78
1.49315329 0.92044401 0.35680453 3.16392629 -0.29005692 1.62068559
79 80 81 82 83 84
-1.78584050 0.14131220 0.47853324 3.32256325 0.40874013 -0.94035136
85 86 87 88 89 90
0.33181485 1.80523992 -0.16160219 0.74452955 1.50360300 0.80658627
91 92 93 94 95 96
-1.41782850 0.09507406 0.55135049 -0.23717136 -2.10912012 0.85551119
97 98 99 100 101 102
0.20741513 1.90100607 -0.08705321 -0.26754536 -1.28385196 1.24660062
103 104 105 106 107 108
2.63343681 0.53079908 1.45278320 -2.33359554 1.02277008 0.11614044
109 110 111 112 113 114
1.49936720 -0.25068337 1.01987554 0.14699639 2.48310102 -1.92401234
115 116 117 118 119 120
-2.85060257 1.41070769 -1.47160698 1.04738422 -1.88863308 0.30590785
121 122 123 124 125 126
-1.25213124 0.37677851 -2.97686579 -1.03615492 -0.96629744 -0.80595733
127 128 129 130 131 132
-0.41757307 0.75546337 1.18438191 -2.95405389 1.84039248 -3.36800493
133 134 135 136 137 138
1.90764806 -1.93145336 -1.66659088 -0.12264770 0.71020155 0.56391741
139 140 141 142 143 144
-2.17283756 -1.33959324 -5.38208617 2.93655052 1.62326407 0.40114312
145 146 147 148 149 150
1.16651515 -4.16518940 2.07353950 -2.17531946 0.84308012 -0.06666955
151 152 153 154 155 156
-3.14982410 -1.48494734 1.88321956 3.78515078 1.50285984 -2.54019182
157 158 159 160 161 162
0.09507406 1.35386277 1.18438191 0.91298644 -0.59782463 0.58024646
> postscript(file="/var/fisher/rcomp/tmp/6c5rm1352147489.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 162
Frequency = 1
lag(myerror, k = 1) myerror
0 -3.19202847 NA
1 -0.08676064 -3.19202847
2 2.69710706 -0.08676064
3 3.15869001 2.69710706
4 -1.64752707 3.15869001
5 -1.98959693 -1.64752707
6 3.83762756 -1.98959693
7 -1.72699142 3.83762756
8 -1.98771799 -1.72699142
9 2.44002205 -1.98771799
10 0.71396744 2.44002205
11 -0.24504613 0.71396744
12 0.52290969 -0.24504613
13 0.60002616 0.52290969
14 -0.50092830 0.60002616
15 -0.12392994 -0.50092830
16 0.32595640 -0.12392994
17 3.73158509 0.32595640
18 2.50949216 3.73158509
19 0.71531509 2.50949216
20 0.68943840 0.71531509
21 1.18042795 0.68943840
22 2.50277619 1.18042795
23 1.22231641 2.50277619
24 2.11614500 1.22231641
25 0.02631916 2.11614500
26 0.91182479 0.02631916
27 -1.18032939 0.91182479
28 0.40946885 -1.18032939
29 -0.05607469 0.40946885
30 -0.69185452 -0.05607469
31 -0.29531662 -0.69185452
32 -1.19148198 -0.29531662
33 0.43843972 -1.19148198
34 -1.76637494 0.43843972
35 -5.98439605 -1.76637494
36 -1.02222975 -5.98439605
37 -1.88489247 -1.02222975
38 1.66566559 -1.88489247
39 1.32719921 1.66566559
40 0.87229376 1.32719921
41 -1.69713844 0.87229376
42 2.04643869 -1.69713844
43 -0.29159409 2.04643869
44 -0.96761712 -0.29159409
45 -4.70730679 -0.96761712
46 -2.50120745 -4.70730679
47 -0.04717613 -2.50120745
48 0.64252219 -0.04717613
49 -2.11770564 0.64252219
50 -0.61457144 -2.11770564
51 -0.22415915 -0.61457144
52 -2.83105978 -0.22415915
53 0.71686472 -2.83105978
54 -2.61134455 0.71686472
55 1.27265122 -2.61134455
56 -0.20390756 1.27265122
57 0.82038760 -0.20390756
58 -0.43183717 0.82038760
59 1.74309241 -0.43183717
60 0.45111600 1.74309241
61 -0.09903244 0.45111600
62 -0.60544250 -0.09903244
63 -0.47553536 -0.60544250
64 0.48712200 -0.47553536
65 1.15620793 0.48712200
66 1.96321196 1.15620793
67 3.40406780 1.96321196
68 -3.79868945 3.40406780
69 0.64334551 -3.79868945
70 -3.34530584 0.64334551
71 -0.25098522 -3.34530584
72 1.49315329 -0.25098522
73 0.92044401 1.49315329
74 0.35680453 0.92044401
75 3.16392629 0.35680453
76 -0.29005692 3.16392629
77 1.62068559 -0.29005692
78 -1.78584050 1.62068559
79 0.14131220 -1.78584050
80 0.47853324 0.14131220
81 3.32256325 0.47853324
82 0.40874013 3.32256325
83 -0.94035136 0.40874013
84 0.33181485 -0.94035136
85 1.80523992 0.33181485
86 -0.16160219 1.80523992
87 0.74452955 -0.16160219
88 1.50360300 0.74452955
89 0.80658627 1.50360300
90 -1.41782850 0.80658627
91 0.09507406 -1.41782850
92 0.55135049 0.09507406
93 -0.23717136 0.55135049
94 -2.10912012 -0.23717136
95 0.85551119 -2.10912012
96 0.20741513 0.85551119
97 1.90100607 0.20741513
98 -0.08705321 1.90100607
99 -0.26754536 -0.08705321
100 -1.28385196 -0.26754536
101 1.24660062 -1.28385196
102 2.63343681 1.24660062
103 0.53079908 2.63343681
104 1.45278320 0.53079908
105 -2.33359554 1.45278320
106 1.02277008 -2.33359554
107 0.11614044 1.02277008
108 1.49936720 0.11614044
109 -0.25068337 1.49936720
110 1.01987554 -0.25068337
111 0.14699639 1.01987554
112 2.48310102 0.14699639
113 -1.92401234 2.48310102
114 -2.85060257 -1.92401234
115 1.41070769 -2.85060257
116 -1.47160698 1.41070769
117 1.04738422 -1.47160698
118 -1.88863308 1.04738422
119 0.30590785 -1.88863308
120 -1.25213124 0.30590785
121 0.37677851 -1.25213124
122 -2.97686579 0.37677851
123 -1.03615492 -2.97686579
124 -0.96629744 -1.03615492
125 -0.80595733 -0.96629744
126 -0.41757307 -0.80595733
127 0.75546337 -0.41757307
128 1.18438191 0.75546337
129 -2.95405389 1.18438191
130 1.84039248 -2.95405389
131 -3.36800493 1.84039248
132 1.90764806 -3.36800493
133 -1.93145336 1.90764806
134 -1.66659088 -1.93145336
135 -0.12264770 -1.66659088
136 0.71020155 -0.12264770
137 0.56391741 0.71020155
138 -2.17283756 0.56391741
139 -1.33959324 -2.17283756
140 -5.38208617 -1.33959324
141 2.93655052 -5.38208617
142 1.62326407 2.93655052
143 0.40114312 1.62326407
144 1.16651515 0.40114312
145 -4.16518940 1.16651515
146 2.07353950 -4.16518940
147 -2.17531946 2.07353950
148 0.84308012 -2.17531946
149 -0.06666955 0.84308012
150 -3.14982410 -0.06666955
151 -1.48494734 -3.14982410
152 1.88321956 -1.48494734
153 3.78515078 1.88321956
154 1.50285984 3.78515078
155 -2.54019182 1.50285984
156 0.09507406 -2.54019182
157 1.35386277 0.09507406
158 1.18438191 1.35386277
159 0.91298644 1.18438191
160 -0.59782463 0.91298644
161 0.58024646 -0.59782463
162 NA 0.58024646
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.08676064 -3.19202847
[2,] 2.69710706 -0.08676064
[3,] 3.15869001 2.69710706
[4,] -1.64752707 3.15869001
[5,] -1.98959693 -1.64752707
[6,] 3.83762756 -1.98959693
[7,] -1.72699142 3.83762756
[8,] -1.98771799 -1.72699142
[9,] 2.44002205 -1.98771799
[10,] 0.71396744 2.44002205
[11,] -0.24504613 0.71396744
[12,] 0.52290969 -0.24504613
[13,] 0.60002616 0.52290969
[14,] -0.50092830 0.60002616
[15,] -0.12392994 -0.50092830
[16,] 0.32595640 -0.12392994
[17,] 3.73158509 0.32595640
[18,] 2.50949216 3.73158509
[19,] 0.71531509 2.50949216
[20,] 0.68943840 0.71531509
[21,] 1.18042795 0.68943840
[22,] 2.50277619 1.18042795
[23,] 1.22231641 2.50277619
[24,] 2.11614500 1.22231641
[25,] 0.02631916 2.11614500
[26,] 0.91182479 0.02631916
[27,] -1.18032939 0.91182479
[28,] 0.40946885 -1.18032939
[29,] -0.05607469 0.40946885
[30,] -0.69185452 -0.05607469
[31,] -0.29531662 -0.69185452
[32,] -1.19148198 -0.29531662
[33,] 0.43843972 -1.19148198
[34,] -1.76637494 0.43843972
[35,] -5.98439605 -1.76637494
[36,] -1.02222975 -5.98439605
[37,] -1.88489247 -1.02222975
[38,] 1.66566559 -1.88489247
[39,] 1.32719921 1.66566559
[40,] 0.87229376 1.32719921
[41,] -1.69713844 0.87229376
[42,] 2.04643869 -1.69713844
[43,] -0.29159409 2.04643869
[44,] -0.96761712 -0.29159409
[45,] -4.70730679 -0.96761712
[46,] -2.50120745 -4.70730679
[47,] -0.04717613 -2.50120745
[48,] 0.64252219 -0.04717613
[49,] -2.11770564 0.64252219
[50,] -0.61457144 -2.11770564
[51,] -0.22415915 -0.61457144
[52,] -2.83105978 -0.22415915
[53,] 0.71686472 -2.83105978
[54,] -2.61134455 0.71686472
[55,] 1.27265122 -2.61134455
[56,] -0.20390756 1.27265122
[57,] 0.82038760 -0.20390756
[58,] -0.43183717 0.82038760
[59,] 1.74309241 -0.43183717
[60,] 0.45111600 1.74309241
[61,] -0.09903244 0.45111600
[62,] -0.60544250 -0.09903244
[63,] -0.47553536 -0.60544250
[64,] 0.48712200 -0.47553536
[65,] 1.15620793 0.48712200
[66,] 1.96321196 1.15620793
[67,] 3.40406780 1.96321196
[68,] -3.79868945 3.40406780
[69,] 0.64334551 -3.79868945
[70,] -3.34530584 0.64334551
[71,] -0.25098522 -3.34530584
[72,] 1.49315329 -0.25098522
[73,] 0.92044401 1.49315329
[74,] 0.35680453 0.92044401
[75,] 3.16392629 0.35680453
[76,] -0.29005692 3.16392629
[77,] 1.62068559 -0.29005692
[78,] -1.78584050 1.62068559
[79,] 0.14131220 -1.78584050
[80,] 0.47853324 0.14131220
[81,] 3.32256325 0.47853324
[82,] 0.40874013 3.32256325
[83,] -0.94035136 0.40874013
[84,] 0.33181485 -0.94035136
[85,] 1.80523992 0.33181485
[86,] -0.16160219 1.80523992
[87,] 0.74452955 -0.16160219
[88,] 1.50360300 0.74452955
[89,] 0.80658627 1.50360300
[90,] -1.41782850 0.80658627
[91,] 0.09507406 -1.41782850
[92,] 0.55135049 0.09507406
[93,] -0.23717136 0.55135049
[94,] -2.10912012 -0.23717136
[95,] 0.85551119 -2.10912012
[96,] 0.20741513 0.85551119
[97,] 1.90100607 0.20741513
[98,] -0.08705321 1.90100607
[99,] -0.26754536 -0.08705321
[100,] -1.28385196 -0.26754536
[101,] 1.24660062 -1.28385196
[102,] 2.63343681 1.24660062
[103,] 0.53079908 2.63343681
[104,] 1.45278320 0.53079908
[105,] -2.33359554 1.45278320
[106,] 1.02277008 -2.33359554
[107,] 0.11614044 1.02277008
[108,] 1.49936720 0.11614044
[109,] -0.25068337 1.49936720
[110,] 1.01987554 -0.25068337
[111,] 0.14699639 1.01987554
[112,] 2.48310102 0.14699639
[113,] -1.92401234 2.48310102
[114,] -2.85060257 -1.92401234
[115,] 1.41070769 -2.85060257
[116,] -1.47160698 1.41070769
[117,] 1.04738422 -1.47160698
[118,] -1.88863308 1.04738422
[119,] 0.30590785 -1.88863308
[120,] -1.25213124 0.30590785
[121,] 0.37677851 -1.25213124
[122,] -2.97686579 0.37677851
[123,] -1.03615492 -2.97686579
[124,] -0.96629744 -1.03615492
[125,] -0.80595733 -0.96629744
[126,] -0.41757307 -0.80595733
[127,] 0.75546337 -0.41757307
[128,] 1.18438191 0.75546337
[129,] -2.95405389 1.18438191
[130,] 1.84039248 -2.95405389
[131,] -3.36800493 1.84039248
[132,] 1.90764806 -3.36800493
[133,] -1.93145336 1.90764806
[134,] -1.66659088 -1.93145336
[135,] -0.12264770 -1.66659088
[136,] 0.71020155 -0.12264770
[137,] 0.56391741 0.71020155
[138,] -2.17283756 0.56391741
[139,] -1.33959324 -2.17283756
[140,] -5.38208617 -1.33959324
[141,] 2.93655052 -5.38208617
[142,] 1.62326407 2.93655052
[143,] 0.40114312 1.62326407
[144,] 1.16651515 0.40114312
[145,] -4.16518940 1.16651515
[146,] 2.07353950 -4.16518940
[147,] -2.17531946 2.07353950
[148,] 0.84308012 -2.17531946
[149,] -0.06666955 0.84308012
[150,] -3.14982410 -0.06666955
[151,] -1.48494734 -3.14982410
[152,] 1.88321956 -1.48494734
[153,] 3.78515078 1.88321956
[154,] 1.50285984 3.78515078
[155,] -2.54019182 1.50285984
[156,] 0.09507406 -2.54019182
[157,] 1.35386277 0.09507406
[158,] 1.18438191 1.35386277
[159,] 0.91298644 1.18438191
[160,] -0.59782463 0.91298644
[161,] 0.58024646 -0.59782463
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.08676064 -3.19202847
2 2.69710706 -0.08676064
3 3.15869001 2.69710706
4 -1.64752707 3.15869001
5 -1.98959693 -1.64752707
6 3.83762756 -1.98959693
7 -1.72699142 3.83762756
8 -1.98771799 -1.72699142
9 2.44002205 -1.98771799
10 0.71396744 2.44002205
11 -0.24504613 0.71396744
12 0.52290969 -0.24504613
13 0.60002616 0.52290969
14 -0.50092830 0.60002616
15 -0.12392994 -0.50092830
16 0.32595640 -0.12392994
17 3.73158509 0.32595640
18 2.50949216 3.73158509
19 0.71531509 2.50949216
20 0.68943840 0.71531509
21 1.18042795 0.68943840
22 2.50277619 1.18042795
23 1.22231641 2.50277619
24 2.11614500 1.22231641
25 0.02631916 2.11614500
26 0.91182479 0.02631916
27 -1.18032939 0.91182479
28 0.40946885 -1.18032939
29 -0.05607469 0.40946885
30 -0.69185452 -0.05607469
31 -0.29531662 -0.69185452
32 -1.19148198 -0.29531662
33 0.43843972 -1.19148198
34 -1.76637494 0.43843972
35 -5.98439605 -1.76637494
36 -1.02222975 -5.98439605
37 -1.88489247 -1.02222975
38 1.66566559 -1.88489247
39 1.32719921 1.66566559
40 0.87229376 1.32719921
41 -1.69713844 0.87229376
42 2.04643869 -1.69713844
43 -0.29159409 2.04643869
44 -0.96761712 -0.29159409
45 -4.70730679 -0.96761712
46 -2.50120745 -4.70730679
47 -0.04717613 -2.50120745
48 0.64252219 -0.04717613
49 -2.11770564 0.64252219
50 -0.61457144 -2.11770564
51 -0.22415915 -0.61457144
52 -2.83105978 -0.22415915
53 0.71686472 -2.83105978
54 -2.61134455 0.71686472
55 1.27265122 -2.61134455
56 -0.20390756 1.27265122
57 0.82038760 -0.20390756
58 -0.43183717 0.82038760
59 1.74309241 -0.43183717
60 0.45111600 1.74309241
61 -0.09903244 0.45111600
62 -0.60544250 -0.09903244
63 -0.47553536 -0.60544250
64 0.48712200 -0.47553536
65 1.15620793 0.48712200
66 1.96321196 1.15620793
67 3.40406780 1.96321196
68 -3.79868945 3.40406780
69 0.64334551 -3.79868945
70 -3.34530584 0.64334551
71 -0.25098522 -3.34530584
72 1.49315329 -0.25098522
73 0.92044401 1.49315329
74 0.35680453 0.92044401
75 3.16392629 0.35680453
76 -0.29005692 3.16392629
77 1.62068559 -0.29005692
78 -1.78584050 1.62068559
79 0.14131220 -1.78584050
80 0.47853324 0.14131220
81 3.32256325 0.47853324
82 0.40874013 3.32256325
83 -0.94035136 0.40874013
84 0.33181485 -0.94035136
85 1.80523992 0.33181485
86 -0.16160219 1.80523992
87 0.74452955 -0.16160219
88 1.50360300 0.74452955
89 0.80658627 1.50360300
90 -1.41782850 0.80658627
91 0.09507406 -1.41782850
92 0.55135049 0.09507406
93 -0.23717136 0.55135049
94 -2.10912012 -0.23717136
95 0.85551119 -2.10912012
96 0.20741513 0.85551119
97 1.90100607 0.20741513
98 -0.08705321 1.90100607
99 -0.26754536 -0.08705321
100 -1.28385196 -0.26754536
101 1.24660062 -1.28385196
102 2.63343681 1.24660062
103 0.53079908 2.63343681
104 1.45278320 0.53079908
105 -2.33359554 1.45278320
106 1.02277008 -2.33359554
107 0.11614044 1.02277008
108 1.49936720 0.11614044
109 -0.25068337 1.49936720
110 1.01987554 -0.25068337
111 0.14699639 1.01987554
112 2.48310102 0.14699639
113 -1.92401234 2.48310102
114 -2.85060257 -1.92401234
115 1.41070769 -2.85060257
116 -1.47160698 1.41070769
117 1.04738422 -1.47160698
118 -1.88863308 1.04738422
119 0.30590785 -1.88863308
120 -1.25213124 0.30590785
121 0.37677851 -1.25213124
122 -2.97686579 0.37677851
123 -1.03615492 -2.97686579
124 -0.96629744 -1.03615492
125 -0.80595733 -0.96629744
126 -0.41757307 -0.80595733
127 0.75546337 -0.41757307
128 1.18438191 0.75546337
129 -2.95405389 1.18438191
130 1.84039248 -2.95405389
131 -3.36800493 1.84039248
132 1.90764806 -3.36800493
133 -1.93145336 1.90764806
134 -1.66659088 -1.93145336
135 -0.12264770 -1.66659088
136 0.71020155 -0.12264770
137 0.56391741 0.71020155
138 -2.17283756 0.56391741
139 -1.33959324 -2.17283756
140 -5.38208617 -1.33959324
141 2.93655052 -5.38208617
142 1.62326407 2.93655052
143 0.40114312 1.62326407
144 1.16651515 0.40114312
145 -4.16518940 1.16651515
146 2.07353950 -4.16518940
147 -2.17531946 2.07353950
148 0.84308012 -2.17531946
149 -0.06666955 0.84308012
150 -3.14982410 -0.06666955
151 -1.48494734 -3.14982410
152 1.88321956 -1.48494734
153 3.78515078 1.88321956
154 1.50285984 3.78515078
155 -2.54019182 1.50285984
156 0.09507406 -2.54019182
157 1.35386277 0.09507406
158 1.18438191 1.35386277
159 0.91298644 1.18438191
160 -0.59782463 0.91298644
161 0.58024646 -0.59782463
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/7vpsn1352147489.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/82a9r1352147489.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/9n2bi1352147489.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/fisher/rcomp/tmp/10pv3k1352147489.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/fisher/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, 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/fisher/rcomp/tmp/11otuf1352147489.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/fisher/rcomp/tmp/129qlh1352147489.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/fisher/rcomp/tmp/13jfvx1352147489.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/fisher/rcomp/tmp/14ulc11352147489.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/fisher/rcomp/tmp/15ojf41352147489.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/fisher/rcomp/tmp/16jmra1352147489.tab")
+ }
>
> try(system("convert tmp/1n69g1352147489.ps tmp/1n69g1352147489.png",intern=TRUE))
character(0)
> try(system("convert tmp/2dovc1352147489.ps tmp/2dovc1352147489.png",intern=TRUE))
character(0)
> try(system("convert tmp/3euo81352147489.ps tmp/3euo81352147489.png",intern=TRUE))
character(0)
> try(system("convert tmp/4v8d71352147489.ps tmp/4v8d71352147489.png",intern=TRUE))
character(0)
> try(system("convert tmp/57owl1352147489.ps tmp/57owl1352147489.png",intern=TRUE))
character(0)
> try(system("convert tmp/6c5rm1352147489.ps tmp/6c5rm1352147489.png",intern=TRUE))
character(0)
> try(system("convert tmp/7vpsn1352147489.ps tmp/7vpsn1352147489.png",intern=TRUE))
character(0)
> try(system("convert tmp/82a9r1352147489.ps tmp/82a9r1352147489.png",intern=TRUE))
character(0)
> try(system("convert tmp/9n2bi1352147489.ps tmp/9n2bi1352147489.png",intern=TRUE))
character(0)
> try(system("convert tmp/10pv3k1352147489.ps tmp/10pv3k1352147489.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
8.300 1.134 9.441