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(2
+ ,7
+ ,41
+ ,38
+ ,13
+ ,12
+ ,14
+ ,12
+ ,53
+ ,32
+ ,2
+ ,5
+ ,39
+ ,32
+ ,16
+ ,11
+ ,18
+ ,11
+ ,86
+ ,51
+ ,2
+ ,5
+ ,30
+ ,35
+ ,19
+ ,15
+ ,11
+ ,14
+ ,66
+ ,42
+ ,1
+ ,5
+ ,31
+ ,33
+ ,15
+ ,6
+ ,12
+ ,12
+ ,67
+ ,41
+ ,2
+ ,8
+ ,34
+ ,37
+ ,14
+ ,13
+ ,16
+ ,21
+ ,76
+ ,46
+ ,2
+ ,6
+ ,35
+ ,29
+ ,13
+ ,10
+ ,18
+ ,12
+ ,78
+ ,47
+ ,2
+ ,5
+ ,39
+ ,31
+ ,19
+ ,12
+ ,14
+ ,22
+ ,53
+ ,37
+ ,2
+ ,6
+ ,34
+ ,36
+ ,15
+ ,14
+ ,14
+ ,11
+ ,80
+ ,49
+ ,2
+ ,5
+ ,36
+ ,35
+ ,14
+ ,12
+ ,15
+ ,10
+ ,74
+ ,45
+ ,2
+ ,4
+ ,37
+ ,38
+ ,15
+ ,6
+ ,15
+ ,13
+ ,76
+ ,47
+ ,1
+ ,6
+ ,38
+ ,31
+ ,16
+ ,10
+ ,17
+ ,10
+ ,79
+ ,49
+ ,2
+ ,5
+ ,36
+ ,34
+ ,16
+ ,12
+ ,19
+ ,8
+ ,54
+ ,33
+ ,1
+ ,5
+ ,38
+ ,35
+ ,16
+ ,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+ ,7
+ ,35
+ ,32
+ ,13
+ ,9
+ ,9
+ ,19
+ ,73
+ ,46
+ ,2
+ ,6
+ ,38
+ ,39
+ ,10
+ ,7
+ ,16
+ ,12
+ ,85
+ ,53
+ ,2
+ ,7
+ ,42
+ ,37
+ ,15
+ ,13
+ ,13
+ ,17
+ ,79
+ ,47
+ ,1
+ ,10
+ ,34
+ ,38
+ ,16
+ ,9
+ ,16
+ ,9
+ ,71
+ ,41
+ ,2
+ ,6
+ ,35
+ ,39
+ ,16
+ ,6
+ ,12
+ ,12
+ ,72
+ ,44
+ ,2
+ ,8
+ ,35
+ ,34
+ ,14
+ ,8
+ ,9
+ ,19
+ ,69
+ ,43
+ ,2
+ ,4
+ ,33
+ ,31
+ ,10
+ ,8
+ ,13
+ ,18
+ ,78
+ ,51
+ ,2
+ ,5
+ ,36
+ ,32
+ ,17
+ ,15
+ ,13
+ ,15
+ ,54
+ ,33
+ ,2
+ ,6
+ ,32
+ ,37
+ ,13
+ ,6
+ ,14
+ ,14
+ ,69
+ ,43
+ ,2
+ ,7
+ ,33
+ ,36
+ ,15
+ ,9
+ ,19
+ ,11
+ ,81
+ ,53
+ ,2
+ ,7
+ ,34
+ ,32
+ ,16
+ ,11
+ ,13
+ ,9
+ ,84
+ ,51
+ ,2
+ ,6
+ ,32
+ ,35
+ ,12
+ ,8
+ ,12
+ ,18
+ ,84
+ ,50
+ ,2
+ ,6
+ ,34
+ ,36
+ ,13
+ ,8
+ ,13
+ ,16
+ ,69
+ ,46)
+ ,dim=c(10
+ ,162)
+ ,dimnames=list(c('Gender'
+ ,'Age'
+ ,'Connected'
+ ,'Separate'
+ ,'Learning'
+ ,'Software'
+ ,'Happiness'
+ ,'Depression'
+ ,'Belonging'
+ ,'Belonging_Final')
+ ,1:162))
> y <- array(NA,dim=c(10,162),dimnames=list(c('Gender','Age','Connected','Separate','Learning','Software','Happiness','Depression','Belonging','Belonging_Final'),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 = '5'
> 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 Gender Age Connected Separate Software Happiness Depression
1 13 2 7 41 38 12 14 12
2 16 2 5 39 32 11 18 11
3 19 2 5 30 35 15 11 14
4 15 1 5 31 33 6 12 12
5 14 2 8 34 37 13 16 21
6 13 2 6 35 29 10 18 12
7 19 2 5 39 31 12 14 22
8 15 2 6 34 36 14 14 11
9 14 2 5 36 35 12 15 10
10 15 2 4 37 38 6 15 13
11 16 1 6 38 31 10 17 10
12 16 2 5 36 34 12 19 8
13 16 1 5 38 35 12 10 15
14 16 2 6 39 38 11 16 14
15 17 2 7 33 37 15 18 10
16 15 1 6 32 33 12 14 14
17 15 1 7 36 32 10 14 14
18 20 2 6 38 38 12 17 11
19 18 1 8 39 38 11 14 10
20 16 2 7 32 32 12 16 13
21 16 1 5 32 33 11 18 7
22 16 2 5 31 31 12 11 14
23 19 2 7 39 38 13 14 12
24 16 2 7 37 39 11 12 14
25 17 1 5 39 32 9 17 11
26 17 2 4 41 32 13 9 9
27 16 1 10 36 35 10 16 11
28 15 2 6 33 37 14 14 15
29 16 2 5 33 33 12 15 14
30 14 1 5 34 33 10 11 13
31 15 2 5 31 28 12 16 9
32 12 1 5 27 32 8 13 15
33 14 2 6 37 31 10 17 10
34 16 2 5 34 37 12 15 11
35 14 1 5 34 30 12 14 13
36 7 1 5 32 33 7 16 8
37 10 1 5 29 31 6 9 20
38 14 1 5 36 33 12 15 12
39 16 2 5 29 31 10 17 10
40 16 1 5 35 33 10 13 10
41 16 1 5 37 32 10 15 9
42 14 2 7 34 33 12 16 14
43 20 1 5 38 32 15 16 8
44 14 1 6 35 33 10 12 14
45 14 2 7 38 28 10 12 11
46 11 2 7 37 35 12 11 13
47 14 2 5 38 39 13 15 9
48 15 2 5 33 34 11 15 11
49 16 2 4 36 38 11 17 15
50 14 1 5 38 32 12 13 11
51 16 2 4 32 38 14 16 10
52 14 1 5 32 30 10 14 14
53 12 1 5 32 33 12 11 18
54 16 2 7 34 38 13 12 14
55 9 1 5 32 32 5 12 11
56 14 2 5 37 32 6 15 12
57 16 2 6 39 34 12 16 13
58 16 2 4 29 34 12 15 9
59 15 1 6 37 36 11 12 10
60 16 2 6 35 34 10 12 15
61 12 1 5 30 28 7 8 20
62 16 1 7 38 34 12 13 12
63 16 2 6 34 35 14 11 12
64 14 2 8 31 35 11 14 14
65 16 2 7 34 31 12 15 13
66 17 1 5 35 37 13 10 11
67 18 2 6 36 35 14 11 17
68 18 1 6 30 27 11 12 12
69 12 2 5 39 40 12 15 13
70 16 1 5 35 37 12 15 14
71 10 1 5 38 36 8 14 13
72 14 2 5 31 38 11 16 15
73 18 2 4 34 39 14 15 13
74 18 1 6 38 41 14 15 10
75 16 1 6 34 27 12 13 11
76 17 2 6 39 30 9 12 19
77 16 2 6 37 37 13 17 13
78 16 2 7 34 31 11 13 17
79 13 1 5 28 31 12 15 13
80 16 1 7 37 27 12 13 9
81 16 1 6 33 36 12 15 11
82 20 1 5 37 38 12 16 10
83 16 2 5 35 37 12 15 9
84 15 1 4 37 33 12 16 12
85 15 2 8 32 34 11 15 12
86 16 2 8 33 31 10 14 13
87 14 1 5 38 39 9 15 13
88 16 2 5 33 34 12 14 12
89 16 2 6 29 32 12 13 15
90 15 2 4 33 33 12 7 22
91 12 2 5 31 36 9 17 13
92 17 2 5 36 32 15 13 15
93 16 2 5 35 41 12 15 13
94 15 2 5 32 28 12 14 15
95 13 2 6 29 30 12 13 10
96 16 2 6 39 36 10 16 11
97 16 2 5 37 35 13 12 16
98 16 2 6 35 31 9 14 11
99 16 1 5 37 34 12 17 11
100 14 1 7 32 36 10 15 10
101 16 2 5 38 36 14 17 10
102 16 1 6 37 35 11 12 16
103 20 2 6 36 37 15 16 12
104 15 1 6 32 28 11 11 11
105 16 2 4 33 39 11 15 16
106 13 1 5 40 32 12 9 19
107 17 2 5 38 35 12 16 11
108 16 1 7 41 39 12 15 16
109 16 1 6 36 35 11 10 15
110 12 2 9 43 42 7 10 24
111 16 2 6 30 34 12 15 14
112 16 2 6 31 33 14 11 15
113 17 2 5 32 41 11 13 11
114 13 1 6 32 33 11 14 15
115 12 2 5 37 34 10 18 12
116 18 1 8 37 32 13 16 10
117 14 2 7 33 40 13 14 14
118 14 2 5 34 40 8 14 13
119 13 2 7 33 35 11 14 9
120 16 2 6 38 36 12 14 15
121 13 2 6 33 37 11 12 15
122 16 2 9 31 27 13 14 14
123 13 2 7 38 39 12 15 11
124 16 2 6 37 38 14 15 8
125 15 2 5 33 31 13 15 11
126 16 2 5 31 33 15 13 11
127 15 1 6 39 32 10 17 8
128 17 2 6 44 39 11 17 10
129 15 2 7 33 36 9 19 11
130 12 2 5 35 33 11 15 13
131 16 1 5 32 33 10 13 11
132 10 1 5 28 32 11 9 20
133 16 2 6 40 37 8 15 10
134 12 1 4 27 30 11 15 15
135 14 1 5 37 38 12 15 12
136 15 2 7 32 29 12 16 14
137 13 1 5 28 22 9 11 23
138 15 1 7 34 35 11 14 14
139 11 2 7 30 35 10 11 16
140 12 2 6 35 34 8 15 11
141 8 1 5 31 35 9 13 12
142 16 2 8 32 34 8 15 10
143 15 1 5 30 34 9 16 14
144 17 2 5 30 35 15 14 12
145 16 1 5 31 23 11 15 12
146 10 2 6 40 31 8 16 11
147 18 2 4 32 27 13 16 12
148 13 1 5 36 36 12 11 13
149 16 1 5 32 31 12 12 11
150 13 1 7 35 32 9 9 19
151 10 2 6 38 39 7 16 12
152 15 2 7 42 37 13 13 17
153 16 1 10 34 38 9 16 9
154 16 2 6 35 39 6 12 12
155 14 2 8 35 34 8 9 19
156 10 2 4 33 31 8 13 18
157 17 2 5 36 32 15 13 15
158 13 2 6 32 37 6 14 14
159 15 2 7 33 36 9 19 11
160 16 2 7 34 32 11 13 9
161 12 2 6 32 35 8 12 18
162 13 2 6 34 36 8 13 16
Belonging Belonging_Final
1 53 32
2 86 51
3 66 42
4 67 41
5 76 46
6 78 47
7 53 37
8 80 49
9 74 45
10 76 47
11 79 49
12 54 33
13 67 42
14 54 33
15 87 53
16 58 36
17 75 45
18 88 54
19 64 41
20 57 36
21 66 41
22 68 44
23 54 33
24 56 37
25 86 52
26 80 47
27 76 43
28 69 44
29 78 45
30 67 44
31 80 49
32 54 33
33 71 43
34 84 54
35 74 42
36 71 44
37 63 37
38 71 43
39 76 46
40 69 42
41 74 45
42 75 44
43 54 33
44 52 31
45 69 42
46 68 40
47 65 43
48 75 46
49 74 42
50 75 45
51 72 44
52 67 40
53 63 37
54 62 46
55 63 36
56 76 47
57 74 45
58 67 42
59 73 43
60 70 43
61 53 32
62 77 45
63 77 45
64 52 31
65 54 33
66 80 49
67 66 42
68 73 41
69 63 38
70 69 42
71 67 44
72 54 33
73 81 48
74 69 40
75 84 50
76 80 49
77 70 43
78 69 44
79 77 47
80 54 33
81 79 46
82 30 0
83 71 45
84 73 43
85 72 44
86 77 47
87 75 45
88 69 42
89 54 33
90 70 43
91 73 46
92 54 33
93 77 46
94 82 48
95 80 47
96 80 47
97 69 43
98 78 46
99 81 48
100 76 46
101 76 45
102 73 45
103 85 52
104 66 42
105 79 47
106 68 41
107 76 47
108 71 43
109 54 33
110 46 30
111 82 49
112 74 44
113 88 55
114 38 11
115 76 47
116 86 53
117 54 33
118 70 44
119 69 42
120 90 55
121 54 33
122 76 46
123 89 54
124 76 47
125 73 45
126 79 47
127 90 55
128 74 44
129 81 53
130 72 44
131 71 42
132 66 40
133 77 46
134 65 40
135 74 46
136 82 53
137 54 33
138 63 42
139 54 35
140 64 40
141 69 41
142 54 33
143 84 51
144 86 53
145 77 46
146 89 55
147 76 47
148 60 38
149 75 46
150 73 46
151 85 53
152 79 47
153 71 41
154 72 44
155 69 43
156 78 51
157 54 33
158 69 43
159 81 53
160 84 51
161 84 50
162 69 46
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Gender Age Connected
5.16363 0.17762 0.12894 0.10890
Separate Software Happiness Depression
-0.02801 0.54012 0.04799 -0.07869
Belonging Belonging_Final
0.04305 -0.06352
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-5.7270 -1.1940 0.2017 1.1293 4.1042
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.16363 2.68628 1.922 0.0564 .
Gender 0.17762 0.33558 0.529 0.5974
Age 0.12894 0.12881 1.001 0.3184
Connected 0.10890 0.04745 2.295 0.0231 *
Separate -0.02801 0.04599 -0.609 0.5435
Software 0.54012 0.07051 7.660 2.02e-12 ***
Happiness 0.04799 0.07844 0.612 0.5416
Depression -0.07869 0.05755 -1.367 0.1735
Belonging 0.04305 0.04530 0.950 0.3435
Belonging_Final -0.06352 0.06572 -0.966 0.3353
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.854 on 152 degrees of freedom
Multiple R-squared: 0.3624, Adjusted R-squared: 0.3247
F-statistic: 9.6 on 9 and 152 DF, p-value: 1.582e-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.48968766 0.97937532 0.51031234
[2,] 0.39564125 0.79128250 0.60435875
[3,] 0.30750070 0.61500140 0.69249930
[4,] 0.28695341 0.57390682 0.71304659
[5,] 0.27694021 0.55388041 0.72305979
[6,] 0.51814058 0.96371885 0.48185942
[7,] 0.44009148 0.88018297 0.55990852
[8,] 0.36597235 0.73194471 0.63402765
[9,] 0.32590076 0.65180152 0.67409924
[10,] 0.27028415 0.54056829 0.72971585
[11,] 0.51572467 0.96855065 0.48427533
[12,] 0.50899131 0.98201737 0.49100869
[13,] 0.47337113 0.94674227 0.52662887
[14,] 0.44124408 0.88248815 0.55875592
[15,] 0.52453776 0.95092448 0.47546224
[16,] 0.53012284 0.93975432 0.46987716
[17,] 0.51526136 0.96947729 0.48473864
[18,] 0.56948747 0.86102506 0.43051253
[19,] 0.50467022 0.99065957 0.49532978
[20,] 0.45900543 0.91801086 0.54099457
[21,] 0.42109051 0.84218102 0.57890949
[22,] 0.37989288 0.75978576 0.62010712
[23,] 0.33659814 0.67319628 0.66340186
[24,] 0.88367306 0.23265387 0.11632694
[25,] 0.86069741 0.27860518 0.13930259
[26,] 0.85498096 0.29003808 0.14501904
[27,] 0.86988739 0.26022523 0.13011261
[28,] 0.85767865 0.28464270 0.14232135
[29,] 0.83288120 0.33423759 0.16711880
[30,] 0.81621602 0.36756795 0.18378398
[31,] 0.83883112 0.32233777 0.16116888
[32,] 0.80379561 0.39240879 0.19620439
[33,] 0.77238907 0.45522187 0.22761093
[34,] 0.90449767 0.19100466 0.09550233
[35,] 0.94011314 0.11977371 0.05988686
[36,] 0.92299394 0.15401212 0.07700606
[37,] 0.90816366 0.18367269 0.09183634
[38,] 0.91061374 0.17877252 0.08938626
[39,] 0.88864681 0.22270638 0.11135319
[40,] 0.86262360 0.27475280 0.13737640
[41,] 0.87887132 0.24225736 0.12112868
[42,] 0.86441682 0.27116636 0.13558318
[43,] 0.86819759 0.26360482 0.13180241
[44,] 0.84974891 0.30050218 0.15025109
[45,] 0.81978979 0.36042043 0.18021021
[46,] 0.80169733 0.39660533 0.19830267
[47,] 0.76697572 0.46604857 0.23302428
[48,] 0.76630991 0.46738017 0.23369009
[49,] 0.73406514 0.53186972 0.26593486
[50,] 0.69582863 0.60834274 0.30417137
[51,] 0.66317094 0.67365812 0.33682906
[52,] 0.62417982 0.75164036 0.37582018
[53,] 0.58530572 0.82938856 0.41469428
[54,] 0.55771618 0.88456763 0.44228382
[55,] 0.55065083 0.89869833 0.44934917
[56,] 0.69780127 0.60439747 0.30219873
[57,] 0.79548661 0.40902679 0.20451339
[58,] 0.76849516 0.46300969 0.23150484
[59,] 0.84721064 0.30557872 0.15278936
[60,] 0.81722011 0.36555977 0.18277989
[61,] 0.81257856 0.37484287 0.18742144
[62,] 0.79556580 0.40886841 0.20443420
[63,] 0.76049077 0.47901846 0.23950923
[64,] 0.80266194 0.39467611 0.19733806
[65,] 0.76936072 0.46127856 0.23063928
[66,] 0.74941802 0.50116396 0.25058198
[67,] 0.75006881 0.49986238 0.24993119
[68,] 0.71069673 0.57860654 0.28930327
[69,] 0.67309658 0.65380684 0.32690342
[70,] 0.79155224 0.41689553 0.20844776
[71,] 0.75810259 0.48379483 0.24189741
[72,] 0.72827890 0.54344221 0.27172110
[73,] 0.68868448 0.62263104 0.31131552
[74,] 0.66809784 0.66380431 0.33190216
[75,] 0.62498640 0.75002719 0.37501360
[76,] 0.58679795 0.82640411 0.41320205
[77,] 0.56493651 0.87012698 0.43506349
[78,] 0.53896681 0.92206638 0.46103319
[79,] 0.51481422 0.97037157 0.48518578
[80,] 0.47880539 0.95761077 0.52119461
[81,] 0.43855915 0.87711830 0.56144085
[82,] 0.39536906 0.79073813 0.60463094
[83,] 0.42256692 0.84513385 0.57743308
[84,] 0.38582282 0.77164565 0.61417718
[85,] 0.34949374 0.69898749 0.65050626
[86,] 0.34522410 0.69044820 0.65477590
[87,] 0.30323431 0.60646862 0.69676569
[88,] 0.26770053 0.53540105 0.73229947
[89,] 0.23988874 0.47977748 0.76011126
[90,] 0.22545192 0.45090383 0.77454808
[91,] 0.26946655 0.53893311 0.73053345
[92,] 0.23162460 0.46324920 0.76837540
[93,] 0.24738069 0.49476138 0.75261931
[94,] 0.25021466 0.50042932 0.74978534
[95,] 0.23932046 0.47864092 0.76067954
[96,] 0.21353006 0.42706012 0.78646994
[97,] 0.21491171 0.42982342 0.78508829
[98,] 0.19131278 0.38262557 0.80868722
[99,] 0.16674516 0.33349031 0.83325484
[100,] 0.13839341 0.27678682 0.86160659
[101,] 0.17455134 0.34910268 0.82544866
[102,] 0.16087797 0.32175593 0.83912203
[103,] 0.18548699 0.37097399 0.81451301
[104,] 0.16540388 0.33080776 0.83459612
[105,] 0.14780486 0.29560972 0.85219514
[106,] 0.13748079 0.27496157 0.86251921
[107,] 0.15571046 0.31142092 0.84428954
[108,] 0.14499597 0.28999194 0.85500403
[109,] 0.12510531 0.25021062 0.87489469
[110,] 0.10719101 0.21438202 0.89280899
[111,] 0.13321789 0.26643578 0.86678211
[112,] 0.10956516 0.21913033 0.89043484
[113,] 0.09048311 0.18096622 0.90951689
[114,] 0.07261382 0.14522764 0.92738618
[115,] 0.05444077 0.10888154 0.94555923
[116,] 0.04790789 0.09581578 0.95209211
[117,] 0.03668981 0.07337963 0.96331019
[118,] 0.04672965 0.09345930 0.95327035
[119,] 0.04720695 0.09441390 0.95279305
[120,] 0.06287108 0.12574216 0.93712892
[121,] 0.07756345 0.15512691 0.92243655
[122,] 0.07439828 0.14879656 0.92560172
[123,] 0.05624248 0.11248495 0.94375752
[124,] 0.04610732 0.09221463 0.95389268
[125,] 0.03149860 0.06299719 0.96850140
[126,] 0.02227444 0.04454888 0.97772556
[127,] 0.08392655 0.16785311 0.91607345
[128,] 0.07088792 0.14177584 0.92911208
[129,] 0.60785797 0.78428405 0.39214203
[130,] 0.58104514 0.83790972 0.41895486
[131,] 0.58508257 0.82983486 0.41491743
[132,] 0.49517700 0.99035399 0.50482300
[133,] 0.42622652 0.85245305 0.57377348
[134,] 0.42048766 0.84097533 0.57951234
[135,] 0.44901816 0.89803632 0.55098184
[136,] 0.65113491 0.69773019 0.34886509
[137,] 0.48290319 0.96580637 0.51709681
> postscript(file="/var/wessaorg/rcomp/tmp/1avpv1352161441.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/2psp01352161441.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/3vxp51352161441.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/4blgt1352161441.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/52w6l1352161441.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.27991042 0.08361818 2.84847696 3.41031974 -1.70319741 -1.98464912
7 8 9 10 11 12
4.10422011 -1.68596412 -1.84507954 2.77671073 0.89688831 -0.12374297
13 14 15 16 17 18
0.85886245 0.68883787 -0.53598135 0.06297394 0.39056161 3.84396203
19 20 21 22 23 24
2.46750579 0.59678794 0.96251921 1.28885207 2.41825178 1.16564365
25 26 27 28 29 30
2.45298546 0.19320091 0.58562792 -1.07840336 0.56817958 0.24037769
31 32 33 34 35 36
-0.62748182 -0.02281100 -1.20859406 0.64866408 -1.49620616 -5.72701327
37 38 39 40 41 42
-0.73633375 -1.56400099 1.76690415 1.58630381 1.14116761 -1.78097858
43 44 45 46 47 48
2.30366015 -0.14685845 -1.18927748 -4.84319687 -2.30928860 0.09290281
49 50 51 52 53 54
1.01490776 -1.83767182 -0.30215559 0.05480395 -2.50108423 0.69752773
55 56 57 58 59 60
-2.41058489 1.40103460 -0.14065944 1.05024401 -0.27721898 1.76964578
61 62 63 64 65 66
0.69146090 -0.04694893 -0.61627723 -0.72683281 0.33753345 1.27176691
67 68 69 70 71 72
1.84230089 3.26336325 -3.76683123 0.83687765 -3.17492872 -0.23231069
73 74 75 76 77 78
1.65876757 0.97122303 0.25915102 3.02754603 -0.38179499 1.34142290
79 80 81 82 83 84
-1.67429749 -0.14236222 0.48529287 3.29522047 0.37028882 -0.67803780
85 86 87 88 89 90
-0.10424290 1.34495890 0.04014117 0.68364698 1.29234343 0.92783566
91 92 93 94 95 96
-1.40554226 0.03861400 0.60231450 -0.31790074 -2.38700606 0.70698287
97 98 99 100 101 102
0.21017048 1.66121536 0.06759273 -0.40406012 -1.29717745 1.29394564
103 104 105 106 107 108
2.54217188 0.40770950 1.64666016 -2.18679610 1.00876976 0.11639574
109 110 111 112 113 114
1.47574550 -0.63250335 0.87585401 -0.04390387 2.50592468 -2.04534613
115 116 117 118 119 120
-2.84738068 1.15630476 -1.71494256 1.06594917 -2.24217818 0.22408438
121 122 123 124 125 126
-1.41512553 -0.24035298 -3.20404992 -1.19556483 -1.04878605 -0.89046651
127 128 129 130 131 132
-0.43375955 0.64741252 0.96570326 -2.99343892 1.90560656 -3.23858926
133 134 135 136 137 138
1.74123913 -1.69506324 -1.47143896 -0.40482847 0.77356801 0.47825988
139 140 141 142 143 144
-2.47954048 -1.54111322 -5.28809906 2.43482742 1.79574236 0.38496194
145 146 147 148 149 150
1.17284415 -4.34095956 2.10563830 -2.05345058 0.89924307 -0.17743628
151 152 153 154 155 156
-3.23514761 -1.68188648 1.35838520 3.81152272 1.09374971 -2.40656217
157 158 159 160 161 162
0.03861400 1.20923752 0.96570326 0.53888654 -0.71733209 0.27911562
> postscript(file="/var/wessaorg/rcomp/tmp/68jm61352161441.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.27991042 NA
1 0.08361818 -3.27991042
2 2.84847696 0.08361818
3 3.41031974 2.84847696
4 -1.70319741 3.41031974
5 -1.98464912 -1.70319741
6 4.10422011 -1.98464912
7 -1.68596412 4.10422011
8 -1.84507954 -1.68596412
9 2.77671073 -1.84507954
10 0.89688831 2.77671073
11 -0.12374297 0.89688831
12 0.85886245 -0.12374297
13 0.68883787 0.85886245
14 -0.53598135 0.68883787
15 0.06297394 -0.53598135
16 0.39056161 0.06297394
17 3.84396203 0.39056161
18 2.46750579 3.84396203
19 0.59678794 2.46750579
20 0.96251921 0.59678794
21 1.28885207 0.96251921
22 2.41825178 1.28885207
23 1.16564365 2.41825178
24 2.45298546 1.16564365
25 0.19320091 2.45298546
26 0.58562792 0.19320091
27 -1.07840336 0.58562792
28 0.56817958 -1.07840336
29 0.24037769 0.56817958
30 -0.62748182 0.24037769
31 -0.02281100 -0.62748182
32 -1.20859406 -0.02281100
33 0.64866408 -1.20859406
34 -1.49620616 0.64866408
35 -5.72701327 -1.49620616
36 -0.73633375 -5.72701327
37 -1.56400099 -0.73633375
38 1.76690415 -1.56400099
39 1.58630381 1.76690415
40 1.14116761 1.58630381
41 -1.78097858 1.14116761
42 2.30366015 -1.78097858
43 -0.14685845 2.30366015
44 -1.18927748 -0.14685845
45 -4.84319687 -1.18927748
46 -2.30928860 -4.84319687
47 0.09290281 -2.30928860
48 1.01490776 0.09290281
49 -1.83767182 1.01490776
50 -0.30215559 -1.83767182
51 0.05480395 -0.30215559
52 -2.50108423 0.05480395
53 0.69752773 -2.50108423
54 -2.41058489 0.69752773
55 1.40103460 -2.41058489
56 -0.14065944 1.40103460
57 1.05024401 -0.14065944
58 -0.27721898 1.05024401
59 1.76964578 -0.27721898
60 0.69146090 1.76964578
61 -0.04694893 0.69146090
62 -0.61627723 -0.04694893
63 -0.72683281 -0.61627723
64 0.33753345 -0.72683281
65 1.27176691 0.33753345
66 1.84230089 1.27176691
67 3.26336325 1.84230089
68 -3.76683123 3.26336325
69 0.83687765 -3.76683123
70 -3.17492872 0.83687765
71 -0.23231069 -3.17492872
72 1.65876757 -0.23231069
73 0.97122303 1.65876757
74 0.25915102 0.97122303
75 3.02754603 0.25915102
76 -0.38179499 3.02754603
77 1.34142290 -0.38179499
78 -1.67429749 1.34142290
79 -0.14236222 -1.67429749
80 0.48529287 -0.14236222
81 3.29522047 0.48529287
82 0.37028882 3.29522047
83 -0.67803780 0.37028882
84 -0.10424290 -0.67803780
85 1.34495890 -0.10424290
86 0.04014117 1.34495890
87 0.68364698 0.04014117
88 1.29234343 0.68364698
89 0.92783566 1.29234343
90 -1.40554226 0.92783566
91 0.03861400 -1.40554226
92 0.60231450 0.03861400
93 -0.31790074 0.60231450
94 -2.38700606 -0.31790074
95 0.70698287 -2.38700606
96 0.21017048 0.70698287
97 1.66121536 0.21017048
98 0.06759273 1.66121536
99 -0.40406012 0.06759273
100 -1.29717745 -0.40406012
101 1.29394564 -1.29717745
102 2.54217188 1.29394564
103 0.40770950 2.54217188
104 1.64666016 0.40770950
105 -2.18679610 1.64666016
106 1.00876976 -2.18679610
107 0.11639574 1.00876976
108 1.47574550 0.11639574
109 -0.63250335 1.47574550
110 0.87585401 -0.63250335
111 -0.04390387 0.87585401
112 2.50592468 -0.04390387
113 -2.04534613 2.50592468
114 -2.84738068 -2.04534613
115 1.15630476 -2.84738068
116 -1.71494256 1.15630476
117 1.06594917 -1.71494256
118 -2.24217818 1.06594917
119 0.22408438 -2.24217818
120 -1.41512553 0.22408438
121 -0.24035298 -1.41512553
122 -3.20404992 -0.24035298
123 -1.19556483 -3.20404992
124 -1.04878605 -1.19556483
125 -0.89046651 -1.04878605
126 -0.43375955 -0.89046651
127 0.64741252 -0.43375955
128 0.96570326 0.64741252
129 -2.99343892 0.96570326
130 1.90560656 -2.99343892
131 -3.23858926 1.90560656
132 1.74123913 -3.23858926
133 -1.69506324 1.74123913
134 -1.47143896 -1.69506324
135 -0.40482847 -1.47143896
136 0.77356801 -0.40482847
137 0.47825988 0.77356801
138 -2.47954048 0.47825988
139 -1.54111322 -2.47954048
140 -5.28809906 -1.54111322
141 2.43482742 -5.28809906
142 1.79574236 2.43482742
143 0.38496194 1.79574236
144 1.17284415 0.38496194
145 -4.34095956 1.17284415
146 2.10563830 -4.34095956
147 -2.05345058 2.10563830
148 0.89924307 -2.05345058
149 -0.17743628 0.89924307
150 -3.23514761 -0.17743628
151 -1.68188648 -3.23514761
152 1.35838520 -1.68188648
153 3.81152272 1.35838520
154 1.09374971 3.81152272
155 -2.40656217 1.09374971
156 0.03861400 -2.40656217
157 1.20923752 0.03861400
158 0.96570326 1.20923752
159 0.53888654 0.96570326
160 -0.71733209 0.53888654
161 0.27911562 -0.71733209
162 NA 0.27911562
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.08361818 -3.27991042
[2,] 2.84847696 0.08361818
[3,] 3.41031974 2.84847696
[4,] -1.70319741 3.41031974
[5,] -1.98464912 -1.70319741
[6,] 4.10422011 -1.98464912
[7,] -1.68596412 4.10422011
[8,] -1.84507954 -1.68596412
[9,] 2.77671073 -1.84507954
[10,] 0.89688831 2.77671073
[11,] -0.12374297 0.89688831
[12,] 0.85886245 -0.12374297
[13,] 0.68883787 0.85886245
[14,] -0.53598135 0.68883787
[15,] 0.06297394 -0.53598135
[16,] 0.39056161 0.06297394
[17,] 3.84396203 0.39056161
[18,] 2.46750579 3.84396203
[19,] 0.59678794 2.46750579
[20,] 0.96251921 0.59678794
[21,] 1.28885207 0.96251921
[22,] 2.41825178 1.28885207
[23,] 1.16564365 2.41825178
[24,] 2.45298546 1.16564365
[25,] 0.19320091 2.45298546
[26,] 0.58562792 0.19320091
[27,] -1.07840336 0.58562792
[28,] 0.56817958 -1.07840336
[29,] 0.24037769 0.56817958
[30,] -0.62748182 0.24037769
[31,] -0.02281100 -0.62748182
[32,] -1.20859406 -0.02281100
[33,] 0.64866408 -1.20859406
[34,] -1.49620616 0.64866408
[35,] -5.72701327 -1.49620616
[36,] -0.73633375 -5.72701327
[37,] -1.56400099 -0.73633375
[38,] 1.76690415 -1.56400099
[39,] 1.58630381 1.76690415
[40,] 1.14116761 1.58630381
[41,] -1.78097858 1.14116761
[42,] 2.30366015 -1.78097858
[43,] -0.14685845 2.30366015
[44,] -1.18927748 -0.14685845
[45,] -4.84319687 -1.18927748
[46,] -2.30928860 -4.84319687
[47,] 0.09290281 -2.30928860
[48,] 1.01490776 0.09290281
[49,] -1.83767182 1.01490776
[50,] -0.30215559 -1.83767182
[51,] 0.05480395 -0.30215559
[52,] -2.50108423 0.05480395
[53,] 0.69752773 -2.50108423
[54,] -2.41058489 0.69752773
[55,] 1.40103460 -2.41058489
[56,] -0.14065944 1.40103460
[57,] 1.05024401 -0.14065944
[58,] -0.27721898 1.05024401
[59,] 1.76964578 -0.27721898
[60,] 0.69146090 1.76964578
[61,] -0.04694893 0.69146090
[62,] -0.61627723 -0.04694893
[63,] -0.72683281 -0.61627723
[64,] 0.33753345 -0.72683281
[65,] 1.27176691 0.33753345
[66,] 1.84230089 1.27176691
[67,] 3.26336325 1.84230089
[68,] -3.76683123 3.26336325
[69,] 0.83687765 -3.76683123
[70,] -3.17492872 0.83687765
[71,] -0.23231069 -3.17492872
[72,] 1.65876757 -0.23231069
[73,] 0.97122303 1.65876757
[74,] 0.25915102 0.97122303
[75,] 3.02754603 0.25915102
[76,] -0.38179499 3.02754603
[77,] 1.34142290 -0.38179499
[78,] -1.67429749 1.34142290
[79,] -0.14236222 -1.67429749
[80,] 0.48529287 -0.14236222
[81,] 3.29522047 0.48529287
[82,] 0.37028882 3.29522047
[83,] -0.67803780 0.37028882
[84,] -0.10424290 -0.67803780
[85,] 1.34495890 -0.10424290
[86,] 0.04014117 1.34495890
[87,] 0.68364698 0.04014117
[88,] 1.29234343 0.68364698
[89,] 0.92783566 1.29234343
[90,] -1.40554226 0.92783566
[91,] 0.03861400 -1.40554226
[92,] 0.60231450 0.03861400
[93,] -0.31790074 0.60231450
[94,] -2.38700606 -0.31790074
[95,] 0.70698287 -2.38700606
[96,] 0.21017048 0.70698287
[97,] 1.66121536 0.21017048
[98,] 0.06759273 1.66121536
[99,] -0.40406012 0.06759273
[100,] -1.29717745 -0.40406012
[101,] 1.29394564 -1.29717745
[102,] 2.54217188 1.29394564
[103,] 0.40770950 2.54217188
[104,] 1.64666016 0.40770950
[105,] -2.18679610 1.64666016
[106,] 1.00876976 -2.18679610
[107,] 0.11639574 1.00876976
[108,] 1.47574550 0.11639574
[109,] -0.63250335 1.47574550
[110,] 0.87585401 -0.63250335
[111,] -0.04390387 0.87585401
[112,] 2.50592468 -0.04390387
[113,] -2.04534613 2.50592468
[114,] -2.84738068 -2.04534613
[115,] 1.15630476 -2.84738068
[116,] -1.71494256 1.15630476
[117,] 1.06594917 -1.71494256
[118,] -2.24217818 1.06594917
[119,] 0.22408438 -2.24217818
[120,] -1.41512553 0.22408438
[121,] -0.24035298 -1.41512553
[122,] -3.20404992 -0.24035298
[123,] -1.19556483 -3.20404992
[124,] -1.04878605 -1.19556483
[125,] -0.89046651 -1.04878605
[126,] -0.43375955 -0.89046651
[127,] 0.64741252 -0.43375955
[128,] 0.96570326 0.64741252
[129,] -2.99343892 0.96570326
[130,] 1.90560656 -2.99343892
[131,] -3.23858926 1.90560656
[132,] 1.74123913 -3.23858926
[133,] -1.69506324 1.74123913
[134,] -1.47143896 -1.69506324
[135,] -0.40482847 -1.47143896
[136,] 0.77356801 -0.40482847
[137,] 0.47825988 0.77356801
[138,] -2.47954048 0.47825988
[139,] -1.54111322 -2.47954048
[140,] -5.28809906 -1.54111322
[141,] 2.43482742 -5.28809906
[142,] 1.79574236 2.43482742
[143,] 0.38496194 1.79574236
[144,] 1.17284415 0.38496194
[145,] -4.34095956 1.17284415
[146,] 2.10563830 -4.34095956
[147,] -2.05345058 2.10563830
[148,] 0.89924307 -2.05345058
[149,] -0.17743628 0.89924307
[150,] -3.23514761 -0.17743628
[151,] -1.68188648 -3.23514761
[152,] 1.35838520 -1.68188648
[153,] 3.81152272 1.35838520
[154,] 1.09374971 3.81152272
[155,] -2.40656217 1.09374971
[156,] 0.03861400 -2.40656217
[157,] 1.20923752 0.03861400
[158,] 0.96570326 1.20923752
[159,] 0.53888654 0.96570326
[160,] -0.71733209 0.53888654
[161,] 0.27911562 -0.71733209
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.08361818 -3.27991042
2 2.84847696 0.08361818
3 3.41031974 2.84847696
4 -1.70319741 3.41031974
5 -1.98464912 -1.70319741
6 4.10422011 -1.98464912
7 -1.68596412 4.10422011
8 -1.84507954 -1.68596412
9 2.77671073 -1.84507954
10 0.89688831 2.77671073
11 -0.12374297 0.89688831
12 0.85886245 -0.12374297
13 0.68883787 0.85886245
14 -0.53598135 0.68883787
15 0.06297394 -0.53598135
16 0.39056161 0.06297394
17 3.84396203 0.39056161
18 2.46750579 3.84396203
19 0.59678794 2.46750579
20 0.96251921 0.59678794
21 1.28885207 0.96251921
22 2.41825178 1.28885207
23 1.16564365 2.41825178
24 2.45298546 1.16564365
25 0.19320091 2.45298546
26 0.58562792 0.19320091
27 -1.07840336 0.58562792
28 0.56817958 -1.07840336
29 0.24037769 0.56817958
30 -0.62748182 0.24037769
31 -0.02281100 -0.62748182
32 -1.20859406 -0.02281100
33 0.64866408 -1.20859406
34 -1.49620616 0.64866408
35 -5.72701327 -1.49620616
36 -0.73633375 -5.72701327
37 -1.56400099 -0.73633375
38 1.76690415 -1.56400099
39 1.58630381 1.76690415
40 1.14116761 1.58630381
41 -1.78097858 1.14116761
42 2.30366015 -1.78097858
43 -0.14685845 2.30366015
44 -1.18927748 -0.14685845
45 -4.84319687 -1.18927748
46 -2.30928860 -4.84319687
47 0.09290281 -2.30928860
48 1.01490776 0.09290281
49 -1.83767182 1.01490776
50 -0.30215559 -1.83767182
51 0.05480395 -0.30215559
52 -2.50108423 0.05480395
53 0.69752773 -2.50108423
54 -2.41058489 0.69752773
55 1.40103460 -2.41058489
56 -0.14065944 1.40103460
57 1.05024401 -0.14065944
58 -0.27721898 1.05024401
59 1.76964578 -0.27721898
60 0.69146090 1.76964578
61 -0.04694893 0.69146090
62 -0.61627723 -0.04694893
63 -0.72683281 -0.61627723
64 0.33753345 -0.72683281
65 1.27176691 0.33753345
66 1.84230089 1.27176691
67 3.26336325 1.84230089
68 -3.76683123 3.26336325
69 0.83687765 -3.76683123
70 -3.17492872 0.83687765
71 -0.23231069 -3.17492872
72 1.65876757 -0.23231069
73 0.97122303 1.65876757
74 0.25915102 0.97122303
75 3.02754603 0.25915102
76 -0.38179499 3.02754603
77 1.34142290 -0.38179499
78 -1.67429749 1.34142290
79 -0.14236222 -1.67429749
80 0.48529287 -0.14236222
81 3.29522047 0.48529287
82 0.37028882 3.29522047
83 -0.67803780 0.37028882
84 -0.10424290 -0.67803780
85 1.34495890 -0.10424290
86 0.04014117 1.34495890
87 0.68364698 0.04014117
88 1.29234343 0.68364698
89 0.92783566 1.29234343
90 -1.40554226 0.92783566
91 0.03861400 -1.40554226
92 0.60231450 0.03861400
93 -0.31790074 0.60231450
94 -2.38700606 -0.31790074
95 0.70698287 -2.38700606
96 0.21017048 0.70698287
97 1.66121536 0.21017048
98 0.06759273 1.66121536
99 -0.40406012 0.06759273
100 -1.29717745 -0.40406012
101 1.29394564 -1.29717745
102 2.54217188 1.29394564
103 0.40770950 2.54217188
104 1.64666016 0.40770950
105 -2.18679610 1.64666016
106 1.00876976 -2.18679610
107 0.11639574 1.00876976
108 1.47574550 0.11639574
109 -0.63250335 1.47574550
110 0.87585401 -0.63250335
111 -0.04390387 0.87585401
112 2.50592468 -0.04390387
113 -2.04534613 2.50592468
114 -2.84738068 -2.04534613
115 1.15630476 -2.84738068
116 -1.71494256 1.15630476
117 1.06594917 -1.71494256
118 -2.24217818 1.06594917
119 0.22408438 -2.24217818
120 -1.41512553 0.22408438
121 -0.24035298 -1.41512553
122 -3.20404992 -0.24035298
123 -1.19556483 -3.20404992
124 -1.04878605 -1.19556483
125 -0.89046651 -1.04878605
126 -0.43375955 -0.89046651
127 0.64741252 -0.43375955
128 0.96570326 0.64741252
129 -2.99343892 0.96570326
130 1.90560656 -2.99343892
131 -3.23858926 1.90560656
132 1.74123913 -3.23858926
133 -1.69506324 1.74123913
134 -1.47143896 -1.69506324
135 -0.40482847 -1.47143896
136 0.77356801 -0.40482847
137 0.47825988 0.77356801
138 -2.47954048 0.47825988
139 -1.54111322 -2.47954048
140 -5.28809906 -1.54111322
141 2.43482742 -5.28809906
142 1.79574236 2.43482742
143 0.38496194 1.79574236
144 1.17284415 0.38496194
145 -4.34095956 1.17284415
146 2.10563830 -4.34095956
147 -2.05345058 2.10563830
148 0.89924307 -2.05345058
149 -0.17743628 0.89924307
150 -3.23514761 -0.17743628
151 -1.68188648 -3.23514761
152 1.35838520 -1.68188648
153 3.81152272 1.35838520
154 1.09374971 3.81152272
155 -2.40656217 1.09374971
156 0.03861400 -2.40656217
157 1.20923752 0.03861400
158 0.96570326 1.20923752
159 0.53888654 0.96570326
160 -0.71733209 0.53888654
161 0.27911562 -0.71733209
> 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/7g1a01352161441.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/8f6ys1352161441.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/9ogz01352161441.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/10cwn31352161441.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/117utc1352161441.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/12rhw01352161441.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/13tdpq1352161441.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/14bi8f1352161441.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/152umj1352161441.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/160c731352161441.tab")
+ }
>
> try(system("convert tmp/1avpv1352161441.ps tmp/1avpv1352161441.png",intern=TRUE))
character(0)
> try(system("convert tmp/2psp01352161441.ps tmp/2psp01352161441.png",intern=TRUE))
character(0)
> try(system("convert tmp/3vxp51352161441.ps tmp/3vxp51352161441.png",intern=TRUE))
character(0)
> try(system("convert tmp/4blgt1352161441.ps tmp/4blgt1352161441.png",intern=TRUE))
character(0)
> try(system("convert tmp/52w6l1352161441.ps tmp/52w6l1352161441.png",intern=TRUE))
character(0)
> try(system("convert tmp/68jm61352161441.ps tmp/68jm61352161441.png",intern=TRUE))
character(0)
> try(system("convert tmp/7g1a01352161441.ps tmp/7g1a01352161441.png",intern=TRUE))
character(0)
> try(system("convert tmp/8f6ys1352161441.ps tmp/8f6ys1352161441.png",intern=TRUE))
character(0)
> try(system("convert tmp/9ogz01352161441.ps tmp/9ogz01352161441.png",intern=TRUE))
character(0)
> try(system("convert tmp/10cwn31352161441.ps tmp/10cwn31352161441.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
8.975 1.079 10.028