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
+ ,10
+ ,36
+ ,36
+ ,13
+ ,12
+ ,11
+ ,13
+ ,60
+ ,38
+ ,10
+ ,32
+ ,31
+ ,16
+ ,12
+ ,12
+ ,11
+ ,75
+ ,46
+ ,10
+ ,35
+ ,32
+ ,13
+ ,9
+ ,9
+ ,19
+ ,73
+ ,46
+ ,10
+ ,38
+ ,39
+ ,10
+ ,7
+ ,16
+ ,12
+ ,85
+ ,53
+ ,10
+ ,42
+ ,37
+ ,15
+ ,13
+ ,13
+ ,17
+ ,79
+ ,47
+ ,10
+ ,34
+ ,38
+ ,16
+ ,9
+ ,16
+ ,9
+ ,71
+ ,41
+ ,10
+ ,35
+ ,39
+ ,16
+ ,6
+ ,12
+ ,12
+ ,72
+ ,44
+ ,9
+ ,35
+ ,34
+ ,14
+ ,8
+ ,9
+ ,19
+ ,69
+ ,43
+ ,10
+ ,33
+ ,31
+ ,10
+ ,8
+ ,13
+ ,18
+ ,78
+ ,51
+ ,10
+ ,36
+ ,32
+ ,17
+ ,15
+ ,13
+ ,15
+ ,54
+ ,33
+ ,10
+ ,32
+ ,37
+ ,13
+ ,6
+ ,14
+ ,14
+ ,69
+ ,43
+ ,10
+ ,33
+ ,36
+ ,15
+ ,9
+ ,19
+ ,11
+ ,81
+ ,53
+ ,10
+ ,34
+ ,32
+ ,16
+ ,11
+ ,13
+ ,9
+ ,84
+ ,51
+ ,10
+ ,32
+ ,35
+ ,12
+ ,8
+ ,12
+ ,18
+ ,84
+ ,50
+ ,10
+ ,34
+ ,36
+ ,13
+ ,8
+ ,13
+ ,16
+ ,69
+ ,46)
+ ,dim=c(9
+ ,162)
+ ,dimnames=list(c('Month'
+ ,'Connected'
+ ,'Separate'
+ ,'Learning'
+ ,'Software'
+ ,'Happines'
+ ,'Depression'
+ ,'Belonging'
+ ,'Belonging_Final')
+ ,1:162))
> y <- array(NA,dim=c(9,162),dimnames=list(c('Month','Connected','Separate','Learning','Software','Happines','Depression','Belonging','Belonging_Final'),1:162))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '5'
> par3 <- 'No Linear Trend'
> par2 <- 'Do not include Seasonal Dummies'
> par1 <- '5'
> #'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
Software Month Connected Separate Learning Happines Depression Belonging
1 12 9 41 38 13 14 12 53
2 11 9 39 32 16 18 11 86
3 15 9 30 35 19 11 14 66
4 6 9 31 33 15 12 12 67
5 13 9 34 37 14 16 21 76
6 10 9 35 29 13 18 12 78
7 12 9 39 31 19 14 22 53
8 14 9 34 36 15 14 11 80
9 12 9 36 35 14 15 10 74
10 6 9 37 38 15 15 13 76
11 10 9 38 31 16 17 10 79
12 12 9 36 34 16 19 8 54
13 12 9 38 35 16 10 15 67
14 11 9 39 38 16 16 14 54
15 15 9 33 37 17 18 10 87
16 12 9 32 33 15 14 14 58
17 10 9 36 32 15 14 14 75
18 12 9 38 38 20 17 11 88
19 11 9 39 38 18 14 10 64
20 12 9 32 32 16 16 13 57
21 11 9 32 33 16 18 7 66
22 12 9 31 31 16 11 14 68
23 13 9 39 38 19 14 12 54
24 11 9 37 39 16 12 14 56
25 9 9 39 32 17 17 11 86
26 13 9 41 32 17 9 9 80
27 10 9 36 35 16 16 11 76
28 14 9 33 37 15 14 15 69
29 12 9 33 33 16 15 14 78
30 10 9 34 33 14 11 13 67
31 12 9 31 28 15 16 9 80
32 8 9 27 32 12 13 15 54
33 10 9 37 31 14 17 10 71
34 12 9 34 37 16 15 11 84
35 12 9 34 30 14 14 13 74
36 7 9 32 33 7 16 8 71
37 6 9 29 31 10 9 20 63
38 12 9 36 33 14 15 12 71
39 10 9 29 31 16 17 10 76
40 10 9 35 33 16 13 10 69
41 10 9 37 32 16 15 9 74
42 12 9 34 33 14 16 14 75
43 15 9 38 32 20 16 8 54
44 10 9 35 33 14 12 14 52
45 10 9 38 28 14 12 11 69
46 12 9 37 35 11 11 13 68
47 13 9 38 39 14 15 9 65
48 11 9 33 34 15 15 11 75
49 11 9 36 38 16 17 15 74
50 12 9 38 32 14 13 11 75
51 14 9 32 38 16 16 10 72
52 10 9 32 30 14 14 14 67
53 12 9 32 33 12 11 18 63
54 13 9 34 38 16 12 14 62
55 5 9 32 32 9 12 11 63
56 6 9 37 32 14 15 12 76
57 12 9 39 34 16 16 13 74
58 12 9 29 34 16 15 9 67
59 11 9 37 36 15 12 10 73
60 10 9 35 34 16 12 15 70
61 7 9 30 28 12 8 20 53
62 12 9 38 34 16 13 12 77
63 14 9 34 35 16 11 12 77
64 11 9 31 35 14 14 14 52
65 12 9 34 31 16 15 13 54
66 13 10 35 37 17 10 11 80
67 14 10 36 35 18 11 17 66
68 11 10 30 27 18 12 12 73
69 12 10 39 40 12 15 13 63
70 12 10 35 37 16 15 14 69
71 8 10 38 36 10 14 13 67
72 11 10 31 38 14 16 15 54
73 14 10 34 39 18 15 13 81
74 14 10 38 41 18 15 10 69
75 12 10 34 27 16 13 11 84
76 9 10 39 30 17 12 19 80
77 13 10 37 37 16 17 13 70
78 11 10 34 31 16 13 17 69
79 12 10 28 31 13 15 13 77
80 12 10 37 27 16 13 9 54
81 12 10 33 36 16 15 11 79
82 12 10 37 38 20 16 10 30
83 12 10 35 37 16 15 9 71
84 12 10 37 33 15 16 12 73
85 11 10 32 34 15 15 12 72
86 10 10 33 31 16 14 13 77
87 9 10 38 39 14 15 13 75
88 12 10 33 34 16 14 12 69
89 12 10 29 32 16 13 15 54
90 12 10 33 33 15 7 22 70
91 9 10 31 36 12 17 13 73
92 15 10 36 32 17 13 15 54
93 12 10 35 41 16 15 13 77
94 12 10 32 28 15 14 15 82
95 12 10 29 30 13 13 10 80
96 10 10 39 36 16 16 11 80
97 13 10 37 35 16 12 16 69
98 9 10 35 31 16 14 11 78
99 12 10 37 34 16 17 11 81
100 10 10 32 36 14 15 10 76
101 14 10 38 36 16 17 10 76
102 11 10 37 35 16 12 16 73
103 15 10 36 37 20 16 12 85
104 11 10 32 28 15 11 11 66
105 11 10 33 39 16 15 16 79
106 12 10 40 32 13 9 19 68
107 12 10 38 35 17 16 11 76
108 12 10 41 39 16 15 16 71
109 11 10 36 35 16 10 15 54
110 7 10 43 42 12 10 24 46
111 12 10 30 34 16 15 14 82
112 14 10 31 33 16 11 15 74
113 11 10 32 41 17 13 11 88
114 11 10 32 33 13 14 15 38
115 10 10 37 34 12 18 12 76
116 13 10 37 32 18 16 10 86
117 13 10 33 40 14 14 14 54
118 8 10 34 40 14 14 13 70
119 11 10 33 35 13 14 9 69
120 12 10 38 36 16 14 15 90
121 11 10 33 37 13 12 15 54
122 13 10 31 27 16 14 14 76
123 12 10 38 39 13 15 11 89
124 14 10 37 38 16 15 8 76
125 13 10 33 31 15 15 11 73
126 15 10 31 33 16 13 11 79
127 10 10 39 32 15 17 8 90
128 11 10 44 39 17 17 10 74
129 9 10 33 36 15 19 11 81
130 11 10 35 33 12 15 13 72
131 10 10 32 33 16 13 11 71
132 11 10 28 32 10 9 20 66
133 8 10 40 37 16 15 10 77
134 11 10 27 30 12 15 15 65
135 12 10 37 38 14 15 12 74
136 12 10 32 29 15 16 14 82
137 9 10 28 22 13 11 23 54
138 11 10 34 35 15 14 14 63
139 10 10 30 35 11 11 16 54
140 8 10 35 34 12 15 11 64
141 9 10 31 35 8 13 12 69
142 8 10 32 34 16 15 10 54
143 9 10 30 34 15 16 14 84
144 15 10 30 35 17 14 12 86
145 11 10 31 23 16 15 12 77
146 8 10 40 31 10 16 11 89
147 13 10 32 27 18 16 12 76
148 12 10 36 36 13 11 13 60
149 12 10 32 31 16 12 11 75
150 9 10 35 32 13 9 19 73
151 7 10 38 39 10 16 12 85
152 13 10 42 37 15 13 17 79
153 9 10 34 38 16 16 9 71
154 6 10 35 39 16 12 12 72
155 8 9 35 34 14 9 19 69
156 8 10 33 31 10 13 18 78
157 15 10 36 32 17 13 15 54
158 6 10 32 37 13 14 14 69
159 9 10 33 36 15 19 11 81
160 11 10 34 32 16 13 9 84
161 8 10 32 35 12 12 18 84
162 8 10 34 36 13 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
3.2616667 0.1470831 -0.0453947 0.0306926
Learning Happines Depression Belonging
0.5291966 -0.0404783 -0.0263390 0.0001822
Belonging_Final
-0.0025054
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-5.909 -1.002 0.200 1.297 3.114
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.2616667 3.6490777 0.894 0.373
Month 0.1470831 0.3038037 0.484 0.629
Connected -0.0453947 0.0473507 -0.959 0.339
Separate 0.0306926 0.0446955 0.687 0.493
Learning 0.5291966 0.0673502 7.857 6.47e-13 ***
Happines -0.0404783 0.0756546 -0.535 0.593
Depression -0.0263390 0.0565845 -0.465 0.642
Belonging 0.0001822 0.0448182 0.004 0.997
Belonging_Final -0.0025054 0.0638914 -0.039 0.969
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.831 on 153 degrees of freedom
Multiple R-squared: 0.3056, Adjusted R-squared: 0.2693
F-statistic: 8.416 on 8 and 153 DF, p-value: 1.925e-09
> 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.99990601 0.0001879778 9.398888e-05
[2,] 0.99973823 0.0005235427 2.617714e-04
[3,] 0.99952320 0.0009535917 4.767958e-04
[4,] 0.99942580 0.0011483908 5.741954e-04
[5,] 0.99889263 0.0022147356 1.107368e-03
[6,] 0.99782419 0.0043516193 2.175810e-03
[7,] 0.99716647 0.0056670639 2.833532e-03
[8,] 0.99528349 0.0094330255 4.716513e-03
[9,] 0.99168920 0.0166216064 8.310803e-03
[10,] 0.98663330 0.0267333908 1.336670e-02
[11,] 0.98029847 0.0394030558 1.970153e-02
[12,] 0.96978631 0.0604273768 3.021369e-02
[13,] 0.95580106 0.0883978799 4.419894e-02
[14,] 0.95348154 0.0930369219 4.651846e-02
[15,] 0.95628559 0.0874288248 4.371441e-02
[16,] 0.95612525 0.0877495067 4.387475e-02
[17,] 0.96147133 0.0770573359 3.852867e-02
[18,] 0.94595903 0.1080819493 5.404097e-02
[19,] 0.92836941 0.1432611720 7.163059e-02
[20,] 0.91379709 0.1724058178 8.620291e-02
[21,] 0.92739646 0.1452070731 7.260354e-02
[22,] 0.90381612 0.1923677686 9.618388e-02
[23,] 0.87535098 0.2492980379 1.246490e-01
[24,] 0.86292154 0.2741569163 1.370785e-01
[25,] 0.82887095 0.3422580946 1.711290e-01
[26,] 0.86444569 0.2711086222 1.355543e-01
[27,] 0.85645172 0.2870965616 1.435483e-01
[28,] 0.84562200 0.3087560061 1.543780e-01
[29,] 0.82791446 0.3441710774 1.720855e-01
[30,] 0.80498077 0.3900384682 1.950192e-01
[31,] 0.78930871 0.4213825815 2.106913e-01
[32,] 0.78715706 0.4256858849 2.128429e-01
[33,] 0.74725831 0.5054833867 2.527417e-01
[34,] 0.70504738 0.5899052302 2.949526e-01
[35,] 0.76419555 0.4716089029 2.358045e-01
[36,] 0.77513226 0.4497354853 2.248677e-01
[37,] 0.73363777 0.5327244564 2.663622e-01
[38,] 0.69683221 0.6063355794 3.031678e-01
[39,] 0.68616757 0.6276648548 3.138324e-01
[40,] 0.69895658 0.6020868438 3.010434e-01
[41,] 0.65273507 0.6945298501 3.472649e-01
[42,] 0.69099535 0.6180092920 3.090046e-01
[43,] 0.66867889 0.6626422211 3.313211e-01
[44,] 0.73723146 0.5255370830 2.627685e-01
[45,] 0.86546405 0.2690719007 1.345360e-01
[46,] 0.84269995 0.3146001089 1.573001e-01
[47,] 0.81249018 0.3750196456 1.875098e-01
[48,] 0.77811160 0.4437768071 2.218884e-01
[49,] 0.76067641 0.4786471734 2.393236e-01
[50,] 0.77208397 0.4558320636 2.279160e-01
[51,] 0.73692275 0.5261545031 2.630773e-01
[52,] 0.75666808 0.4866638400 2.433319e-01
[53,] 0.72405443 0.5518911423 2.759456e-01
[54,] 0.71471785 0.5705643043 2.852822e-01
[55,] 0.67395468 0.6520906414 3.260453e-01
[56,] 0.64450486 0.7109902782 3.554951e-01
[57,] 0.63782327 0.7243534569 3.621767e-01
[58,] 0.64533939 0.7093212271 3.546606e-01
[59,] 0.60634679 0.7873064193 3.936532e-01
[60,] 0.57142942 0.8571411647 4.285706e-01
[61,] 0.53095573 0.9380885450 4.690443e-01
[62,] 0.49968932 0.9993786340 5.003107e-01
[63,] 0.47466917 0.9493383392 5.253308e-01
[64,] 0.44135098 0.8827019691 5.586490e-01
[65,] 0.50729829 0.9854034166 4.927017e-01
[66,] 0.49430062 0.9886012457 5.056994e-01
[67,] 0.45169380 0.9033875916 5.483062e-01
[68,] 0.44924755 0.8984951003 5.507524e-01
[69,] 0.41469557 0.8293911353 5.853044e-01
[70,] 0.37338473 0.7467694578 6.266153e-01
[71,] 0.38100123 0.7620024590 6.189988e-01
[72,] 0.34555434 0.6911086803 6.544457e-01
[73,] 0.31297121 0.6259424174 6.870288e-01
[74,] 0.27495604 0.5499120706 7.250440e-01
[75,] 0.27160622 0.5432124472 7.283938e-01
[76,] 0.27599426 0.5519885106 7.240057e-01
[77,] 0.23839291 0.4767858264 7.616071e-01
[78,] 0.20407710 0.4081542068 7.959229e-01
[79,] 0.17742160 0.3548432037 8.225784e-01
[80,] 0.15573552 0.3114710340 8.442645e-01
[81,] 0.20745019 0.4149003743 7.925498e-01
[82,] 0.18094620 0.3618924039 8.190538e-01
[83,] 0.16051665 0.3210332915 8.394834e-01
[84,] 0.14957889 0.2991577826 8.504211e-01
[85,] 0.14481602 0.2896320411 8.551840e-01
[86,] 0.13172236 0.2634447276 8.682776e-01
[87,] 0.17334079 0.3466815772 8.266592e-01
[88,] 0.14528987 0.2905797423 8.547101e-01
[89,] 0.12562601 0.2512520120 8.743740e-01
[90,] 0.14696318 0.2939263501 8.530368e-01
[91,] 0.12477233 0.2495446503 8.752277e-01
[92,] 0.11761630 0.2352325986 8.823837e-01
[93,] 0.09802446 0.1960489269 9.019755e-01
[94,] 0.08247124 0.1649424795 9.175288e-01
[95,] 0.07860613 0.1572122506 9.213939e-01
[96,] 0.06284410 0.1256881985 9.371559e-01
[97,] 0.05402348 0.1080469547 9.459765e-01
[98,] 0.04405612 0.0881122491 9.559439e-01
[99,] 0.04857702 0.0971540408 9.514230e-01
[100,] 0.03782052 0.0756410391 9.621795e-01
[101,] 0.03876032 0.0775206420 9.612397e-01
[102,] 0.03529450 0.0705890008 9.647055e-01
[103,] 0.02772946 0.0554589228 9.722705e-01
[104,] 0.02201450 0.0440290082 9.779855e-01
[105,] 0.01660293 0.0332058566 9.833971e-01
[106,] 0.02496523 0.0499304627 9.750348e-01
[107,] 0.02959290 0.0591857977 9.704071e-01
[108,] 0.02283362 0.0456672457 9.771664e-01
[109,] 0.01704158 0.0340831628 9.829584e-01
[110,] 0.01371652 0.0274330443 9.862835e-01
[111,] 0.01105649 0.0221129837 9.889435e-01
[112,] 0.01256406 0.0251281156 9.874359e-01
[113,] 0.01939785 0.0387956941 9.806022e-01
[114,] 0.02027556 0.0405511155 9.797244e-01
[115,] 0.04599622 0.0919924465 9.540038e-01
[116,] 0.03510691 0.0702138286 9.648931e-01
[117,] 0.02683699 0.0536739840 9.731630e-01
[118,] 0.02267838 0.0453567627 9.773216e-01
[119,] 0.02151408 0.0430281684 9.784859e-01
[120,] 0.01756221 0.0351244177 9.824378e-01
[121,] 0.01795157 0.0359031399 9.820484e-01
[122,] 0.02886021 0.0577204145 9.711398e-01
[123,] 0.03394528 0.0678905533 9.660547e-01
[124,] 0.03696445 0.0739288984 9.630356e-01
[125,] 0.03044086 0.0608817277 9.695591e-01
[126,] 0.02940520 0.0588103952 9.705948e-01
[127,] 0.02108633 0.0421726550 9.789137e-01
[128,] 0.01900062 0.0380012307 9.809994e-01
[129,] 0.01308492 0.0261698331 9.869151e-01
[130,] 0.04639358 0.0927871647 9.536064e-01
[131,] 0.04696750 0.0939350040 9.530325e-01
[132,] 0.03295152 0.0659030419 9.670485e-01
[133,] 0.32517993 0.6503598546 6.748201e-01
[134,] 0.34184115 0.6836822959 6.581589e-01
[135,] 0.59693602 0.8061279515 4.030640e-01
[136,] 0.58512570 0.8297486068 4.148743e-01
[137,] 0.86883670 0.2623266013 1.311633e-01
[138,] 0.86802391 0.2639521797 1.319761e-01
[139,] 0.77089107 0.4582178666 2.291089e-01
> postscript(file="/var/wessaorg/rcomp/tmp/1x6ex1356110838.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/2apav1356110838.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/3u5mb1356110838.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/4ps111356110838.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/5up6d1356110838.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
2.18317073 -0.13388953 1.55465513 -5.23666562 2.71579574 0.38197476
7 8 9 10 11 12
-0.59203333 2.87973245 1.53562222 -4.95659430 -1.21914410 0.59073673
13 14 15 16 17 18
0.49108098 -0.35925077 2.88957219 0.93147678 -0.83680118 -1.51355312
19 20 21 22 23 24
-1.58573580 0.48777267 -0.60911028 0.31505657 -0.08047535 -0.63298897
25 26 27 28 29 30
-2.70105911 1.00179200 -1.46132900 2.89847863 0.50705715 -0.57790808
31 32 33 34 35 36
1.01736805 -1.69814071 -0.21972005 0.37211959 1.62931839 0.10564690
37 38 39 40 41 42
-2.54010230 1.64522133 -1.63466578 -1.59434223 -1.41163751 1.64936475
43 44 45 46 47 48
1.50468976 -0.49553279 -0.26044112 3.07427686 2.47393139 -0.07040370
49 50 51 52 53 54
-0.40971352 1.66368955 2.24190972 -0.43886718 2.50458192 1.28297479
55 56 57 58 59 60
-3.02353549 -4.26958092 0.76360090 0.15757918 -0.10513592 -1.53149508
61 62 63 64 65 66
-2.51220608 0.56988554 2.27665751 0.34245989 0.56180682 0.52704480
67 68 69 70 71 72
1.28815376 -1.83367099 2.49313709 0.32211682 -0.39726869 0.21524093
73 74 75 76 77 78
1.14345024 1.16677036 0.44098445 -2.78485955 1.46984704 -0.53605106
79 80 81 82 83 84
1.76082984 0.48736566 0.19120240 -1.89757037 0.19757362 1.05445016
85 86 87 88 89 90
-0.24100660 -1.64026500 -1.56460724 0.23024900 0.12877899 0.77250296
91 92 93 94 95 96
-0.64807237 2.91734514 0.18157110 0.98988705 1.67639683 -1.49362798
97 98 99 100 101 102
1.40803980 -2.60484123 0.51976939 -0.82159129 2.47083480 -0.58767832
103 104 105 106 107 108
1.26066358 -0.24902062 -0.76667513 2.17664505 -0.03679778 0.58791860
109 110 111 112 113 114
-0.76697108 -2.31627751 0.20239005 2.13183386 -1.59690019 0.81013563
115 116 117 118 119 120
0.70177905 0.46755986 2.13734941 -2.81895119 0.70812936 0.50359750
121 122 123 124 125 126
0.70400623 1.41573193 1.93190879 2.23543103 1.87245013 3.11403962
127 128 129 130 131 132
-0.86197859 -0.88021253 -2.10051429 1.53979901 -1.85163484 2.24369681
133 134 135 136 137 138
-3.54770195 1.31265137 1.39703933 1.02633909 -0.89234433 -0.17208094
139 140 141 142 143 144
0.67847216 -1.55213534 1.29935645 -3.84716046 -2.22328863 2.55863715
145 146 147 148 149 150
-0.47387946 -0.10118720 0.43351741 1.78916021 0.17856473 -1.03871254
151 152 153 154 155 156
-1.41546043 2.17784125 -2.84805694 -5.90891729 -2.48899861 -0.36402916
157 158 159 160 161 162
2.91734514 -4.26445024 -2.10051429 -0.76265123 -1.63466473 -2.12325242
> postscript(file="/var/wessaorg/rcomp/tmp/6qtg41356110838.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 2.18317073 NA
1 -0.13388953 2.18317073
2 1.55465513 -0.13388953
3 -5.23666562 1.55465513
4 2.71579574 -5.23666562
5 0.38197476 2.71579574
6 -0.59203333 0.38197476
7 2.87973245 -0.59203333
8 1.53562222 2.87973245
9 -4.95659430 1.53562222
10 -1.21914410 -4.95659430
11 0.59073673 -1.21914410
12 0.49108098 0.59073673
13 -0.35925077 0.49108098
14 2.88957219 -0.35925077
15 0.93147678 2.88957219
16 -0.83680118 0.93147678
17 -1.51355312 -0.83680118
18 -1.58573580 -1.51355312
19 0.48777267 -1.58573580
20 -0.60911028 0.48777267
21 0.31505657 -0.60911028
22 -0.08047535 0.31505657
23 -0.63298897 -0.08047535
24 -2.70105911 -0.63298897
25 1.00179200 -2.70105911
26 -1.46132900 1.00179200
27 2.89847863 -1.46132900
28 0.50705715 2.89847863
29 -0.57790808 0.50705715
30 1.01736805 -0.57790808
31 -1.69814071 1.01736805
32 -0.21972005 -1.69814071
33 0.37211959 -0.21972005
34 1.62931839 0.37211959
35 0.10564690 1.62931839
36 -2.54010230 0.10564690
37 1.64522133 -2.54010230
38 -1.63466578 1.64522133
39 -1.59434223 -1.63466578
40 -1.41163751 -1.59434223
41 1.64936475 -1.41163751
42 1.50468976 1.64936475
43 -0.49553279 1.50468976
44 -0.26044112 -0.49553279
45 3.07427686 -0.26044112
46 2.47393139 3.07427686
47 -0.07040370 2.47393139
48 -0.40971352 -0.07040370
49 1.66368955 -0.40971352
50 2.24190972 1.66368955
51 -0.43886718 2.24190972
52 2.50458192 -0.43886718
53 1.28297479 2.50458192
54 -3.02353549 1.28297479
55 -4.26958092 -3.02353549
56 0.76360090 -4.26958092
57 0.15757918 0.76360090
58 -0.10513592 0.15757918
59 -1.53149508 -0.10513592
60 -2.51220608 -1.53149508
61 0.56988554 -2.51220608
62 2.27665751 0.56988554
63 0.34245989 2.27665751
64 0.56180682 0.34245989
65 0.52704480 0.56180682
66 1.28815376 0.52704480
67 -1.83367099 1.28815376
68 2.49313709 -1.83367099
69 0.32211682 2.49313709
70 -0.39726869 0.32211682
71 0.21524093 -0.39726869
72 1.14345024 0.21524093
73 1.16677036 1.14345024
74 0.44098445 1.16677036
75 -2.78485955 0.44098445
76 1.46984704 -2.78485955
77 -0.53605106 1.46984704
78 1.76082984 -0.53605106
79 0.48736566 1.76082984
80 0.19120240 0.48736566
81 -1.89757037 0.19120240
82 0.19757362 -1.89757037
83 1.05445016 0.19757362
84 -0.24100660 1.05445016
85 -1.64026500 -0.24100660
86 -1.56460724 -1.64026500
87 0.23024900 -1.56460724
88 0.12877899 0.23024900
89 0.77250296 0.12877899
90 -0.64807237 0.77250296
91 2.91734514 -0.64807237
92 0.18157110 2.91734514
93 0.98988705 0.18157110
94 1.67639683 0.98988705
95 -1.49362798 1.67639683
96 1.40803980 -1.49362798
97 -2.60484123 1.40803980
98 0.51976939 -2.60484123
99 -0.82159129 0.51976939
100 2.47083480 -0.82159129
101 -0.58767832 2.47083480
102 1.26066358 -0.58767832
103 -0.24902062 1.26066358
104 -0.76667513 -0.24902062
105 2.17664505 -0.76667513
106 -0.03679778 2.17664505
107 0.58791860 -0.03679778
108 -0.76697108 0.58791860
109 -2.31627751 -0.76697108
110 0.20239005 -2.31627751
111 2.13183386 0.20239005
112 -1.59690019 2.13183386
113 0.81013563 -1.59690019
114 0.70177905 0.81013563
115 0.46755986 0.70177905
116 2.13734941 0.46755986
117 -2.81895119 2.13734941
118 0.70812936 -2.81895119
119 0.50359750 0.70812936
120 0.70400623 0.50359750
121 1.41573193 0.70400623
122 1.93190879 1.41573193
123 2.23543103 1.93190879
124 1.87245013 2.23543103
125 3.11403962 1.87245013
126 -0.86197859 3.11403962
127 -0.88021253 -0.86197859
128 -2.10051429 -0.88021253
129 1.53979901 -2.10051429
130 -1.85163484 1.53979901
131 2.24369681 -1.85163484
132 -3.54770195 2.24369681
133 1.31265137 -3.54770195
134 1.39703933 1.31265137
135 1.02633909 1.39703933
136 -0.89234433 1.02633909
137 -0.17208094 -0.89234433
138 0.67847216 -0.17208094
139 -1.55213534 0.67847216
140 1.29935645 -1.55213534
141 -3.84716046 1.29935645
142 -2.22328863 -3.84716046
143 2.55863715 -2.22328863
144 -0.47387946 2.55863715
145 -0.10118720 -0.47387946
146 0.43351741 -0.10118720
147 1.78916021 0.43351741
148 0.17856473 1.78916021
149 -1.03871254 0.17856473
150 -1.41546043 -1.03871254
151 2.17784125 -1.41546043
152 -2.84805694 2.17784125
153 -5.90891729 -2.84805694
154 -2.48899861 -5.90891729
155 -0.36402916 -2.48899861
156 2.91734514 -0.36402916
157 -4.26445024 2.91734514
158 -2.10051429 -4.26445024
159 -0.76265123 -2.10051429
160 -1.63466473 -0.76265123
161 -2.12325242 -1.63466473
162 NA -2.12325242
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.13388953 2.18317073
[2,] 1.55465513 -0.13388953
[3,] -5.23666562 1.55465513
[4,] 2.71579574 -5.23666562
[5,] 0.38197476 2.71579574
[6,] -0.59203333 0.38197476
[7,] 2.87973245 -0.59203333
[8,] 1.53562222 2.87973245
[9,] -4.95659430 1.53562222
[10,] -1.21914410 -4.95659430
[11,] 0.59073673 -1.21914410
[12,] 0.49108098 0.59073673
[13,] -0.35925077 0.49108098
[14,] 2.88957219 -0.35925077
[15,] 0.93147678 2.88957219
[16,] -0.83680118 0.93147678
[17,] -1.51355312 -0.83680118
[18,] -1.58573580 -1.51355312
[19,] 0.48777267 -1.58573580
[20,] -0.60911028 0.48777267
[21,] 0.31505657 -0.60911028
[22,] -0.08047535 0.31505657
[23,] -0.63298897 -0.08047535
[24,] -2.70105911 -0.63298897
[25,] 1.00179200 -2.70105911
[26,] -1.46132900 1.00179200
[27,] 2.89847863 -1.46132900
[28,] 0.50705715 2.89847863
[29,] -0.57790808 0.50705715
[30,] 1.01736805 -0.57790808
[31,] -1.69814071 1.01736805
[32,] -0.21972005 -1.69814071
[33,] 0.37211959 -0.21972005
[34,] 1.62931839 0.37211959
[35,] 0.10564690 1.62931839
[36,] -2.54010230 0.10564690
[37,] 1.64522133 -2.54010230
[38,] -1.63466578 1.64522133
[39,] -1.59434223 -1.63466578
[40,] -1.41163751 -1.59434223
[41,] 1.64936475 -1.41163751
[42,] 1.50468976 1.64936475
[43,] -0.49553279 1.50468976
[44,] -0.26044112 -0.49553279
[45,] 3.07427686 -0.26044112
[46,] 2.47393139 3.07427686
[47,] -0.07040370 2.47393139
[48,] -0.40971352 -0.07040370
[49,] 1.66368955 -0.40971352
[50,] 2.24190972 1.66368955
[51,] -0.43886718 2.24190972
[52,] 2.50458192 -0.43886718
[53,] 1.28297479 2.50458192
[54,] -3.02353549 1.28297479
[55,] -4.26958092 -3.02353549
[56,] 0.76360090 -4.26958092
[57,] 0.15757918 0.76360090
[58,] -0.10513592 0.15757918
[59,] -1.53149508 -0.10513592
[60,] -2.51220608 -1.53149508
[61,] 0.56988554 -2.51220608
[62,] 2.27665751 0.56988554
[63,] 0.34245989 2.27665751
[64,] 0.56180682 0.34245989
[65,] 0.52704480 0.56180682
[66,] 1.28815376 0.52704480
[67,] -1.83367099 1.28815376
[68,] 2.49313709 -1.83367099
[69,] 0.32211682 2.49313709
[70,] -0.39726869 0.32211682
[71,] 0.21524093 -0.39726869
[72,] 1.14345024 0.21524093
[73,] 1.16677036 1.14345024
[74,] 0.44098445 1.16677036
[75,] -2.78485955 0.44098445
[76,] 1.46984704 -2.78485955
[77,] -0.53605106 1.46984704
[78,] 1.76082984 -0.53605106
[79,] 0.48736566 1.76082984
[80,] 0.19120240 0.48736566
[81,] -1.89757037 0.19120240
[82,] 0.19757362 -1.89757037
[83,] 1.05445016 0.19757362
[84,] -0.24100660 1.05445016
[85,] -1.64026500 -0.24100660
[86,] -1.56460724 -1.64026500
[87,] 0.23024900 -1.56460724
[88,] 0.12877899 0.23024900
[89,] 0.77250296 0.12877899
[90,] -0.64807237 0.77250296
[91,] 2.91734514 -0.64807237
[92,] 0.18157110 2.91734514
[93,] 0.98988705 0.18157110
[94,] 1.67639683 0.98988705
[95,] -1.49362798 1.67639683
[96,] 1.40803980 -1.49362798
[97,] -2.60484123 1.40803980
[98,] 0.51976939 -2.60484123
[99,] -0.82159129 0.51976939
[100,] 2.47083480 -0.82159129
[101,] -0.58767832 2.47083480
[102,] 1.26066358 -0.58767832
[103,] -0.24902062 1.26066358
[104,] -0.76667513 -0.24902062
[105,] 2.17664505 -0.76667513
[106,] -0.03679778 2.17664505
[107,] 0.58791860 -0.03679778
[108,] -0.76697108 0.58791860
[109,] -2.31627751 -0.76697108
[110,] 0.20239005 -2.31627751
[111,] 2.13183386 0.20239005
[112,] -1.59690019 2.13183386
[113,] 0.81013563 -1.59690019
[114,] 0.70177905 0.81013563
[115,] 0.46755986 0.70177905
[116,] 2.13734941 0.46755986
[117,] -2.81895119 2.13734941
[118,] 0.70812936 -2.81895119
[119,] 0.50359750 0.70812936
[120,] 0.70400623 0.50359750
[121,] 1.41573193 0.70400623
[122,] 1.93190879 1.41573193
[123,] 2.23543103 1.93190879
[124,] 1.87245013 2.23543103
[125,] 3.11403962 1.87245013
[126,] -0.86197859 3.11403962
[127,] -0.88021253 -0.86197859
[128,] -2.10051429 -0.88021253
[129,] 1.53979901 -2.10051429
[130,] -1.85163484 1.53979901
[131,] 2.24369681 -1.85163484
[132,] -3.54770195 2.24369681
[133,] 1.31265137 -3.54770195
[134,] 1.39703933 1.31265137
[135,] 1.02633909 1.39703933
[136,] -0.89234433 1.02633909
[137,] -0.17208094 -0.89234433
[138,] 0.67847216 -0.17208094
[139,] -1.55213534 0.67847216
[140,] 1.29935645 -1.55213534
[141,] -3.84716046 1.29935645
[142,] -2.22328863 -3.84716046
[143,] 2.55863715 -2.22328863
[144,] -0.47387946 2.55863715
[145,] -0.10118720 -0.47387946
[146,] 0.43351741 -0.10118720
[147,] 1.78916021 0.43351741
[148,] 0.17856473 1.78916021
[149,] -1.03871254 0.17856473
[150,] -1.41546043 -1.03871254
[151,] 2.17784125 -1.41546043
[152,] -2.84805694 2.17784125
[153,] -5.90891729 -2.84805694
[154,] -2.48899861 -5.90891729
[155,] -0.36402916 -2.48899861
[156,] 2.91734514 -0.36402916
[157,] -4.26445024 2.91734514
[158,] -2.10051429 -4.26445024
[159,] -0.76265123 -2.10051429
[160,] -1.63466473 -0.76265123
[161,] -2.12325242 -1.63466473
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.13388953 2.18317073
2 1.55465513 -0.13388953
3 -5.23666562 1.55465513
4 2.71579574 -5.23666562
5 0.38197476 2.71579574
6 -0.59203333 0.38197476
7 2.87973245 -0.59203333
8 1.53562222 2.87973245
9 -4.95659430 1.53562222
10 -1.21914410 -4.95659430
11 0.59073673 -1.21914410
12 0.49108098 0.59073673
13 -0.35925077 0.49108098
14 2.88957219 -0.35925077
15 0.93147678 2.88957219
16 -0.83680118 0.93147678
17 -1.51355312 -0.83680118
18 -1.58573580 -1.51355312
19 0.48777267 -1.58573580
20 -0.60911028 0.48777267
21 0.31505657 -0.60911028
22 -0.08047535 0.31505657
23 -0.63298897 -0.08047535
24 -2.70105911 -0.63298897
25 1.00179200 -2.70105911
26 -1.46132900 1.00179200
27 2.89847863 -1.46132900
28 0.50705715 2.89847863
29 -0.57790808 0.50705715
30 1.01736805 -0.57790808
31 -1.69814071 1.01736805
32 -0.21972005 -1.69814071
33 0.37211959 -0.21972005
34 1.62931839 0.37211959
35 0.10564690 1.62931839
36 -2.54010230 0.10564690
37 1.64522133 -2.54010230
38 -1.63466578 1.64522133
39 -1.59434223 -1.63466578
40 -1.41163751 -1.59434223
41 1.64936475 -1.41163751
42 1.50468976 1.64936475
43 -0.49553279 1.50468976
44 -0.26044112 -0.49553279
45 3.07427686 -0.26044112
46 2.47393139 3.07427686
47 -0.07040370 2.47393139
48 -0.40971352 -0.07040370
49 1.66368955 -0.40971352
50 2.24190972 1.66368955
51 -0.43886718 2.24190972
52 2.50458192 -0.43886718
53 1.28297479 2.50458192
54 -3.02353549 1.28297479
55 -4.26958092 -3.02353549
56 0.76360090 -4.26958092
57 0.15757918 0.76360090
58 -0.10513592 0.15757918
59 -1.53149508 -0.10513592
60 -2.51220608 -1.53149508
61 0.56988554 -2.51220608
62 2.27665751 0.56988554
63 0.34245989 2.27665751
64 0.56180682 0.34245989
65 0.52704480 0.56180682
66 1.28815376 0.52704480
67 -1.83367099 1.28815376
68 2.49313709 -1.83367099
69 0.32211682 2.49313709
70 -0.39726869 0.32211682
71 0.21524093 -0.39726869
72 1.14345024 0.21524093
73 1.16677036 1.14345024
74 0.44098445 1.16677036
75 -2.78485955 0.44098445
76 1.46984704 -2.78485955
77 -0.53605106 1.46984704
78 1.76082984 -0.53605106
79 0.48736566 1.76082984
80 0.19120240 0.48736566
81 -1.89757037 0.19120240
82 0.19757362 -1.89757037
83 1.05445016 0.19757362
84 -0.24100660 1.05445016
85 -1.64026500 -0.24100660
86 -1.56460724 -1.64026500
87 0.23024900 -1.56460724
88 0.12877899 0.23024900
89 0.77250296 0.12877899
90 -0.64807237 0.77250296
91 2.91734514 -0.64807237
92 0.18157110 2.91734514
93 0.98988705 0.18157110
94 1.67639683 0.98988705
95 -1.49362798 1.67639683
96 1.40803980 -1.49362798
97 -2.60484123 1.40803980
98 0.51976939 -2.60484123
99 -0.82159129 0.51976939
100 2.47083480 -0.82159129
101 -0.58767832 2.47083480
102 1.26066358 -0.58767832
103 -0.24902062 1.26066358
104 -0.76667513 -0.24902062
105 2.17664505 -0.76667513
106 -0.03679778 2.17664505
107 0.58791860 -0.03679778
108 -0.76697108 0.58791860
109 -2.31627751 -0.76697108
110 0.20239005 -2.31627751
111 2.13183386 0.20239005
112 -1.59690019 2.13183386
113 0.81013563 -1.59690019
114 0.70177905 0.81013563
115 0.46755986 0.70177905
116 2.13734941 0.46755986
117 -2.81895119 2.13734941
118 0.70812936 -2.81895119
119 0.50359750 0.70812936
120 0.70400623 0.50359750
121 1.41573193 0.70400623
122 1.93190879 1.41573193
123 2.23543103 1.93190879
124 1.87245013 2.23543103
125 3.11403962 1.87245013
126 -0.86197859 3.11403962
127 -0.88021253 -0.86197859
128 -2.10051429 -0.88021253
129 1.53979901 -2.10051429
130 -1.85163484 1.53979901
131 2.24369681 -1.85163484
132 -3.54770195 2.24369681
133 1.31265137 -3.54770195
134 1.39703933 1.31265137
135 1.02633909 1.39703933
136 -0.89234433 1.02633909
137 -0.17208094 -0.89234433
138 0.67847216 -0.17208094
139 -1.55213534 0.67847216
140 1.29935645 -1.55213534
141 -3.84716046 1.29935645
142 -2.22328863 -3.84716046
143 2.55863715 -2.22328863
144 -0.47387946 2.55863715
145 -0.10118720 -0.47387946
146 0.43351741 -0.10118720
147 1.78916021 0.43351741
148 0.17856473 1.78916021
149 -1.03871254 0.17856473
150 -1.41546043 -1.03871254
151 2.17784125 -1.41546043
152 -2.84805694 2.17784125
153 -5.90891729 -2.84805694
154 -2.48899861 -5.90891729
155 -0.36402916 -2.48899861
156 2.91734514 -0.36402916
157 -4.26445024 2.91734514
158 -2.10051429 -4.26445024
159 -0.76265123 -2.10051429
160 -1.63466473 -0.76265123
161 -2.12325242 -1.63466473
> 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/7h4jr1356110838.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/8y0de1356110838.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/9cksj1356110838.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/10edyu1356110838.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/11gzxu1356110838.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/12c3al1356110838.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/13k4ap1356110838.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/14lqok1356110838.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/15lbpd1356110838.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/160p201356110838.tab")
+ }
>
> try(system("convert tmp/1x6ex1356110838.ps tmp/1x6ex1356110838.png",intern=TRUE))
character(0)
> try(system("convert tmp/2apav1356110838.ps tmp/2apav1356110838.png",intern=TRUE))
character(0)
> try(system("convert tmp/3u5mb1356110838.ps tmp/3u5mb1356110838.png",intern=TRUE))
character(0)
> try(system("convert tmp/4ps111356110838.ps tmp/4ps111356110838.png",intern=TRUE))
character(0)
> try(system("convert tmp/5up6d1356110838.ps tmp/5up6d1356110838.png",intern=TRUE))
character(0)
> try(system("convert tmp/6qtg41356110838.ps tmp/6qtg41356110838.png",intern=TRUE))
character(0)
> try(system("convert tmp/7h4jr1356110838.ps tmp/7h4jr1356110838.png",intern=TRUE))
character(0)
> try(system("convert tmp/8y0de1356110838.ps tmp/8y0de1356110838.png",intern=TRUE))
character(0)
> try(system("convert tmp/9cksj1356110838.ps tmp/9cksj1356110838.png",intern=TRUE))
character(0)
> try(system("convert tmp/10edyu1356110838.ps tmp/10edyu1356110838.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
8.566 1.302 9.932