R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i686-pc-linux-gnu (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(41
+ ,38
+ ,13
+ ,12
+ ,14
+ ,12
+ ,53
+ ,32
+ ,9
+ ,1
+ ,39
+ ,32
+ ,16
+ ,11
+ ,18
+ ,11
+ ,86
+ ,51
+ ,9
+ ,2
+ ,30
+ ,35
+ ,19
+ ,15
+ ,11
+ ,14
+ ,66
+ ,42
+ ,9
+ ,3
+ ,31
+ ,33
+ ,15
+ ,6
+ ,12
+ ,12
+ ,67
+ ,41
+ ,9
+ ,4
+ ,34
+ ,37
+ ,14
+ ,13
+ ,16
+ ,21
+ ,76
+ ,46
+ ,9
+ ,5
+ ,35
+ ,29
+ ,13
+ ,10
+ ,18
+ ,12
+ ,78
+ ,47
+ ,9
+ ,6
+ ,39
+ ,31
+ ,19
+ ,12
+ ,14
+ ,22
+ ,53
+ ,37
+ ,9
+ ,7
+ ,34
+ ,36
+ ,15
+ ,14
+ ,14
+ ,11
+ ,80
+ ,49
+ ,9
+ ,8
+ ,36
+ ,35
+ ,14
+ ,12
+ ,15
+ ,10
+ ,74
+ ,45
+ ,9
+ ,9
+ ,37
+ ,38
+ ,15
+ ,6
+ ,15
+ ,13
+ ,76
+ ,47
+ ,9
+ ,10
+ ,38
+ ,31
+ ,16
+ ,10
+ ,17
+ ,10
+ ,79
+ ,49
+ ,9
+ ,11
+ ,36
+ ,34
+ ,16
+ ,12
+ ,19
+ ,8
+ ,54
+ ,33
+ ,9
+ ,12
+ ,38
+ ,35
+ ,16
+ ,12
+ ,10
+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,35
+ ,32
+ ,13
+ ,9
+ ,9
+ ,19
+ ,73
+ ,46
+ ,11
+ ,150
+ ,38
+ ,39
+ ,10
+ ,7
+ ,16
+ ,12
+ ,85
+ ,53
+ ,11
+ ,151
+ ,42
+ ,37
+ ,15
+ ,13
+ ,13
+ ,17
+ ,79
+ ,47
+ ,11
+ ,152
+ ,34
+ ,38
+ ,16
+ ,9
+ ,16
+ ,9
+ ,71
+ ,41
+ ,11
+ ,153
+ ,35
+ ,39
+ ,16
+ ,6
+ ,12
+ ,12
+ ,72
+ ,44
+ ,11
+ ,154
+ ,35
+ ,34
+ ,14
+ ,8
+ ,9
+ ,19
+ ,69
+ ,43
+ ,11
+ ,155
+ ,33
+ ,31
+ ,10
+ ,8
+ ,13
+ ,18
+ ,78
+ ,51
+ ,11
+ ,156
+ ,36
+ ,32
+ ,17
+ ,15
+ ,13
+ ,15
+ ,54
+ ,33
+ ,11
+ ,157
+ ,32
+ ,37
+ ,13
+ ,6
+ ,14
+ ,14
+ ,69
+ ,43
+ ,11
+ ,158
+ ,33
+ ,36
+ ,15
+ ,9
+ ,19
+ ,11
+ ,81
+ ,53
+ ,11
+ ,159
+ ,34
+ ,32
+ ,16
+ ,11
+ ,13
+ ,9
+ ,84
+ ,51
+ ,11
+ ,160
+ ,32
+ ,35
+ ,12
+ ,8
+ ,12
+ ,18
+ ,84
+ ,50
+ ,11
+ ,161
+ ,34
+ ,36
+ ,13
+ ,8
+ ,13
+ ,16
+ ,69
+ ,46
+ ,11
+ ,162)
+ ,dim=c(10
+ ,162)
+ ,dimnames=list(c('Connected'
+ ,'Separate'
+ ,'Learning'
+ ,'Software'
+ ,'Happiness'
+ ,'Depression'
+ ,'Belonging'
+ ,'Belonging_Final'
+ ,'Month'
+ ,'T
')
+ ,1:162))
> y <- array(NA,dim=c(10,162),dimnames=list(c('Connected','Separate','Learning','Software','Happiness','Depression','Belonging','Belonging_Final','Month','T
'),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 = '3'
> par3 <- 'No Linear Trend'
> par2 <- 'Do not include Seasonal Dummies'
> par1 <- '3'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following object(s) are masked from 'package:base':
as.Date, as.Date.numeric
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
Learning Connected Separate Software Happiness Depression Belonging
1 13 41 38 12 14 12 53
2 16 39 32 11 18 11 86
3 19 30 35 15 11 14 66
4 15 31 33 6 12 12 67
5 14 34 37 13 16 21 76
6 13 35 29 10 18 12 78
7 19 39 31 12 14 22 53
8 15 34 36 14 14 11 80
9 14 36 35 12 15 10 74
10 15 37 38 6 15 13 76
11 16 38 31 10 17 10 79
12 16 36 34 12 19 8 54
13 16 38 35 12 10 15 67
14 16 39 38 11 16 14 54
15 17 33 37 15 18 10 87
16 15 32 33 12 14 14 58
17 15 36 32 10 14 14 75
18 20 38 38 12 17 11 88
19 18 39 38 11 14 10 64
20 16 32 32 12 16 13 57
21 16 32 33 11 18 7 66
22 16 31 31 12 11 14 68
23 19 39 38 13 14 12 54
24 16 37 39 11 12 14 56
25 17 39 32 9 17 11 86
26 17 41 32 13 9 9 80
27 16 36 35 10 16 11 76
28 15 33 37 14 14 15 69
29 16 33 33 12 15 14 78
30 14 34 33 10 11 13 67
31 15 31 28 12 16 9 80
32 12 27 32 8 13 15 54
33 14 37 31 10 17 10 71
34 16 34 37 12 15 11 84
35 14 34 30 12 14 13 74
36 7 32 33 7 16 8 71
37 10 29 31 6 9 20 63
38 14 36 33 12 15 12 71
39 16 29 31 10 17 10 76
40 16 35 33 10 13 10 69
41 16 37 32 10 15 9 74
42 14 34 33 12 16 14 75
43 20 38 32 15 16 8 54
44 14 35 33 10 12 14 52
45 14 38 28 10 12 11 69
46 11 37 35 12 11 13 68
47 14 38 39 13 15 9 65
48 15 33 34 11 15 11 75
49 16 36 38 11 17 15 74
50 14 38 32 12 13 11 75
51 16 32 38 14 16 10 72
52 14 32 30 10 14 14 67
53 12 32 33 12 11 18 63
54 16 34 38 13 12 14 62
55 9 32 32 5 12 11 63
56 14 37 32 6 15 12 76
57 16 39 34 12 16 13 74
58 16 29 34 12 15 9 67
59 15 37 36 11 12 10 73
60 16 35 34 10 12 15 70
61 12 30 28 7 8 20 53
62 16 38 34 12 13 12 77
63 16 34 35 14 11 12 77
64 14 31 35 11 14 14 52
65 16 34 31 12 15 13 54
66 17 35 37 13 10 11 80
67 18 36 35 14 11 17 66
68 18 30 27 11 12 12 73
69 12 39 40 12 15 13 63
70 16 35 37 12 15 14 69
71 10 38 36 8 14 13 67
72 14 31 38 11 16 15 54
73 18 34 39 14 15 13 81
74 18 38 41 14 15 10 69
75 16 34 27 12 13 11 84
76 17 39 30 9 12 19 80
77 16 37 37 13 17 13 70
78 16 34 31 11 13 17 69
79 13 28 31 12 15 13 77
80 16 37 27 12 13 9 54
81 16 33 36 12 15 11 79
82 20 37 38 12 16 10 30
83 16 35 37 12 15 9 71
84 15 37 33 12 16 12 73
85 15 32 34 11 15 12 72
86 16 33 31 10 14 13 77
87 14 38 39 9 15 13 75
88 16 33 34 12 14 12 69
89 16 29 32 12 13 15 54
90 15 33 33 12 7 22 70
91 12 31 36 9 17 13 73
92 17 36 32 15 13 15 54
93 16 35 41 12 15 13 77
94 15 32 28 12 14 15 82
95 13 29 30 12 13 10 80
96 16 39 36 10 16 11 80
97 16 37 35 13 12 16 69
98 16 35 31 9 14 11 78
99 16 37 34 12 17 11 81
100 14 32 36 10 15 10 76
101 16 38 36 14 17 10 76
102 16 37 35 11 12 16 73
103 20 36 37 15 16 12 85
104 15 32 28 11 11 11 66
105 16 33 39 11 15 16 79
106 13 40 32 12 9 19 68
107 17 38 35 12 16 11 76
108 16 41 39 12 15 16 71
109 16 36 35 11 10 15 54
110 12 43 42 7 10 24 46
111 16 30 34 12 15 14 82
112 16 31 33 14 11 15 74
113 17 32 41 11 13 11 88
114 13 32 33 11 14 15 38
115 12 37 34 10 18 12 76
116 18 37 32 13 16 10 86
117 14 33 40 13 14 14 54
118 14 34 40 8 14 13 70
119 13 33 35 11 14 9 69
120 16 38 36 12 14 15 90
121 13 33 37 11 12 15 54
122 16 31 27 13 14 14 76
123 13 38 39 12 15 11 89
124 16 37 38 14 15 8 76
125 15 33 31 13 15 11 73
126 16 31 33 15 13 11 79
127 15 39 32 10 17 8 90
128 17 44 39 11 17 10 74
129 15 33 36 9 19 11 81
130 12 35 33 11 15 13 72
131 16 32 33 10 13 11 71
132 10 28 32 11 9 20 66
133 16 40 37 8 15 10 77
134 12 27 30 11 15 15 65
135 14 37 38 12 15 12 74
136 15 32 29 12 16 14 82
137 13 28 22 9 11 23 54
138 15 34 35 11 14 14 63
139 11 30 35 10 11 16 54
140 12 35 34 8 15 11 64
141 8 31 35 9 13 12 69
142 16 32 34 8 15 10 54
143 15 30 34 9 16 14 84
144 17 30 35 15 14 12 86
145 16 31 23 11 15 12 77
146 10 40 31 8 16 11 89
147 18 32 27 13 16 12 76
148 13 36 36 12 11 13 60
149 16 32 31 12 12 11 75
150 13 35 32 9 9 19 73
151 10 38 39 7 16 12 85
152 15 42 37 13 13 17 79
153 16 34 38 9 16 9 71
154 16 35 39 6 12 12 72
155 14 35 34 8 9 19 69
156 10 33 31 8 13 18 78
157 17 36 32 15 13 15 54
158 13 32 37 6 14 14 69
159 15 33 36 9 19 11 81
160 16 34 32 11 13 9 84
161 12 32 35 8 12 18 84
162 13 34 36 8 13 16 69
Belonging_Final Month T\r
1 32 9 1
2 51 9 2
3 42 9 3
4 41 9 4
5 46 9 5
6 47 9 6
7 37 9 7
8 49 9 8
9 45 9 9
10 47 9 10
11 49 9 11
12 33 9 12
13 42 9 13
14 33 9 14
15 53 9 15
16 36 9 16
17 45 9 17
18 54 9 18
19 41 9 19
20 36 9 20
21 41 9 21
22 44 9 22
23 33 9 23
24 37 9 24
25 52 9 25
26 47 9 26
27 43 9 27
28 44 9 28
29 45 9 29
30 44 9 30
31 49 9 31
32 33 9 32
33 43 9 33
34 54 9 34
35 42 9 35
36 44 9 36
37 37 9 37
38 43 9 38
39 46 9 39
40 42 9 40
41 45 9 41
42 44 9 42
43 33 9 43
44 31 9 44
45 42 9 45
46 40 9 46
47 43 9 47
48 46 9 48
49 42 9 49
50 45 9 50
51 44 9 51
52 40 9 52
53 37 9 53
54 46 9 54
55 36 10 55
56 47 10 56
57 45 10 57
58 42 10 58
59 43 10 59
60 43 10 60
61 32 10 61
62 45 10 62
63 45 10 63
64 31 10 64
65 33 10 65
66 49 10 66
67 42 10 67
68 41 10 68
69 38 10 69
70 42 10 70
71 44 10 71
72 33 10 72
73 48 10 73
74 40 10 74
75 50 10 75
76 49 10 76
77 43 10 77
78 44 10 78
79 47 10 79
80 33 10 80
81 46 10 81
82 0 10 82
83 45 10 83
84 43 10 84
85 44 10 85
86 47 10 86
87 45 10 87
88 42 10 88
89 33 10 89
90 43 10 90
91 46 10 91
92 33 10 92
93 46 10 93
94 48 10 94
95 47 10 95
96 47 10 96
97 43 10 97
98 46 10 98
99 48 10 99
100 46 10 100
101 45 10 101
102 45 10 102
103 52 10 103
104 42 10 104
105 47 10 105
106 41 10 106
107 47 10 107
108 43 10 108
109 33 11 109
110 30 11 110
111 49 11 111
112 44 11 112
113 55 11 113
114 11 11 114
115 47 11 115
116 53 11 116
117 33 11 117
118 44 11 118
119 42 11 119
120 55 11 120
121 33 11 121
122 46 11 122
123 54 11 123
124 47 11 124
125 45 11 125
126 47 11 126
127 55 11 127
128 44 11 128
129 53 11 129
130 44 11 130
131 42 11 131
132 40 11 132
133 46 11 133
134 40 11 134
135 46 11 135
136 53 11 136
137 33 11 137
138 42 11 138
139 35 11 139
140 40 11 140
141 41 11 141
142 33 11 142
143 51 11 143
144 53 11 144
145 46 11 145
146 55 11 146
147 47 11 147
148 38 11 148
149 46 11 149
150 46 11 150
151 53 11 151
152 47 11 152
153 41 11 153
154 44 11 154
155 43 11 155
156 51 11 156
157 33 11 157
158 43 11 158
159 53 11 159
160 51 11 160
161 50 11 161
162 46 11 162
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Connected Separate Software
3.740075 0.106297 -0.016170 0.530389
Happiness Depression Belonging Belonging_Final
0.051927 -0.064263 0.041442 -0.054350
Month `T\\r`
0.239499 -0.008166
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-6.0499 -1.1385 0.2752 1.1689 4.1665
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.740075 5.289954 0.707 0.4806
Connected 0.106297 0.047365 2.244 0.0263 *
Separate -0.016170 0.045230 -0.358 0.7212
Software 0.530389 0.069632 7.617 2.58e-12 ***
Happiness 0.051927 0.076633 0.678 0.4991
Depression -0.064263 0.056687 -1.134 0.2587
Belonging 0.041442 0.044855 0.924 0.3570
Belonging_Final -0.054350 0.064168 -0.847 0.3983
Month 0.239499 0.538496 0.445 0.6571
`T\\r` -0.008166 0.009445 -0.865 0.3886
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.851 on 152 degrees of freedom
Multiple R-squared: 0.3645, Adjusted R-squared: 0.3269
F-statistic: 9.689 on 9 and 152 DF, p-value: 1.251e-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.73504773 0.52990454 0.26495227
[2,] 0.70936526 0.58126949 0.29063474
[3,] 0.58753817 0.82492367 0.41246183
[4,] 0.47437500 0.94875001 0.52562500
[5,] 0.39585369 0.79170738 0.60414631
[6,] 0.55004897 0.89990207 0.44995103
[7,] 0.46398609 0.92797219 0.53601391
[8,] 0.37524416 0.75048832 0.62475584
[9,] 0.30475205 0.60950410 0.69524795
[10,] 0.29672728 0.59345456 0.70327272
[11,] 0.42214305 0.84428611 0.57785695
[12,] 0.49425492 0.98850985 0.50574508
[13,] 0.43954133 0.87908266 0.56045867
[14,] 0.37133191 0.74266381 0.62866809
[15,] 0.34223093 0.68446186 0.65776907
[16,] 0.44539529 0.89079057 0.55460471
[17,] 0.38757291 0.77514581 0.61242709
[18,] 0.49679608 0.99359216 0.50320392
[19,] 0.44587868 0.89175737 0.55412132
[20,] 0.40843317 0.81686634 0.59156683
[21,] 0.39641509 0.79283018 0.60358491
[22,] 0.36441799 0.72883598 0.63558201
[23,] 0.31673113 0.63346226 0.68326887
[24,] 0.86093190 0.27813620 0.13906810
[25,] 0.83378427 0.33243146 0.16621573
[26,] 0.81590822 0.36818355 0.18409178
[27,] 0.84599546 0.30800908 0.15400454
[28,] 0.83329488 0.33341025 0.16670512
[29,] 0.80546835 0.38906331 0.19453165
[30,] 0.77830691 0.44338619 0.22169309
[31,] 0.80641890 0.38716219 0.19358110
[32,] 0.76643321 0.46713358 0.23356679
[33,] 0.73711315 0.52577369 0.26288685
[34,] 0.87636306 0.24727388 0.12363694
[35,] 0.90080057 0.19839886 0.09919943
[36,] 0.87940222 0.24119556 0.12059778
[37,] 0.87567941 0.24864118 0.12432059
[38,] 0.87176483 0.25647035 0.12823517
[39,] 0.84690025 0.30619950 0.15309975
[40,] 0.81943203 0.36113594 0.18056797
[41,] 0.84217756 0.31564489 0.15782244
[42,] 0.81112819 0.37774362 0.18887181
[43,] 0.81749701 0.36500599 0.18250299
[44,] 0.80733934 0.38532132 0.19266066
[45,] 0.77150271 0.45699459 0.22849729
[46,] 0.74857403 0.50285194 0.25142597
[47,] 0.71181213 0.57637574 0.28818787
[48,] 0.70238242 0.59523515 0.29761758
[49,] 0.65972530 0.68054939 0.34027470
[50,] 0.61465418 0.77069164 0.38534582
[51,] 0.57303995 0.85392010 0.42696005
[52,] 0.52593178 0.94813644 0.47406822
[53,] 0.48164366 0.96328733 0.51835634
[54,] 0.44394937 0.88789875 0.55605063
[55,] 0.43226667 0.86453333 0.56773333
[56,] 0.55421714 0.89156572 0.44578286
[57,] 0.69335340 0.61329320 0.30664660
[58,] 0.65429730 0.69140539 0.34570270
[59,] 0.78023063 0.43953875 0.21976937
[60,] 0.74543551 0.50912897 0.25456449
[61,] 0.73564232 0.52871535 0.26435768
[62,] 0.71552800 0.56894401 0.28447200
[63,] 0.67381738 0.65236523 0.32618262
[64,] 0.72793897 0.54412206 0.27206103
[65,] 0.68827121 0.62345757 0.31172879
[66,] 0.66965206 0.66069587 0.33034794
[67,] 0.68269437 0.63461126 0.31730563
[68,] 0.63915813 0.72168374 0.36084187
[69,] 0.60092731 0.79814537 0.39907269
[70,] 0.73538710 0.52922580 0.26461290
[71,] 0.69848290 0.60303421 0.30151710
[72,] 0.66764146 0.66471709 0.33235854
[73,] 0.62547019 0.74905962 0.37452981
[74,] 0.61462621 0.77074758 0.38537379
[75,] 0.56990296 0.86019407 0.43009704
[76,] 0.52719815 0.94560369 0.47280185
[77,] 0.50125311 0.99749377 0.49874689
[78,] 0.46170317 0.92340635 0.53829683
[79,] 0.45319238 0.90638475 0.54680762
[80,] 0.40830665 0.81661330 0.59169335
[81,] 0.36704802 0.73409604 0.63295198
[82,] 0.32388574 0.64777149 0.67611426
[83,] 0.36179604 0.72359209 0.63820396
[84,] 0.32614695 0.65229391 0.67385305
[85,] 0.28365411 0.56730823 0.71634589
[86,] 0.27517004 0.55034008 0.72482996
[87,] 0.23685649 0.47371298 0.76314351
[88,] 0.21492157 0.42984313 0.78507843
[89,] 0.20436188 0.40872375 0.79563812
[90,] 0.17938747 0.35877494 0.82061253
[91,] 0.20151147 0.40302294 0.79848853
[92,] 0.17160275 0.34320549 0.82839725
[93,] 0.15579566 0.31159133 0.84420434
[94,] 0.17454211 0.34908423 0.82545789
[95,] 0.14807045 0.29614089 0.85192955
[96,] 0.12068642 0.24137283 0.87931358
[97,] 0.11392603 0.22785206 0.88607397
[98,] 0.11396665 0.22793331 0.88603335
[99,] 0.10083696 0.20167393 0.89916304
[100,] 0.08631700 0.17263400 0.91368300
[101,] 0.11281680 0.22563359 0.88718320
[102,] 0.10819706 0.21639412 0.89180294
[103,] 0.13097687 0.26195374 0.86902313
[104,] 0.13515283 0.27030566 0.86484717
[105,] 0.11610424 0.23220847 0.88389576
[106,] 0.11617092 0.23234183 0.88382908
[107,] 0.10741557 0.21483113 0.89258443
[108,] 0.12089615 0.24179230 0.87910385
[109,] 0.09849664 0.19699328 0.90150336
[110,] 0.08575339 0.17150678 0.91424661
[111,] 0.08416505 0.16833011 0.91583495
[112,] 0.06517130 0.13034260 0.93482870
[113,] 0.04968220 0.09936441 0.95031780
[114,] 0.03712284 0.07424567 0.96287716
[115,] 0.02668185 0.05336370 0.97331815
[116,] 0.02506711 0.05013422 0.97493289
[117,] 0.02730236 0.05460472 0.97269764
[118,] 0.02709973 0.05419946 0.97290027
[119,] 0.02926073 0.05852146 0.97073927
[120,] 0.03105690 0.06211381 0.96894310
[121,] 0.06465273 0.12930546 0.93534727
[122,] 0.06686186 0.13372373 0.93313814
[123,] 0.05047235 0.10094469 0.94952765
[124,] 0.04044116 0.08088231 0.95955884
[125,] 0.02853365 0.05706730 0.97146635
[126,] 0.03393284 0.06786569 0.96606716
[127,] 0.02781545 0.05563090 0.97218455
[128,] 0.01790555 0.03581109 0.98209445
[129,] 0.45935099 0.91870199 0.54064901
[130,] 0.39805506 0.79611012 0.60194494
[131,] 0.32600327 0.65200654 0.67399673
[132,] 0.24253035 0.48506070 0.75746965
[133,] 0.17146852 0.34293704 0.82853148
[134,] 0.20163925 0.40327851 0.79836075
[135,] 0.21937631 0.43875263 0.78062369
[136,] 0.46035283 0.92070566 0.53964717
[137,] 0.44392638 0.88785277 0.55607362
> postscript(file="/var/wessaorg/rcomp/tmp/1f8s51351631214.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/2s4vz1351631214.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/3dcdo1351631214.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/4cmgw1351631214.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/55c211351631214.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.408827970 -0.361610262 2.426155376 2.792938435 -1.896398115 -2.243480354
7 8 9 10 11 12
3.653950672 -1.959952016 -2.204710533 2.146608168 0.501459567 -0.355976291
13 14 15 16 17 18
0.323354931 0.477894420 -0.655376424 -0.271798518 0.140421876 3.574072004
19 20 21 22 23 24
2.385907813 0.618020546 0.582085647 1.027316150 2.465940274 1.130545563
25 26 27 28 29 30
1.993266100 -0.068924210 0.823808646 -1.232997307 0.336445528 -0.155948043
31 32 33 34 35 36
-0.754205313 -0.385361700 -1.207152382 0.383371070 -1.778983690 -6.049909584
37 38 39 40 41 42
-1.139073080 -1.856081480 1.648060702 1.331188272 0.898312439 -1.645642620
43 44 45 46 47 48
2.216853735 -0.220503848 -0.911534147 -4.631461238 -2.372682549 0.024049433
49 50 51 52 53 54
0.755244611 -2.004329225 -0.472204266 -0.121129699 -2.709678963 0.857971668
55 56 57 58 59 60
-2.792412100 1.121465563 -0.246435459 0.746621251 -0.507117792 1.657331779
61 62 63 64 65 66
0.326815289 -0.132115718 -0.639514453 -0.473394832 0.530435625 0.922155280
67 68 69 70 71 72
1.794683932 3.184748568 -3.924079925 0.493774031 -3.532316650 -0.373329811
73 74 75 76 77 78
1.360664790 0.845698968 0.203432448 2.997240366 -0.347255250 1.504110280
79 80 81 82 83 84
-1.909722954 0.116157474 0.390215570 3.419899968 0.358785505 -0.961047323
85 86 87 88 89 90
0.272883016 1.728659704 -0.212650585 0.728248678 1.506458762 0.747438066
91 92 93 94 95 96
-1.451037563 0.195711018 0.567877335 -0.233338016 -2.114793267 0.896683988
97 98 99 100 101 102
0.277593455 1.920129840 0.001638766 -0.227489338 -1.136865786 1.322133716
103 104 105 106 107 108
2.765767166 0.614415516 1.540767855 -2.204612812 1.181629043 0.298637386
109 110 111 112 113 114
1.420884203 -0.333427445 0.913763489 0.070442173 2.349597286 -1.885776792
115 116 117 118 119 120
-2.881228273 1.390438393 -1.446792940 0.977535525 -1.904330081 0.279977144
121 122 123 124 125 126
-1.233744517 0.391241719 -2.968900187 -0.965877334 -0.906912021 -0.750687087
127 128 129 130 131 132
-0.378682758 0.874550126 1.223716033 -2.869939015 1.895577369 -3.333042113
133 134 135 136 137 138
1.987623239 -1.834189047 -1.529686159 -0.010055436 0.812651329 0.714497207
139 140 141 142 143 144
-2.044924208 -1.195329869 -5.260937437 3.109600778 1.740135535 0.583283164
145 146 147 148 149 150
1.353263844 -3.999057667 2.311068108 -1.932209929 1.053008576 0.102390004
151 152 153 154 155 156
-2.964549544 -1.196598158 2.135221574 4.166533806 1.708668411 -2.329231840
157 158 159 160 161 162
0.487010345 1.580396558 1.468700102 1.195119807 -0.368498683 0.667022513
> postscript(file="/var/wessaorg/rcomp/tmp/6r6vp1351631214.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.408827970 NA
1 -0.361610262 -3.408827970
2 2.426155376 -0.361610262
3 2.792938435 2.426155376
4 -1.896398115 2.792938435
5 -2.243480354 -1.896398115
6 3.653950672 -2.243480354
7 -1.959952016 3.653950672
8 -2.204710533 -1.959952016
9 2.146608168 -2.204710533
10 0.501459567 2.146608168
11 -0.355976291 0.501459567
12 0.323354931 -0.355976291
13 0.477894420 0.323354931
14 -0.655376424 0.477894420
15 -0.271798518 -0.655376424
16 0.140421876 -0.271798518
17 3.574072004 0.140421876
18 2.385907813 3.574072004
19 0.618020546 2.385907813
20 0.582085647 0.618020546
21 1.027316150 0.582085647
22 2.465940274 1.027316150
23 1.130545563 2.465940274
24 1.993266100 1.130545563
25 -0.068924210 1.993266100
26 0.823808646 -0.068924210
27 -1.232997307 0.823808646
28 0.336445528 -1.232997307
29 -0.155948043 0.336445528
30 -0.754205313 -0.155948043
31 -0.385361700 -0.754205313
32 -1.207152382 -0.385361700
33 0.383371070 -1.207152382
34 -1.778983690 0.383371070
35 -6.049909584 -1.778983690
36 -1.139073080 -6.049909584
37 -1.856081480 -1.139073080
38 1.648060702 -1.856081480
39 1.331188272 1.648060702
40 0.898312439 1.331188272
41 -1.645642620 0.898312439
42 2.216853735 -1.645642620
43 -0.220503848 2.216853735
44 -0.911534147 -0.220503848
45 -4.631461238 -0.911534147
46 -2.372682549 -4.631461238
47 0.024049433 -2.372682549
48 0.755244611 0.024049433
49 -2.004329225 0.755244611
50 -0.472204266 -2.004329225
51 -0.121129699 -0.472204266
52 -2.709678963 -0.121129699
53 0.857971668 -2.709678963
54 -2.792412100 0.857971668
55 1.121465563 -2.792412100
56 -0.246435459 1.121465563
57 0.746621251 -0.246435459
58 -0.507117792 0.746621251
59 1.657331779 -0.507117792
60 0.326815289 1.657331779
61 -0.132115718 0.326815289
62 -0.639514453 -0.132115718
63 -0.473394832 -0.639514453
64 0.530435625 -0.473394832
65 0.922155280 0.530435625
66 1.794683932 0.922155280
67 3.184748568 1.794683932
68 -3.924079925 3.184748568
69 0.493774031 -3.924079925
70 -3.532316650 0.493774031
71 -0.373329811 -3.532316650
72 1.360664790 -0.373329811
73 0.845698968 1.360664790
74 0.203432448 0.845698968
75 2.997240366 0.203432448
76 -0.347255250 2.997240366
77 1.504110280 -0.347255250
78 -1.909722954 1.504110280
79 0.116157474 -1.909722954
80 0.390215570 0.116157474
81 3.419899968 0.390215570
82 0.358785505 3.419899968
83 -0.961047323 0.358785505
84 0.272883016 -0.961047323
85 1.728659704 0.272883016
86 -0.212650585 1.728659704
87 0.728248678 -0.212650585
88 1.506458762 0.728248678
89 0.747438066 1.506458762
90 -1.451037563 0.747438066
91 0.195711018 -1.451037563
92 0.567877335 0.195711018
93 -0.233338016 0.567877335
94 -2.114793267 -0.233338016
95 0.896683988 -2.114793267
96 0.277593455 0.896683988
97 1.920129840 0.277593455
98 0.001638766 1.920129840
99 -0.227489338 0.001638766
100 -1.136865786 -0.227489338
101 1.322133716 -1.136865786
102 2.765767166 1.322133716
103 0.614415516 2.765767166
104 1.540767855 0.614415516
105 -2.204612812 1.540767855
106 1.181629043 -2.204612812
107 0.298637386 1.181629043
108 1.420884203 0.298637386
109 -0.333427445 1.420884203
110 0.913763489 -0.333427445
111 0.070442173 0.913763489
112 2.349597286 0.070442173
113 -1.885776792 2.349597286
114 -2.881228273 -1.885776792
115 1.390438393 -2.881228273
116 -1.446792940 1.390438393
117 0.977535525 -1.446792940
118 -1.904330081 0.977535525
119 0.279977144 -1.904330081
120 -1.233744517 0.279977144
121 0.391241719 -1.233744517
122 -2.968900187 0.391241719
123 -0.965877334 -2.968900187
124 -0.906912021 -0.965877334
125 -0.750687087 -0.906912021
126 -0.378682758 -0.750687087
127 0.874550126 -0.378682758
128 1.223716033 0.874550126
129 -2.869939015 1.223716033
130 1.895577369 -2.869939015
131 -3.333042113 1.895577369
132 1.987623239 -3.333042113
133 -1.834189047 1.987623239
134 -1.529686159 -1.834189047
135 -0.010055436 -1.529686159
136 0.812651329 -0.010055436
137 0.714497207 0.812651329
138 -2.044924208 0.714497207
139 -1.195329869 -2.044924208
140 -5.260937437 -1.195329869
141 3.109600778 -5.260937437
142 1.740135535 3.109600778
143 0.583283164 1.740135535
144 1.353263844 0.583283164
145 -3.999057667 1.353263844
146 2.311068108 -3.999057667
147 -1.932209929 2.311068108
148 1.053008576 -1.932209929
149 0.102390004 1.053008576
150 -2.964549544 0.102390004
151 -1.196598158 -2.964549544
152 2.135221574 -1.196598158
153 4.166533806 2.135221574
154 1.708668411 4.166533806
155 -2.329231840 1.708668411
156 0.487010345 -2.329231840
157 1.580396558 0.487010345
158 1.468700102 1.580396558
159 1.195119807 1.468700102
160 -0.368498683 1.195119807
161 0.667022513 -0.368498683
162 NA 0.667022513
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.361610262 -3.408827970
[2,] 2.426155376 -0.361610262
[3,] 2.792938435 2.426155376
[4,] -1.896398115 2.792938435
[5,] -2.243480354 -1.896398115
[6,] 3.653950672 -2.243480354
[7,] -1.959952016 3.653950672
[8,] -2.204710533 -1.959952016
[9,] 2.146608168 -2.204710533
[10,] 0.501459567 2.146608168
[11,] -0.355976291 0.501459567
[12,] 0.323354931 -0.355976291
[13,] 0.477894420 0.323354931
[14,] -0.655376424 0.477894420
[15,] -0.271798518 -0.655376424
[16,] 0.140421876 -0.271798518
[17,] 3.574072004 0.140421876
[18,] 2.385907813 3.574072004
[19,] 0.618020546 2.385907813
[20,] 0.582085647 0.618020546
[21,] 1.027316150 0.582085647
[22,] 2.465940274 1.027316150
[23,] 1.130545563 2.465940274
[24,] 1.993266100 1.130545563
[25,] -0.068924210 1.993266100
[26,] 0.823808646 -0.068924210
[27,] -1.232997307 0.823808646
[28,] 0.336445528 -1.232997307
[29,] -0.155948043 0.336445528
[30,] -0.754205313 -0.155948043
[31,] -0.385361700 -0.754205313
[32,] -1.207152382 -0.385361700
[33,] 0.383371070 -1.207152382
[34,] -1.778983690 0.383371070
[35,] -6.049909584 -1.778983690
[36,] -1.139073080 -6.049909584
[37,] -1.856081480 -1.139073080
[38,] 1.648060702 -1.856081480
[39,] 1.331188272 1.648060702
[40,] 0.898312439 1.331188272
[41,] -1.645642620 0.898312439
[42,] 2.216853735 -1.645642620
[43,] -0.220503848 2.216853735
[44,] -0.911534147 -0.220503848
[45,] -4.631461238 -0.911534147
[46,] -2.372682549 -4.631461238
[47,] 0.024049433 -2.372682549
[48,] 0.755244611 0.024049433
[49,] -2.004329225 0.755244611
[50,] -0.472204266 -2.004329225
[51,] -0.121129699 -0.472204266
[52,] -2.709678963 -0.121129699
[53,] 0.857971668 -2.709678963
[54,] -2.792412100 0.857971668
[55,] 1.121465563 -2.792412100
[56,] -0.246435459 1.121465563
[57,] 0.746621251 -0.246435459
[58,] -0.507117792 0.746621251
[59,] 1.657331779 -0.507117792
[60,] 0.326815289 1.657331779
[61,] -0.132115718 0.326815289
[62,] -0.639514453 -0.132115718
[63,] -0.473394832 -0.639514453
[64,] 0.530435625 -0.473394832
[65,] 0.922155280 0.530435625
[66,] 1.794683932 0.922155280
[67,] 3.184748568 1.794683932
[68,] -3.924079925 3.184748568
[69,] 0.493774031 -3.924079925
[70,] -3.532316650 0.493774031
[71,] -0.373329811 -3.532316650
[72,] 1.360664790 -0.373329811
[73,] 0.845698968 1.360664790
[74,] 0.203432448 0.845698968
[75,] 2.997240366 0.203432448
[76,] -0.347255250 2.997240366
[77,] 1.504110280 -0.347255250
[78,] -1.909722954 1.504110280
[79,] 0.116157474 -1.909722954
[80,] 0.390215570 0.116157474
[81,] 3.419899968 0.390215570
[82,] 0.358785505 3.419899968
[83,] -0.961047323 0.358785505
[84,] 0.272883016 -0.961047323
[85,] 1.728659704 0.272883016
[86,] -0.212650585 1.728659704
[87,] 0.728248678 -0.212650585
[88,] 1.506458762 0.728248678
[89,] 0.747438066 1.506458762
[90,] -1.451037563 0.747438066
[91,] 0.195711018 -1.451037563
[92,] 0.567877335 0.195711018
[93,] -0.233338016 0.567877335
[94,] -2.114793267 -0.233338016
[95,] 0.896683988 -2.114793267
[96,] 0.277593455 0.896683988
[97,] 1.920129840 0.277593455
[98,] 0.001638766 1.920129840
[99,] -0.227489338 0.001638766
[100,] -1.136865786 -0.227489338
[101,] 1.322133716 -1.136865786
[102,] 2.765767166 1.322133716
[103,] 0.614415516 2.765767166
[104,] 1.540767855 0.614415516
[105,] -2.204612812 1.540767855
[106,] 1.181629043 -2.204612812
[107,] 0.298637386 1.181629043
[108,] 1.420884203 0.298637386
[109,] -0.333427445 1.420884203
[110,] 0.913763489 -0.333427445
[111,] 0.070442173 0.913763489
[112,] 2.349597286 0.070442173
[113,] -1.885776792 2.349597286
[114,] -2.881228273 -1.885776792
[115,] 1.390438393 -2.881228273
[116,] -1.446792940 1.390438393
[117,] 0.977535525 -1.446792940
[118,] -1.904330081 0.977535525
[119,] 0.279977144 -1.904330081
[120,] -1.233744517 0.279977144
[121,] 0.391241719 -1.233744517
[122,] -2.968900187 0.391241719
[123,] -0.965877334 -2.968900187
[124,] -0.906912021 -0.965877334
[125,] -0.750687087 -0.906912021
[126,] -0.378682758 -0.750687087
[127,] 0.874550126 -0.378682758
[128,] 1.223716033 0.874550126
[129,] -2.869939015 1.223716033
[130,] 1.895577369 -2.869939015
[131,] -3.333042113 1.895577369
[132,] 1.987623239 -3.333042113
[133,] -1.834189047 1.987623239
[134,] -1.529686159 -1.834189047
[135,] -0.010055436 -1.529686159
[136,] 0.812651329 -0.010055436
[137,] 0.714497207 0.812651329
[138,] -2.044924208 0.714497207
[139,] -1.195329869 -2.044924208
[140,] -5.260937437 -1.195329869
[141,] 3.109600778 -5.260937437
[142,] 1.740135535 3.109600778
[143,] 0.583283164 1.740135535
[144,] 1.353263844 0.583283164
[145,] -3.999057667 1.353263844
[146,] 2.311068108 -3.999057667
[147,] -1.932209929 2.311068108
[148,] 1.053008576 -1.932209929
[149,] 0.102390004 1.053008576
[150,] -2.964549544 0.102390004
[151,] -1.196598158 -2.964549544
[152,] 2.135221574 -1.196598158
[153,] 4.166533806 2.135221574
[154,] 1.708668411 4.166533806
[155,] -2.329231840 1.708668411
[156,] 0.487010345 -2.329231840
[157,] 1.580396558 0.487010345
[158,] 1.468700102 1.580396558
[159,] 1.195119807 1.468700102
[160,] -0.368498683 1.195119807
[161,] 0.667022513 -0.368498683
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.361610262 -3.408827970
2 2.426155376 -0.361610262
3 2.792938435 2.426155376
4 -1.896398115 2.792938435
5 -2.243480354 -1.896398115
6 3.653950672 -2.243480354
7 -1.959952016 3.653950672
8 -2.204710533 -1.959952016
9 2.146608168 -2.204710533
10 0.501459567 2.146608168
11 -0.355976291 0.501459567
12 0.323354931 -0.355976291
13 0.477894420 0.323354931
14 -0.655376424 0.477894420
15 -0.271798518 -0.655376424
16 0.140421876 -0.271798518
17 3.574072004 0.140421876
18 2.385907813 3.574072004
19 0.618020546 2.385907813
20 0.582085647 0.618020546
21 1.027316150 0.582085647
22 2.465940274 1.027316150
23 1.130545563 2.465940274
24 1.993266100 1.130545563
25 -0.068924210 1.993266100
26 0.823808646 -0.068924210
27 -1.232997307 0.823808646
28 0.336445528 -1.232997307
29 -0.155948043 0.336445528
30 -0.754205313 -0.155948043
31 -0.385361700 -0.754205313
32 -1.207152382 -0.385361700
33 0.383371070 -1.207152382
34 -1.778983690 0.383371070
35 -6.049909584 -1.778983690
36 -1.139073080 -6.049909584
37 -1.856081480 -1.139073080
38 1.648060702 -1.856081480
39 1.331188272 1.648060702
40 0.898312439 1.331188272
41 -1.645642620 0.898312439
42 2.216853735 -1.645642620
43 -0.220503848 2.216853735
44 -0.911534147 -0.220503848
45 -4.631461238 -0.911534147
46 -2.372682549 -4.631461238
47 0.024049433 -2.372682549
48 0.755244611 0.024049433
49 -2.004329225 0.755244611
50 -0.472204266 -2.004329225
51 -0.121129699 -0.472204266
52 -2.709678963 -0.121129699
53 0.857971668 -2.709678963
54 -2.792412100 0.857971668
55 1.121465563 -2.792412100
56 -0.246435459 1.121465563
57 0.746621251 -0.246435459
58 -0.507117792 0.746621251
59 1.657331779 -0.507117792
60 0.326815289 1.657331779
61 -0.132115718 0.326815289
62 -0.639514453 -0.132115718
63 -0.473394832 -0.639514453
64 0.530435625 -0.473394832
65 0.922155280 0.530435625
66 1.794683932 0.922155280
67 3.184748568 1.794683932
68 -3.924079925 3.184748568
69 0.493774031 -3.924079925
70 -3.532316650 0.493774031
71 -0.373329811 -3.532316650
72 1.360664790 -0.373329811
73 0.845698968 1.360664790
74 0.203432448 0.845698968
75 2.997240366 0.203432448
76 -0.347255250 2.997240366
77 1.504110280 -0.347255250
78 -1.909722954 1.504110280
79 0.116157474 -1.909722954
80 0.390215570 0.116157474
81 3.419899968 0.390215570
82 0.358785505 3.419899968
83 -0.961047323 0.358785505
84 0.272883016 -0.961047323
85 1.728659704 0.272883016
86 -0.212650585 1.728659704
87 0.728248678 -0.212650585
88 1.506458762 0.728248678
89 0.747438066 1.506458762
90 -1.451037563 0.747438066
91 0.195711018 -1.451037563
92 0.567877335 0.195711018
93 -0.233338016 0.567877335
94 -2.114793267 -0.233338016
95 0.896683988 -2.114793267
96 0.277593455 0.896683988
97 1.920129840 0.277593455
98 0.001638766 1.920129840
99 -0.227489338 0.001638766
100 -1.136865786 -0.227489338
101 1.322133716 -1.136865786
102 2.765767166 1.322133716
103 0.614415516 2.765767166
104 1.540767855 0.614415516
105 -2.204612812 1.540767855
106 1.181629043 -2.204612812
107 0.298637386 1.181629043
108 1.420884203 0.298637386
109 -0.333427445 1.420884203
110 0.913763489 -0.333427445
111 0.070442173 0.913763489
112 2.349597286 0.070442173
113 -1.885776792 2.349597286
114 -2.881228273 -1.885776792
115 1.390438393 -2.881228273
116 -1.446792940 1.390438393
117 0.977535525 -1.446792940
118 -1.904330081 0.977535525
119 0.279977144 -1.904330081
120 -1.233744517 0.279977144
121 0.391241719 -1.233744517
122 -2.968900187 0.391241719
123 -0.965877334 -2.968900187
124 -0.906912021 -0.965877334
125 -0.750687087 -0.906912021
126 -0.378682758 -0.750687087
127 0.874550126 -0.378682758
128 1.223716033 0.874550126
129 -2.869939015 1.223716033
130 1.895577369 -2.869939015
131 -3.333042113 1.895577369
132 1.987623239 -3.333042113
133 -1.834189047 1.987623239
134 -1.529686159 -1.834189047
135 -0.010055436 -1.529686159
136 0.812651329 -0.010055436
137 0.714497207 0.812651329
138 -2.044924208 0.714497207
139 -1.195329869 -2.044924208
140 -5.260937437 -1.195329869
141 3.109600778 -5.260937437
142 1.740135535 3.109600778
143 0.583283164 1.740135535
144 1.353263844 0.583283164
145 -3.999057667 1.353263844
146 2.311068108 -3.999057667
147 -1.932209929 2.311068108
148 1.053008576 -1.932209929
149 0.102390004 1.053008576
150 -2.964549544 0.102390004
151 -1.196598158 -2.964549544
152 2.135221574 -1.196598158
153 4.166533806 2.135221574
154 1.708668411 4.166533806
155 -2.329231840 1.708668411
156 0.487010345 -2.329231840
157 1.580396558 0.487010345
158 1.468700102 1.580396558
159 1.195119807 1.468700102
160 -0.368498683 1.195119807
161 0.667022513 -0.368498683
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/78qb01351631215.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/8uv071351631215.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/9ylmk1351631215.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/wessaorg/rcomp/tmp/10dzvt1351631215.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/wessaorg/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/11zl161351631215.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/12kgsm1351631215.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/13gpnc1351631215.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/14j57j1351631215.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/15yhof1351631215.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/169x611351631215.tab")
+ }
>
> try(system("convert tmp/1f8s51351631214.ps tmp/1f8s51351631214.png",intern=TRUE))
character(0)
> try(system("convert tmp/2s4vz1351631214.ps tmp/2s4vz1351631214.png",intern=TRUE))
character(0)
> try(system("convert tmp/3dcdo1351631214.ps tmp/3dcdo1351631214.png",intern=TRUE))
character(0)
> try(system("convert tmp/4cmgw1351631214.ps tmp/4cmgw1351631214.png",intern=TRUE))
character(0)
> try(system("convert tmp/55c211351631214.ps tmp/55c211351631214.png",intern=TRUE))
character(0)
> try(system("convert tmp/6r6vp1351631214.ps tmp/6r6vp1351631214.png",intern=TRUE))
character(0)
> try(system("convert tmp/78qb01351631215.ps tmp/78qb01351631215.png",intern=TRUE))
character(0)
> try(system("convert tmp/8uv071351631215.ps tmp/8uv071351631215.png",intern=TRUE))
character(0)
> try(system("convert tmp/9ylmk1351631215.ps tmp/9ylmk1351631215.png",intern=TRUE))
character(0)
> try(system("convert tmp/10dzvt1351631215.ps tmp/10dzvt1351631215.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
9.304 1.121 10.504