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(99
+ ,13
+ ,12
+ ,14
+ ,12
+ ,53
+ ,32
+ ,41
+ ,38
+ ,9
+ ,16
+ ,11
+ ,18
+ ,11
+ ,86
+ ,51
+ ,39
+ ,32
+ ,9
+ ,19
+ ,15
+ ,11
+ ,14
+ ,66
+ ,42
+ ,30
+ ,35
+ ,9
+ ,15
+ ,6
+ ,12
+ ,12
+ ,67
+ ,41
+ ,31
+ ,33
+ ,9
+ ,14
+ ,13
+ ,16
+ ,21
+ ,76
+ ,46
+ ,34
+ ,37
+ ,9
+ ,13
+ ,10
+ ,18
+ ,12
+ ,78
+ ,47
+ ,35
+ ,29
+ ,9
+ ,19
+ ,12
+ ,14
+ ,22
+ ,53
+ ,37
+ ,39
+ ,31
+ ,9
+ ,15
+ ,14
+ ,14
+ ,11
+ ,80
+ ,49
+ ,34
+ ,36
+ ,9
+ ,14
+ ,12
+ ,15
+ ,10
+ ,74
+ ,45
+ ,36
+ ,35
+ ,9
+ ,15
+ ,6
+ ,15
+ ,13
+ ,76
+ ,47
+ ,37
+ ,38
+ ,9
+ ,16
+ ,10
+ ,17
+ ,10
+ ,79
+ ,49
+ ,38
+ ,31
+ ,9
+ ,16
+ ,12
+ ,19
+ ,8
+ ,54
+ ,33
+ ,36
+ ,34
+ ,9
+ ,16
+ ,12
+ ,10
+ ,15
+ ,67
+ ,42
+ ,38
+ ,35
+ ,9
+ ,16
+ ,11
+ ,16
+ ,14
+ ,54
+ ,33
+ ,39
+ ,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,47
+ ,32
+ ,27
+ ,10
+ ,13
+ ,12
+ ,11
+ ,13
+ ,60
+ ,38
+ ,36
+ ,36
+ ,10
+ ,16
+ ,12
+ ,12
+ ,11
+ ,75
+ ,46
+ ,32
+ ,31
+ ,10
+ ,13
+ ,9
+ ,9
+ ,19
+ ,73
+ ,46
+ ,35
+ ,32
+ ,10
+ ,10
+ ,7
+ ,16
+ ,12
+ ,85
+ ,53
+ ,38
+ ,39
+ ,10
+ ,15
+ ,13
+ ,13
+ ,17
+ ,79
+ ,47
+ ,42
+ ,37
+ ,10
+ ,16
+ ,9
+ ,16
+ ,9
+ ,71
+ ,41
+ ,34
+ ,38
+ ,9
+ ,16
+ ,6
+ ,12
+ ,12
+ ,72
+ ,44
+ ,35
+ ,39
+ ,10
+ ,14
+ ,8
+ ,9
+ ,19
+ ,69
+ ,43
+ ,35
+ ,34
+ ,10
+ ,10
+ ,8
+ ,13
+ ,18
+ ,78
+ ,51
+ ,33
+ ,31
+ ,10
+ ,17
+ ,15
+ ,13
+ ,15
+ ,54
+ ,33
+ ,36
+ ,32
+ ,10
+ ,13
+ ,6
+ ,14
+ ,14
+ ,69
+ ,43
+ ,32
+ ,37
+ ,10
+ ,15
+ ,9
+ ,19
+ ,11
+ ,81
+ ,53
+ ,33
+ ,36
+ ,10
+ ,16
+ ,11
+ ,13
+ ,9
+ ,84
+ ,51
+ ,34
+ ,32
+ ,10
+ ,12
+ ,8
+ ,12
+ ,18
+ ,84
+ ,50
+ ,32
+ ,35
+ ,11
+ ,13
+ ,8
+ ,13
+ ,16
+ ,69
+ ,46
+ ,34
+ ,36)
+ ,dim=c(9
+ ,162)
+ ,dimnames=list(c('month'
+ ,'Learning'
+ ,'Software'
+ ,'Happiness'
+ ,'Depression'
+ ,'Belonging'
+ ,'Belonging_Final'
+ ,'Connected'
+ ,'Separate')
+ ,1:162))
> y <- array(NA,dim=c(9,162),dimnames=list(c('month','Learning','Software','Happiness','Depression','Belonging','Belonging_Final','Connected','Separate'),1:162))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '2'
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following object(s) are masked from 'package:base':
as.Date, as.Date.numeric
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
Learning month Software Happiness Depression Belonging Belonging_Final
1 13 99 12 14 12 53 32
2 16 9 11 18 11 86 51
3 19 9 15 11 14 66 42
4 15 9 6 12 12 67 41
5 14 9 13 16 21 76 46
6 13 9 10 18 12 78 47
7 19 9 12 14 22 53 37
8 15 9 14 14 11 80 49
9 14 9 12 15 10 74 45
10 15 9 6 15 13 76 47
11 16 9 10 17 10 79 49
12 16 9 12 19 8 54 33
13 16 9 12 10 15 67 42
14 16 9 11 16 14 54 33
15 17 9 15 18 10 87 53
16 15 9 12 14 14 58 36
17 15 9 10 14 14 75 45
18 20 9 12 17 11 88 54
19 18 9 11 14 10 64 41
20 16 9 12 16 13 57 36
21 16 9 11 18 7 66 41
22 16 9 12 11 14 68 44
23 19 9 13 14 12 54 33
24 16 9 11 12 14 56 37
25 17 9 9 17 11 86 52
26 17 9 13 9 9 80 47
27 16 9 10 16 11 76 43
28 15 9 14 14 15 69 44
29 16 9 12 15 14 78 45
30 14 9 10 11 13 67 44
31 15 9 12 16 9 80 49
32 12 9 8 13 15 54 33
33 14 9 10 17 10 71 43
34 16 9 12 15 11 84 54
35 14 9 12 14 13 74 42
36 7 9 7 16 8 71 44
37 10 9 6 9 20 63 37
38 14 9 12 15 12 71 43
39 16 9 10 17 10 76 46
40 16 9 10 13 10 69 42
41 16 9 10 15 9 74 45
42 14 9 12 16 14 75 44
43 20 9 15 16 8 54 33
44 14 9 10 12 14 52 31
45 14 9 10 12 11 69 42
46 11 9 12 11 13 68 40
47 14 9 13 15 9 65 43
48 15 9 11 15 11 75 46
49 16 9 11 17 15 74 42
50 14 9 12 13 11 75 45
51 16 9 14 16 10 72 44
52 14 9 10 14 14 67 40
53 12 9 12 11 18 63 37
54 16 9 13 12 14 62 46
55 9 9 5 12 11 63 36
56 14 9 6 15 12 76 47
57 16 9 12 16 13 74 45
58 16 9 12 15 9 67 42
59 15 9 11 12 10 73 43
60 16 9 10 12 15 70 43
61 12 9 7 8 20 53 32
62 16 9 12 13 12 77 45
63 16 9 14 11 12 77 45
64 14 9 11 14 14 52 31
65 16 9 12 15 13 54 33
66 17 10 13 10 11 80 49
67 18 10 14 11 17 66 42
68 18 10 11 12 12 73 41
69 12 10 12 15 13 63 38
70 16 10 12 15 14 69 42
71 10 10 8 14 13 67 44
72 14 10 11 16 15 54 33
73 18 10 14 15 13 81 48
74 18 10 14 15 10 69 40
75 16 10 12 13 11 84 50
76 17 10 9 12 19 80 49
77 16 10 13 17 13 70 43
78 16 10 11 13 17 69 44
79 13 10 12 15 13 77 47
80 16 10 12 13 9 54 33
81 16 10 12 15 11 79 46
82 20 10 12 16 10 30 0
83 16 10 12 15 9 71 45
84 15 10 12 16 12 73 43
85 15 10 11 15 12 72 44
86 16 10 10 14 13 77 47
87 14 10 9 15 13 75 45
88 16 10 12 14 12 69 42
89 16 10 12 13 15 54 33
90 15 10 12 7 22 70 43
91 12 10 9 17 13 73 46
92 17 10 15 13 15 54 33
93 16 10 12 15 13 77 46
94 15 10 12 14 15 82 48
95 13 10 12 13 10 80 47
96 16 10 10 16 11 80 47
97 16 10 13 12 16 69 43
98 16 10 9 14 11 78 46
99 16 10 12 17 11 81 48
100 14 10 10 15 10 76 46
101 16 10 14 17 10 76 45
102 16 10 11 12 16 73 45
103 20 10 15 16 12 85 52
104 15 10 11 11 11 66 42
105 16 10 11 15 16 79 47
106 13 10 12 9 19 68 41
107 17 10 12 16 11 76 47
108 16 10 12 15 16 71 43
109 16 10 11 10 15 54 33
110 12 10 7 10 24 46 30
111 16 10 12 15 14 82 49
112 16 10 14 11 15 74 44
113 17 10 11 13 11 88 55
114 13 10 11 14 15 38 11
115 12 10 10 18 12 76 47
116 18 10 13 16 10 86 53
117 14 10 13 14 14 54 33
118 14 10 8 14 13 70 44
119 13 10 11 14 9 69 42
120 16 10 12 14 15 90 55
121 13 10 11 12 15 54 33
122 16 10 13 14 14 76 46
123 13 10 12 15 11 89 54
124 16 10 14 15 8 76 47
125 15 10 13 15 11 73 45
126 16 10 15 13 11 79 47
127 15 10 10 17 8 90 55
128 17 10 11 17 10 74 44
129 15 10 9 19 11 81 53
130 12 10 11 15 13 72 44
131 16 10 10 13 11 71 42
132 10 10 11 9 20 66 40
133 16 10 8 15 10 77 46
134 12 10 11 15 15 65 40
135 14 10 12 15 12 74 46
136 15 10 12 16 14 82 53
137 13 10 9 11 23 54 33
138 15 10 11 14 14 63 42
139 11 10 10 11 16 54 35
140 12 10 8 15 11 64 40
141 8 10 9 13 12 69 41
142 16 10 8 15 10 54 33
143 15 10 9 16 14 84 51
144 17 10 15 14 12 86 53
145 16 10 11 15 12 77 46
146 10 10 8 16 11 89 55
147 18 10 13 16 12 76 47
148 13 10 12 11 13 60 38
149 16 10 12 12 11 75 46
150 13 10 9 9 19 73 46
151 10 10 7 16 12 85 53
152 15 10 13 13 17 79 47
153 16 10 9 16 9 71 41
154 16 9 6 12 12 72 44
155 14 10 8 9 19 69 43
156 10 10 8 13 18 78 51
157 17 10 15 13 15 54 33
158 13 10 6 14 14 69 43
159 15 10 9 19 11 81 53
160 16 10 11 13 9 84 51
161 12 10 8 12 18 84 50
162 13 11 8 13 16 69 46
Connected Separate
1 41 38
2 39 32
3 30 35
4 31 33
5 34 37
6 35 29
7 39 31
8 34 36
9 36 35
10 37 38
11 38 31
12 36 34
13 38 35
14 39 38
15 33 37
16 32 33
17 36 32
18 38 38
19 39 38
20 32 32
21 32 33
22 31 31
23 39 38
24 37 39
25 39 32
26 41 32
27 36 35
28 33 37
29 33 33
30 34 33
31 31 28
32 27 32
33 37 31
34 34 37
35 34 30
36 32 33
37 29 31
38 36 33
39 29 31
40 35 33
41 37 32
42 34 33
43 38 32
44 35 33
45 38 28
46 37 35
47 38 39
48 33 34
49 36 38
50 38 32
51 32 38
52 32 30
53 32 33
54 34 38
55 32 32
56 37 32
57 39 34
58 29 34
59 37 36
60 35 34
61 30 28
62 38 34
63 34 35
64 31 35
65 34 31
66 35 37
67 36 35
68 30 27
69 39 40
70 35 37
71 38 36
72 31 38
73 34 39
74 38 41
75 34 27
76 39 30
77 37 37
78 34 31
79 28 31
80 37 27
81 33 36
82 37 38
83 35 37
84 37 33
85 32 34
86 33 31
87 38 39
88 33 34
89 29 32
90 33 33
91 31 36
92 36 32
93 35 41
94 32 28
95 29 30
96 39 36
97 37 35
98 35 31
99 37 34
100 32 36
101 38 36
102 37 35
103 36 37
104 32 28
105 33 39
106 40 32
107 38 35
108 41 39
109 36 35
110 43 42
111 30 34
112 31 33
113 32 41
114 32 33
115 37 34
116 37 32
117 33 40
118 34 40
119 33 35
120 38 36
121 33 37
122 31 27
123 38 39
124 37 38
125 33 31
126 31 33
127 39 32
128 44 39
129 33 36
130 35 33
131 32 33
132 28 32
133 40 37
134 27 30
135 37 38
136 32 29
137 28 22
138 34 35
139 30 35
140 35 34
141 31 35
142 32 34
143 30 34
144 30 35
145 31 23
146 40 31
147 32 27
148 36 36
149 32 31
150 35 32
151 38 39
152 42 37
153 34 38
154 35 39
155 35 34
156 33 31
157 36 32
158 32 37
159 33 36
160 34 32
161 32 35
162 34 36
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) month Software Happiness
5.69429 -0.03767 0.54591 0.05870
Depression Belonging Belonging_Final Connected
-0.07419 0.03101 -0.05029 0.12511
Separate
-0.01821
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-5.9141 -1.0786 0.2108 1.1502 3.8662
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.69429 2.58044 2.207 0.02882 *
month -0.03767 0.02101 -1.793 0.07496 .
Software 0.54591 0.06849 7.971 3.38e-13 ***
Happiness 0.05870 0.07584 0.774 0.44013
Depression -0.07419 0.05596 -1.326 0.18696
Belonging 0.03101 0.04429 0.700 0.48488
Belonging_Final -0.05029 0.06351 -0.792 0.42970
Connected 0.12511 0.04696 2.664 0.00855 **
Separate -0.01821 0.04451 -0.409 0.68310
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.837 on 153 degrees of freedom
Multiple R-squared: 0.3699, Adjusted R-squared: 0.337
F-statistic: 11.23 on 8 and 153 DF, p-value: 1.959e-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.66776551 0.66446898 0.3322345
[2,] 0.56559931 0.86880139 0.4344007
[3,] 0.43386040 0.86772079 0.5661396
[4,] 0.34571031 0.69142063 0.6542897
[5,] 0.25901141 0.51802283 0.7409886
[6,] 0.19604888 0.39209775 0.8039511
[7,] 0.40147225 0.80294450 0.5985277
[8,] 0.32741342 0.65482684 0.6725866
[9,] 0.24638587 0.49277174 0.7536141
[10,] 0.18140440 0.36280880 0.8185956
[11,] 0.14814599 0.29629198 0.8518540
[12,] 0.19681369 0.39362738 0.8031863
[13,] 0.26417017 0.52834034 0.7358298
[14,] 0.25692346 0.51384692 0.7430765
[15,] 0.20085927 0.40171855 0.7991407
[16,] 0.22061429 0.44122857 0.7793857
[17,] 0.22822570 0.45645141 0.7717743
[18,] 0.21524288 0.43048577 0.7847571
[19,] 0.24078735 0.48157471 0.7592126
[20,] 0.19051314 0.38102628 0.8094869
[21,] 0.15711636 0.31423271 0.8428836
[22,] 0.15055454 0.30110909 0.8494455
[23,] 0.12223181 0.24446362 0.8777682
[24,] 0.09830704 0.19661408 0.9016930
[25,] 0.68012595 0.63974809 0.3198740
[26,] 0.63938619 0.72122763 0.3606138
[27,] 0.64324957 0.71350086 0.3567504
[28,] 0.70275887 0.59448226 0.2972411
[29,] 0.67446150 0.65107701 0.3255385
[30,] 0.63099655 0.73800690 0.3690034
[31,] 0.60087311 0.79825379 0.3991269
[32,] 0.60761692 0.78476616 0.3923831
[33,] 0.56089118 0.87821765 0.4391088
[34,] 0.52955509 0.94088982 0.4704449
[35,] 0.78238546 0.43522908 0.2176145
[36,] 0.86620768 0.26758465 0.1337923
[37,] 0.83586063 0.32827874 0.1641394
[38,] 0.80988617 0.38022765 0.1901138
[39,] 0.81310703 0.37378594 0.1868930
[40,] 0.77828529 0.44342942 0.2217147
[41,] 0.73892307 0.52215385 0.2610769
[42,] 0.77065747 0.45868506 0.2293425
[43,] 0.74908101 0.50183799 0.2509190
[44,] 0.77696340 0.44607319 0.2230366
[45,] 0.74329855 0.51340290 0.2567014
[46,] 0.70557978 0.58884045 0.2944202
[47,] 0.67858766 0.64282468 0.3214123
[48,] 0.63948234 0.72103531 0.3605177
[49,] 0.62698055 0.74603890 0.3730195
[50,] 0.58555113 0.82889773 0.4144489
[51,] 0.54131731 0.91736537 0.4586827
[52,] 0.50965824 0.98068353 0.4903418
[53,] 0.46947668 0.93895336 0.5305233
[54,] 0.42470318 0.84940636 0.5752968
[55,] 0.39840612 0.79681224 0.6015939
[56,] 0.39382775 0.78765551 0.6061722
[57,] 0.56940104 0.86119793 0.4305990
[58,] 0.71045379 0.57909241 0.2895462
[59,] 0.67342851 0.65314298 0.3265715
[60,] 0.79061720 0.41876560 0.2093828
[61,] 0.75487849 0.49024302 0.2451215
[62,] 0.74553234 0.50893533 0.2544677
[63,] 0.72144296 0.55711409 0.2785570
[64,] 0.68054139 0.63891723 0.3194586
[65,] 0.73560362 0.52879275 0.2643964
[66,] 0.69768106 0.60463787 0.3023189
[67,] 0.68293155 0.63413690 0.3170684
[68,] 0.68414674 0.63170652 0.3158533
[69,] 0.64125556 0.71748889 0.3587444
[70,] 0.60144616 0.79710768 0.3985538
[71,] 0.71934443 0.56131113 0.2806556
[72,] 0.67979463 0.64041074 0.3202054
[73,] 0.64922240 0.70155521 0.3507776
[74,] 0.60572631 0.78854737 0.3942737
[75,] 0.60261212 0.79477575 0.3973879
[76,] 0.55685852 0.88628297 0.4431415
[77,] 0.51659391 0.96681219 0.4834061
[78,] 0.49903095 0.99806189 0.5009691
[79,] 0.46462220 0.92924439 0.5353778
[80,] 0.44659188 0.89318375 0.5534081
[81,] 0.40827991 0.81655982 0.5917201
[82,] 0.36702382 0.73404764 0.6329762
[83,] 0.32463088 0.64926175 0.6753691
[84,] 0.33365445 0.66730889 0.6663456
[85,] 0.30108623 0.60217246 0.6989138
[86,] 0.26482165 0.52964329 0.7351784
[87,] 0.26880463 0.53760927 0.7311954
[88,] 0.23091739 0.46183478 0.7690826
[89,] 0.19699509 0.39399018 0.8030049
[90,] 0.17808151 0.35616302 0.8219185
[91,] 0.16435048 0.32870096 0.8356495
[92,] 0.20415514 0.40831027 0.7958449
[93,] 0.17279266 0.34558533 0.8272073
[94,] 0.16743441 0.33486882 0.8325656
[95,] 0.18264843 0.36529685 0.8173516
[96,] 0.16326344 0.32652688 0.8367366
[97,] 0.14361855 0.28723710 0.8563815
[98,] 0.13794000 0.27588000 0.8620600
[99,] 0.12842149 0.25684298 0.8715785
[100,] 0.11295789 0.22591578 0.8870421
[101,] 0.09309157 0.18618314 0.9069084
[102,] 0.11363986 0.22727972 0.8863601
[103,] 0.10244491 0.20488981 0.8975551
[104,] 0.13488673 0.26977346 0.8651133
[105,] 0.12767826 0.25535653 0.8723217
[106,] 0.11106914 0.22213827 0.8889309
[107,] 0.09603286 0.19206573 0.9039671
[108,] 0.09707529 0.19415058 0.9029247
[109,] 0.08914393 0.17828786 0.9108561
[110,] 0.07500771 0.15001541 0.9249923
[111,] 0.05898704 0.11797409 0.9410130
[112,] 0.06706820 0.13413641 0.9329318
[113,] 0.05322102 0.10644205 0.9467790
[114,] 0.04254873 0.08509746 0.9574513
[115,] 0.03185504 0.06371009 0.9681450
[116,] 0.02343882 0.04687764 0.9765612
[117,] 0.01835714 0.03671429 0.9816429
[118,] 0.01407581 0.02815163 0.9859242
[119,] 0.02017782 0.04035564 0.9798222
[120,] 0.01734751 0.03469503 0.9826525
[121,] 0.02693961 0.05387923 0.9730604
[122,] 0.03007938 0.06015875 0.9699206
[123,] 0.04269578 0.08539157 0.9573042
[124,] 0.03402567 0.06805134 0.9659743
[125,] 0.02324969 0.04649938 0.9767503
[126,] 0.01561550 0.03123100 0.9843845
[127,] 0.01018738 0.02037476 0.9898126
[128,] 0.02026354 0.04052709 0.9797365
[129,] 0.01692400 0.03384801 0.9830760
[130,] 0.59469744 0.81060512 0.4053026
[131,] 0.52721131 0.94557738 0.4727887
[132,] 0.44105370 0.88210740 0.5589463
[133,] 0.36648476 0.73296951 0.6335152
[134,] 0.27946945 0.55893890 0.7205305
[135,] 0.28451390 0.56902779 0.7154861
[136,] 0.24233483 0.48466965 0.7576652
[137,] 0.74933187 0.50133627 0.2506681
[138,] 0.73510608 0.52978783 0.2648939
[139,] 0.57442231 0.85115537 0.4255777
> postscript(file="/var/wessaorg/rcomp/tmp/1hgib1352142104.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/243xp1352142104.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/3r3911352142104.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/4hr1y1352142104.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/5snhv1352142104.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
0.0808030925 0.0002556609 2.7982991822 3.2616128214 -1.4570660049
6 7 8 9 10
-1.8868929003 3.8063513393 -1.6188207652 -1.9433807431 2.5227111488
11 12 13 14 15
0.7540949307 -0.3279640711 0.5370503244 0.5366620985 -0.3463350439
16 17 18 19 20
-0.0803217449 0.4182482719 3.8362330770 2.4495040686 0.7409011366
21 22 23 24 25
0.7148399616 1.2766526051 2.4138669123 1.1790108090 2.2010678038
26 27 28 29 30
0.0230623661 1.0013235622 -1.0890692610 0.5682136625 -0.0136026651
31 32 33 34 35
-0.5630998626 -0.1832783238 -1.1744292927 0.5599048130 -1.6538152384
36 37 38 39 40
-5.9141271022 -0.8321144309 -1.8389638033 1.8222283774 1.3587319528
41 42 43 44 45
0.8945302894 -1.5728423794 1.9237706094 -0.3117885547 -0.9747389293
46 47 48 49 50
-4.6765038957 -2.5623242910 0.0531061295 0.7598101387 -2.0876449278
51 52 53 54 55
-0.5271183452 -0.1210795903 -2.7122604940 0.7108266793 -2.5373685199
56 57 58 59 60
1.3392849081 -0.1730525118 0.9061996052 -0.3978370375 1.8258392873
61 62 63 64 65
0.5596300107 -0.0390724736 -0.4948631487 -0.4382573527 0.4733509316
66 67 68 69 70
1.0926601414 1.8537969242 3.3995130796 -3.9783207713 0.5567498985
71 72 73 74 75
-3.5060113116 -0.3506252593 1.4818405183 0.7651143095 0.3317493149
76 77 78 79 80
3.1245131922 -0.4116828526 1.5590595304 -1.7475862515 -0.1164665311
81 82 83 84 85
0.4572278825 3.0666623067 0.2746667303 -1.0471238181 0.2825310977
86 87 88 89 90
1.7774019718 -0.2538174704 0.6626722767 1.4205331206 0.8164860613
91 92 93 94 95
-1.4377724466 -0.0929505700 0.5084447402 -0.2003416451 -2.0890961054
96 97 98 99 100
0.7589870486 0.0989675397 1.8434273932 -0.1584594018 -0.3069872092
101 102 103 104 105
-1.4089635488 1.1673172811 2.5935219298 0.4194017515 1.4789746973
106 107 108 109 110
-2.4559750399 0.8981161137 -0.0208446952 1.3214147550 -0.4783362771
111 112 113 114 115
1.0765185890 0.1470212861 2.5101654613 -2.0595242617 -2.9463736719
116 117 118 119 120
1.3401104492 -1.6130355079 0.9742043598 -1.9957640876 0.2985924108
121 122 123 124 125
-1.3842491684 0.3719617197 -3.0215024278 -1.1778357486 -1.0439287571
126 127 128 129 130
-0.8172264908 -0.5029110476 0.5444878829 1.1501658560 -3.0368114888
131 132 133 134 135
1.7838837649 -3.3228584620 1.7711748241 -1.9262723469 -1.7775352515
136 137 138 139 140
-0.1222712362 0.7121850828 0.4361329259 -2.2659674395 -1.4822916423
141 142 143 144 145
-5.4227618857 2.7769498522 1.6941072143 0.4444242510 1.1528754379
146 147 148 149 150
-4.2421339037 2.0313757988 -2.3479913193 0.7914506029 -0.0963239737
151 152 153 154 155
-3.2026945023 -1.5836413759 1.7958591145 3.8662288461 1.4591859875
156 157 158 159 160
-2.5310058452 -0.0929505700 1.3165298865 1.1501658560 0.8706148327
161 162
-0.5107405308 0.3518953856
> postscript(file="/var/wessaorg/rcomp/tmp/6g48i1352142104.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 0.0808030925 NA
1 0.0002556609 0.0808030925
2 2.7982991822 0.0002556609
3 3.2616128214 2.7982991822
4 -1.4570660049 3.2616128214
5 -1.8868929003 -1.4570660049
6 3.8063513393 -1.8868929003
7 -1.6188207652 3.8063513393
8 -1.9433807431 -1.6188207652
9 2.5227111488 -1.9433807431
10 0.7540949307 2.5227111488
11 -0.3279640711 0.7540949307
12 0.5370503244 -0.3279640711
13 0.5366620985 0.5370503244
14 -0.3463350439 0.5366620985
15 -0.0803217449 -0.3463350439
16 0.4182482719 -0.0803217449
17 3.8362330770 0.4182482719
18 2.4495040686 3.8362330770
19 0.7409011366 2.4495040686
20 0.7148399616 0.7409011366
21 1.2766526051 0.7148399616
22 2.4138669123 1.2766526051
23 1.1790108090 2.4138669123
24 2.2010678038 1.1790108090
25 0.0230623661 2.2010678038
26 1.0013235622 0.0230623661
27 -1.0890692610 1.0013235622
28 0.5682136625 -1.0890692610
29 -0.0136026651 0.5682136625
30 -0.5630998626 -0.0136026651
31 -0.1832783238 -0.5630998626
32 -1.1744292927 -0.1832783238
33 0.5599048130 -1.1744292927
34 -1.6538152384 0.5599048130
35 -5.9141271022 -1.6538152384
36 -0.8321144309 -5.9141271022
37 -1.8389638033 -0.8321144309
38 1.8222283774 -1.8389638033
39 1.3587319528 1.8222283774
40 0.8945302894 1.3587319528
41 -1.5728423794 0.8945302894
42 1.9237706094 -1.5728423794
43 -0.3117885547 1.9237706094
44 -0.9747389293 -0.3117885547
45 -4.6765038957 -0.9747389293
46 -2.5623242910 -4.6765038957
47 0.0531061295 -2.5623242910
48 0.7598101387 0.0531061295
49 -2.0876449278 0.7598101387
50 -0.5271183452 -2.0876449278
51 -0.1210795903 -0.5271183452
52 -2.7122604940 -0.1210795903
53 0.7108266793 -2.7122604940
54 -2.5373685199 0.7108266793
55 1.3392849081 -2.5373685199
56 -0.1730525118 1.3392849081
57 0.9061996052 -0.1730525118
58 -0.3978370375 0.9061996052
59 1.8258392873 -0.3978370375
60 0.5596300107 1.8258392873
61 -0.0390724736 0.5596300107
62 -0.4948631487 -0.0390724736
63 -0.4382573527 -0.4948631487
64 0.4733509316 -0.4382573527
65 1.0926601414 0.4733509316
66 1.8537969242 1.0926601414
67 3.3995130796 1.8537969242
68 -3.9783207713 3.3995130796
69 0.5567498985 -3.9783207713
70 -3.5060113116 0.5567498985
71 -0.3506252593 -3.5060113116
72 1.4818405183 -0.3506252593
73 0.7651143095 1.4818405183
74 0.3317493149 0.7651143095
75 3.1245131922 0.3317493149
76 -0.4116828526 3.1245131922
77 1.5590595304 -0.4116828526
78 -1.7475862515 1.5590595304
79 -0.1164665311 -1.7475862515
80 0.4572278825 -0.1164665311
81 3.0666623067 0.4572278825
82 0.2746667303 3.0666623067
83 -1.0471238181 0.2746667303
84 0.2825310977 -1.0471238181
85 1.7774019718 0.2825310977
86 -0.2538174704 1.7774019718
87 0.6626722767 -0.2538174704
88 1.4205331206 0.6626722767
89 0.8164860613 1.4205331206
90 -1.4377724466 0.8164860613
91 -0.0929505700 -1.4377724466
92 0.5084447402 -0.0929505700
93 -0.2003416451 0.5084447402
94 -2.0890961054 -0.2003416451
95 0.7589870486 -2.0890961054
96 0.0989675397 0.7589870486
97 1.8434273932 0.0989675397
98 -0.1584594018 1.8434273932
99 -0.3069872092 -0.1584594018
100 -1.4089635488 -0.3069872092
101 1.1673172811 -1.4089635488
102 2.5935219298 1.1673172811
103 0.4194017515 2.5935219298
104 1.4789746973 0.4194017515
105 -2.4559750399 1.4789746973
106 0.8981161137 -2.4559750399
107 -0.0208446952 0.8981161137
108 1.3214147550 -0.0208446952
109 -0.4783362771 1.3214147550
110 1.0765185890 -0.4783362771
111 0.1470212861 1.0765185890
112 2.5101654613 0.1470212861
113 -2.0595242617 2.5101654613
114 -2.9463736719 -2.0595242617
115 1.3401104492 -2.9463736719
116 -1.6130355079 1.3401104492
117 0.9742043598 -1.6130355079
118 -1.9957640876 0.9742043598
119 0.2985924108 -1.9957640876
120 -1.3842491684 0.2985924108
121 0.3719617197 -1.3842491684
122 -3.0215024278 0.3719617197
123 -1.1778357486 -3.0215024278
124 -1.0439287571 -1.1778357486
125 -0.8172264908 -1.0439287571
126 -0.5029110476 -0.8172264908
127 0.5444878829 -0.5029110476
128 1.1501658560 0.5444878829
129 -3.0368114888 1.1501658560
130 1.7838837649 -3.0368114888
131 -3.3228584620 1.7838837649
132 1.7711748241 -3.3228584620
133 -1.9262723469 1.7711748241
134 -1.7775352515 -1.9262723469
135 -0.1222712362 -1.7775352515
136 0.7121850828 -0.1222712362
137 0.4361329259 0.7121850828
138 -2.2659674395 0.4361329259
139 -1.4822916423 -2.2659674395
140 -5.4227618857 -1.4822916423
141 2.7769498522 -5.4227618857
142 1.6941072143 2.7769498522
143 0.4444242510 1.6941072143
144 1.1528754379 0.4444242510
145 -4.2421339037 1.1528754379
146 2.0313757988 -4.2421339037
147 -2.3479913193 2.0313757988
148 0.7914506029 -2.3479913193
149 -0.0963239737 0.7914506029
150 -3.2026945023 -0.0963239737
151 -1.5836413759 -3.2026945023
152 1.7958591145 -1.5836413759
153 3.8662288461 1.7958591145
154 1.4591859875 3.8662288461
155 -2.5310058452 1.4591859875
156 -0.0929505700 -2.5310058452
157 1.3165298865 -0.0929505700
158 1.1501658560 1.3165298865
159 0.8706148327 1.1501658560
160 -0.5107405308 0.8706148327
161 0.3518953856 -0.5107405308
162 NA 0.3518953856
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.0002556609 0.0808030925
[2,] 2.7982991822 0.0002556609
[3,] 3.2616128214 2.7982991822
[4,] -1.4570660049 3.2616128214
[5,] -1.8868929003 -1.4570660049
[6,] 3.8063513393 -1.8868929003
[7,] -1.6188207652 3.8063513393
[8,] -1.9433807431 -1.6188207652
[9,] 2.5227111488 -1.9433807431
[10,] 0.7540949307 2.5227111488
[11,] -0.3279640711 0.7540949307
[12,] 0.5370503244 -0.3279640711
[13,] 0.5366620985 0.5370503244
[14,] -0.3463350439 0.5366620985
[15,] -0.0803217449 -0.3463350439
[16,] 0.4182482719 -0.0803217449
[17,] 3.8362330770 0.4182482719
[18,] 2.4495040686 3.8362330770
[19,] 0.7409011366 2.4495040686
[20,] 0.7148399616 0.7409011366
[21,] 1.2766526051 0.7148399616
[22,] 2.4138669123 1.2766526051
[23,] 1.1790108090 2.4138669123
[24,] 2.2010678038 1.1790108090
[25,] 0.0230623661 2.2010678038
[26,] 1.0013235622 0.0230623661
[27,] -1.0890692610 1.0013235622
[28,] 0.5682136625 -1.0890692610
[29,] -0.0136026651 0.5682136625
[30,] -0.5630998626 -0.0136026651
[31,] -0.1832783238 -0.5630998626
[32,] -1.1744292927 -0.1832783238
[33,] 0.5599048130 -1.1744292927
[34,] -1.6538152384 0.5599048130
[35,] -5.9141271022 -1.6538152384
[36,] -0.8321144309 -5.9141271022
[37,] -1.8389638033 -0.8321144309
[38,] 1.8222283774 -1.8389638033
[39,] 1.3587319528 1.8222283774
[40,] 0.8945302894 1.3587319528
[41,] -1.5728423794 0.8945302894
[42,] 1.9237706094 -1.5728423794
[43,] -0.3117885547 1.9237706094
[44,] -0.9747389293 -0.3117885547
[45,] -4.6765038957 -0.9747389293
[46,] -2.5623242910 -4.6765038957
[47,] 0.0531061295 -2.5623242910
[48,] 0.7598101387 0.0531061295
[49,] -2.0876449278 0.7598101387
[50,] -0.5271183452 -2.0876449278
[51,] -0.1210795903 -0.5271183452
[52,] -2.7122604940 -0.1210795903
[53,] 0.7108266793 -2.7122604940
[54,] -2.5373685199 0.7108266793
[55,] 1.3392849081 -2.5373685199
[56,] -0.1730525118 1.3392849081
[57,] 0.9061996052 -0.1730525118
[58,] -0.3978370375 0.9061996052
[59,] 1.8258392873 -0.3978370375
[60,] 0.5596300107 1.8258392873
[61,] -0.0390724736 0.5596300107
[62,] -0.4948631487 -0.0390724736
[63,] -0.4382573527 -0.4948631487
[64,] 0.4733509316 -0.4382573527
[65,] 1.0926601414 0.4733509316
[66,] 1.8537969242 1.0926601414
[67,] 3.3995130796 1.8537969242
[68,] -3.9783207713 3.3995130796
[69,] 0.5567498985 -3.9783207713
[70,] -3.5060113116 0.5567498985
[71,] -0.3506252593 -3.5060113116
[72,] 1.4818405183 -0.3506252593
[73,] 0.7651143095 1.4818405183
[74,] 0.3317493149 0.7651143095
[75,] 3.1245131922 0.3317493149
[76,] -0.4116828526 3.1245131922
[77,] 1.5590595304 -0.4116828526
[78,] -1.7475862515 1.5590595304
[79,] -0.1164665311 -1.7475862515
[80,] 0.4572278825 -0.1164665311
[81,] 3.0666623067 0.4572278825
[82,] 0.2746667303 3.0666623067
[83,] -1.0471238181 0.2746667303
[84,] 0.2825310977 -1.0471238181
[85,] 1.7774019718 0.2825310977
[86,] -0.2538174704 1.7774019718
[87,] 0.6626722767 -0.2538174704
[88,] 1.4205331206 0.6626722767
[89,] 0.8164860613 1.4205331206
[90,] -1.4377724466 0.8164860613
[91,] -0.0929505700 -1.4377724466
[92,] 0.5084447402 -0.0929505700
[93,] -0.2003416451 0.5084447402
[94,] -2.0890961054 -0.2003416451
[95,] 0.7589870486 -2.0890961054
[96,] 0.0989675397 0.7589870486
[97,] 1.8434273932 0.0989675397
[98,] -0.1584594018 1.8434273932
[99,] -0.3069872092 -0.1584594018
[100,] -1.4089635488 -0.3069872092
[101,] 1.1673172811 -1.4089635488
[102,] 2.5935219298 1.1673172811
[103,] 0.4194017515 2.5935219298
[104,] 1.4789746973 0.4194017515
[105,] -2.4559750399 1.4789746973
[106,] 0.8981161137 -2.4559750399
[107,] -0.0208446952 0.8981161137
[108,] 1.3214147550 -0.0208446952
[109,] -0.4783362771 1.3214147550
[110,] 1.0765185890 -0.4783362771
[111,] 0.1470212861 1.0765185890
[112,] 2.5101654613 0.1470212861
[113,] -2.0595242617 2.5101654613
[114,] -2.9463736719 -2.0595242617
[115,] 1.3401104492 -2.9463736719
[116,] -1.6130355079 1.3401104492
[117,] 0.9742043598 -1.6130355079
[118,] -1.9957640876 0.9742043598
[119,] 0.2985924108 -1.9957640876
[120,] -1.3842491684 0.2985924108
[121,] 0.3719617197 -1.3842491684
[122,] -3.0215024278 0.3719617197
[123,] -1.1778357486 -3.0215024278
[124,] -1.0439287571 -1.1778357486
[125,] -0.8172264908 -1.0439287571
[126,] -0.5029110476 -0.8172264908
[127,] 0.5444878829 -0.5029110476
[128,] 1.1501658560 0.5444878829
[129,] -3.0368114888 1.1501658560
[130,] 1.7838837649 -3.0368114888
[131,] -3.3228584620 1.7838837649
[132,] 1.7711748241 -3.3228584620
[133,] -1.9262723469 1.7711748241
[134,] -1.7775352515 -1.9262723469
[135,] -0.1222712362 -1.7775352515
[136,] 0.7121850828 -0.1222712362
[137,] 0.4361329259 0.7121850828
[138,] -2.2659674395 0.4361329259
[139,] -1.4822916423 -2.2659674395
[140,] -5.4227618857 -1.4822916423
[141,] 2.7769498522 -5.4227618857
[142,] 1.6941072143 2.7769498522
[143,] 0.4444242510 1.6941072143
[144,] 1.1528754379 0.4444242510
[145,] -4.2421339037 1.1528754379
[146,] 2.0313757988 -4.2421339037
[147,] -2.3479913193 2.0313757988
[148,] 0.7914506029 -2.3479913193
[149,] -0.0963239737 0.7914506029
[150,] -3.2026945023 -0.0963239737
[151,] -1.5836413759 -3.2026945023
[152,] 1.7958591145 -1.5836413759
[153,] 3.8662288461 1.7958591145
[154,] 1.4591859875 3.8662288461
[155,] -2.5310058452 1.4591859875
[156,] -0.0929505700 -2.5310058452
[157,] 1.3165298865 -0.0929505700
[158,] 1.1501658560 1.3165298865
[159,] 0.8706148327 1.1501658560
[160,] -0.5107405308 0.8706148327
[161,] 0.3518953856 -0.5107405308
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.0002556609 0.0808030925
2 2.7982991822 0.0002556609
3 3.2616128214 2.7982991822
4 -1.4570660049 3.2616128214
5 -1.8868929003 -1.4570660049
6 3.8063513393 -1.8868929003
7 -1.6188207652 3.8063513393
8 -1.9433807431 -1.6188207652
9 2.5227111488 -1.9433807431
10 0.7540949307 2.5227111488
11 -0.3279640711 0.7540949307
12 0.5370503244 -0.3279640711
13 0.5366620985 0.5370503244
14 -0.3463350439 0.5366620985
15 -0.0803217449 -0.3463350439
16 0.4182482719 -0.0803217449
17 3.8362330770 0.4182482719
18 2.4495040686 3.8362330770
19 0.7409011366 2.4495040686
20 0.7148399616 0.7409011366
21 1.2766526051 0.7148399616
22 2.4138669123 1.2766526051
23 1.1790108090 2.4138669123
24 2.2010678038 1.1790108090
25 0.0230623661 2.2010678038
26 1.0013235622 0.0230623661
27 -1.0890692610 1.0013235622
28 0.5682136625 -1.0890692610
29 -0.0136026651 0.5682136625
30 -0.5630998626 -0.0136026651
31 -0.1832783238 -0.5630998626
32 -1.1744292927 -0.1832783238
33 0.5599048130 -1.1744292927
34 -1.6538152384 0.5599048130
35 -5.9141271022 -1.6538152384
36 -0.8321144309 -5.9141271022
37 -1.8389638033 -0.8321144309
38 1.8222283774 -1.8389638033
39 1.3587319528 1.8222283774
40 0.8945302894 1.3587319528
41 -1.5728423794 0.8945302894
42 1.9237706094 -1.5728423794
43 -0.3117885547 1.9237706094
44 -0.9747389293 -0.3117885547
45 -4.6765038957 -0.9747389293
46 -2.5623242910 -4.6765038957
47 0.0531061295 -2.5623242910
48 0.7598101387 0.0531061295
49 -2.0876449278 0.7598101387
50 -0.5271183452 -2.0876449278
51 -0.1210795903 -0.5271183452
52 -2.7122604940 -0.1210795903
53 0.7108266793 -2.7122604940
54 -2.5373685199 0.7108266793
55 1.3392849081 -2.5373685199
56 -0.1730525118 1.3392849081
57 0.9061996052 -0.1730525118
58 -0.3978370375 0.9061996052
59 1.8258392873 -0.3978370375
60 0.5596300107 1.8258392873
61 -0.0390724736 0.5596300107
62 -0.4948631487 -0.0390724736
63 -0.4382573527 -0.4948631487
64 0.4733509316 -0.4382573527
65 1.0926601414 0.4733509316
66 1.8537969242 1.0926601414
67 3.3995130796 1.8537969242
68 -3.9783207713 3.3995130796
69 0.5567498985 -3.9783207713
70 -3.5060113116 0.5567498985
71 -0.3506252593 -3.5060113116
72 1.4818405183 -0.3506252593
73 0.7651143095 1.4818405183
74 0.3317493149 0.7651143095
75 3.1245131922 0.3317493149
76 -0.4116828526 3.1245131922
77 1.5590595304 -0.4116828526
78 -1.7475862515 1.5590595304
79 -0.1164665311 -1.7475862515
80 0.4572278825 -0.1164665311
81 3.0666623067 0.4572278825
82 0.2746667303 3.0666623067
83 -1.0471238181 0.2746667303
84 0.2825310977 -1.0471238181
85 1.7774019718 0.2825310977
86 -0.2538174704 1.7774019718
87 0.6626722767 -0.2538174704
88 1.4205331206 0.6626722767
89 0.8164860613 1.4205331206
90 -1.4377724466 0.8164860613
91 -0.0929505700 -1.4377724466
92 0.5084447402 -0.0929505700
93 -0.2003416451 0.5084447402
94 -2.0890961054 -0.2003416451
95 0.7589870486 -2.0890961054
96 0.0989675397 0.7589870486
97 1.8434273932 0.0989675397
98 -0.1584594018 1.8434273932
99 -0.3069872092 -0.1584594018
100 -1.4089635488 -0.3069872092
101 1.1673172811 -1.4089635488
102 2.5935219298 1.1673172811
103 0.4194017515 2.5935219298
104 1.4789746973 0.4194017515
105 -2.4559750399 1.4789746973
106 0.8981161137 -2.4559750399
107 -0.0208446952 0.8981161137
108 1.3214147550 -0.0208446952
109 -0.4783362771 1.3214147550
110 1.0765185890 -0.4783362771
111 0.1470212861 1.0765185890
112 2.5101654613 0.1470212861
113 -2.0595242617 2.5101654613
114 -2.9463736719 -2.0595242617
115 1.3401104492 -2.9463736719
116 -1.6130355079 1.3401104492
117 0.9742043598 -1.6130355079
118 -1.9957640876 0.9742043598
119 0.2985924108 -1.9957640876
120 -1.3842491684 0.2985924108
121 0.3719617197 -1.3842491684
122 -3.0215024278 0.3719617197
123 -1.1778357486 -3.0215024278
124 -1.0439287571 -1.1778357486
125 -0.8172264908 -1.0439287571
126 -0.5029110476 -0.8172264908
127 0.5444878829 -0.5029110476
128 1.1501658560 0.5444878829
129 -3.0368114888 1.1501658560
130 1.7838837649 -3.0368114888
131 -3.3228584620 1.7838837649
132 1.7711748241 -3.3228584620
133 -1.9262723469 1.7711748241
134 -1.7775352515 -1.9262723469
135 -0.1222712362 -1.7775352515
136 0.7121850828 -0.1222712362
137 0.4361329259 0.7121850828
138 -2.2659674395 0.4361329259
139 -1.4822916423 -2.2659674395
140 -5.4227618857 -1.4822916423
141 2.7769498522 -5.4227618857
142 1.6941072143 2.7769498522
143 0.4444242510 1.6941072143
144 1.1528754379 0.4444242510
145 -4.2421339037 1.1528754379
146 2.0313757988 -4.2421339037
147 -2.3479913193 2.0313757988
148 0.7914506029 -2.3479913193
149 -0.0963239737 0.7914506029
150 -3.2026945023 -0.0963239737
151 -1.5836413759 -3.2026945023
152 1.7958591145 -1.5836413759
153 3.8662288461 1.7958591145
154 1.4591859875 3.8662288461
155 -2.5310058452 1.4591859875
156 -0.0929505700 -2.5310058452
157 1.3165298865 -0.0929505700
158 1.1501658560 1.3165298865
159 0.8706148327 1.1501658560
160 -0.5107405308 0.8706148327
161 0.3518953856 -0.5107405308
> 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/7ie2a1352142104.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/83tht1352142104.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/9w3vb1352142104.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')
Warning messages:
1: In sqrt(crit * p * (1 - hh)/hh) : NaNs produced
2: In sqrt(crit * p * (1 - hh)/hh) : NaNs produced
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/wessaorg/rcomp/tmp/10d3b71352142104.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/11xc4d1352142104.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/122fty1352142104.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/13wm911352142104.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/1456fv1352142105.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/15tbk61352142105.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/166ads1352142105.tab")
+ }
>
> try(system("convert tmp/1hgib1352142104.ps tmp/1hgib1352142104.png",intern=TRUE))
character(0)
> try(system("convert tmp/243xp1352142104.ps tmp/243xp1352142104.png",intern=TRUE))
character(0)
> try(system("convert tmp/3r3911352142104.ps tmp/3r3911352142104.png",intern=TRUE))
character(0)
> try(system("convert tmp/4hr1y1352142104.ps tmp/4hr1y1352142104.png",intern=TRUE))
character(0)
> try(system("convert tmp/5snhv1352142104.ps tmp/5snhv1352142104.png",intern=TRUE))
character(0)
> try(system("convert tmp/6g48i1352142104.ps tmp/6g48i1352142104.png",intern=TRUE))
character(0)
> try(system("convert tmp/7ie2a1352142104.ps tmp/7ie2a1352142104.png",intern=TRUE))
character(0)
> try(system("convert tmp/83tht1352142104.ps tmp/83tht1352142104.png",intern=TRUE))
character(0)
> try(system("convert tmp/9w3vb1352142104.ps tmp/9w3vb1352142104.png",intern=TRUE))
character(0)
> try(system("convert tmp/10d3b71352142104.ps tmp/10d3b71352142104.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
8.010 0.868 8.910