R version 2.13.0 (2011-04-13)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-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(41
+ ,38
+ ,13
+ ,12
+ ,14
+ ,12
+ ,53
+ ,32
+ ,39
+ ,32
+ ,16
+ ,11
+ ,18
+ ,11
+ ,86
+ ,51
+ ,30
+ ,35
+ ,19
+ ,15
+ ,11
+ ,14
+ ,66
+ ,42
+ ,31
+ ,33
+ ,15
+ ,6
+ ,12
+ ,12
+ ,67
+ ,41
+ ,34
+ ,37
+ ,14
+ ,13
+ ,16
+ ,21
+ ,76
+ ,46
+ ,35
+ ,29
+ ,13
+ ,10
+ ,18
+ ,12
+ ,78
+ ,47
+ ,39
+ ,31
+ ,19
+ ,12
+ ,14
+ ,22
+ ,53
+ ,37
+ ,34
+ ,36
+ ,15
+ ,14
+ ,14
+ ,11
+ ,80
+ ,49
+ ,36
+ ,35
+ ,14
+ ,12
+ ,15
+ ,10
+ ,74
+ ,45
+ ,37
+ ,38
+ ,15
+ ,6
+ ,15
+ ,13
+ ,76
+ ,47
+ ,38
+ ,31
+ ,16
+ ,10
+ ,17
+ ,10
+ ,79
+ ,49
+ ,36
+ ,34
+ ,16
+ ,12
+ ,19
+ ,8
+ ,54
+ ,33
+ ,38
+ ,35
+ ,16
+ ,12
+ ,10
+ ,15
+ ,67
+ ,42
+ ,39
+ ,38
+ ,16
+ ,11
+ ,16
+ ,14
+ ,54
+ ,33
+ ,33
+ ,37
+ ,17
+ ,15
+ ,18
+ ,10
+ ,87
+ ,53
+ ,32
+ ,33
+ ,15
+ ,12
+ ,14
+ ,14
+ ,58
+ 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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 = 'Include Monthly Dummies'
> par1 = '1'
> #'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
> 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
Connected Separate Learning Software Happiness Depression Belonging
1 41 38 13 12 14 12 53
2 39 32 16 11 18 11 86
3 30 35 19 15 11 14 66
4 31 33 15 6 12 12 67
5 34 37 14 13 16 21 76
6 35 29 13 10 18 12 78
7 39 31 19 12 14 22 53
8 34 36 15 14 14 11 80
9 36 35 14 12 15 10 74
10 37 38 15 6 15 13 76
11 38 31 16 10 17 10 79
12 36 34 16 12 19 8 54
13 38 35 16 12 10 15 67
14 39 38 16 11 16 14 54
15 33 37 17 15 18 10 87
16 32 33 15 12 14 14 58
17 36 32 15 10 14 14 75
18 38 38 20 12 17 11 88
19 39 38 18 11 14 10 64
20 32 32 16 12 16 13 57
21 32 33 16 11 18 7 66
22 31 31 16 12 11 14 68
23 39 38 19 13 14 12 54
24 37 39 16 11 12 14 56
25 39 32 17 9 17 11 86
26 41 32 17 13 9 9 80
27 36 35 16 10 16 11 76
28 33 37 15 14 14 15 69
29 33 33 16 12 15 14 78
30 34 33 14 10 11 13 67
31 31 28 15 12 16 9 80
32 27 32 12 8 13 15 54
33 37 31 14 10 17 10 71
34 34 37 16 12 15 11 84
35 34 30 14 12 14 13 74
36 32 33 7 7 16 8 71
37 29 31 10 6 9 20 63
38 36 33 14 12 15 12 71
39 29 31 16 10 17 10 76
40 35 33 16 10 13 10 69
41 37 32 16 10 15 9 74
42 34 33 14 12 16 14 75
43 38 32 20 15 16 8 54
44 35 33 14 10 12 14 52
45 38 28 14 10 12 11 69
46 37 35 11 12 11 13 68
47 38 39 14 13 15 9 65
48 33 34 15 11 15 11 75
49 36 38 16 11 17 15 74
50 38 32 14 12 13 11 75
51 32 38 16 14 16 10 72
52 32 30 14 10 14 14 67
53 32 33 12 12 11 18 63
54 34 38 16 13 12 14 62
55 32 32 9 5 12 11 63
56 37 32 14 6 15 12 76
57 39 34 16 12 16 13 74
58 29 34 16 12 15 9 67
59 37 36 15 11 12 10 73
60 35 34 16 10 12 15 70
61 30 28 12 7 8 20 53
62 38 34 16 12 13 12 77
63 34 35 16 14 11 12 77
64 31 35 14 11 14 14 52
65 34 31 16 12 15 13 54
66 35 37 17 13 10 11 80
67 36 35 18 14 11 17 66
68 30 27 18 11 12 12 73
69 39 40 12 12 15 13 63
70 35 37 16 12 15 14 69
71 38 36 10 8 14 13 67
72 31 38 14 11 16 15 54
73 34 39 18 14 15 13 81
74 38 41 18 14 15 10 69
75 34 27 16 12 13 11 84
76 39 30 17 9 12 19 80
77 37 37 16 13 17 13 70
78 34 31 16 11 13 17 69
79 28 31 13 12 15 13 77
80 37 27 16 12 13 9 54
81 33 36 16 12 15 11 79
82 37 38 20 12 16 10 30
83 35 37 16 12 15 9 71
84 37 33 15 12 16 12 73
85 32 34 15 11 15 12 72
86 33 31 16 10 14 13 77
87 38 39 14 9 15 13 75
88 33 34 16 12 14 12 69
89 29 32 16 12 13 15 54
90 33 33 15 12 7 22 70
91 31 36 12 9 17 13 73
92 36 32 17 15 13 15 54
93 35 41 16 12 15 13 77
94 32 28 15 12 14 15 82
95 29 30 13 12 13 10 80
96 39 36 16 10 16 11 80
97 37 35 16 13 12 16 69
98 35 31 16 9 14 11 78
99 37 34 16 12 17 11 81
100 32 36 14 10 15 10 76
101 38 36 16 14 17 10 76
102 37 35 16 11 12 16 73
103 36 37 20 15 16 12 85
104 32 28 15 11 11 11 66
105 33 39 16 11 15 16 79
106 40 32 13 12 9 19 68
107 38 35 17 12 16 11 76
108 41 39 16 12 15 16 71
109 36 35 16 11 10 15 54
110 43 42 12 7 10 24 46
111 30 34 16 12 15 14 82
112 31 33 16 14 11 15 74
113 32 41 17 11 13 11 88
114 32 33 13 11 14 15 38
115 37 34 12 10 18 12 76
116 37 32 18 13 16 10 86
117 33 40 14 13 14 14 54
118 34 40 14 8 14 13 70
119 33 35 13 11 14 9 69
120 38 36 16 12 14 15 90
121 33 37 13 11 12 15 54
122 31 27 16 13 14 14 76
123 38 39 13 12 15 11 89
124 37 38 16 14 15 8 76
125 33 31 15 13 15 11 73
126 31 33 16 15 13 11 79
127 39 32 15 10 17 8 90
128 44 39 17 11 17 10 74
129 33 36 15 9 19 11 81
130 35 33 12 11 15 13 72
131 32 33 16 10 13 11 71
132 28 32 10 11 9 20 66
133 40 37 16 8 15 10 77
134 27 30 12 11 15 15 65
135 37 38 14 12 15 12 74
136 32 29 15 12 16 14 82
137 28 22 13 9 11 23 54
138 34 35 15 11 14 14 63
139 30 35 11 10 11 16 54
140 35 34 12 8 15 11 64
141 31 35 8 9 13 12 69
142 32 34 16 8 15 10 54
143 30 34 15 9 16 14 84
144 30 35 17 15 14 12 86
145 31 23 16 11 15 12 77
146 40 31 10 8 16 11 89
147 32 27 18 13 16 12 76
148 36 36 13 12 11 13 60
149 32 31 16 12 12 11 75
150 35 32 13 9 9 19 73
151 38 39 10 7 16 12 85
152 42 37 15 13 13 17 79
153 34 38 16 9 16 9 71
154 35 39 16 6 12 12 72
155 35 34 14 8 9 19 69
156 33 31 10 8 13 18 78
157 36 32 17 15 13 15 54
158 32 37 13 6 14 14 69
159 33 36 15 9 19 11 81
160 34 32 16 11 13 9 84
161 32 35 12 8 12 18 84
162 34 36 13 8 13 16 69
Belonging_Final\r M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11
1 32 1 0 0 0 0 0 0 0 0 0 0
2 51 0 1 0 0 0 0 0 0 0 0 0
3 42 0 0 1 0 0 0 0 0 0 0 0
4 41 0 0 0 1 0 0 0 0 0 0 0
5 46 0 0 0 0 1 0 0 0 0 0 0
6 47 0 0 0 0 0 1 0 0 0 0 0
7 37 0 0 0 0 0 0 1 0 0 0 0
8 49 0 0 0 0 0 0 0 1 0 0 0
9 45 0 0 0 0 0 0 0 0 1 0 0
10 47 0 0 0 0 0 0 0 0 0 1 0
11 49 0 0 0 0 0 0 0 0 0 0 1
12 33 0 0 0 0 0 0 0 0 0 0 0
13 42 1 0 0 0 0 0 0 0 0 0 0
14 33 0 1 0 0 0 0 0 0 0 0 0
15 53 0 0 1 0 0 0 0 0 0 0 0
16 36 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0
95 47 0 0 0 0 0 0 0 0 0 0 1
96 47 0 0 0 0 0 0 0 0 0 0 0
97 43 1 0 0 0 0 0 0 0 0 0 0
98 46 0 1 0 0 0 0 0 0 0 0 0
99 48 0 0 1 0 0 0 0 0 0 0 0
100 46 0 0 0 1 0 0 0 0 0 0 0
101 45 0 0 0 0 1 0 0 0 0 0 0
102 45 0 0 0 0 0 1 0 0 0 0 0
103 52 0 0 0 0 0 0 1 0 0 0 0
104 42 0 0 0 0 0 0 0 1 0 0 0
105 47 0 0 0 0 0 0 0 0 1 0 0
106 41 0 0 0 0 0 0 0 0 0 1 0
107 47 0 0 0 0 0 0 0 0 0 0 1
108 43 0 0 0 0 0 0 0 0 0 0 0
109 33 1 0 0 0 0 0 0 0 0 0 0
110 30 0 1 0 0 0 0 0 0 0 0 0
111 49 0 0 1 0 0 0 0 0 0 0 0
112 44 0 0 0 1 0 0 0 0 0 0 0
113 55 0 0 0 0 1 0 0 0 0 0 0
114 11 0 0 0 0 0 1 0 0 0 0 0
115 47 0 0 0 0 0 0 1 0 0 0 0
116 53 0 0 0 0 0 0 0 1 0 0 0
117 33 0 0 0 0 0 0 0 0 1 0 0
118 44 0 0 0 0 0 0 0 0 0 1 0
119 42 0 0 0 0 0 0 0 0 0 0 1
120 55 0 0 0 0 0 0 0 0 0 0 0
121 33 1 0 0 0 0 0 0 0 0 0 0
122 46 0 1 0 0 0 0 0 0 0 0 0
123 54 0 0 1 0 0 0 0 0 0 0 0
124 47 0 0 0 1 0 0 0 0 0 0 0
125 45 0 0 0 0 1 0 0 0 0 0 0
126 47 0 0 0 0 0 1 0 0 0 0 0
127 55 0 0 0 0 0 0 1 0 0 0 0
128 44 0 0 0 0 0 0 0 1 0 0 0
129 53 0 0 0 0 0 0 0 0 1 0 0
130 44 0 0 0 0 0 0 0 0 0 1 0
131 42 0 0 0 0 0 0 0 0 0 0 1
132 40 0 0 0 0 0 0 0 0 0 0 0
133 46 1 0 0 0 0 0 0 0 0 0 0
134 40 0 1 0 0 0 0 0 0 0 0 0
135 46 0 0 1 0 0 0 0 0 0 0 0
136 53 0 0 0 1 0 0 0 0 0 0 0
137 33 0 0 0 0 1 0 0 0 0 0 0
138 42 0 0 0 0 0 1 0 0 0 0 0
139 35 0 0 0 0 0 0 1 0 0 0 0
140 40 0 0 0 0 0 0 0 1 0 0 0
141 41 0 0 0 0 0 0 0 0 1 0 0
142 33 0 0 0 0 0 0 0 0 0 1 0
143 51 0 0 0 0 0 0 0 0 0 0 1
144 53 0 0 0 0 0 0 0 0 0 0 0
145 46 1 0 0 0 0 0 0 0 0 0 0
146 55 0 1 0 0 0 0 0 0 0 0 0
147 47 0 0 1 0 0 0 0 0 0 0 0
148 38 0 0 0 1 0 0 0 0 0 0 0
149 46 0 0 0 0 1 0 0 0 0 0 0
150 46 0 0 0 0 0 1 0 0 0 0 0
151 53 0 0 0 0 0 0 1 0 0 0 0
152 47 0 0 0 0 0 0 0 1 0 0 0
153 41 0 0 0 0 0 0 0 0 1 0 0
154 44 0 0 0 0 0 0 0 0 0 1 0
155 43 0 0 0 0 0 0 0 0 0 0 1
156 51 0 0 0 0 0 0 0 0 0 0 0
157 33 1 0 0 0 0 0 0 0 0 0 0
158 43 0 1 0 0 0 0 0 0 0 0 0
159 53 0 0 1 0 0 0 0 0 0 0 0
160 51 0 0 0 1 0 0 0 0 0 0 0
161 50 0 0 0 0 1 0 0 0 0 0 0
162 46 0 0 0 0 0 1 0 0 0 0 0
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Separate Learning
15.588664 0.357805 0.315171
Software Happiness Depression
-0.082414 0.059839 -0.003814
Belonging `Belonging_Final\r` M1
0.051068 -0.033617 0.800495
M2 M3 M4
2.029117 -1.472864 -0.885124
M5 M6 M7
-0.810165 -0.126977 0.496574
M8 M9 M10
1.315707 -0.269304 -0.444327
M11
0.418400
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-7.0426 -2.1650 0.0551 2.0310 7.7372
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 15.588664 4.449107 3.504 0.000613 ***
Separate 0.357805 0.072086 4.964 1.94e-06 ***
Learning 0.315171 0.134744 2.339 0.020718 *
Software -0.082414 0.138506 -0.595 0.552770
Happiness 0.059839 0.132817 0.451 0.653009
Depression -0.003814 0.099038 -0.039 0.969334
Belonging 0.051068 0.076395 0.668 0.504905
`Belonging_Final\r` -0.033617 0.109613 -0.307 0.759530
M1 0.800495 1.214340 0.659 0.510826
M2 2.029117 1.200248 1.691 0.093095 .
M3 -1.472864 1.216252 -1.211 0.227898
M4 -0.885124 1.208615 -0.732 0.465156
M5 -0.810165 1.204787 -0.672 0.502379
M6 -0.126977 1.210079 -0.105 0.916576
M7 0.496574 1.219704 0.407 0.684524
M8 1.315707 1.246610 1.055 0.293010
M9 -0.269304 1.222222 -0.220 0.825921
M10 -0.444327 1.240694 -0.358 0.720776
M11 0.418400 1.230350 0.340 0.734306
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 3.081 on 143 degrees of freedom
Multiple R-squared: 0.2598, Adjusted R-squared: 0.1666
F-statistic: 2.788 on 18 and 143 DF, p-value: 0.0003701
> 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.32684744 0.65369487 0.6731526
[2,] 0.25031915 0.50063830 0.7496808
[3,] 0.15538735 0.31077469 0.8446127
[4,] 0.09082460 0.18164920 0.9091754
[5,] 0.06706865 0.13413730 0.9329314
[6,] 0.03444149 0.06888299 0.9655585
[7,] 0.02413585 0.04827171 0.9758641
[8,] 0.02235447 0.04470894 0.9776455
[9,] 0.01127602 0.02255205 0.9887240
[10,] 0.08577875 0.17155750 0.9142213
[11,] 0.20718619 0.41437237 0.7928138
[12,] 0.21794090 0.43588179 0.7820591
[13,] 0.16270310 0.32540620 0.8372969
[14,] 0.15977498 0.31954996 0.8402250
[15,] 0.11732994 0.23465987 0.8826701
[16,] 0.25510074 0.51020148 0.7448993
[17,] 0.21686496 0.43372993 0.7831350
[18,] 0.19240074 0.38480148 0.8075993
[19,] 0.17141511 0.34283022 0.8285849
[20,] 0.15547628 0.31095256 0.8445237
[21,] 0.11800400 0.23600799 0.8819960
[22,] 0.09878074 0.19756148 0.9012193
[23,] 0.12018349 0.24036698 0.8798165
[24,] 0.22425205 0.44850410 0.7757479
[25,] 0.27339068 0.54678136 0.7266093
[26,] 0.23524572 0.47049144 0.7647543
[27,] 0.20803367 0.41606733 0.7919663
[28,] 0.20143676 0.40287351 0.7985632
[29,] 0.17609467 0.35218933 0.8239053
[30,] 0.15256345 0.30512690 0.8474366
[31,] 0.12284953 0.24569906 0.8771505
[32,] 0.09908947 0.19817895 0.9009105
[33,] 0.07958946 0.15917893 0.9204105
[34,] 0.06554734 0.13109468 0.9344527
[35,] 0.08967513 0.17935025 0.9103249
[36,] 0.10209218 0.20418436 0.8979078
[37,] 0.17717245 0.35434491 0.8228275
[38,] 0.15387796 0.30775592 0.8461220
[39,] 0.12482357 0.24964714 0.8751764
[40,] 0.11250746 0.22501492 0.8874925
[41,] 0.09747812 0.19495623 0.9025219
[42,] 0.08362666 0.16725332 0.9163733
[43,] 0.07286445 0.14572890 0.9271355
[44,] 0.06029652 0.12059303 0.9397035
[45,] 0.05148327 0.10296654 0.9485167
[46,] 0.04116176 0.08232352 0.9588382
[47,] 0.05004015 0.10008030 0.9499599
[48,] 0.05446199 0.10892399 0.9455380
[49,] 0.04196334 0.08392668 0.9580367
[50,] 0.04722440 0.09444881 0.9527756
[51,] 0.06267389 0.12534778 0.9373261
[52,] 0.09525646 0.19051291 0.9047435
[53,] 0.09209861 0.18419722 0.9079014
[54,] 0.10257774 0.20515548 0.8974223
[55,] 0.18055534 0.36111068 0.8194447
[56,] 0.15868253 0.31736507 0.8413175
[57,] 0.13134730 0.26269459 0.8686527
[58,] 0.21026132 0.42052263 0.7897387
[59,] 0.27948001 0.55896003 0.7205200
[60,] 0.29354431 0.58708863 0.7064557
[61,] 0.25989453 0.51978907 0.7401055
[62,] 0.24658853 0.49317705 0.7534115
[63,] 0.24940237 0.49880473 0.7505976
[64,] 0.27452165 0.54904330 0.7254784
[65,] 0.29096398 0.58192796 0.7090360
[66,] 0.30197816 0.60395633 0.6980218
[67,] 0.26033845 0.52067690 0.7396616
[68,] 0.28476255 0.56952510 0.7152374
[69,] 0.24440185 0.48880371 0.7555981
[70,] 0.28420748 0.56841496 0.7157925
[71,] 0.25864525 0.51729049 0.7413548
[72,] 0.23805699 0.47611398 0.7619430
[73,] 0.20371563 0.40743126 0.7962844
[74,] 0.22906727 0.45813454 0.7709327
[75,] 0.24281917 0.48563834 0.7571808
[76,] 0.20968140 0.41936279 0.7903186
[77,] 0.19046608 0.38093215 0.8095339
[78,] 0.19299768 0.38599536 0.8070023
[79,] 0.17921124 0.35842247 0.8207888
[80,] 0.18758095 0.37516190 0.8124191
[81,] 0.16967280 0.33934560 0.8303272
[82,] 0.14719107 0.29438215 0.8528089
[83,] 0.12220308 0.24440615 0.8777969
[84,] 0.12616268 0.25232537 0.8738373
[85,] 0.29760652 0.59521304 0.7023935
[86,] 0.30346513 0.60693025 0.6965349
[87,] 0.39187088 0.78374175 0.6081291
[88,] 0.34090509 0.68181017 0.6590949
[89,] 0.57320721 0.85358559 0.4267928
[90,] 0.62914783 0.74170435 0.3708522
[91,] 0.62583193 0.74833614 0.3741681
[92,] 0.68967415 0.62065169 0.3103258
[93,] 0.64086106 0.71827788 0.3591389
[94,] 0.61836799 0.76326402 0.3816320
[95,] 0.62495617 0.75008765 0.3750438
[96,] 0.59245801 0.81508399 0.4075420
[97,] 0.55908410 0.88183180 0.4409159
[98,] 0.51050635 0.97898729 0.4894936
[99,] 0.55530308 0.88939384 0.4446969
[100,] 0.53872140 0.92255721 0.4612786
[101,] 0.50455739 0.99088522 0.4954426
[102,] 0.46109129 0.92218259 0.5389087
[103,] 0.41064827 0.82129654 0.5893517
[104,] 0.36013045 0.72026089 0.6398696
[105,] 0.36794983 0.73589966 0.6320502
[106,] 0.41432472 0.82864945 0.5856753
[107,] 0.53036637 0.93926725 0.4696336
[108,] 0.46136485 0.92272969 0.5386352
[109,] 0.39130316 0.78260632 0.6086968
[110,] 0.33682356 0.67364711 0.6631764
[111,] 0.29847706 0.59695411 0.7015229
[112,] 0.25071361 0.50142721 0.7492864
[113,] 0.41822988 0.83645976 0.5817701
[114,] 0.33770904 0.67541807 0.6622910
[115,] 0.39249680 0.78499361 0.6075032
[116,] 0.29133719 0.58267439 0.7086628
[117,] 0.19521215 0.39042430 0.8047879
[118,] 0.41817020 0.83634040 0.5818298
[119,] 0.59610260 0.80779481 0.4038974
> postscript(file="/var/wessaorg/rcomp/tmp/19vfe1322163509.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/2md4c1322163509.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/3xu2f1322163509.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/4hycp1322163509.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/5ht4x1322163509.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
5.48313467 2.08371329 -3.95445333 -2.45977443 -0.57044514 2.45421444
7 8 9 10 11 12
4.60688813 -2.59315490 1.60829453 0.87678749 3.31609035 1.43743656
13 14 15 16 17 18
2.48304406 1.09708546 -2.17649663 -0.78580992 2.76659847 -0.02674243
19 20 21 22 23 24
1.86195803 -3.01642953 -2.30572959 -1.88840129 2.03916577 1.04008119
25 26 27 28 29 30
2.92579133 4.63623130 1.79129063 -1.34120593 -0.95459334 0.59140733
31 32 33 34 35 36
-2.20371366 -6.84590210 3.84098158 -1.76695297 0.68004725 -0.09914872
37 38 39 40 41 42
-3.57409379 0.11908398 -3.74029158 1.41872335 3.42358714 0.05231038
43 44 45 46 47 48
2.82254552 0.42170592 6.28592324 4.11795316 1.96035167 -1.71442640
49 50 51 52 53 54
-1.44913231 2.45571250 -2.71839380 0.11280133 0.05779129 -1.31416885
55 56 57 58 59 60
-0.64267857 1.57494122 4.28736089 -5.23640567 1.32855189 0.23725145
61 62 63 64 65 66
-1.64616936 1.01143769 0.44011752 -2.13033669 1.57944053 -0.98167806
67 68 69 70 71 72
0.32030836 -4.35362846 3.78748723 -0.39288743 3.88895694 -4.23964186
73 74 75 76 77 78
-4.23376676 -1.84555489 2.82484518 5.86228420 1.91442167 0.55253155
79 80 81 82 83 84
-5.48572085 3.98921019 -2.59776325 0.49328995 -1.27597023 2.67105441
85 86 87 88 89 90
-3.42513603 -3.06876587 3.09376677 -0.82646468 -3.65105952 -0.47207752
91 92 93 94 95 96
-4.15583731 1.15513905 -2.27702418 -0.25600522 -4.09471120 2.89081551
97 98 99 100 101 102
1.38107499 -1.24349255 3.16682692 -2.36703776 3.10402247 2.00667949
103 104 105 106 107 108
-1.89562261 -1.31880142 -3.70090565 7.73720389 1.88415044 4.38628383
109 110 111 112 113 114
0.76196736 5.30176127 -3.71950563 -2.30098232 -5.28089948 -0.81126649
115 116 117 118 119 120
2.45894608 0.51470456 -2.40525782 -2.09342604 -1.63613562 1.94882708
121 122 123 124 125 126
-2.12780659 -3.36903861 3.23614593 1.64265378 0.40250091 -3.26613975
127 128 129 130 131 132
3.82760355 5.41084284 -2.63600746 2.12681805 -2.98312248 -3.77168962
133 134 135 136 137 138
2.74330043 -7.04257102 2.77968415 -0.12842104 -0.22454790 -0.39562208
139 140 141 142 143 144
-3.42946104 0.02818902 -1.49974080 -2.20090977 -5.63758096 -5.63569990
145 146 147 148 149 150
-0.99255911 5.18624249 0.40891113 2.91191546 -0.88408821 2.08535460
151 152 153 154 155 156
1.91478438 5.03318361 -2.38761873 -1.51706414 0.53020619 0.84885647
157 158 159 160 161 162
1.67035111 -5.32184504 -1.43244726 0.39165466 -1.68272890 -0.47480263
> postscript(file="/var/wessaorg/rcomp/tmp/6q8co1322163509.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 5.48313467 NA
1 2.08371329 5.48313467
2 -3.95445333 2.08371329
3 -2.45977443 -3.95445333
4 -0.57044514 -2.45977443
5 2.45421444 -0.57044514
6 4.60688813 2.45421444
7 -2.59315490 4.60688813
8 1.60829453 -2.59315490
9 0.87678749 1.60829453
10 3.31609035 0.87678749
11 1.43743656 3.31609035
12 2.48304406 1.43743656
13 1.09708546 2.48304406
14 -2.17649663 1.09708546
15 -0.78580992 -2.17649663
16 2.76659847 -0.78580992
17 -0.02674243 2.76659847
18 1.86195803 -0.02674243
19 -3.01642953 1.86195803
20 -2.30572959 -3.01642953
21 -1.88840129 -2.30572959
22 2.03916577 -1.88840129
23 1.04008119 2.03916577
24 2.92579133 1.04008119
25 4.63623130 2.92579133
26 1.79129063 4.63623130
27 -1.34120593 1.79129063
28 -0.95459334 -1.34120593
29 0.59140733 -0.95459334
30 -2.20371366 0.59140733
31 -6.84590210 -2.20371366
32 3.84098158 -6.84590210
33 -1.76695297 3.84098158
34 0.68004725 -1.76695297
35 -0.09914872 0.68004725
36 -3.57409379 -0.09914872
37 0.11908398 -3.57409379
38 -3.74029158 0.11908398
39 1.41872335 -3.74029158
40 3.42358714 1.41872335
41 0.05231038 3.42358714
42 2.82254552 0.05231038
43 0.42170592 2.82254552
44 6.28592324 0.42170592
45 4.11795316 6.28592324
46 1.96035167 4.11795316
47 -1.71442640 1.96035167
48 -1.44913231 -1.71442640
49 2.45571250 -1.44913231
50 -2.71839380 2.45571250
51 0.11280133 -2.71839380
52 0.05779129 0.11280133
53 -1.31416885 0.05779129
54 -0.64267857 -1.31416885
55 1.57494122 -0.64267857
56 4.28736089 1.57494122
57 -5.23640567 4.28736089
58 1.32855189 -5.23640567
59 0.23725145 1.32855189
60 -1.64616936 0.23725145
61 1.01143769 -1.64616936
62 0.44011752 1.01143769
63 -2.13033669 0.44011752
64 1.57944053 -2.13033669
65 -0.98167806 1.57944053
66 0.32030836 -0.98167806
67 -4.35362846 0.32030836
68 3.78748723 -4.35362846
69 -0.39288743 3.78748723
70 3.88895694 -0.39288743
71 -4.23964186 3.88895694
72 -4.23376676 -4.23964186
73 -1.84555489 -4.23376676
74 2.82484518 -1.84555489
75 5.86228420 2.82484518
76 1.91442167 5.86228420
77 0.55253155 1.91442167
78 -5.48572085 0.55253155
79 3.98921019 -5.48572085
80 -2.59776325 3.98921019
81 0.49328995 -2.59776325
82 -1.27597023 0.49328995
83 2.67105441 -1.27597023
84 -3.42513603 2.67105441
85 -3.06876587 -3.42513603
86 3.09376677 -3.06876587
87 -0.82646468 3.09376677
88 -3.65105952 -0.82646468
89 -0.47207752 -3.65105952
90 -4.15583731 -0.47207752
91 1.15513905 -4.15583731
92 -2.27702418 1.15513905
93 -0.25600522 -2.27702418
94 -4.09471120 -0.25600522
95 2.89081551 -4.09471120
96 1.38107499 2.89081551
97 -1.24349255 1.38107499
98 3.16682692 -1.24349255
99 -2.36703776 3.16682692
100 3.10402247 -2.36703776
101 2.00667949 3.10402247
102 -1.89562261 2.00667949
103 -1.31880142 -1.89562261
104 -3.70090565 -1.31880142
105 7.73720389 -3.70090565
106 1.88415044 7.73720389
107 4.38628383 1.88415044
108 0.76196736 4.38628383
109 5.30176127 0.76196736
110 -3.71950563 5.30176127
111 -2.30098232 -3.71950563
112 -5.28089948 -2.30098232
113 -0.81126649 -5.28089948
114 2.45894608 -0.81126649
115 0.51470456 2.45894608
116 -2.40525782 0.51470456
117 -2.09342604 -2.40525782
118 -1.63613562 -2.09342604
119 1.94882708 -1.63613562
120 -2.12780659 1.94882708
121 -3.36903861 -2.12780659
122 3.23614593 -3.36903861
123 1.64265378 3.23614593
124 0.40250091 1.64265378
125 -3.26613975 0.40250091
126 3.82760355 -3.26613975
127 5.41084284 3.82760355
128 -2.63600746 5.41084284
129 2.12681805 -2.63600746
130 -2.98312248 2.12681805
131 -3.77168962 -2.98312248
132 2.74330043 -3.77168962
133 -7.04257102 2.74330043
134 2.77968415 -7.04257102
135 -0.12842104 2.77968415
136 -0.22454790 -0.12842104
137 -0.39562208 -0.22454790
138 -3.42946104 -0.39562208
139 0.02818902 -3.42946104
140 -1.49974080 0.02818902
141 -2.20090977 -1.49974080
142 -5.63758096 -2.20090977
143 -5.63569990 -5.63758096
144 -0.99255911 -5.63569990
145 5.18624249 -0.99255911
146 0.40891113 5.18624249
147 2.91191546 0.40891113
148 -0.88408821 2.91191546
149 2.08535460 -0.88408821
150 1.91478438 2.08535460
151 5.03318361 1.91478438
152 -2.38761873 5.03318361
153 -1.51706414 -2.38761873
154 0.53020619 -1.51706414
155 0.84885647 0.53020619
156 1.67035111 0.84885647
157 -5.32184504 1.67035111
158 -1.43244726 -5.32184504
159 0.39165466 -1.43244726
160 -1.68272890 0.39165466
161 -0.47480263 -1.68272890
162 NA -0.47480263
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 2.08371329 5.48313467
[2,] -3.95445333 2.08371329
[3,] -2.45977443 -3.95445333
[4,] -0.57044514 -2.45977443
[5,] 2.45421444 -0.57044514
[6,] 4.60688813 2.45421444
[7,] -2.59315490 4.60688813
[8,] 1.60829453 -2.59315490
[9,] 0.87678749 1.60829453
[10,] 3.31609035 0.87678749
[11,] 1.43743656 3.31609035
[12,] 2.48304406 1.43743656
[13,] 1.09708546 2.48304406
[14,] -2.17649663 1.09708546
[15,] -0.78580992 -2.17649663
[16,] 2.76659847 -0.78580992
[17,] -0.02674243 2.76659847
[18,] 1.86195803 -0.02674243
[19,] -3.01642953 1.86195803
[20,] -2.30572959 -3.01642953
[21,] -1.88840129 -2.30572959
[22,] 2.03916577 -1.88840129
[23,] 1.04008119 2.03916577
[24,] 2.92579133 1.04008119
[25,] 4.63623130 2.92579133
[26,] 1.79129063 4.63623130
[27,] -1.34120593 1.79129063
[28,] -0.95459334 -1.34120593
[29,] 0.59140733 -0.95459334
[30,] -2.20371366 0.59140733
[31,] -6.84590210 -2.20371366
[32,] 3.84098158 -6.84590210
[33,] -1.76695297 3.84098158
[34,] 0.68004725 -1.76695297
[35,] -0.09914872 0.68004725
[36,] -3.57409379 -0.09914872
[37,] 0.11908398 -3.57409379
[38,] -3.74029158 0.11908398
[39,] 1.41872335 -3.74029158
[40,] 3.42358714 1.41872335
[41,] 0.05231038 3.42358714
[42,] 2.82254552 0.05231038
[43,] 0.42170592 2.82254552
[44,] 6.28592324 0.42170592
[45,] 4.11795316 6.28592324
[46,] 1.96035167 4.11795316
[47,] -1.71442640 1.96035167
[48,] -1.44913231 -1.71442640
[49,] 2.45571250 -1.44913231
[50,] -2.71839380 2.45571250
[51,] 0.11280133 -2.71839380
[52,] 0.05779129 0.11280133
[53,] -1.31416885 0.05779129
[54,] -0.64267857 -1.31416885
[55,] 1.57494122 -0.64267857
[56,] 4.28736089 1.57494122
[57,] -5.23640567 4.28736089
[58,] 1.32855189 -5.23640567
[59,] 0.23725145 1.32855189
[60,] -1.64616936 0.23725145
[61,] 1.01143769 -1.64616936
[62,] 0.44011752 1.01143769
[63,] -2.13033669 0.44011752
[64,] 1.57944053 -2.13033669
[65,] -0.98167806 1.57944053
[66,] 0.32030836 -0.98167806
[67,] -4.35362846 0.32030836
[68,] 3.78748723 -4.35362846
[69,] -0.39288743 3.78748723
[70,] 3.88895694 -0.39288743
[71,] -4.23964186 3.88895694
[72,] -4.23376676 -4.23964186
[73,] -1.84555489 -4.23376676
[74,] 2.82484518 -1.84555489
[75,] 5.86228420 2.82484518
[76,] 1.91442167 5.86228420
[77,] 0.55253155 1.91442167
[78,] -5.48572085 0.55253155
[79,] 3.98921019 -5.48572085
[80,] -2.59776325 3.98921019
[81,] 0.49328995 -2.59776325
[82,] -1.27597023 0.49328995
[83,] 2.67105441 -1.27597023
[84,] -3.42513603 2.67105441
[85,] -3.06876587 -3.42513603
[86,] 3.09376677 -3.06876587
[87,] -0.82646468 3.09376677
[88,] -3.65105952 -0.82646468
[89,] -0.47207752 -3.65105952
[90,] -4.15583731 -0.47207752
[91,] 1.15513905 -4.15583731
[92,] -2.27702418 1.15513905
[93,] -0.25600522 -2.27702418
[94,] -4.09471120 -0.25600522
[95,] 2.89081551 -4.09471120
[96,] 1.38107499 2.89081551
[97,] -1.24349255 1.38107499
[98,] 3.16682692 -1.24349255
[99,] -2.36703776 3.16682692
[100,] 3.10402247 -2.36703776
[101,] 2.00667949 3.10402247
[102,] -1.89562261 2.00667949
[103,] -1.31880142 -1.89562261
[104,] -3.70090565 -1.31880142
[105,] 7.73720389 -3.70090565
[106,] 1.88415044 7.73720389
[107,] 4.38628383 1.88415044
[108,] 0.76196736 4.38628383
[109,] 5.30176127 0.76196736
[110,] -3.71950563 5.30176127
[111,] -2.30098232 -3.71950563
[112,] -5.28089948 -2.30098232
[113,] -0.81126649 -5.28089948
[114,] 2.45894608 -0.81126649
[115,] 0.51470456 2.45894608
[116,] -2.40525782 0.51470456
[117,] -2.09342604 -2.40525782
[118,] -1.63613562 -2.09342604
[119,] 1.94882708 -1.63613562
[120,] -2.12780659 1.94882708
[121,] -3.36903861 -2.12780659
[122,] 3.23614593 -3.36903861
[123,] 1.64265378 3.23614593
[124,] 0.40250091 1.64265378
[125,] -3.26613975 0.40250091
[126,] 3.82760355 -3.26613975
[127,] 5.41084284 3.82760355
[128,] -2.63600746 5.41084284
[129,] 2.12681805 -2.63600746
[130,] -2.98312248 2.12681805
[131,] -3.77168962 -2.98312248
[132,] 2.74330043 -3.77168962
[133,] -7.04257102 2.74330043
[134,] 2.77968415 -7.04257102
[135,] -0.12842104 2.77968415
[136,] -0.22454790 -0.12842104
[137,] -0.39562208 -0.22454790
[138,] -3.42946104 -0.39562208
[139,] 0.02818902 -3.42946104
[140,] -1.49974080 0.02818902
[141,] -2.20090977 -1.49974080
[142,] -5.63758096 -2.20090977
[143,] -5.63569990 -5.63758096
[144,] -0.99255911 -5.63569990
[145,] 5.18624249 -0.99255911
[146,] 0.40891113 5.18624249
[147,] 2.91191546 0.40891113
[148,] -0.88408821 2.91191546
[149,] 2.08535460 -0.88408821
[150,] 1.91478438 2.08535460
[151,] 5.03318361 1.91478438
[152,] -2.38761873 5.03318361
[153,] -1.51706414 -2.38761873
[154,] 0.53020619 -1.51706414
[155,] 0.84885647 0.53020619
[156,] 1.67035111 0.84885647
[157,] -5.32184504 1.67035111
[158,] -1.43244726 -5.32184504
[159,] 0.39165466 -1.43244726
[160,] -1.68272890 0.39165466
[161,] -0.47480263 -1.68272890
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 2.08371329 5.48313467
2 -3.95445333 2.08371329
3 -2.45977443 -3.95445333
4 -0.57044514 -2.45977443
5 2.45421444 -0.57044514
6 4.60688813 2.45421444
7 -2.59315490 4.60688813
8 1.60829453 -2.59315490
9 0.87678749 1.60829453
10 3.31609035 0.87678749
11 1.43743656 3.31609035
12 2.48304406 1.43743656
13 1.09708546 2.48304406
14 -2.17649663 1.09708546
15 -0.78580992 -2.17649663
16 2.76659847 -0.78580992
17 -0.02674243 2.76659847
18 1.86195803 -0.02674243
19 -3.01642953 1.86195803
20 -2.30572959 -3.01642953
21 -1.88840129 -2.30572959
22 2.03916577 -1.88840129
23 1.04008119 2.03916577
24 2.92579133 1.04008119
25 4.63623130 2.92579133
26 1.79129063 4.63623130
27 -1.34120593 1.79129063
28 -0.95459334 -1.34120593
29 0.59140733 -0.95459334
30 -2.20371366 0.59140733
31 -6.84590210 -2.20371366
32 3.84098158 -6.84590210
33 -1.76695297 3.84098158
34 0.68004725 -1.76695297
35 -0.09914872 0.68004725
36 -3.57409379 -0.09914872
37 0.11908398 -3.57409379
38 -3.74029158 0.11908398
39 1.41872335 -3.74029158
40 3.42358714 1.41872335
41 0.05231038 3.42358714
42 2.82254552 0.05231038
43 0.42170592 2.82254552
44 6.28592324 0.42170592
45 4.11795316 6.28592324
46 1.96035167 4.11795316
47 -1.71442640 1.96035167
48 -1.44913231 -1.71442640
49 2.45571250 -1.44913231
50 -2.71839380 2.45571250
51 0.11280133 -2.71839380
52 0.05779129 0.11280133
53 -1.31416885 0.05779129
54 -0.64267857 -1.31416885
55 1.57494122 -0.64267857
56 4.28736089 1.57494122
57 -5.23640567 4.28736089
58 1.32855189 -5.23640567
59 0.23725145 1.32855189
60 -1.64616936 0.23725145
61 1.01143769 -1.64616936
62 0.44011752 1.01143769
63 -2.13033669 0.44011752
64 1.57944053 -2.13033669
65 -0.98167806 1.57944053
66 0.32030836 -0.98167806
67 -4.35362846 0.32030836
68 3.78748723 -4.35362846
69 -0.39288743 3.78748723
70 3.88895694 -0.39288743
71 -4.23964186 3.88895694
72 -4.23376676 -4.23964186
73 -1.84555489 -4.23376676
74 2.82484518 -1.84555489
75 5.86228420 2.82484518
76 1.91442167 5.86228420
77 0.55253155 1.91442167
78 -5.48572085 0.55253155
79 3.98921019 -5.48572085
80 -2.59776325 3.98921019
81 0.49328995 -2.59776325
82 -1.27597023 0.49328995
83 2.67105441 -1.27597023
84 -3.42513603 2.67105441
85 -3.06876587 -3.42513603
86 3.09376677 -3.06876587
87 -0.82646468 3.09376677
88 -3.65105952 -0.82646468
89 -0.47207752 -3.65105952
90 -4.15583731 -0.47207752
91 1.15513905 -4.15583731
92 -2.27702418 1.15513905
93 -0.25600522 -2.27702418
94 -4.09471120 -0.25600522
95 2.89081551 -4.09471120
96 1.38107499 2.89081551
97 -1.24349255 1.38107499
98 3.16682692 -1.24349255
99 -2.36703776 3.16682692
100 3.10402247 -2.36703776
101 2.00667949 3.10402247
102 -1.89562261 2.00667949
103 -1.31880142 -1.89562261
104 -3.70090565 -1.31880142
105 7.73720389 -3.70090565
106 1.88415044 7.73720389
107 4.38628383 1.88415044
108 0.76196736 4.38628383
109 5.30176127 0.76196736
110 -3.71950563 5.30176127
111 -2.30098232 -3.71950563
112 -5.28089948 -2.30098232
113 -0.81126649 -5.28089948
114 2.45894608 -0.81126649
115 0.51470456 2.45894608
116 -2.40525782 0.51470456
117 -2.09342604 -2.40525782
118 -1.63613562 -2.09342604
119 1.94882708 -1.63613562
120 -2.12780659 1.94882708
121 -3.36903861 -2.12780659
122 3.23614593 -3.36903861
123 1.64265378 3.23614593
124 0.40250091 1.64265378
125 -3.26613975 0.40250091
126 3.82760355 -3.26613975
127 5.41084284 3.82760355
128 -2.63600746 5.41084284
129 2.12681805 -2.63600746
130 -2.98312248 2.12681805
131 -3.77168962 -2.98312248
132 2.74330043 -3.77168962
133 -7.04257102 2.74330043
134 2.77968415 -7.04257102
135 -0.12842104 2.77968415
136 -0.22454790 -0.12842104
137 -0.39562208 -0.22454790
138 -3.42946104 -0.39562208
139 0.02818902 -3.42946104
140 -1.49974080 0.02818902
141 -2.20090977 -1.49974080
142 -5.63758096 -2.20090977
143 -5.63569990 -5.63758096
144 -0.99255911 -5.63569990
145 5.18624249 -0.99255911
146 0.40891113 5.18624249
147 2.91191546 0.40891113
148 -0.88408821 2.91191546
149 2.08535460 -0.88408821
150 1.91478438 2.08535460
151 5.03318361 1.91478438
152 -2.38761873 5.03318361
153 -1.51706414 -2.38761873
154 0.53020619 -1.51706414
155 0.84885647 0.53020619
156 1.67035111 0.84885647
157 -5.32184504 1.67035111
158 -1.43244726 -5.32184504
159 0.39165466 -1.43244726
160 -1.68272890 0.39165466
161 -0.47480263 -1.68272890
> 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/756sl1322163509.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/8yj971322163509.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/9fom11322163509.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/102qe01322163509.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/11lgf31322163509.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/12fssx1322163509.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/13mxvc1322163509.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/14671b1322163509.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/15etxc1322163509.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/16d7ks1322163509.tab")
+ }
>
> try(system("convert tmp/19vfe1322163509.ps tmp/19vfe1322163509.png",intern=TRUE))
character(0)
> try(system("convert tmp/2md4c1322163509.ps tmp/2md4c1322163509.png",intern=TRUE))
character(0)
> try(system("convert tmp/3xu2f1322163509.ps tmp/3xu2f1322163509.png",intern=TRUE))
character(0)
> try(system("convert tmp/4hycp1322163509.ps tmp/4hycp1322163509.png",intern=TRUE))
character(0)
> try(system("convert tmp/5ht4x1322163509.ps tmp/5ht4x1322163509.png",intern=TRUE))
character(0)
> try(system("convert tmp/6q8co1322163509.ps tmp/6q8co1322163509.png",intern=TRUE))
character(0)
> try(system("convert tmp/756sl1322163509.ps tmp/756sl1322163509.png",intern=TRUE))
character(0)
> try(system("convert tmp/8yj971322163509.ps tmp/8yj971322163509.png",intern=TRUE))
character(0)
> try(system("convert tmp/9fom11322163509.ps tmp/9fom11322163509.png",intern=TRUE))
character(0)
> try(system("convert tmp/102qe01322163509.ps tmp/102qe01322163509.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.428 0.525 6.032