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
+ ,86
+ ,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
+ ,6
+ ,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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,12
+ ,76
+ ,47
+ ,11
+ ,36
+ ,36
+ ,13
+ ,12
+ ,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
+ ,35
+ ,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
+ ,35
+ ,12
+ ,8
+ ,12
+ ,18
+ ,84
+ ,50
+ ,11
+ ,34
+ ,36
+ ,13
+ ,8
+ ,13
+ ,16
+ ,69
+ ,46)
+ ,dim=c(9
+ ,162)
+ ,dimnames=list(c('month'
+ ,'Connected'
+ ,'Separate'
+ ,'Learning'
+ ,'Software'
+ ,'Happiness'
+ ,'Depression'
+ ,'Belonging'
+ ,'Belonging_Final')
+ ,1:162))
> y <- array(NA,dim=c(9,162),dimnames=list(c('month','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 = '4'
> par3 <- 'No Linear Trend'
> par2 <- 'Do not include Seasonal Dummies'
> par1 <- '4'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following object(s) are masked from 'package:base':
as.Date, as.Date.numeric
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
Learning month Connected Separate Software Happiness Depression Belonging
1 13 9 41 38 12 14 12 53
2 16 9 39 32 11 18 11 86
3 19 9 30 35 15 11 14 66
4 15 9 31 33 6 12 12 67
5 14 9 34 37 13 16 21 76
6 13 9 35 29 10 18 12 78
7 19 9 39 31 12 14 22 53
8 15 9 34 36 14 14 11 80
9 14 9 36 35 12 15 10 74
10 15 9 37 38 6 15 13 76
11 16 9 38 31 10 17 10 79
12 16 9 36 34 12 19 8 54
13 16 9 38 35 12 10 15 67
14 16 9 39 38 11 16 14 54
15 17 9 33 37 15 18 10 87
16 15 9 32 33 12 14 14 58
17 15 9 36 32 10 14 14 75
18 20 9 38 38 12 17 11 88
19 18 9 39 38 11 14 10 64
20 16 9 32 32 12 16 13 57
21 16 9 32 33 11 18 7 66
22 16 9 31 31 12 11 14 68
23 19 9 39 38 13 14 12 54
24 16 9 37 39 11 12 14 56
25 17 9 39 32 9 17 11 86
26 17 9 41 32 13 9 9 80
27 16 9 36 35 10 16 11 76
28 15 9 33 37 14 14 15 69
29 16 9 33 33 12 15 14 78
30 14 9 34 33 10 11 13 67
31 15 9 31 28 12 16 9 80
32 12 9 27 32 8 13 15 54
33 14 9 37 31 10 17 10 71
34 16 9 34 37 12 15 11 84
35 14 9 34 30 12 14 13 74
36 7 9 32 33 7 16 8 71
37 10 9 29 31 6 9 20 63
38 14 9 36 33 12 15 12 71
39 16 9 29 31 10 17 10 76
40 16 9 35 33 10 13 10 69
41 16 9 37 32 10 15 9 74
42 14 9 34 33 12 16 14 75
43 20 9 38 32 15 16 8 54
44 14 9 35 33 10 12 14 52
45 14 9 38 28 10 12 11 69
46 11 9 37 35 12 11 13 68
47 14 9 38 39 13 15 9 65
48 15 9 33 34 11 15 11 75
49 16 9 36 38 11 17 15 74
50 14 9 38 32 12 13 11 75
51 16 9 32 38 14 16 10 72
52 14 9 32 30 10 14 14 67
53 12 9 32 33 12 11 18 63
54 16 9 34 38 13 12 14 62
55 9 10 32 32 5 12 11 63
56 14 10 37 32 6 15 12 76
57 16 10 39 34 12 16 13 74
58 16 10 29 34 12 15 9 67
59 15 10 37 36 11 12 10 73
60 16 10 35 34 10 12 15 70
61 12 10 30 28 7 8 20 53
62 16 10 38 34 12 13 12 77
63 16 10 34 35 14 11 12 77
64 14 10 31 35 11 14 14 52
65 16 10 34 31 12 15 13 54
66 17 10 35 37 13 10 11 80
67 18 10 36 35 14 11 17 66
68 18 10 30 27 11 12 12 73
69 12 10 39 40 12 15 13 63
70 16 10 35 37 12 15 14 69
71 10 10 38 36 8 14 13 67
72 14 10 31 38 11 16 15 54
73 18 10 34 39 14 15 13 81
74 18 10 38 41 14 15 10 69
75 16 10 34 27 12 13 11 84
76 17 10 39 30 9 12 19 80
77 16 10 37 37 13 17 13 70
78 16 10 34 31 11 13 17 69
79 13 10 28 31 12 15 13 77
80 16 10 37 27 12 13 9 54
81 16 10 33 36 12 15 11 79
82 20 10 37 38 12 16 10 30
83 16 10 35 37 12 15 9 71
84 15 10 37 33 12 16 12 73
85 15 10 32 34 11 15 12 72
86 16 10 33 31 10 14 13 77
87 14 10 38 39 9 15 13 75
88 16 10 33 34 12 14 12 69
89 16 10 29 32 12 13 15 54
90 15 10 33 33 12 7 22 70
91 12 10 31 36 9 17 13 73
92 17 10 36 32 15 13 15 54
93 16 10 35 41 12 15 13 77
94 15 10 32 28 12 14 15 82
95 13 10 29 30 12 13 10 80
96 16 10 39 36 10 16 11 80
97 16 10 37 35 13 12 16 69
98 16 10 35 31 9 14 11 78
99 16 10 37 34 12 17 11 81
100 14 10 32 36 10 15 10 76
101 16 10 38 36 14 17 10 76
102 16 10 37 35 11 12 16 73
103 20 10 36 37 15 16 12 85
104 15 10 32 28 11 11 11 66
105 16 10 33 39 11 15 16 79
106 13 10 40 32 12 9 19 68
107 17 10 38 35 12 16 11 76
108 16 10 41 39 12 15 16 71
109 16 11 36 35 11 10 15 54
110 12 11 43 42 7 10 24 46
111 16 11 30 34 12 15 14 82
112 16 11 31 33 14 11 15 74
113 17 11 32 41 11 13 11 88
114 13 11 32 33 11 14 15 38
115 12 11 37 34 10 18 12 76
116 18 11 37 32 13 16 10 86
117 14 11 33 40 13 14 14 54
118 14 11 34 40 8 14 13 70
119 13 11 33 35 11 14 9 69
120 16 11 38 36 12 14 15 90
121 13 11 33 37 11 12 15 54
122 16 11 31 27 13 14 14 76
123 13 11 38 39 12 15 11 89
124 16 11 37 38 14 15 8 76
125 15 11 33 31 13 15 11 73
126 16 11 31 33 15 13 11 79
127 15 11 39 32 10 17 8 90
128 17 11 44 39 11 17 10 74
129 15 11 33 36 9 19 11 81
130 12 11 35 33 11 15 13 72
131 16 11 32 33 10 13 11 71
132 10 11 28 32 11 9 20 66
133 16 11 40 37 8 15 10 77
134 12 11 27 30 11 15 15 65
135 14 11 37 38 12 15 12 74
136 15 11 32 29 12 16 14 82
137 13 11 28 22 9 11 23 54
138 15 11 34 35 11 14 14 63
139 11 11 30 35 10 11 16 54
140 12 11 35 34 8 15 11 64
141 8 11 31 35 9 13 12 69
142 16 11 32 34 8 15 10 54
143 15 11 30 34 9 16 14 84
144 17 11 30 35 15 14 12 86
145 16 11 31 23 11 15 12 77
146 10 11 40 31 8 16 11 89
147 18 11 32 27 13 16 12 76
148 13 11 36 36 12 11 13 60
149 16 11 32 31 12 12 11 75
150 13 11 35 32 9 9 19 73
151 10 11 38 39 7 16 12 85
152 15 11 42 37 13 13 17 79
153 16 11 34 38 9 16 9 71
154 16 11 35 39 6 12 12 72
155 14 11 35 34 8 9 19 69
156 10 11 33 31 8 13 18 78
157 17 11 36 32 15 13 15 54
158 13 11 32 37 6 14 14 69
159 15 11 33 36 9 19 11 81
160 16 11 34 32 11 13 9 84
161 12 11 32 35 8 12 18 84
162 13 11 34 36 8 13 16 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 45
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 0
83 45
84 43
85 44
86 47
87 45
88 42
89 33
90 43
91 46
92 33
93 46
94 48
95 47
96 47
97 43
98 46
99 48
100 46
101 45
102 45
103 52
104 42
105 47
106 41
107 47
108 43
109 33
110 30
111 49
112 44
113 55
114 11
115 47
116 53
117 33
118 44
119 42
120 55
121 33
122 46
123 54
124 47
125 45
126 47
127 55
128 44
129 53
130 44
131 42
132 40
133 46
134 40
135 46
136 53
137 33
138 42
139 35
140 40
141 41
142 33
143 51
144 53
145 46
146 55
147 47
148 38
149 46
150 46
151 53
152 47
153 41
154 44
155 43
156 51
157 33
158 43
159 53
160 51
161 50
162 46
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) month Connected Separate
7.41086 -0.19742 0.10718 -0.01460
Software Happiness Depression Belonging
0.53300 0.05423 -0.06478 0.04131
Belonging_Final
-0.05659
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-6.1056 -1.1770 0.2563 1.1386 4.0230
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.41086 3.15308 2.350 0.0200 *
month -0.19742 0.18590 -1.062 0.2899
Connected 0.10718 0.04732 2.265 0.0249 *
Separate -0.01460 0.04516 -0.323 0.7470
Software 0.53300 0.06951 7.668 1.89e-12 ***
Happiness 0.05423 0.07652 0.709 0.4796
Depression -0.06478 0.05664 -1.144 0.2545
Belonging 0.04131 0.04482 0.922 0.3582
Belonging_Final -0.05659 0.06406 -0.883 0.3785
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.85 on 153 degrees of freedom
Multiple R-squared: 0.3614, Adjusted R-squared: 0.328
F-statistic: 10.82 on 8 and 153 DF, p-value: 5.123e-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.760956946 0.47808611 0.23904305
[2,] 0.624143756 0.75171249 0.37585624
[3,] 0.584120006 0.83175999 0.41587999
[4,] 0.464417749 0.92883550 0.53558225
[5,] 0.364089189 0.72817838 0.63591081
[6,] 0.300795498 0.60159100 0.69920450
[7,] 0.507276005 0.98544799 0.49272399
[8,] 0.422232679 0.84446536 0.57776732
[9,] 0.332734571 0.66546914 0.66726543
[10,] 0.262509361 0.52501872 0.73749064
[11,] 0.238859953 0.47771991 0.76114005
[12,] 0.434126603 0.86825321 0.56587340
[13,] 0.468163995 0.93632799 0.53183600
[14,] 0.454916118 0.90983224 0.54508388
[15,] 0.414038208 0.82807642 0.58596179
[16,] 0.472973084 0.94594617 0.52702692
[17,] 0.476602730 0.95320546 0.52339727
[18,] 0.455952527 0.91190505 0.54404747
[19,] 0.496487641 0.99297528 0.50351236
[20,] 0.435974868 0.87194974 0.56402513
[21,] 0.386755237 0.77351047 0.61324476
[22,] 0.360712491 0.72142498 0.63928751
[23,] 0.325264460 0.65052892 0.67473554
[24,] 0.279923609 0.55984722 0.72007639
[25,] 0.850558191 0.29888362 0.14944181
[26,] 0.826418386 0.34716323 0.17358161
[27,] 0.821386272 0.35722746 0.17861373
[28,] 0.839056432 0.32188714 0.16094357
[29,] 0.820583244 0.35883351 0.17941676
[30,] 0.788829163 0.42234167 0.21117084
[31,] 0.765476024 0.46904795 0.23452398
[32,] 0.787687376 0.42462525 0.21231262
[33,] 0.746437515 0.50712497 0.25356249
[34,] 0.718685538 0.56262892 0.28131446
[35,] 0.878255071 0.24348986 0.12174493
[36,] 0.923283489 0.15343302 0.07671651
[37,] 0.902908723 0.19418255 0.09709128
[38,] 0.887168772 0.22566246 0.11283123
[39,] 0.890536049 0.21892790 0.10946395
[40,] 0.867245155 0.26550969 0.13275485
[41,] 0.839706585 0.32058683 0.16029341
[42,] 0.868414075 0.26317185 0.13158592
[43,] 0.851615718 0.29676856 0.14838428
[44,] 0.860026398 0.27994720 0.13997360
[45,] 0.845305752 0.30938850 0.15469425
[46,] 0.813808109 0.37238378 0.18619189
[47,] 0.796069553 0.40786089 0.20393045
[48,] 0.764438723 0.47112255 0.23556128
[49,] 0.751809187 0.49638163 0.24819081
[50,] 0.713319286 0.57336143 0.28668071
[51,] 0.671562103 0.65687579 0.32843790
[52,] 0.633635856 0.73272829 0.36636414
[53,] 0.589231236 0.82153753 0.41076876
[54,] 0.544419065 0.91116187 0.45558093
[55,] 0.505577601 0.98884480 0.49442240
[56,] 0.488064118 0.97612824 0.51193588
[57,] 0.602752054 0.79449589 0.39724795
[58,] 0.758098682 0.48380264 0.24190132
[59,] 0.720539822 0.55892036 0.27946018
[60,] 0.851625149 0.29674970 0.14837485
[61,] 0.823963658 0.35207268 0.17603634
[62,] 0.809754386 0.38049123 0.19024561
[63,] 0.787949061 0.42410188 0.21205094
[64,] 0.753062497 0.49387501 0.24693750
[65,] 0.781826418 0.43634716 0.21817358
[66,] 0.749819366 0.50036127 0.25018063
[67,] 0.727155814 0.54568837 0.27284419
[68,] 0.748771898 0.50245620 0.25122810
[69,] 0.710290372 0.57941926 0.28970963
[70,] 0.671394064 0.65721187 0.32860594
[71,] 0.786524697 0.42695061 0.21347530
[72,] 0.751574882 0.49685024 0.24842512
[73,] 0.729737937 0.54052413 0.27026206
[74,] 0.689670566 0.62065887 0.31032943
[75,] 0.669653585 0.66069283 0.33034642
[76,] 0.628657461 0.74268508 0.37134254
[77,] 0.584466883 0.83106623 0.41553312
[78,] 0.553992031 0.89201594 0.44600797
[79,] 0.513331644 0.97333671 0.48666836
[80,] 0.515228970 0.96954206 0.48477103
[81,] 0.473126548 0.94625310 0.52687345
[82,] 0.426793613 0.85358723 0.57320639
[83,] 0.384848435 0.76969687 0.61515156
[84,] 0.433858744 0.86771749 0.56614126
[85,] 0.389655751 0.77931150 0.61034425
[86,] 0.345294036 0.69058807 0.65470596
[87,] 0.324686253 0.64937251 0.67531375
[88,] 0.284193329 0.56838666 0.71580667
[89,] 0.260732834 0.52146567 0.73926717
[90,] 0.254396439 0.50879288 0.74560356
[91,] 0.221464162 0.44292832 0.77853584
[92,] 0.238190478 0.47638096 0.76180952
[93,] 0.204131618 0.40826324 0.79586838
[94,] 0.182925037 0.36585007 0.81707496
[95,] 0.214398540 0.42879708 0.78560146
[96,] 0.181218595 0.36243719 0.81878140
[97,] 0.150785850 0.30157170 0.84921415
[98,] 0.142662138 0.28532428 0.85733786
[99,] 0.134934194 0.26986839 0.86506581
[100,] 0.117345253 0.23469051 0.88265475
[101,] 0.097152025 0.19430405 0.90284798
[102,] 0.110721307 0.22144261 0.88927869
[103,] 0.103277771 0.20655554 0.89672223
[104,] 0.135528781 0.27105756 0.86447122
[105,] 0.127869765 0.25573953 0.87213023
[106,] 0.110629723 0.22125945 0.88937028
[107,] 0.094936302 0.18987260 0.90506370
[108,] 0.097349867 0.19469973 0.90265013
[109,] 0.089732043 0.17946409 0.91026796
[110,] 0.075047501 0.15009500 0.92495250
[111,] 0.059101503 0.11820301 0.94089850
[112,] 0.066204280 0.13240856 0.93379572
[113,] 0.051891159 0.10378232 0.94810884
[114,] 0.040835650 0.08167130 0.95916435
[115,] 0.030475360 0.06095072 0.96952464
[116,] 0.022384004 0.04476801 0.97761600
[117,] 0.017541184 0.03508237 0.98245882
[118,] 0.013950456 0.02790091 0.98604954
[119,] 0.018979276 0.03795855 0.98102072
[120,] 0.015804947 0.03160989 0.98419505
[121,] 0.024433096 0.04886619 0.97556690
[122,] 0.025532376 0.05106475 0.97446762
[123,] 0.033861106 0.06772221 0.96613889
[124,] 0.025927787 0.05185557 0.97407221
[125,] 0.017296989 0.03459398 0.98270301
[126,] 0.011362632 0.02272526 0.98863737
[127,] 0.007744085 0.01548817 0.99225591
[128,] 0.012500829 0.02500166 0.98749917
[129,] 0.010069384 0.02013877 0.98993062
[130,] 0.529372884 0.94125423 0.47062712
[131,] 0.469323685 0.93864737 0.53067631
[132,] 0.385784513 0.77156903 0.61421549
[133,] 0.307825751 0.61565150 0.69217425
[134,] 0.228547159 0.45709432 0.77145284
[135,] 0.258655710 0.51731142 0.74134429
[136,] 0.220031795 0.44006359 0.77996821
[137,] 0.599207856 0.80158429 0.40079214
[138,] 0.538583678 0.92283264 0.46141632
[139,] 0.375953463 0.75190693 0.62404654
> postscript(file="/var/wessaorg/rcomp/tmp/1d9xt1352122832.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/2p0721352122832.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/3tjqt1352122832.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/4igd31352122832.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/5p4bv1352122832.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.230182647 -0.140042676 2.627172950 3.006091392 -1.710755745 -2.053219953
7 8 9 10 11 12
3.812754832 -1.793167608 -2.053651079 2.305839881 0.650957477 -0.267633688
13 14 15 16 17 18
0.446408776 0.553566550 -0.548873549 -0.189143680 0.240600838 3.663091150
19 20 21 22 23 24
2.442529018 0.664331495 0.625961908 1.091160541 2.466465100 1.143170018
25 26 27 28 29 30
2.036765503 -0.040427151 0.827110850 -1.240831356 0.332602856 -0.158675199
31 32 33 34 35 36
-0.760408235 -0.421367152 -1.250930869 0.350903651 -1.833455093 -6.105585249
37 38 39 40 41 42
-1.188928562 -1.942535315 1.569755561 1.235559527 0.796593161 -1.761474627
43 44 45 46 47 48
2.052501210 -0.371337731 -1.039956983 -4.784677767 -2.548828314 -0.133641700
49 50 51 52 53 54
0.568822676 -2.179873117 -0.675331223 -0.312345520 -2.917282722 0.645569852
55 56 57 58 59 60
-2.567762481 1.350901644 -0.052261390 0.934047466 -0.325009522 1.840983806
61 62 63 64 65 66
0.508877626 0.028903009 -0.485312328 -0.357452974 0.641173725 1.061568429
67 68 69 70 71 72
1.908836106 3.310293385 -3.852198916 0.576033317 -3.442888183 -0.326778734
73 74 75 76 77 78
1.425477280 0.874578103 0.284471438 3.072451330 -0.329283055 1.544609465
79 80 81 82 83 84
-1.873562327 0.110575645 0.394743986 3.297214289 0.339276565 -0.989140778
85 86 87 88 89 90
0.246483031 1.710748258 -0.260188743 0.671276260 1.429696540 0.699360906
91 92 93 94 95 96
-1.522955765 0.080430029 0.465532017 -0.312233268 -2.205146956 0.778698363
97 98 99 100 101 102
0.148310915 1.801926274 -0.141069508 -0.372941862 -1.313064545 1.162253647
103 104 105 106 107 108
2.591038401 0.445701337 1.352019153 -2.398868142 0.970515618 0.065667583
109 110 111 112 113 114
1.616303523 -0.156096233 1.124699844 0.266134000 2.551296814 -1.785076341
115 116 117 118 119 120
-2.717160851 1.560007414 -1.336855954 1.117720780 -1.778057266 0.424512382
121 122 123 124 125 126
-1.141413225 0.514655628 -2.860332062 -0.887208500 -0.822564193 -0.671212163
127 128 129 130 131 132
-0.291206156 0.910062742 1.287737240 -2.827461801 1.934107347 -3.291461901
133 134 135 136 137 138
2.006300767 -1.821432809 -1.536065006 0.009476970 0.814031817 0.686502377
139 140 141 142 143 144
-2.083879264 -1.239333746 -5.305715501 3.034387096 1.700024859 0.526091642
145 146 147 148 149 150
1.297172031 -4.057113598 2.226043860 -2.050790745 0.954271142 0.009852924
151 152 153 154 155 156
-3.076154769 -1.337154018 1.976887938 4.022998356 1.567506018 -2.462668735
157 158 159 160 161 162
0.277846457 1.403792834 1.287737240 1.014888041 -0.547300856 0.462387875
> postscript(file="/var/wessaorg/rcomp/tmp/63q671352122832.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.230182647 NA
1 -0.140042676 -3.230182647
2 2.627172950 -0.140042676
3 3.006091392 2.627172950
4 -1.710755745 3.006091392
5 -2.053219953 -1.710755745
6 3.812754832 -2.053219953
7 -1.793167608 3.812754832
8 -2.053651079 -1.793167608
9 2.305839881 -2.053651079
10 0.650957477 2.305839881
11 -0.267633688 0.650957477
12 0.446408776 -0.267633688
13 0.553566550 0.446408776
14 -0.548873549 0.553566550
15 -0.189143680 -0.548873549
16 0.240600838 -0.189143680
17 3.663091150 0.240600838
18 2.442529018 3.663091150
19 0.664331495 2.442529018
20 0.625961908 0.664331495
21 1.091160541 0.625961908
22 2.466465100 1.091160541
23 1.143170018 2.466465100
24 2.036765503 1.143170018
25 -0.040427151 2.036765503
26 0.827110850 -0.040427151
27 -1.240831356 0.827110850
28 0.332602856 -1.240831356
29 -0.158675199 0.332602856
30 -0.760408235 -0.158675199
31 -0.421367152 -0.760408235
32 -1.250930869 -0.421367152
33 0.350903651 -1.250930869
34 -1.833455093 0.350903651
35 -6.105585249 -1.833455093
36 -1.188928562 -6.105585249
37 -1.942535315 -1.188928562
38 1.569755561 -1.942535315
39 1.235559527 1.569755561
40 0.796593161 1.235559527
41 -1.761474627 0.796593161
42 2.052501210 -1.761474627
43 -0.371337731 2.052501210
44 -1.039956983 -0.371337731
45 -4.784677767 -1.039956983
46 -2.548828314 -4.784677767
47 -0.133641700 -2.548828314
48 0.568822676 -0.133641700
49 -2.179873117 0.568822676
50 -0.675331223 -2.179873117
51 -0.312345520 -0.675331223
52 -2.917282722 -0.312345520
53 0.645569852 -2.917282722
54 -2.567762481 0.645569852
55 1.350901644 -2.567762481
56 -0.052261390 1.350901644
57 0.934047466 -0.052261390
58 -0.325009522 0.934047466
59 1.840983806 -0.325009522
60 0.508877626 1.840983806
61 0.028903009 0.508877626
62 -0.485312328 0.028903009
63 -0.357452974 -0.485312328
64 0.641173725 -0.357452974
65 1.061568429 0.641173725
66 1.908836106 1.061568429
67 3.310293385 1.908836106
68 -3.852198916 3.310293385
69 0.576033317 -3.852198916
70 -3.442888183 0.576033317
71 -0.326778734 -3.442888183
72 1.425477280 -0.326778734
73 0.874578103 1.425477280
74 0.284471438 0.874578103
75 3.072451330 0.284471438
76 -0.329283055 3.072451330
77 1.544609465 -0.329283055
78 -1.873562327 1.544609465
79 0.110575645 -1.873562327
80 0.394743986 0.110575645
81 3.297214289 0.394743986
82 0.339276565 3.297214289
83 -0.989140778 0.339276565
84 0.246483031 -0.989140778
85 1.710748258 0.246483031
86 -0.260188743 1.710748258
87 0.671276260 -0.260188743
88 1.429696540 0.671276260
89 0.699360906 1.429696540
90 -1.522955765 0.699360906
91 0.080430029 -1.522955765
92 0.465532017 0.080430029
93 -0.312233268 0.465532017
94 -2.205146956 -0.312233268
95 0.778698363 -2.205146956
96 0.148310915 0.778698363
97 1.801926274 0.148310915
98 -0.141069508 1.801926274
99 -0.372941862 -0.141069508
100 -1.313064545 -0.372941862
101 1.162253647 -1.313064545
102 2.591038401 1.162253647
103 0.445701337 2.591038401
104 1.352019153 0.445701337
105 -2.398868142 1.352019153
106 0.970515618 -2.398868142
107 0.065667583 0.970515618
108 1.616303523 0.065667583
109 -0.156096233 1.616303523
110 1.124699844 -0.156096233
111 0.266134000 1.124699844
112 2.551296814 0.266134000
113 -1.785076341 2.551296814
114 -2.717160851 -1.785076341
115 1.560007414 -2.717160851
116 -1.336855954 1.560007414
117 1.117720780 -1.336855954
118 -1.778057266 1.117720780
119 0.424512382 -1.778057266
120 -1.141413225 0.424512382
121 0.514655628 -1.141413225
122 -2.860332062 0.514655628
123 -0.887208500 -2.860332062
124 -0.822564193 -0.887208500
125 -0.671212163 -0.822564193
126 -0.291206156 -0.671212163
127 0.910062742 -0.291206156
128 1.287737240 0.910062742
129 -2.827461801 1.287737240
130 1.934107347 -2.827461801
131 -3.291461901 1.934107347
132 2.006300767 -3.291461901
133 -1.821432809 2.006300767
134 -1.536065006 -1.821432809
135 0.009476970 -1.536065006
136 0.814031817 0.009476970
137 0.686502377 0.814031817
138 -2.083879264 0.686502377
139 -1.239333746 -2.083879264
140 -5.305715501 -1.239333746
141 3.034387096 -5.305715501
142 1.700024859 3.034387096
143 0.526091642 1.700024859
144 1.297172031 0.526091642
145 -4.057113598 1.297172031
146 2.226043860 -4.057113598
147 -2.050790745 2.226043860
148 0.954271142 -2.050790745
149 0.009852924 0.954271142
150 -3.076154769 0.009852924
151 -1.337154018 -3.076154769
152 1.976887938 -1.337154018
153 4.022998356 1.976887938
154 1.567506018 4.022998356
155 -2.462668735 1.567506018
156 0.277846457 -2.462668735
157 1.403792834 0.277846457
158 1.287737240 1.403792834
159 1.014888041 1.287737240
160 -0.547300856 1.014888041
161 0.462387875 -0.547300856
162 NA 0.462387875
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.140042676 -3.230182647
[2,] 2.627172950 -0.140042676
[3,] 3.006091392 2.627172950
[4,] -1.710755745 3.006091392
[5,] -2.053219953 -1.710755745
[6,] 3.812754832 -2.053219953
[7,] -1.793167608 3.812754832
[8,] -2.053651079 -1.793167608
[9,] 2.305839881 -2.053651079
[10,] 0.650957477 2.305839881
[11,] -0.267633688 0.650957477
[12,] 0.446408776 -0.267633688
[13,] 0.553566550 0.446408776
[14,] -0.548873549 0.553566550
[15,] -0.189143680 -0.548873549
[16,] 0.240600838 -0.189143680
[17,] 3.663091150 0.240600838
[18,] 2.442529018 3.663091150
[19,] 0.664331495 2.442529018
[20,] 0.625961908 0.664331495
[21,] 1.091160541 0.625961908
[22,] 2.466465100 1.091160541
[23,] 1.143170018 2.466465100
[24,] 2.036765503 1.143170018
[25,] -0.040427151 2.036765503
[26,] 0.827110850 -0.040427151
[27,] -1.240831356 0.827110850
[28,] 0.332602856 -1.240831356
[29,] -0.158675199 0.332602856
[30,] -0.760408235 -0.158675199
[31,] -0.421367152 -0.760408235
[32,] -1.250930869 -0.421367152
[33,] 0.350903651 -1.250930869
[34,] -1.833455093 0.350903651
[35,] -6.105585249 -1.833455093
[36,] -1.188928562 -6.105585249
[37,] -1.942535315 -1.188928562
[38,] 1.569755561 -1.942535315
[39,] 1.235559527 1.569755561
[40,] 0.796593161 1.235559527
[41,] -1.761474627 0.796593161
[42,] 2.052501210 -1.761474627
[43,] -0.371337731 2.052501210
[44,] -1.039956983 -0.371337731
[45,] -4.784677767 -1.039956983
[46,] -2.548828314 -4.784677767
[47,] -0.133641700 -2.548828314
[48,] 0.568822676 -0.133641700
[49,] -2.179873117 0.568822676
[50,] -0.675331223 -2.179873117
[51,] -0.312345520 -0.675331223
[52,] -2.917282722 -0.312345520
[53,] 0.645569852 -2.917282722
[54,] -2.567762481 0.645569852
[55,] 1.350901644 -2.567762481
[56,] -0.052261390 1.350901644
[57,] 0.934047466 -0.052261390
[58,] -0.325009522 0.934047466
[59,] 1.840983806 -0.325009522
[60,] 0.508877626 1.840983806
[61,] 0.028903009 0.508877626
[62,] -0.485312328 0.028903009
[63,] -0.357452974 -0.485312328
[64,] 0.641173725 -0.357452974
[65,] 1.061568429 0.641173725
[66,] 1.908836106 1.061568429
[67,] 3.310293385 1.908836106
[68,] -3.852198916 3.310293385
[69,] 0.576033317 -3.852198916
[70,] -3.442888183 0.576033317
[71,] -0.326778734 -3.442888183
[72,] 1.425477280 -0.326778734
[73,] 0.874578103 1.425477280
[74,] 0.284471438 0.874578103
[75,] 3.072451330 0.284471438
[76,] -0.329283055 3.072451330
[77,] 1.544609465 -0.329283055
[78,] -1.873562327 1.544609465
[79,] 0.110575645 -1.873562327
[80,] 0.394743986 0.110575645
[81,] 3.297214289 0.394743986
[82,] 0.339276565 3.297214289
[83,] -0.989140778 0.339276565
[84,] 0.246483031 -0.989140778
[85,] 1.710748258 0.246483031
[86,] -0.260188743 1.710748258
[87,] 0.671276260 -0.260188743
[88,] 1.429696540 0.671276260
[89,] 0.699360906 1.429696540
[90,] -1.522955765 0.699360906
[91,] 0.080430029 -1.522955765
[92,] 0.465532017 0.080430029
[93,] -0.312233268 0.465532017
[94,] -2.205146956 -0.312233268
[95,] 0.778698363 -2.205146956
[96,] 0.148310915 0.778698363
[97,] 1.801926274 0.148310915
[98,] -0.141069508 1.801926274
[99,] -0.372941862 -0.141069508
[100,] -1.313064545 -0.372941862
[101,] 1.162253647 -1.313064545
[102,] 2.591038401 1.162253647
[103,] 0.445701337 2.591038401
[104,] 1.352019153 0.445701337
[105,] -2.398868142 1.352019153
[106,] 0.970515618 -2.398868142
[107,] 0.065667583 0.970515618
[108,] 1.616303523 0.065667583
[109,] -0.156096233 1.616303523
[110,] 1.124699844 -0.156096233
[111,] 0.266134000 1.124699844
[112,] 2.551296814 0.266134000
[113,] -1.785076341 2.551296814
[114,] -2.717160851 -1.785076341
[115,] 1.560007414 -2.717160851
[116,] -1.336855954 1.560007414
[117,] 1.117720780 -1.336855954
[118,] -1.778057266 1.117720780
[119,] 0.424512382 -1.778057266
[120,] -1.141413225 0.424512382
[121,] 0.514655628 -1.141413225
[122,] -2.860332062 0.514655628
[123,] -0.887208500 -2.860332062
[124,] -0.822564193 -0.887208500
[125,] -0.671212163 -0.822564193
[126,] -0.291206156 -0.671212163
[127,] 0.910062742 -0.291206156
[128,] 1.287737240 0.910062742
[129,] -2.827461801 1.287737240
[130,] 1.934107347 -2.827461801
[131,] -3.291461901 1.934107347
[132,] 2.006300767 -3.291461901
[133,] -1.821432809 2.006300767
[134,] -1.536065006 -1.821432809
[135,] 0.009476970 -1.536065006
[136,] 0.814031817 0.009476970
[137,] 0.686502377 0.814031817
[138,] -2.083879264 0.686502377
[139,] -1.239333746 -2.083879264
[140,] -5.305715501 -1.239333746
[141,] 3.034387096 -5.305715501
[142,] 1.700024859 3.034387096
[143,] 0.526091642 1.700024859
[144,] 1.297172031 0.526091642
[145,] -4.057113598 1.297172031
[146,] 2.226043860 -4.057113598
[147,] -2.050790745 2.226043860
[148,] 0.954271142 -2.050790745
[149,] 0.009852924 0.954271142
[150,] -3.076154769 0.009852924
[151,] -1.337154018 -3.076154769
[152,] 1.976887938 -1.337154018
[153,] 4.022998356 1.976887938
[154,] 1.567506018 4.022998356
[155,] -2.462668735 1.567506018
[156,] 0.277846457 -2.462668735
[157,] 1.403792834 0.277846457
[158,] 1.287737240 1.403792834
[159,] 1.014888041 1.287737240
[160,] -0.547300856 1.014888041
[161,] 0.462387875 -0.547300856
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.140042676 -3.230182647
2 2.627172950 -0.140042676
3 3.006091392 2.627172950
4 -1.710755745 3.006091392
5 -2.053219953 -1.710755745
6 3.812754832 -2.053219953
7 -1.793167608 3.812754832
8 -2.053651079 -1.793167608
9 2.305839881 -2.053651079
10 0.650957477 2.305839881
11 -0.267633688 0.650957477
12 0.446408776 -0.267633688
13 0.553566550 0.446408776
14 -0.548873549 0.553566550
15 -0.189143680 -0.548873549
16 0.240600838 -0.189143680
17 3.663091150 0.240600838
18 2.442529018 3.663091150
19 0.664331495 2.442529018
20 0.625961908 0.664331495
21 1.091160541 0.625961908
22 2.466465100 1.091160541
23 1.143170018 2.466465100
24 2.036765503 1.143170018
25 -0.040427151 2.036765503
26 0.827110850 -0.040427151
27 -1.240831356 0.827110850
28 0.332602856 -1.240831356
29 -0.158675199 0.332602856
30 -0.760408235 -0.158675199
31 -0.421367152 -0.760408235
32 -1.250930869 -0.421367152
33 0.350903651 -1.250930869
34 -1.833455093 0.350903651
35 -6.105585249 -1.833455093
36 -1.188928562 -6.105585249
37 -1.942535315 -1.188928562
38 1.569755561 -1.942535315
39 1.235559527 1.569755561
40 0.796593161 1.235559527
41 -1.761474627 0.796593161
42 2.052501210 -1.761474627
43 -0.371337731 2.052501210
44 -1.039956983 -0.371337731
45 -4.784677767 -1.039956983
46 -2.548828314 -4.784677767
47 -0.133641700 -2.548828314
48 0.568822676 -0.133641700
49 -2.179873117 0.568822676
50 -0.675331223 -2.179873117
51 -0.312345520 -0.675331223
52 -2.917282722 -0.312345520
53 0.645569852 -2.917282722
54 -2.567762481 0.645569852
55 1.350901644 -2.567762481
56 -0.052261390 1.350901644
57 0.934047466 -0.052261390
58 -0.325009522 0.934047466
59 1.840983806 -0.325009522
60 0.508877626 1.840983806
61 0.028903009 0.508877626
62 -0.485312328 0.028903009
63 -0.357452974 -0.485312328
64 0.641173725 -0.357452974
65 1.061568429 0.641173725
66 1.908836106 1.061568429
67 3.310293385 1.908836106
68 -3.852198916 3.310293385
69 0.576033317 -3.852198916
70 -3.442888183 0.576033317
71 -0.326778734 -3.442888183
72 1.425477280 -0.326778734
73 0.874578103 1.425477280
74 0.284471438 0.874578103
75 3.072451330 0.284471438
76 -0.329283055 3.072451330
77 1.544609465 -0.329283055
78 -1.873562327 1.544609465
79 0.110575645 -1.873562327
80 0.394743986 0.110575645
81 3.297214289 0.394743986
82 0.339276565 3.297214289
83 -0.989140778 0.339276565
84 0.246483031 -0.989140778
85 1.710748258 0.246483031
86 -0.260188743 1.710748258
87 0.671276260 -0.260188743
88 1.429696540 0.671276260
89 0.699360906 1.429696540
90 -1.522955765 0.699360906
91 0.080430029 -1.522955765
92 0.465532017 0.080430029
93 -0.312233268 0.465532017
94 -2.205146956 -0.312233268
95 0.778698363 -2.205146956
96 0.148310915 0.778698363
97 1.801926274 0.148310915
98 -0.141069508 1.801926274
99 -0.372941862 -0.141069508
100 -1.313064545 -0.372941862
101 1.162253647 -1.313064545
102 2.591038401 1.162253647
103 0.445701337 2.591038401
104 1.352019153 0.445701337
105 -2.398868142 1.352019153
106 0.970515618 -2.398868142
107 0.065667583 0.970515618
108 1.616303523 0.065667583
109 -0.156096233 1.616303523
110 1.124699844 -0.156096233
111 0.266134000 1.124699844
112 2.551296814 0.266134000
113 -1.785076341 2.551296814
114 -2.717160851 -1.785076341
115 1.560007414 -2.717160851
116 -1.336855954 1.560007414
117 1.117720780 -1.336855954
118 -1.778057266 1.117720780
119 0.424512382 -1.778057266
120 -1.141413225 0.424512382
121 0.514655628 -1.141413225
122 -2.860332062 0.514655628
123 -0.887208500 -2.860332062
124 -0.822564193 -0.887208500
125 -0.671212163 -0.822564193
126 -0.291206156 -0.671212163
127 0.910062742 -0.291206156
128 1.287737240 0.910062742
129 -2.827461801 1.287737240
130 1.934107347 -2.827461801
131 -3.291461901 1.934107347
132 2.006300767 -3.291461901
133 -1.821432809 2.006300767
134 -1.536065006 -1.821432809
135 0.009476970 -1.536065006
136 0.814031817 0.009476970
137 0.686502377 0.814031817
138 -2.083879264 0.686502377
139 -1.239333746 -2.083879264
140 -5.305715501 -1.239333746
141 3.034387096 -5.305715501
142 1.700024859 3.034387096
143 0.526091642 1.700024859
144 1.297172031 0.526091642
145 -4.057113598 1.297172031
146 2.226043860 -4.057113598
147 -2.050790745 2.226043860
148 0.954271142 -2.050790745
149 0.009852924 0.954271142
150 -3.076154769 0.009852924
151 -1.337154018 -3.076154769
152 1.976887938 -1.337154018
153 4.022998356 1.976887938
154 1.567506018 4.022998356
155 -2.462668735 1.567506018
156 0.277846457 -2.462668735
157 1.403792834 0.277846457
158 1.287737240 1.403792834
159 1.014888041 1.287737240
160 -0.547300856 1.014888041
161 0.462387875 -0.547300856
> 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/7s07m1352122832.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/88llx1352122832.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/9xeab1352122832.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/10k9xx1352122832.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/115e0e1352122832.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/12benx1352122832.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/13maqv1352122832.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/14yqxc1352122832.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/15o3v61352122832.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/16c89h1352122832.tab")
+ }
>
> try(system("convert tmp/1d9xt1352122832.ps tmp/1d9xt1352122832.png",intern=TRUE))
character(0)
> try(system("convert tmp/2p0721352122832.ps tmp/2p0721352122832.png",intern=TRUE))
character(0)
> try(system("convert tmp/3tjqt1352122832.ps tmp/3tjqt1352122832.png",intern=TRUE))
character(0)
> try(system("convert tmp/4igd31352122832.ps tmp/4igd31352122832.png",intern=TRUE))
character(0)
> try(system("convert tmp/5p4bv1352122832.ps tmp/5p4bv1352122832.png",intern=TRUE))
character(0)
> try(system("convert tmp/63q671352122832.ps tmp/63q671352122832.png",intern=TRUE))
character(0)
> try(system("convert tmp/7s07m1352122832.ps tmp/7s07m1352122832.png",intern=TRUE))
character(0)
> try(system("convert tmp/88llx1352122832.ps tmp/88llx1352122832.png",intern=TRUE))
character(0)
> try(system("convert tmp/9xeab1352122832.ps tmp/9xeab1352122832.png",intern=TRUE))
character(0)
> try(system("convert tmp/10k9xx1352122832.ps tmp/10k9xx1352122832.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
8.816 1.299 10.105