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
+ ,41
+ ,38
+ ,13
+ ,12
+ ,14
+ ,12
+ ,53
+ ,32
+ ,9
+ ,39
+ ,32
+ ,16
+ ,11
+ ,18
+ ,11
+ ,83
+ ,51
+ ,9
+ ,30
+ ,35
+ ,19
+ ,15
+ ,11
+ ,14
+ ,66
+ ,42
+ ,9
+ ,31
+ ,33
+ ,15
+ ,6
+ ,12
+ ,12
+ ,67
+ ,41
+ ,9
+ ,34
+ ,37
+ ,14
+ ,13
+ ,16
+ ,21
+ ,76
+ ,46
+ ,9
+ ,35
+ ,29
+ ,13
+ ,10
+ ,18
+ ,12
+ ,78
+ ,47
+ ,9
+ ,39
+ ,31
+ ,19
+ ,12
+ ,14
+ ,22
+ ,53
+ ,37
+ ,9
+ ,34
+ ,36
+ ,15
+ ,14
+ ,14
+ ,11
+ ,80
+ ,49
+ ,9
+ ,36
+ ,35
+ ,14
+ ,12
+ ,15
+ ,10
+ ,74
+ ,45
+ ,9
+ ,37
+ ,38
+ ,15
+ ,9
+ ,15
+ ,13
+ ,76
+ ,47
+ ,9
+ ,38
+ ,31
+ ,16
+ ,10
+ ,17
+ ,10
+ ,79
+ ,49
+ ,9
+ ,36
+ ,34
+ ,16
+ ,12
+ ,19
+ ,8
+ ,54
+ ,33
+ ,9
+ ,38
+ ,35
+ ,16
+ ,12
+ ,10
+ ,15
+ ,67
+ ,42
+ ,9
+ ,39
+ ,38
+ ,16
+ ,11
+ ,16
+ ,14
+ ,54
+ ,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,11
+ ,13
+ ,60
+ ,38
+ ,11
+ ,32
+ ,31
+ ,16
+ ,12
+ ,12
+ ,11
+ ,75
+ ,46
+ ,11
+ ,35
+ ,32
+ ,13
+ ,9
+ ,9
+ ,19
+ ,73
+ ,46
+ ,11
+ ,38
+ ,39
+ ,10
+ ,7
+ ,16
+ ,12
+ ,85
+ ,53
+ ,11
+ ,42
+ ,37
+ ,15
+ ,13
+ ,13
+ ,17
+ ,79
+ ,47
+ ,11
+ ,34
+ ,38
+ ,16
+ ,9
+ ,16
+ ,9
+ ,71
+ ,41
+ ,11
+ ,35
+ ,39
+ ,16
+ ,6
+ ,12
+ ,12
+ ,72
+ ,44
+ ,11
+ ,38
+ ,34
+ ,14
+ ,8
+ ,9
+ ,19
+ ,69
+ ,43
+ ,11
+ ,33
+ ,31
+ ,10
+ ,8
+ ,13
+ ,18
+ ,78
+ ,51
+ ,11
+ ,36
+ ,32
+ ,17
+ ,15
+ ,13
+ ,15
+ ,54
+ ,33
+ ,11
+ ,32
+ ,37
+ ,13
+ ,6
+ ,14
+ ,14
+ ,69
+ ,43
+ ,11
+ ,33
+ ,36
+ ,15
+ ,9
+ ,19
+ ,11
+ ,81
+ ,53
+ ,11
+ ,34
+ ,32
+ ,16
+ ,11
+ ,13
+ ,9
+ ,84
+ ,51
+ ,11
+ ,32
+ ,38
+ ,12
+ ,8
+ ,12
+ ,18
+ ,84
+ ,50
+ ,11
+ ,34
+ ,36
+ ,13
+ ,8
+ ,13
+ ,16
+ ,69
+ ,46)
+ ,dim=c(9
+ ,161)
+ ,dimnames=list(c('month'
+ ,'Connected'
+ ,'Separate'
+ ,'Learning'
+ ,'Software'
+ ,'Happiness'
+ ,'Depression'
+ ,'Belonging'
+ ,'Belonging_Final')
+ ,1:161))
> y <- array(NA,dim=c(9,161),dimnames=list(c('month','Connected','Separate','Learning','Software','Happiness','Depression','Belonging','Belonging_Final'),1:161))
> 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 = '4'
> 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 Connected Separate Software Happiness Depression Belonging
1 13 9 41 38 12 14 12.0 53
2 16 9 39 32 11 18 11.0 83
3 19 9 30 35 15 11 14.0 66
4 15 9 31 33 6 12 12.0 67
5 14 9 34 37 13 16 21.0 76
6 13 9 35 29 10 18 12.0 78
7 19 9 39 31 12 14 22.0 53
8 15 9 34 36 14 14 11.0 80
9 14 9 36 35 12 15 10.0 74
10 15 9 37 38 9 15 13.0 76
11 16 9 38 31 10 17 10.0 79
12 16 9 36 34 12 19 8.0 54
13 16 9 38 35 12 10 15.0 67
14 16 9 39 38 11 16 14.0 54
15 17 9 33 37 15 18 10.0 87
16 15 9 32 33 12 14 14.0 58
17 15 9 36 32 10 14 14.0 75
18 20 9 38 38 12 17 11.0 88
19 18 9 39 38 11 14 10.0 64
20 16 9 32 32 12 16 13.0 57
21 16 9 32 33 11 18 9.5 66
22 16 9 31 31 12 11 14.0 68
23 19 9 39 38 13 14 12.0 54
24 16 9 37 39 11 12 14.0 56
25 17 9 39 32 12 17 11.0 86
26 17 9 41 32 13 9 9.0 80
27 16 9 36 35 10 16 11.0 76
28 15 9 33 37 14 14 15.0 69
29 16 9 33 33 12 15 14.0 78
30 14 9 34 33 10 11 13.0 67
31 15 9 31 31 12 16 9.0 80
32 12 9 27 32 8 13 15.0 54
33 14 9 37 31 10 17 10.0 71
34 16 9 34 37 12 15 11.0 84
35 14 9 34 30 12 14 13.0 74
36 10 9 32 33 7 16 8.0 71
37 10 9 29 31 9 9 20.0 63
38 14 9 36 33 12 15 12.0 71
39 16 9 29 31 10 17 10.0 76
40 16 9 35 33 10 13 10.0 69
41 16 9 37 32 10 15 9.0 74
42 14 9 34 33 12 16 14.0 75
43 20 9 38 32 15 16 8.0 54
44 14 9 35 33 10 12 14.0 52
45 14 9 38 28 10 15 11.0 69
46 11 9 37 35 12 11 13.0 68
47 14 9 38 39 13 15 9.0 65
48 15 9 33 34 11 15 11.0 75
49 16 9 36 38 11 17 15.0 74
50 14 9 38 32 12 13 11.0 75
51 16 9 32 38 14 16 10.0 72
52 14 9 32 30 10 14 14.0 67
53 12 9 32 33 12 11 18.0 63
54 16 10 34 38 13 12 14.0 62
55 9 10 32 32 5 12 11.0 63
56 14 10 37 35 6 15 14.5 76
57 16 10 39 34 12 16 13.0 74
58 16 10 29 34 12 15 9.0 67
59 15 10 37 36 11 12 10.0 73
60 16 10 35 34 10 12 15.0 70
61 12 10 30 28 7 8 20.0 53
62 16 10 38 34 12 13 12.0 77
63 16 10 34 35 14 11 12.0 80
64 14 10 31 35 11 14 14.0 52
65 16 10 34 31 12 15 13.0 54
66 17 10 35 37 13 10 11.0 80
67 18 10 36 35 14 11 17.0 66
68 18 10 30 27 11 12 12.0 73
69 12 10 39 40 12 15 13.0 63
70 16 10 35 37 12 15 14.0 69
71 10 10 38 36 8 14 13.0 67
72 14 10 31 38 11 16 15.0 54
73 18 10 34 39 14 15 13.0 81
74 18 10 38 41 14 15 10.0 69
75 16 10 34 27 12 13 11.0 84
76 17 10 39 30 9 12 19.0 80
77 16 10 37 37 13 17 13.0 70
78 16 10 34 31 11 13 17.0 69
79 13 10 28 31 12 15 13.0 77
80 16 10 37 27 12 13 9.0 54
81 16 10 33 36 12 15 11.0 79
82 16 10 35 37 12 15 9.0 71
83 15 10 37 33 12 16 12.0 73
84 15 10 32 34 11 15 12.0 72
85 16 10 33 31 10 14 13.0 77
86 14 10 38 39 9 15 13.0 75
87 16 10 33 34 12 14 12.0 69
88 16 10 29 32 12 13 15.0 54
89 15 10 33 33 12 7 22.0 70
90 12 10 31 36 9 17 13.0 73
91 17 10 36 32 15 13 15.0 54
92 16 10 35 41 12 15 13.0 77
93 15 10 32 28 12 14 15.0 82
94 13 10 29 30 12 13 12.5 80
95 16 10 39 36 10 16 11.0 80
96 16 10 37 35 13 12 16.0 69
97 16 10 35 31 9 14 11.0 78
98 16 10 37 34 12 17 11.0 81
99 14 10 32 36 10 15 10.0 76
100 16 10 38 36 14 17 10.0 76
101 16 10 37 35 11 12 16.0 73
102 20 10 36 37 15 16 12.0 85
103 15 10 32 28 11 11 11.0 66
104 16 10 33 39 11 15 16.0 79
105 13 10 40 32 12 9 19.0 68
106 17 10 38 35 12 16 11.0 76
107 16 10 41 39 12 15 16.0 71
108 16 10 36 35 11 10 15.0 54
109 12 11 43 42 7 10 24.0 46
110 16 11 30 34 12 15 14.0 85
111 16 11 31 33 14 11 15.0 74
112 17 11 32 41 11 13 11.0 88
113 13 11 32 33 11 14 15.0 38
114 12 11 37 34 10 18 12.0 76
115 18 11 37 32 13 16 10.0 86
116 14 11 33 40 13 14 14.0 54
117 14 11 34 40 8 14 13.0 67
118 13 11 33 35 11 14 9.0 69
119 16 11 38 36 12 14 15.0 90
120 13 11 33 37 11 12 15.0 54
121 16 11 31 27 13 14 14.0 76
122 13 11 38 39 12 15 11.0 89
123 16 11 37 38 14 15 8.0 76
124 15 11 36 31 13 15 11.0 73
125 16 11 31 33 15 13 11.0 79
126 15 11 39 32 10 17 8.0 90
127 17 11 44 39 11 17 10.0 74
128 15 11 33 36 9 19 11.0 81
129 12 11 35 33 11 15 13.0 72
130 16 11 32 33 10 13 11.0 71
131 10 11 28 32 11 9 20.0 66
132 16 11 40 37 8 15 10.0 77
133 12 11 27 30 11 15 15.0 65
134 14 11 37 38 12 15 12.0 74
135 15 11 32 29 12 16 14.0 85
136 13 11 28 22 9 11 23.0 54
137 15 11 34 35 11 14 14.0 63
138 11 11 30 35 10 11 16.0 54
139 12 11 35 34 8 15 11.0 64
140 11 11 31 35 9 13 12.0 69
141 16 11 32 34 8 15 10.0 54
142 15 11 30 37 9 16 14.0 84
143 17 11 30 35 15 14 12.0 86
144 16 11 31 23 11 15 12.0 77
145 10 11 40 31 8 16 11.0 89
146 18 11 32 27 13 16 12.0 76
147 13 11 36 36 12 11 13.0 60
148 16 11 32 31 12 12 11.0 75
149 13 11 35 32 9 9 19.0 73
150 10 11 38 39 7 16 12.0 85
151 15 11 42 37 13 13 17.0 79
152 16 11 34 38 9 16 9.0 71
153 16 11 35 39 6 12 12.0 72
154 14 11 38 34 8 9 19.0 69
155 10 11 33 31 8 13 18.0 78
156 17 11 36 32 15 13 15.0 54
157 13 11 32 37 6 14 14.0 69
158 15 11 33 36 9 19 11.0 81
159 16 11 34 32 11 13 9.0 84
160 12 11 32 38 8 12 18.0 84
161 13 11 34 36 8 13 16.0 69
Belonging_Final
1 32
2 51
3 42
4 41
5 46
6 47
7 37
8 49
9 45
10 47
11 49
12 33
13 42
14 33
15 53
16 36
17 45
18 54
19 41
20 36
21 41
22 44
23 33
24 37
25 52
26 47
27 43
28 44
29 45
30 44
31 49
32 33
33 43
34 54
35 42
36 44
37 37
38 43
39 46
40 42
41 45
42 44
43 33
44 31
45 42
46 40
47 43
48 46
49 42
50 45
51 44
52 40
53 37
54 46
55 36
56 47
57 45
58 42
59 43
60 43
61 32
62 45
63 48
64 31
65 33
66 49
67 42
68 41
69 38
70 42
71 44
72 33
73 48
74 40
75 50
76 49
77 43
78 44
79 47
80 33
81 46
82 45
83 43
84 44
85 47
86 45
87 42
88 33
89 43
90 46
91 33
92 46
93 48
94 47
95 47
96 43
97 46
98 48
99 46
100 45
101 45
102 52
103 42
104 47
105 41
106 47
107 43
108 33
109 30
110 52
111 44
112 55
113 11
114 47
115 53
116 33
117 44
118 42
119 55
120 33
121 46
122 54
123 47
124 45
125 47
126 55
127 44
128 53
129 44
130 42
131 40
132 46
133 40
134 46
135 53
136 33
137 42
138 35
139 40
140 41
141 33
142 51
143 53
144 46
145 55
146 47
147 38
148 46
149 46
150 53
151 47
152 41
153 44
154 43
155 51
156 33
157 43
158 53
159 51
160 50
161 46
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) month Connected Separate
8.30902 -0.19431 0.08787 -0.01863
Software Happiness Depression Belonging
0.52638 0.03302 -0.08790 -0.02638
Belonging_Final
0.06655
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-4.5648 -1.0761 0.1605 1.0259 3.9507
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 8.30902 2.98779 2.781 0.00611 **
month -0.19431 0.17584 -1.105 0.27088
Connected 0.08787 0.04350 2.020 0.04514 *
Separate -0.01863 0.04194 -0.444 0.65753
Software 0.52638 0.06718 7.835 7.52e-13 ***
Happiness 0.03302 0.07155 0.462 0.64505
Depression -0.08790 0.05323 -1.651 0.10071
Belonging -0.02638 0.04764 -0.554 0.58054
Belonging_Final 0.06655 0.07436 0.895 0.37220
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.72 on 152 degrees of freedom
Multiple R-squared: 0.3774, Adjusted R-squared: 0.3447
F-statistic: 11.52 on 8 and 152 DF, p-value: 1.036e-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.30719677 0.61439354 0.6928032
[2,] 0.22210321 0.44420642 0.7778968
[3,] 0.25599117 0.51198234 0.7440088
[4,] 0.16601020 0.33202040 0.8339898
[5,] 0.11996201 0.23992402 0.8800380
[6,] 0.17233736 0.34467471 0.8276626
[7,] 0.49046900 0.98093801 0.5095310
[8,] 0.41170762 0.82341524 0.5882924
[9,] 0.32514320 0.65028640 0.6748568
[10,] 0.25649710 0.51299420 0.7435029
[11,] 0.25407802 0.50815604 0.7459220
[12,] 0.51434713 0.97130574 0.4856529
[13,] 0.59513567 0.80972867 0.4048643
[14,] 0.56472863 0.87054274 0.4352714
[15,] 0.54200650 0.91598700 0.4579935
[16,] 0.62737831 0.74524339 0.3726217
[17,] 0.63872763 0.72254473 0.3612724
[18,] 0.62148903 0.75702193 0.3785110
[19,] 0.65369773 0.69260454 0.3463023
[20,] 0.60024905 0.79950190 0.3997509
[21,] 0.55486960 0.89026079 0.4451304
[22,] 0.52295047 0.95409906 0.4770495
[23,] 0.47481455 0.94962910 0.5251854
[24,] 0.42430315 0.84860629 0.5756969
[25,] 0.59723651 0.80552697 0.4027635
[26,] 0.64170136 0.71659728 0.3582986
[27,] 0.63886635 0.72226731 0.3611337
[28,] 0.66581952 0.66836097 0.3341805
[29,] 0.63988654 0.72022692 0.3601135
[30,] 0.59576654 0.80846693 0.4042335
[31,] 0.55952406 0.88095189 0.4404759
[32,] 0.58790606 0.82418789 0.4120939
[33,] 0.53381285 0.93237430 0.4661871
[34,] 0.50374012 0.99251976 0.4962599
[35,] 0.74808879 0.50382242 0.2519112
[36,] 0.86164804 0.27670392 0.1383520
[37,] 0.83128156 0.33743687 0.1687184
[38,] 0.82094116 0.35811767 0.1790588
[39,] 0.82730653 0.34538695 0.1726935
[40,] 0.79777766 0.40444468 0.2022223
[41,] 0.76221575 0.47556849 0.2377842
[42,] 0.79980481 0.40039038 0.2001952
[43,] 0.76272500 0.47455001 0.2372750
[44,] 0.77751808 0.44496384 0.2224819
[45,] 0.77619264 0.44761472 0.2238074
[46,] 0.73979684 0.52040632 0.2602032
[47,] 0.71825409 0.56349182 0.2817459
[48,] 0.68483969 0.63032062 0.3151603
[49,] 0.68699376 0.62601247 0.3130062
[50,] 0.64958423 0.70083155 0.3504158
[51,] 0.60635946 0.78728107 0.3936405
[52,] 0.56685719 0.86628562 0.4331428
[53,] 0.52008401 0.95983198 0.4799160
[54,] 0.47678496 0.95356993 0.5232150
[55,] 0.44277897 0.88555795 0.5572210
[56,] 0.43298784 0.86597568 0.5670122
[57,] 0.57676729 0.84646541 0.4232327
[58,] 0.74389624 0.51220751 0.2561038
[59,] 0.70654485 0.58691029 0.2934551
[60,] 0.86451884 0.27096232 0.1354812
[61,] 0.83783902 0.32432197 0.1621610
[62,] 0.82931712 0.34136575 0.1706829
[63,] 0.81175228 0.37649543 0.1882477
[64,] 0.77923536 0.44152927 0.2207646
[65,] 0.82580519 0.34838963 0.1741948
[66,] 0.79717377 0.40565245 0.2028262
[67,] 0.77681101 0.44637797 0.2231890
[68,] 0.80952840 0.38094320 0.1904716
[69,] 0.77691914 0.44616171 0.2230809
[70,] 0.74250924 0.51498151 0.2574908
[71,] 0.70428636 0.59142727 0.2957136
[72,] 0.67822357 0.64355287 0.3217764
[73,] 0.63575475 0.72849049 0.3642452
[74,] 0.61161965 0.77676070 0.3883803
[75,] 0.56909461 0.86181079 0.4309054
[76,] 0.52334655 0.95330690 0.4766534
[77,] 0.49542305 0.99084610 0.5045769
[78,] 0.45505608 0.91011217 0.5449439
[79,] 0.48091836 0.96183672 0.5190816
[80,] 0.43725346 0.87450692 0.5627465
[81,] 0.39419731 0.78839462 0.6058027
[82,] 0.35389716 0.70779433 0.6461028
[83,] 0.41130536 0.82261072 0.5886946
[84,] 0.37096192 0.74192383 0.6290381
[85,] 0.32764372 0.65528743 0.6723563
[86,] 0.30934223 0.61868446 0.6906578
[87,] 0.27054293 0.54108586 0.7294571
[88,] 0.25907226 0.51814452 0.7409277
[89,] 0.25787173 0.51574346 0.7421283
[90,] 0.22429010 0.44858019 0.7757099
[91,] 0.24082704 0.48165408 0.7591730
[92,] 0.21064738 0.42129476 0.7893526
[93,] 0.18821488 0.37642976 0.8117851
[94,] 0.22678118 0.45356235 0.7732188
[95,] 0.19184384 0.38368767 0.8081562
[96,] 0.15967938 0.31935875 0.8403206
[97,] 0.13735821 0.27471643 0.8626418
[98,] 0.13139738 0.26279476 0.8686026
[99,] 0.11376861 0.22753721 0.8862314
[100,] 0.09382749 0.18765498 0.9061725
[101,] 0.10163577 0.20327154 0.8983642
[102,] 0.08896306 0.17792612 0.9110369
[103,] 0.13361907 0.26723815 0.8663809
[104,] 0.13028222 0.26056443 0.8697178
[105,] 0.11417722 0.22835444 0.8858228
[106,] 0.09988041 0.19976083 0.9001196
[107,] 0.11307211 0.22614422 0.8869279
[108,] 0.10866987 0.21733974 0.8913301
[109,] 0.09456792 0.18913584 0.9054321
[110,] 0.07614082 0.15228164 0.9238592
[111,] 0.09385224 0.18770447 0.9061478
[112,] 0.07620402 0.15240804 0.9237960
[113,] 0.06429530 0.12859059 0.9357047
[114,] 0.04998067 0.09996134 0.9500193
[115,] 0.03783354 0.07566708 0.9621665
[116,] 0.03084715 0.06169431 0.9691528
[117,] 0.02539236 0.05078472 0.9746076
[118,] 0.03952115 0.07904230 0.9604788
[119,] 0.03331247 0.06662494 0.9666875
[120,] 0.06406149 0.12812298 0.9359385
[121,] 0.06744665 0.13489331 0.9325533
[122,] 0.10206099 0.20412197 0.8979390
[123,] 0.08471402 0.16942805 0.9152860
[124,] 0.06113984 0.12227967 0.9388602
[125,] 0.04341546 0.08683092 0.9565845
[126,] 0.03273930 0.06547861 0.9672607
[127,] 0.06812097 0.13624193 0.9318790
[128,] 0.06624922 0.13249844 0.9337508
[129,] 0.29516237 0.59032474 0.7048376
[130,] 0.25360742 0.50721485 0.7463926
[131,] 0.19494575 0.38989151 0.8050542
[132,] 0.13782143 0.27564287 0.8621786
[133,] 0.09412752 0.18825504 0.9058725
[134,] 0.18105441 0.36210882 0.8189456
[135,] 0.14346367 0.28692733 0.8565363
[136,] 0.39474731 0.78949463 0.6052527
[137,] 0.29092266 0.58184531 0.7090773
[138,] 0.17317038 0.34634075 0.8268296
> postscript(file="/var/wessaorg/rcomp/tmp/1f7as1355063066.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/2dl6y1355063066.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/3ednn1355063066.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/4pvut1355063066.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/552r71355063066.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 = 161
Frequency = 1
1 2 3 4 5 6
-2.91065662 -0.01343135 2.37313066 2.86957499 -1.44055461 -1.96924251
7 8 9 10 11 12
3.68090522 -1.89266066 -2.04724584 0.68327733 0.55490516 -0.10272140
13 14 15 16 17 18
0.39663712 0.86104335 -0.61409891 -0.17149890 0.36063917 3.62508908
19 20 21 22 23 24
2.30685937 0.62954440 0.70551057 0.70955097 2.69852250 0.97404937
25 26 27 28 29 30
0.50579400 0.06655373 1.24626736 -1.39197328 0.63622192 -0.57830825
31 32 33 34 35 36
-0.91127778 -0.43017969 -1.16894157 -0.08153686 -1.46826782 -3.32251542
37 38 39 40 41 42
-2.60813253 -1.85473622 1.46624708 1.18994392 0.77386736 -1.49725680
43 44 45 46 47 48
2.20420090 -0.14179826 -1.14495595 -4.56482931 -2.86706365 -0.22815809
49 50 51 52 53 54
1.10813940 -2.09854310 -0.71188213 -0.20341323 -2.65548195 -0.08013471
55 56 57 58 59 60
-2.37687359 1.53270763 0.09550827 0.67062362 -0.18998701 1.83523605
61 62 63 64 65 66
0.59718885 0.27368910 -0.46344989 -0.15118283 0.78303797 0.89089389
67 68 69 70 71 72
1.83031569 3.56634122 -3.58399502 0.69155676 -3.72588493 -0.15379179
73 74 75 76 77 78
1.59325058 1.23120638 0.25875094 3.15170378 -0.20468715 1.39067479
79 80 81 82 83 84
-2.01476574 0.15936374 0.58254983 0.10515548 -0.72855471 0.19589292
85 86 87 88 89 90
1.63168293 -0.08492007 0.66863157 1.48285873 0.71999381 -1.71108723
91 92 93 94 95 96
0.28862318 0.62299700 -0.14795881 -2.02002569 1.03490777 0.16049363
97 98 99 100 101 102
1.89946425 0.04742033 -0.44385215 -1.07609707 1.18567457 2.57225021
103 104 105 106 107 108
0.10314240 1.53776647 -2.16311630 0.94585842 0.36360732 1.54912016
109 110 111 112 113 114
0.14401428 1.02586745 0.32884844 2.18874385 -0.03233412 -2.71596652
115 116 117 118 119 120
1.42234562 -1.17257821 0.89442095 -1.85574005 0.41333627 -1.02174874
121 122 123 124 125 126
0.47613892 -2.87522560 -0.99951588 -1.19799839 -0.68294529 -0.41065014
127 128 129 130 131 132
1.23983883 0.81080335 -2.80412868 1.98283877 -3.28629745 2.14528936
133 134 135 136 137 138
-1.89970919 -1.58135356 -0.34259357 0.92715100 0.33760999 -2.28120027
139 140 141 142 143 144
-1.32696946 -2.26395587 3.05081575 1.66805838 0.28239316 1.27194823
145 146 147 148 149 150
-4.19403572 2.07986855 -2.14763496 0.76513920 -0.15117463 -3.22739308
151 152 153 154 155 156
-0.99481856 2.21831368 3.95074020 1.24300366 -2.88854725 0.48293740
157 158 159 160 161
1.27425447 0.81080335 0.83024128 -0.41241681 0.03627987
> postscript(file="/var/wessaorg/rcomp/tmp/62yp41355063066.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 = 161
Frequency = 1
lag(myerror, k = 1) myerror
0 -2.91065662 NA
1 -0.01343135 -2.91065662
2 2.37313066 -0.01343135
3 2.86957499 2.37313066
4 -1.44055461 2.86957499
5 -1.96924251 -1.44055461
6 3.68090522 -1.96924251
7 -1.89266066 3.68090522
8 -2.04724584 -1.89266066
9 0.68327733 -2.04724584
10 0.55490516 0.68327733
11 -0.10272140 0.55490516
12 0.39663712 -0.10272140
13 0.86104335 0.39663712
14 -0.61409891 0.86104335
15 -0.17149890 -0.61409891
16 0.36063917 -0.17149890
17 3.62508908 0.36063917
18 2.30685937 3.62508908
19 0.62954440 2.30685937
20 0.70551057 0.62954440
21 0.70955097 0.70551057
22 2.69852250 0.70955097
23 0.97404937 2.69852250
24 0.50579400 0.97404937
25 0.06655373 0.50579400
26 1.24626736 0.06655373
27 -1.39197328 1.24626736
28 0.63622192 -1.39197328
29 -0.57830825 0.63622192
30 -0.91127778 -0.57830825
31 -0.43017969 -0.91127778
32 -1.16894157 -0.43017969
33 -0.08153686 -1.16894157
34 -1.46826782 -0.08153686
35 -3.32251542 -1.46826782
36 -2.60813253 -3.32251542
37 -1.85473622 -2.60813253
38 1.46624708 -1.85473622
39 1.18994392 1.46624708
40 0.77386736 1.18994392
41 -1.49725680 0.77386736
42 2.20420090 -1.49725680
43 -0.14179826 2.20420090
44 -1.14495595 -0.14179826
45 -4.56482931 -1.14495595
46 -2.86706365 -4.56482931
47 -0.22815809 -2.86706365
48 1.10813940 -0.22815809
49 -2.09854310 1.10813940
50 -0.71188213 -2.09854310
51 -0.20341323 -0.71188213
52 -2.65548195 -0.20341323
53 -0.08013471 -2.65548195
54 -2.37687359 -0.08013471
55 1.53270763 -2.37687359
56 0.09550827 1.53270763
57 0.67062362 0.09550827
58 -0.18998701 0.67062362
59 1.83523605 -0.18998701
60 0.59718885 1.83523605
61 0.27368910 0.59718885
62 -0.46344989 0.27368910
63 -0.15118283 -0.46344989
64 0.78303797 -0.15118283
65 0.89089389 0.78303797
66 1.83031569 0.89089389
67 3.56634122 1.83031569
68 -3.58399502 3.56634122
69 0.69155676 -3.58399502
70 -3.72588493 0.69155676
71 -0.15379179 -3.72588493
72 1.59325058 -0.15379179
73 1.23120638 1.59325058
74 0.25875094 1.23120638
75 3.15170378 0.25875094
76 -0.20468715 3.15170378
77 1.39067479 -0.20468715
78 -2.01476574 1.39067479
79 0.15936374 -2.01476574
80 0.58254983 0.15936374
81 0.10515548 0.58254983
82 -0.72855471 0.10515548
83 0.19589292 -0.72855471
84 1.63168293 0.19589292
85 -0.08492007 1.63168293
86 0.66863157 -0.08492007
87 1.48285873 0.66863157
88 0.71999381 1.48285873
89 -1.71108723 0.71999381
90 0.28862318 -1.71108723
91 0.62299700 0.28862318
92 -0.14795881 0.62299700
93 -2.02002569 -0.14795881
94 1.03490777 -2.02002569
95 0.16049363 1.03490777
96 1.89946425 0.16049363
97 0.04742033 1.89946425
98 -0.44385215 0.04742033
99 -1.07609707 -0.44385215
100 1.18567457 -1.07609707
101 2.57225021 1.18567457
102 0.10314240 2.57225021
103 1.53776647 0.10314240
104 -2.16311630 1.53776647
105 0.94585842 -2.16311630
106 0.36360732 0.94585842
107 1.54912016 0.36360732
108 0.14401428 1.54912016
109 1.02586745 0.14401428
110 0.32884844 1.02586745
111 2.18874385 0.32884844
112 -0.03233412 2.18874385
113 -2.71596652 -0.03233412
114 1.42234562 -2.71596652
115 -1.17257821 1.42234562
116 0.89442095 -1.17257821
117 -1.85574005 0.89442095
118 0.41333627 -1.85574005
119 -1.02174874 0.41333627
120 0.47613892 -1.02174874
121 -2.87522560 0.47613892
122 -0.99951588 -2.87522560
123 -1.19799839 -0.99951588
124 -0.68294529 -1.19799839
125 -0.41065014 -0.68294529
126 1.23983883 -0.41065014
127 0.81080335 1.23983883
128 -2.80412868 0.81080335
129 1.98283877 -2.80412868
130 -3.28629745 1.98283877
131 2.14528936 -3.28629745
132 -1.89970919 2.14528936
133 -1.58135356 -1.89970919
134 -0.34259357 -1.58135356
135 0.92715100 -0.34259357
136 0.33760999 0.92715100
137 -2.28120027 0.33760999
138 -1.32696946 -2.28120027
139 -2.26395587 -1.32696946
140 3.05081575 -2.26395587
141 1.66805838 3.05081575
142 0.28239316 1.66805838
143 1.27194823 0.28239316
144 -4.19403572 1.27194823
145 2.07986855 -4.19403572
146 -2.14763496 2.07986855
147 0.76513920 -2.14763496
148 -0.15117463 0.76513920
149 -3.22739308 -0.15117463
150 -0.99481856 -3.22739308
151 2.21831368 -0.99481856
152 3.95074020 2.21831368
153 1.24300366 3.95074020
154 -2.88854725 1.24300366
155 0.48293740 -2.88854725
156 1.27425447 0.48293740
157 0.81080335 1.27425447
158 0.83024128 0.81080335
159 -0.41241681 0.83024128
160 0.03627987 -0.41241681
161 NA 0.03627987
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.01343135 -2.91065662
[2,] 2.37313066 -0.01343135
[3,] 2.86957499 2.37313066
[4,] -1.44055461 2.86957499
[5,] -1.96924251 -1.44055461
[6,] 3.68090522 -1.96924251
[7,] -1.89266066 3.68090522
[8,] -2.04724584 -1.89266066
[9,] 0.68327733 -2.04724584
[10,] 0.55490516 0.68327733
[11,] -0.10272140 0.55490516
[12,] 0.39663712 -0.10272140
[13,] 0.86104335 0.39663712
[14,] -0.61409891 0.86104335
[15,] -0.17149890 -0.61409891
[16,] 0.36063917 -0.17149890
[17,] 3.62508908 0.36063917
[18,] 2.30685937 3.62508908
[19,] 0.62954440 2.30685937
[20,] 0.70551057 0.62954440
[21,] 0.70955097 0.70551057
[22,] 2.69852250 0.70955097
[23,] 0.97404937 2.69852250
[24,] 0.50579400 0.97404937
[25,] 0.06655373 0.50579400
[26,] 1.24626736 0.06655373
[27,] -1.39197328 1.24626736
[28,] 0.63622192 -1.39197328
[29,] -0.57830825 0.63622192
[30,] -0.91127778 -0.57830825
[31,] -0.43017969 -0.91127778
[32,] -1.16894157 -0.43017969
[33,] -0.08153686 -1.16894157
[34,] -1.46826782 -0.08153686
[35,] -3.32251542 -1.46826782
[36,] -2.60813253 -3.32251542
[37,] -1.85473622 -2.60813253
[38,] 1.46624708 -1.85473622
[39,] 1.18994392 1.46624708
[40,] 0.77386736 1.18994392
[41,] -1.49725680 0.77386736
[42,] 2.20420090 -1.49725680
[43,] -0.14179826 2.20420090
[44,] -1.14495595 -0.14179826
[45,] -4.56482931 -1.14495595
[46,] -2.86706365 -4.56482931
[47,] -0.22815809 -2.86706365
[48,] 1.10813940 -0.22815809
[49,] -2.09854310 1.10813940
[50,] -0.71188213 -2.09854310
[51,] -0.20341323 -0.71188213
[52,] -2.65548195 -0.20341323
[53,] -0.08013471 -2.65548195
[54,] -2.37687359 -0.08013471
[55,] 1.53270763 -2.37687359
[56,] 0.09550827 1.53270763
[57,] 0.67062362 0.09550827
[58,] -0.18998701 0.67062362
[59,] 1.83523605 -0.18998701
[60,] 0.59718885 1.83523605
[61,] 0.27368910 0.59718885
[62,] -0.46344989 0.27368910
[63,] -0.15118283 -0.46344989
[64,] 0.78303797 -0.15118283
[65,] 0.89089389 0.78303797
[66,] 1.83031569 0.89089389
[67,] 3.56634122 1.83031569
[68,] -3.58399502 3.56634122
[69,] 0.69155676 -3.58399502
[70,] -3.72588493 0.69155676
[71,] -0.15379179 -3.72588493
[72,] 1.59325058 -0.15379179
[73,] 1.23120638 1.59325058
[74,] 0.25875094 1.23120638
[75,] 3.15170378 0.25875094
[76,] -0.20468715 3.15170378
[77,] 1.39067479 -0.20468715
[78,] -2.01476574 1.39067479
[79,] 0.15936374 -2.01476574
[80,] 0.58254983 0.15936374
[81,] 0.10515548 0.58254983
[82,] -0.72855471 0.10515548
[83,] 0.19589292 -0.72855471
[84,] 1.63168293 0.19589292
[85,] -0.08492007 1.63168293
[86,] 0.66863157 -0.08492007
[87,] 1.48285873 0.66863157
[88,] 0.71999381 1.48285873
[89,] -1.71108723 0.71999381
[90,] 0.28862318 -1.71108723
[91,] 0.62299700 0.28862318
[92,] -0.14795881 0.62299700
[93,] -2.02002569 -0.14795881
[94,] 1.03490777 -2.02002569
[95,] 0.16049363 1.03490777
[96,] 1.89946425 0.16049363
[97,] 0.04742033 1.89946425
[98,] -0.44385215 0.04742033
[99,] -1.07609707 -0.44385215
[100,] 1.18567457 -1.07609707
[101,] 2.57225021 1.18567457
[102,] 0.10314240 2.57225021
[103,] 1.53776647 0.10314240
[104,] -2.16311630 1.53776647
[105,] 0.94585842 -2.16311630
[106,] 0.36360732 0.94585842
[107,] 1.54912016 0.36360732
[108,] 0.14401428 1.54912016
[109,] 1.02586745 0.14401428
[110,] 0.32884844 1.02586745
[111,] 2.18874385 0.32884844
[112,] -0.03233412 2.18874385
[113,] -2.71596652 -0.03233412
[114,] 1.42234562 -2.71596652
[115,] -1.17257821 1.42234562
[116,] 0.89442095 -1.17257821
[117,] -1.85574005 0.89442095
[118,] 0.41333627 -1.85574005
[119,] -1.02174874 0.41333627
[120,] 0.47613892 -1.02174874
[121,] -2.87522560 0.47613892
[122,] -0.99951588 -2.87522560
[123,] -1.19799839 -0.99951588
[124,] -0.68294529 -1.19799839
[125,] -0.41065014 -0.68294529
[126,] 1.23983883 -0.41065014
[127,] 0.81080335 1.23983883
[128,] -2.80412868 0.81080335
[129,] 1.98283877 -2.80412868
[130,] -3.28629745 1.98283877
[131,] 2.14528936 -3.28629745
[132,] -1.89970919 2.14528936
[133,] -1.58135356 -1.89970919
[134,] -0.34259357 -1.58135356
[135,] 0.92715100 -0.34259357
[136,] 0.33760999 0.92715100
[137,] -2.28120027 0.33760999
[138,] -1.32696946 -2.28120027
[139,] -2.26395587 -1.32696946
[140,] 3.05081575 -2.26395587
[141,] 1.66805838 3.05081575
[142,] 0.28239316 1.66805838
[143,] 1.27194823 0.28239316
[144,] -4.19403572 1.27194823
[145,] 2.07986855 -4.19403572
[146,] -2.14763496 2.07986855
[147,] 0.76513920 -2.14763496
[148,] -0.15117463 0.76513920
[149,] -3.22739308 -0.15117463
[150,] -0.99481856 -3.22739308
[151,] 2.21831368 -0.99481856
[152,] 3.95074020 2.21831368
[153,] 1.24300366 3.95074020
[154,] -2.88854725 1.24300366
[155,] 0.48293740 -2.88854725
[156,] 1.27425447 0.48293740
[157,] 0.81080335 1.27425447
[158,] 0.83024128 0.81080335
[159,] -0.41241681 0.83024128
[160,] 0.03627987 -0.41241681
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.01343135 -2.91065662
2 2.37313066 -0.01343135
3 2.86957499 2.37313066
4 -1.44055461 2.86957499
5 -1.96924251 -1.44055461
6 3.68090522 -1.96924251
7 -1.89266066 3.68090522
8 -2.04724584 -1.89266066
9 0.68327733 -2.04724584
10 0.55490516 0.68327733
11 -0.10272140 0.55490516
12 0.39663712 -0.10272140
13 0.86104335 0.39663712
14 -0.61409891 0.86104335
15 -0.17149890 -0.61409891
16 0.36063917 -0.17149890
17 3.62508908 0.36063917
18 2.30685937 3.62508908
19 0.62954440 2.30685937
20 0.70551057 0.62954440
21 0.70955097 0.70551057
22 2.69852250 0.70955097
23 0.97404937 2.69852250
24 0.50579400 0.97404937
25 0.06655373 0.50579400
26 1.24626736 0.06655373
27 -1.39197328 1.24626736
28 0.63622192 -1.39197328
29 -0.57830825 0.63622192
30 -0.91127778 -0.57830825
31 -0.43017969 -0.91127778
32 -1.16894157 -0.43017969
33 -0.08153686 -1.16894157
34 -1.46826782 -0.08153686
35 -3.32251542 -1.46826782
36 -2.60813253 -3.32251542
37 -1.85473622 -2.60813253
38 1.46624708 -1.85473622
39 1.18994392 1.46624708
40 0.77386736 1.18994392
41 -1.49725680 0.77386736
42 2.20420090 -1.49725680
43 -0.14179826 2.20420090
44 -1.14495595 -0.14179826
45 -4.56482931 -1.14495595
46 -2.86706365 -4.56482931
47 -0.22815809 -2.86706365
48 1.10813940 -0.22815809
49 -2.09854310 1.10813940
50 -0.71188213 -2.09854310
51 -0.20341323 -0.71188213
52 -2.65548195 -0.20341323
53 -0.08013471 -2.65548195
54 -2.37687359 -0.08013471
55 1.53270763 -2.37687359
56 0.09550827 1.53270763
57 0.67062362 0.09550827
58 -0.18998701 0.67062362
59 1.83523605 -0.18998701
60 0.59718885 1.83523605
61 0.27368910 0.59718885
62 -0.46344989 0.27368910
63 -0.15118283 -0.46344989
64 0.78303797 -0.15118283
65 0.89089389 0.78303797
66 1.83031569 0.89089389
67 3.56634122 1.83031569
68 -3.58399502 3.56634122
69 0.69155676 -3.58399502
70 -3.72588493 0.69155676
71 -0.15379179 -3.72588493
72 1.59325058 -0.15379179
73 1.23120638 1.59325058
74 0.25875094 1.23120638
75 3.15170378 0.25875094
76 -0.20468715 3.15170378
77 1.39067479 -0.20468715
78 -2.01476574 1.39067479
79 0.15936374 -2.01476574
80 0.58254983 0.15936374
81 0.10515548 0.58254983
82 -0.72855471 0.10515548
83 0.19589292 -0.72855471
84 1.63168293 0.19589292
85 -0.08492007 1.63168293
86 0.66863157 -0.08492007
87 1.48285873 0.66863157
88 0.71999381 1.48285873
89 -1.71108723 0.71999381
90 0.28862318 -1.71108723
91 0.62299700 0.28862318
92 -0.14795881 0.62299700
93 -2.02002569 -0.14795881
94 1.03490777 -2.02002569
95 0.16049363 1.03490777
96 1.89946425 0.16049363
97 0.04742033 1.89946425
98 -0.44385215 0.04742033
99 -1.07609707 -0.44385215
100 1.18567457 -1.07609707
101 2.57225021 1.18567457
102 0.10314240 2.57225021
103 1.53776647 0.10314240
104 -2.16311630 1.53776647
105 0.94585842 -2.16311630
106 0.36360732 0.94585842
107 1.54912016 0.36360732
108 0.14401428 1.54912016
109 1.02586745 0.14401428
110 0.32884844 1.02586745
111 2.18874385 0.32884844
112 -0.03233412 2.18874385
113 -2.71596652 -0.03233412
114 1.42234562 -2.71596652
115 -1.17257821 1.42234562
116 0.89442095 -1.17257821
117 -1.85574005 0.89442095
118 0.41333627 -1.85574005
119 -1.02174874 0.41333627
120 0.47613892 -1.02174874
121 -2.87522560 0.47613892
122 -0.99951588 -2.87522560
123 -1.19799839 -0.99951588
124 -0.68294529 -1.19799839
125 -0.41065014 -0.68294529
126 1.23983883 -0.41065014
127 0.81080335 1.23983883
128 -2.80412868 0.81080335
129 1.98283877 -2.80412868
130 -3.28629745 1.98283877
131 2.14528936 -3.28629745
132 -1.89970919 2.14528936
133 -1.58135356 -1.89970919
134 -0.34259357 -1.58135356
135 0.92715100 -0.34259357
136 0.33760999 0.92715100
137 -2.28120027 0.33760999
138 -1.32696946 -2.28120027
139 -2.26395587 -1.32696946
140 3.05081575 -2.26395587
141 1.66805838 3.05081575
142 0.28239316 1.66805838
143 1.27194823 0.28239316
144 -4.19403572 1.27194823
145 2.07986855 -4.19403572
146 -2.14763496 2.07986855
147 0.76513920 -2.14763496
148 -0.15117463 0.76513920
149 -3.22739308 -0.15117463
150 -0.99481856 -3.22739308
151 2.21831368 -0.99481856
152 3.95074020 2.21831368
153 1.24300366 3.95074020
154 -2.88854725 1.24300366
155 0.48293740 -2.88854725
156 1.27425447 0.48293740
157 0.81080335 1.27425447
158 0.83024128 0.81080335
159 -0.41241681 0.83024128
160 0.03627987 -0.41241681
> 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/7ppop1355063066.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/890rr1355063066.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/99ou61355063066.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/10lv4n1355063066.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/11xen21355063066.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/12teb01355063066.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/131kbp1355063067.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/14tsdq1355063067.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/150w391355063067.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/16j09u1355063067.tab")
+ }
>
> try(system("convert tmp/1f7as1355063066.ps tmp/1f7as1355063066.png",intern=TRUE))
character(0)
> try(system("convert tmp/2dl6y1355063066.ps tmp/2dl6y1355063066.png",intern=TRUE))
character(0)
> try(system("convert tmp/3ednn1355063066.ps tmp/3ednn1355063066.png",intern=TRUE))
character(0)
> try(system("convert tmp/4pvut1355063066.ps tmp/4pvut1355063066.png",intern=TRUE))
character(0)
> try(system("convert tmp/552r71355063066.ps tmp/552r71355063066.png",intern=TRUE))
character(0)
> try(system("convert tmp/62yp41355063066.ps tmp/62yp41355063066.png",intern=TRUE))
character(0)
> try(system("convert tmp/7ppop1355063066.ps tmp/7ppop1355063066.png",intern=TRUE))
character(0)
> try(system("convert tmp/890rr1355063066.ps tmp/890rr1355063066.png",intern=TRUE))
character(0)
> try(system("convert tmp/99ou61355063066.ps tmp/99ou61355063066.png",intern=TRUE))
character(0)
> try(system("convert tmp/10lv4n1355063066.ps tmp/10lv4n1355063066.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
8.343 1.191 9.562