R version 2.9.0 (2009-04-17)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
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(4
+ ,27
+ ,1
+ ,5
+ ,26
+ ,49
+ ,35
+ ,4
+ ,36
+ ,1
+ ,4
+ ,25
+ ,45
+ ,34
+ ,5
+ ,25
+ ,1
+ ,4
+ ,17
+ ,54
+ ,13
+ ,2
+ ,27
+ ,1
+ ,3
+ ,37
+ ,36
+ ,35
+ ,3
+ ,25
+ ,2
+ ,3
+ ,35
+ ,36
+ ,28
+ ,5
+ ,44
+ ,2
+ ,3
+ ,15
+ ,53
+ ,32
+ ,4
+ ,50
+ ,1
+ ,4
+ ,27
+ ,46
+ ,35
+ ,4
+ ,41
+ ,1
+ ,4
+ ,36
+ ,42
+ ,36
+ ,4
+ ,48
+ ,1
+ ,5
+ ,25
+ ,41
+ ,27
+ ,4
+ ,43
+ ,2
+ ,4
+ ,30
+ ,45
+ ,29
+ ,5
+ ,47
+ ,2
+ ,2
+ ,27
+ ,47
+ ,27
+ ,4
+ ,41
+ ,2
+ ,3
+ ,33
+ ,42
+ ,28
+ ,3
+ ,44
+ ,1
+ ,2
+ ,29
+ ,45
+ ,29
+ ,4
+ ,47
+ ,2
+ ,5
+ ,30
+ ,40
+ ,28
+ ,3
+ ,40
+ ,2
+ ,3
+ ,25
+ ,45
+ ,30
+ ,3
+ ,46
+ ,2
+ ,3
+ ,23
+ ,40
+ ,25
+ ,4
+ ,28
+ ,1
+ ,3
+ ,26
+ ,42
+ ,15
+ ,3
+ ,56
+ ,1
+ ,3
+ ,24
+ ,45
+ ,33
+ ,4
+ ,49
+ ,2
+ ,4
+ ,35
+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+ ,4
+ ,32
+ ,41
+ ,22
+ ,3
+ ,31
+ ,2
+ ,3
+ ,22
+ ,45
+ ,28
+ ,2
+ ,51
+ ,2
+ ,3
+ ,17
+ ,39
+ ,24
+ ,4
+ ,58
+ ,2
+ ,4
+ ,35
+ ,38
+ ,33
+ ,2
+ ,25
+ ,2
+ ,5
+ ,34
+ ,41
+ ,37)
+ ,dim=c(7
+ ,195)
+ ,dimnames=list(c('Teamwork'
+ ,'leeftijd'
+ ,'geslacht'
+ ,'opleiding'
+ ,'Neuroticisme'
+ ,'Extraversie'
+ ,'Openheid
')
+ ,1:195))
> y <- array(NA,dim=c(7,195),dimnames=list(c('Teamwork','leeftijd','geslacht','opleiding','Neuroticisme','Extraversie','Openheid
'),1:195))
> 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 = '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
Attaching package: 'zoo'
The following object(s) are masked from package:base :
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
Teamwork leeftijd geslacht opleiding Neuroticisme Extraversie Openheid\r
1 4 27 1 5 26 49 35
2 4 36 1 4 25 45 34
3 5 25 1 4 17 54 13
4 2 27 1 3 37 36 35
5 3 25 2 3 35 36 28
6 5 44 2 3 15 53 32
7 4 50 1 4 27 46 35
8 4 41 1 4 36 42 36
9 4 48 1 5 25 41 27
10 4 43 2 4 30 45 29
11 5 47 2 2 27 47 27
12 4 41 2 3 33 42 28
13 3 44 1 2 29 45 29
14 4 47 2 5 30 40 28
15 3 40 2 3 25 45 30
16 3 46 2 3 23 40 25
17 4 28 1 3 26 42 15
18 3 56 1 3 24 45 33
19 4 49 2 4 35 47 31
20 2 25 2 4 39 31 37
21 4 41 2 4 23 46 37
22 3 26 2 3 32 34 34
23 4 50 1 5 29 43 32
24 4 47 1 4 26 45 21
25 3 52 1 2 21 42 25
26 3 37 2 5 35 51 32
27 2 41 2 3 23 44 28
28 4 45 1 4 21 47 22
29 5 26 2 4 28 47 25
30 4 1 3 30 41 26 2
31 52 1 4 21 44 34 5
32 46 1 2 29 51 34 4
33 58 1 3 28 46 36 3
34 54 1 5 19 47 36 4
35 29 1 3 26 46 26 2
36 50 2 3 33 38 26 3
37 43 1 2 34 50 34 3
38 30 2 3 33 48 33 3
39 47 2 2 40 36 31 5
40 45 1 3 24 51 33 48
41 2 1 35 35 22 4 48
42 2 3 35 49 29 4 26
43 2 4 32 38 24 4 46
44 1 5 20 47 37 2 2
45 3 35 36 32 4 50 2
46 3 35 47 23 3 25 1
47 4 21 46 29 4 47 1
48 2 33 43 35 1 47 2
49 2 40 53 20 2 41 1
50 3 22 55 28 2 45 2
51 2 35 39 26 4 41 2
52 4 20 55 36 3 45 2
53 5 28 41 26 4 40 2
54 3 46 33 33 3 29 1
55 4 18 52 25 3 34 2
56 5 22 42 29 5 45 1
57 5 20 56 32 3 52 2
58 3 25 46 35 2 41 2
59 4 31 33 24 1 48 2
60 3 21 51 31 2 45 2
61 3 23 46 29 5 54 1
62 2 26 46 27 4 25 2
63 3 34 50 29 4 26 2
64 4 31 46 29 3 28 1
65 4 23 51 27 4 50 2
66 4 31 48 34 4 48 2
67 4 26 44 32 2 51 2
68 3 36 38 31 3 53 2
69 3 28 42 31 4 37 1
70 3 34 39 31 3 56 1
71 2 25 45 16 2 43 1
72 3 33 31 25 4 34 1
73 3 46 29 27 4 42 1
74 3 24 48 32 3 32 2
75 3 32 38 28 5 31 2
76 5 33 55 25 1 46 1
77 3 42 32 25 3 30 2
78 5 17 51 36 3 47 2
79 4 36 53 36 5 33 2
80 4 40 47 36 2 25 1
81 4 30 45 27 3 25 1
82 5 19 33 29 3 21 2
83 4 33 49 32 4 36 2
84 5 35 46 29 2 50 2
85 3 23 42 31 4 48 2
86 3 15 56 34 3 48 2
87 2 38 35 27 3 25 1
88 3 37 40 28 3 48 1
89 4 23 44 32 2 49 2
90 5 41 46 33 3 27 1
91 5 34 46 29 2 28 1
92 3 38 39 32 4 43 2
93 2 45 35 35 4 48 2
94 3 27 48 33 2 48 2
95 4 46 42 27 1 25 1
96 1 26 39 16 5 49 2
97 4 44 39 32 4 26 1
98 3 36 41 26 4 51 1
99 3 20 52 32 4 25 2
100 4 44 45 38 3 29 1
101 3 27 42 24 3 29 1
102 4 27 44 26 1 43 1
103 2 41 33 19 5 46 2
104 3 30 42 37 3 44 1
105 3 33 46 25 3 25 1
106 3 37 45 24 2 51 1
107 2 30 40 23 4 42 1
108 5 20 48 28 4 53 2
109 5 44 32 38 3 25 1
110 4 20 53 28 4 49 2
111 2 33 39 28 4 51 1
112 3 31 45 26 2 20 2
113 3 23 36 21 3 44 2
114 3 33 38 35 3 38 2
115 4 33 49 31 3 46 1
116 5 32 46 34 4 42 2
117 4 25 43 30 5 29 1
118 22 37 30 3 46 2 4
119 16 48 24 3 49 2 2
120 36 45 27 2 51 2 3
121 35 32 26 3 38 1 3
122 25 46 30 1 41 1 1
123 27 20 15 4 47 2 3
124 32 42 28 4 44 2 3
125 36 45 34 4 47 2 3
126 51 29 29 3 46 2 3
127 30 51 26 5 44 1 4
128 20 55 31 2 28 2 3
129 29 50 28 2 47 2 4
130 26 44 33 3 28 2 4
131 20 41 32 3 41 1 5
132 40 40 33 2 45 2 4
133 29 47 31 1 46 2 4
134 32 42 37 3 46 1 4
135 33 40 27 5 22 2 3
136 32 51 19 4 33 2 3
137 34 43 27 4 41 1 4
138 24 45 31 4 47 2 5
139 25 41 38 3 25 1 3
140 41 41 22 5 42 2 3
141 39 37 35 3 47 2 3
142 21 46 35 3 50 2 3
143 38 38 30 3 55 1 5
144 28 39 41 3 21 1 3
145 37 45 25 4 1 3 26
146 46 28 2 52 1 3 30
147 39 45 2 49 2 4 25
148 21 21 4 46 2 4 38
149 31 33 3 1 4 31 35
150 25 3 45 2 3 31 49
151 29 2 52 2 3 27 40
152 31 3 1 3 21 45 29
153 3 40 2 4 26 46 31
154 4 49 2 4 37 45 31
155 1 38 1 5 28 34 25
156 1 32 1 5 29 41 27
157 5 46 2 4 33 43 26
158 4 32 2 3 41 45 26
159 3 41 2 3 19 48 23
160 3 43 2 3 37 43 27
161 4 44 1 4 36 45 24
162 3 47 1 5 27 45 35
163 2 28 2 3 33 34 24
164 1 52 1 1 29 40 32
165 1 27 1 2 42 40 24
166 5 45 2 5 27 55 24
167 4 27 1 4 47 44 38
168 3 25 1 4 17 44 36
169 4 28 1 4 34 48 24
170 5 25 1 3 32 51 18
171 4 52 1 4 25 49 34
172 4 44 1 3 27 33 23
173 2 43 2 3 37 43 35
174 3 47 2 4 34 44 22
175 4 52 2 4 27 44 34
176 3 40 2 2 37 41 28
177 4 42 1 3 32 45 34
178 3 45 1 5 26 44 32
179 4 45 1 2 29 44 24
180 1 50 1 5 28 40 34
181 2 49 1 3 19 48 33
182 3 52 1 2 46 49 33
183 3 48 2 3 31 46 29
184 5 51 2 3 42 49 38
185 4 49 2 4 33 55 24
186 3 31 2 4 39 51 25
187 3 43 2 3 27 46 37
188 3 31 2 3 35 37 33
189 3 28 2 4 23 43 30
190 4 43 2 4 32 41 22
191 3 31 2 3 22 45 28
192 2 51 2 3 17 39 24
193 4 58 2 4 35 38 33
194 2 25 2 5 34 41 37
195 4 27 1 5 26 49 35
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) leeftijd geslacht opleiding Neuroticisme
45.5524 -0.3374 -0.2302 -0.1015 0.1282
Extraversie `Openheid\r`
-0.4458 -0.3278
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-36.6841 -4.8640 -0.4372 3.5133 27.4547
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 45.55241 6.24340 7.296 8.06e-12 ***
leeftijd -0.33739 0.06001 -5.622 6.74e-08 ***
geslacht -0.23017 0.06743 -3.413 0.000786 ***
opleiding -0.10154 0.08032 -1.264 0.207677
Neuroticisme 0.12816 0.07533 1.701 0.090546 .
Extraversie -0.44577 0.04943 -9.019 < 2e-16 ***
`Openheid\r` -0.32784 0.07344 -4.464 1.38e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 9.132 on 188 degrees of freedom
Multiple R-squared: 0.5805, Adjusted R-squared: 0.5671
F-statistic: 43.35 on 6 and 188 DF, p-value: < 2.2e-16
> 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,] 1.733003e-04 3.466006e-04 9.998267e-01
[2,] 1.095967e-05 2.191933e-05 9.999890e-01
[3,] 4.497266e-07 8.994532e-07 9.999996e-01
[4,] 9.233871e-08 1.846774e-07 9.999999e-01
[5,] 5.268537e-09 1.053707e-08 1.000000e+00
[6,] 1.941655e-09 3.883310e-09 1.000000e+00
[7,] 1.323250e-10 2.646500e-10 1.000000e+00
[8,] 1.238755e-11 2.477510e-11 1.000000e+00
[9,] 1.293862e-12 2.587723e-12 1.000000e+00
[10,] 1.780414e-13 3.560827e-13 1.000000e+00
[11,] 1.138428e-14 2.276856e-14 1.000000e+00
[12,] 6.530663e-16 1.306133e-15 1.000000e+00
[13,] 7.414322e-17 1.482864e-16 1.000000e+00
[14,] 4.274717e-18 8.549434e-18 1.000000e+00
[15,] 2.359216e-19 4.718433e-19 1.000000e+00
[16,] 1.267254e-20 2.534509e-20 1.000000e+00
[17,] 5.167310e-20 1.033462e-19 1.000000e+00
[18,] 1.115169e-19 2.230338e-19 1.000000e+00
[19,] 8.358639e-21 1.671728e-20 1.000000e+00
[20,] 1.476172e-21 2.952344e-21 1.000000e+00
[21,] 3.950252e-22 7.900503e-22 1.000000e+00
[22,] 5.342894e-02 1.068579e-01 9.465711e-01
[23,] 1.336434e-01 2.672869e-01 8.663566e-01
[24,] 3.529091e-01 7.058181e-01 6.470909e-01
[25,] 4.119614e-01 8.239227e-01 5.880386e-01
[26,] 3.729196e-01 7.458391e-01 6.270804e-01
[27,] 5.247969e-01 9.504062e-01 4.752031e-01
[28,] 5.249421e-01 9.501158e-01 4.750579e-01
[29,] 6.353883e-01 7.292234e-01 3.646117e-01
[30,] 7.593649e-01 4.812701e-01 2.406351e-01
[31,] 9.164987e-01 1.670025e-01 8.350127e-02
[32,] 9.763017e-01 4.739659e-02 2.369829e-02
[33,] 9.878357e-01 2.432867e-02 1.216433e-02
[34,] 9.932069e-01 1.358619e-02 6.793093e-03
[35,] 9.991843e-01 1.631384e-03 8.156920e-04
[36,] 9.989021e-01 2.195823e-03 1.097912e-03
[37,] 9.997492e-01 5.016622e-04 2.508311e-04
[38,] 9.997225e-01 5.549097e-04 2.774549e-04
[39,] 9.996093e-01 7.814606e-04 3.907303e-04
[40,] 9.995374e-01 9.252735e-04 4.626368e-04
[41,] 9.993452e-01 1.309670e-03 6.548350e-04
[42,] 9.990304e-01 1.939192e-03 9.695959e-04
[43,] 9.987725e-01 2.455099e-03 1.227549e-03
[44,] 9.982674e-01 3.465233e-03 1.732616e-03
[45,] 9.983018e-01 3.396396e-03 1.698198e-03
[46,] 9.978725e-01 4.254967e-03 2.127483e-03
[47,] 9.971970e-01 5.606044e-03 2.803022e-03
[48,] 9.967567e-01 6.486692e-03 3.243346e-03
[49,] 9.955407e-01 8.918551e-03 4.459275e-03
[50,] 9.941309e-01 1.173823e-02 5.869113e-03
[51,] 9.921934e-01 1.561325e-02 7.806627e-03
[52,] 9.919139e-01 1.617213e-02 8.086064e-03
[53,] 9.928354e-01 1.432920e-02 7.164602e-03
[54,] 9.934122e-01 1.317556e-02 6.587779e-03
[55,] 9.930254e-01 1.394924e-02 6.974621e-03
[56,] 9.910870e-01 1.782598e-02 8.912989e-03
[57,] 9.887701e-01 2.245990e-02 1.122995e-02
[58,] 9.865327e-01 2.693455e-02 1.346728e-02
[59,] 9.849200e-01 3.015995e-02 1.507997e-02
[60,] 9.805682e-01 3.886370e-02 1.943185e-02
[61,] 9.803692e-01 3.926159e-02 1.963079e-02
[62,] 9.748395e-01 5.032105e-02 2.516053e-02
[63,] 9.691104e-01 6.177929e-02 3.088964e-02
[64,] 9.626423e-01 7.471534e-02 3.735767e-02
[65,] 9.570526e-01 8.589474e-02 4.294737e-02
[66,] 9.505030e-01 9.899399e-02 4.949699e-02
[67,] 9.442192e-01 1.115616e-01 5.578082e-02
[68,] 9.393808e-01 1.212384e-01 6.061918e-02
[69,] 9.286801e-01 1.426398e-01 7.131991e-02
[70,] 9.160744e-01 1.678512e-01 8.392561e-02
[71,] 9.138621e-01 1.722759e-01 8.613794e-02
[72,] 9.149222e-01 1.701555e-01 8.507777e-02
[73,] 9.254514e-01 1.490972e-01 7.454858e-02
[74,] 9.109431e-01 1.781137e-01 8.905687e-02
[75,] 9.037394e-01 1.925213e-01 9.626064e-02
[76,] 8.898319e-01 2.203362e-01 1.101681e-01
[77,] 8.738742e-01 2.522517e-01 1.261258e-01
[78,] 8.762633e-01 2.474734e-01 1.237367e-01
[79,] 8.594603e-01 2.810794e-01 1.405397e-01
[80,] 8.405111e-01 3.189778e-01 1.594889e-01
[81,] 8.303790e-01 3.392419e-01 1.696210e-01
[82,] 8.219016e-01 3.561967e-01 1.780984e-01
[83,] 7.947044e-01 4.105912e-01 2.052956e-01
[84,] 7.778526e-01 4.442948e-01 2.221474e-01
[85,] 7.514509e-01 4.970983e-01 2.485491e-01
[86,] 7.531011e-01 4.937978e-01 2.468989e-01
[87,] 7.223266e-01 5.553468e-01 2.776734e-01
[88,] 7.056851e-01 5.886298e-01 2.943149e-01
[89,] 6.882257e-01 6.235486e-01 3.117743e-01
[90,] 7.155955e-01 5.688089e-01 2.844045e-01
[91,] 6.899221e-01 6.201558e-01 3.100779e-01
[92,] 6.949713e-01 6.100574e-01 3.050287e-01
[93,] 6.576010e-01 6.847980e-01 3.423990e-01
[94,] 6.205880e-01 7.588239e-01 3.794120e-01
[95,] 5.837792e-01 8.324416e-01 4.162208e-01
[96,] 6.117663e-01 7.764675e-01 3.882337e-01
[97,] 5.872991e-01 8.254018e-01 4.127009e-01
[98,] 5.490469e-01 9.019062e-01 4.509531e-01
[99,] 5.274539e-01 9.450922e-01 4.725461e-01
[100,] 5.116225e-01 9.767551e-01 4.883775e-01
[101,] 4.742279e-01 9.484557e-01 5.257721e-01
[102,] 4.515197e-01 9.030394e-01 5.484803e-01
[103,] 5.438422e-01 9.123156e-01 4.561578e-01
[104,] 5.048428e-01 9.903143e-01 4.951572e-01
[105,] 4.734126e-01 9.468253e-01 5.265874e-01
[106,] 4.320692e-01 8.641383e-01 5.679308e-01
[107,] 3.903455e-01 7.806911e-01 6.096545e-01
[108,] 5.162896e-01 9.674208e-01 4.837104e-01
[109,] 5.206423e-01 9.587153e-01 4.793577e-01
[110,] 5.687433e-01 8.625134e-01 4.312567e-01
[111,] 6.153281e-01 7.693439e-01 3.846719e-01
[112,] 6.526505e-01 6.946990e-01 3.473495e-01
[113,] 6.316432e-01 7.367137e-01 3.683568e-01
[114,] 6.137638e-01 7.724724e-01 3.862362e-01
[115,] 5.905694e-01 8.188612e-01 4.094306e-01
[116,] 5.897569e-01 8.204862e-01 4.102431e-01
[117,] 8.401592e-01 3.196816e-01 1.598408e-01
[118,] 8.159310e-01 3.681380e-01 1.840690e-01
[119,] 8.299922e-01 3.400156e-01 1.700078e-01
[120,] 8.009757e-01 3.980486e-01 1.990243e-01
[121,] 8.058112e-01 3.883776e-01 1.941888e-01
[122,] 8.426335e-01 3.147330e-01 1.573665e-01
[123,] 8.679194e-01 2.641611e-01 1.320806e-01
[124,] 8.415485e-01 3.169030e-01 1.584515e-01
[125,] 8.123154e-01 3.753691e-01 1.876846e-01
[126,] 8.427656e-01 3.144689e-01 1.572344e-01
[127,] 8.381165e-01 3.237670e-01 1.618835e-01
[128,] 8.232419e-01 3.535161e-01 1.767581e-01
[129,] 8.092587e-01 3.814826e-01 1.907413e-01
[130,] 8.375615e-01 3.248770e-01 1.624385e-01
[131,] 8.881289e-01 2.237422e-01 1.118711e-01
[132,] 9.065084e-01 1.869832e-01 9.349158e-02
[133,] 9.129674e-01 1.740653e-01 8.703265e-02
[134,] 9.624208e-01 7.515846e-02 3.757923e-02
[135,] 9.578358e-01 8.432840e-02 4.216420e-02
[136,] 9.960818e-01 7.836376e-03 3.918188e-03
[137,] 9.996803e-01 6.394621e-04 3.197310e-04
[138,] 9.999894e-01 2.123029e-05 1.061514e-05
[139,] 9.999970e-01 5.900122e-06 2.950061e-06
[140,] 1.000000e+00 8.567215e-09 4.283608e-09
[141,] 1.000000e+00 7.388346e-09 3.694173e-09
[142,] 1.000000e+00 9.972700e-09 4.986350e-09
[143,] 1.000000e+00 1.972118e-28 9.860590e-29
[144,] 1.000000e+00 1.793426e-27 8.967132e-28
[145,] 1.000000e+00 1.638491e-26 8.192456e-27
[146,] 1.000000e+00 6.314886e-26 3.157443e-26
[147,] 1.000000e+00 5.652113e-26 2.826056e-26
[148,] 1.000000e+00 1.754885e-25 8.774427e-26
[149,] 1.000000e+00 1.421456e-24 7.107280e-25
[150,] 1.000000e+00 1.348566e-23 6.742828e-24
[151,] 1.000000e+00 1.289737e-22 6.448685e-23
[152,] 1.000000e+00 1.198229e-21 5.991143e-22
[153,] 1.000000e+00 1.083369e-20 5.416847e-21
[154,] 1.000000e+00 7.722281e-20 3.861140e-20
[155,] 1.000000e+00 3.002433e-19 1.501216e-19
[156,] 1.000000e+00 1.483225e-19 7.416124e-20
[157,] 1.000000e+00 7.831256e-19 3.915628e-19
[158,] 1.000000e+00 7.491571e-18 3.745786e-18
[159,] 1.000000e+00 7.359016e-17 3.679508e-17
[160,] 1.000000e+00 7.217332e-16 3.608666e-16
[161,] 1.000000e+00 4.342332e-15 2.171166e-15
[162,] 1.000000e+00 3.064611e-14 1.532306e-14
[163,] 1.000000e+00 1.163534e-13 5.817669e-14
[164,] 1.000000e+00 4.369285e-13 2.184642e-13
[165,] 1.000000e+00 4.221871e-12 2.110935e-12
[166,] 1.000000e+00 2.841519e-11 1.420759e-11
[167,] 1.000000e+00 2.487992e-10 1.243996e-10
[168,] 1.000000e+00 1.556969e-09 7.784845e-10
[169,] 1.000000e+00 1.294316e-08 6.471581e-09
[170,] 1.000000e+00 5.003796e-08 2.501898e-08
[171,] 9.999999e-01 1.280306e-07 6.401529e-08
[172,] 9.999995e-01 9.136157e-07 4.568079e-07
[173,] 9.999989e-01 2.241486e-06 1.120743e-06
[174,] 9.999903e-01 1.944379e-05 9.721893e-06
[175,] 9.999036e-01 1.928495e-04 9.642476e-05
[176,] 9.988025e-01 2.395004e-03 1.197502e-03
> postscript(file="/var/www/html/rcomp/tmp/19t191291198216.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/www/html/rcomp/tmp/21k0c1291198216.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/www/html/rcomp/tmp/31k0c1291198216.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/www/html/rcomp/tmp/41k0c1291198216.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/www/html/rcomp/tmp/51k0c1291198216.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 = 195
Frequency = 1
1 2 3 4 5 6
-1.7198029 -0.7676156 -5.3263585 -11.1276978 -12.6108813 7.2522256
7 8 9 10 11 12
4.4731329 -1.1720609 -0.6953854 -0.4557283 2.3110808 -3.2816927
13 14 15 16 17 18
-1.4234414 -1.5613318 -1.6007992 -3.1882185 -11.2627624 4.6789474
19 20 21 22 23 24
2.4750395 -13.3002576 2.8351254 -10.8135023 1.9975118 -1.4464437
25 26 27 28 29 30
-0.3477339 -0.3611564 -3.1085475 -0.2610348 -5.3548546 -30.4869422
31 32 33 34 35 36
20.9945584 14.1216074 27.4547387 23.2008652 -6.5339208 16.8674038
37 38 39 40 41 42
11.4296483 -1.2937865 17.4889123 26.8233549 -16.9048826 -22.9181328
43 44 45 46 47 48
-17.1906044 -36.6840865 3.2235703 -6.5024285 -0.1679460 2.5117993
49 50 51 52 53 54
2.5214481 0.8320744 -1.7071332 1.8414930 -1.0542861 -3.2150303
55 56 57 58 59 60
-5.5442976 -0.7709546 5.7858967 -1.2995938 0.8640695 -0.1213737
61 62 63 64 65 66
2.4990824 -10.1632459 -4.8945749 -5.1355732 3.1197703 4.9476343
67 68 69 70 71 72
3.7305428 5.3852397 -3.9815502 5.9501096 -3.8954133 -6.7730941
73 74 75 76 77 78
0.9218946 -5.6213858 -6.3322730 6.4848151 -4.8335039 1.8001773
79 80 81 82 83 84
1.1737859 -2.3672398 -7.2435436 -13.9690655 0.3002240 7.4769879
85 86 87 88 89 90
-0.4371550 0.5189475 -8.8461593 3.3216352 1.8268288 -0.8012721
91 92 93 94 95 96
-2.9952447 1.8058491 4.7803808 2.7528515 -2.2795110 -3.3210637
97 98 99 100 101 102
-3.0757932 4.2204877 -9.2988204 0.3799923 -8.4677747 -0.3072005
103 104 105 106 107 108
0.3260557 0.5510663 -7.2042913 5.5318005 -3.3506114 3.8559452
109 110 111 112 113 114
-3.3953500 2.2237201 1.9510623 -9.7805601 -4.4885721 -1.9073413
115 116 117 118 119 120
4.4567243 3.1500409 -7.5594323 -7.5516119 -12.2615312 7.3867977
121 122 123 124 125 126
3.0924123 -2.5066961 -12.0942890 3.7050115 9.7137392 18.1912564
127 128 129 130 131 132
4.2647852 -1.3709353 3.1444008 1.8075136 -7.2188379 12.1776915
133 134 135 136 137 138
2.8493670 5.3007752 6.7211232 6.0797181 6.0787774 -2.3210953
139 140 141 142 143 144
0.5570756 11.3444475 10.1432516 -5.2047227 7.5144077 4.0854560
145 146 147 148 149 150
22.5236895 26.6796005 23.7889883 2.1093050 22.1543113 20.5193993
151 152 153 154 155 156
21.0595484 13.8704131 -0.8537991 1.3271741 -11.2298547 -9.6062574
157 158 159 160 161 162
-0.7031127 -6.6618447 -1.4520292 -4.0016233 -2.7566843 2.1167363
163 164 165 166 167 168
-14.5453084 -2.0712062 -14.6932190 4.5235903 -5.7580431 -4.2437083
169 170 171 172 173 174
-6.5612783 -7.0484084 6.4137076 -7.3819049 -2.3788831 -3.3594804
175 176 177 178 179 180
4.1586971 -5.6790395 0.2580570 0.1408169 -2.1710372 -1.5559614
181 182 183 184 185 186
3.2953389 2.1914164 0.4472874 6.3375972 4.0026439 -5.2945756
187 188 189 190 191 192
1.8957198 -8.5015589 -6.1831542 -4.7900368 -4.9085099 -2.5059264
193 194 195
2.1552754 -8.1001855 -1.7198029
> postscript(file="/var/www/html/rcomp/tmp/6utzf1291198216.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 = 195
Frequency = 1
lag(myerror, k = 1) myerror
0 -1.7198029 NA
1 -0.7676156 -1.7198029
2 -5.3263585 -0.7676156
3 -11.1276978 -5.3263585
4 -12.6108813 -11.1276978
5 7.2522256 -12.6108813
6 4.4731329 7.2522256
7 -1.1720609 4.4731329
8 -0.6953854 -1.1720609
9 -0.4557283 -0.6953854
10 2.3110808 -0.4557283
11 -3.2816927 2.3110808
12 -1.4234414 -3.2816927
13 -1.5613318 -1.4234414
14 -1.6007992 -1.5613318
15 -3.1882185 -1.6007992
16 -11.2627624 -3.1882185
17 4.6789474 -11.2627624
18 2.4750395 4.6789474
19 -13.3002576 2.4750395
20 2.8351254 -13.3002576
21 -10.8135023 2.8351254
22 1.9975118 -10.8135023
23 -1.4464437 1.9975118
24 -0.3477339 -1.4464437
25 -0.3611564 -0.3477339
26 -3.1085475 -0.3611564
27 -0.2610348 -3.1085475
28 -5.3548546 -0.2610348
29 -30.4869422 -5.3548546
30 20.9945584 -30.4869422
31 14.1216074 20.9945584
32 27.4547387 14.1216074
33 23.2008652 27.4547387
34 -6.5339208 23.2008652
35 16.8674038 -6.5339208
36 11.4296483 16.8674038
37 -1.2937865 11.4296483
38 17.4889123 -1.2937865
39 26.8233549 17.4889123
40 -16.9048826 26.8233549
41 -22.9181328 -16.9048826
42 -17.1906044 -22.9181328
43 -36.6840865 -17.1906044
44 3.2235703 -36.6840865
45 -6.5024285 3.2235703
46 -0.1679460 -6.5024285
47 2.5117993 -0.1679460
48 2.5214481 2.5117993
49 0.8320744 2.5214481
50 -1.7071332 0.8320744
51 1.8414930 -1.7071332
52 -1.0542861 1.8414930
53 -3.2150303 -1.0542861
54 -5.5442976 -3.2150303
55 -0.7709546 -5.5442976
56 5.7858967 -0.7709546
57 -1.2995938 5.7858967
58 0.8640695 -1.2995938
59 -0.1213737 0.8640695
60 2.4990824 -0.1213737
61 -10.1632459 2.4990824
62 -4.8945749 -10.1632459
63 -5.1355732 -4.8945749
64 3.1197703 -5.1355732
65 4.9476343 3.1197703
66 3.7305428 4.9476343
67 5.3852397 3.7305428
68 -3.9815502 5.3852397
69 5.9501096 -3.9815502
70 -3.8954133 5.9501096
71 -6.7730941 -3.8954133
72 0.9218946 -6.7730941
73 -5.6213858 0.9218946
74 -6.3322730 -5.6213858
75 6.4848151 -6.3322730
76 -4.8335039 6.4848151
77 1.8001773 -4.8335039
78 1.1737859 1.8001773
79 -2.3672398 1.1737859
80 -7.2435436 -2.3672398
81 -13.9690655 -7.2435436
82 0.3002240 -13.9690655
83 7.4769879 0.3002240
84 -0.4371550 7.4769879
85 0.5189475 -0.4371550
86 -8.8461593 0.5189475
87 3.3216352 -8.8461593
88 1.8268288 3.3216352
89 -0.8012721 1.8268288
90 -2.9952447 -0.8012721
91 1.8058491 -2.9952447
92 4.7803808 1.8058491
93 2.7528515 4.7803808
94 -2.2795110 2.7528515
95 -3.3210637 -2.2795110
96 -3.0757932 -3.3210637
97 4.2204877 -3.0757932
98 -9.2988204 4.2204877
99 0.3799923 -9.2988204
100 -8.4677747 0.3799923
101 -0.3072005 -8.4677747
102 0.3260557 -0.3072005
103 0.5510663 0.3260557
104 -7.2042913 0.5510663
105 5.5318005 -7.2042913
106 -3.3506114 5.5318005
107 3.8559452 -3.3506114
108 -3.3953500 3.8559452
109 2.2237201 -3.3953500
110 1.9510623 2.2237201
111 -9.7805601 1.9510623
112 -4.4885721 -9.7805601
113 -1.9073413 -4.4885721
114 4.4567243 -1.9073413
115 3.1500409 4.4567243
116 -7.5594323 3.1500409
117 -7.5516119 -7.5594323
118 -12.2615312 -7.5516119
119 7.3867977 -12.2615312
120 3.0924123 7.3867977
121 -2.5066961 3.0924123
122 -12.0942890 -2.5066961
123 3.7050115 -12.0942890
124 9.7137392 3.7050115
125 18.1912564 9.7137392
126 4.2647852 18.1912564
127 -1.3709353 4.2647852
128 3.1444008 -1.3709353
129 1.8075136 3.1444008
130 -7.2188379 1.8075136
131 12.1776915 -7.2188379
132 2.8493670 12.1776915
133 5.3007752 2.8493670
134 6.7211232 5.3007752
135 6.0797181 6.7211232
136 6.0787774 6.0797181
137 -2.3210953 6.0787774
138 0.5570756 -2.3210953
139 11.3444475 0.5570756
140 10.1432516 11.3444475
141 -5.2047227 10.1432516
142 7.5144077 -5.2047227
143 4.0854560 7.5144077
144 22.5236895 4.0854560
145 26.6796005 22.5236895
146 23.7889883 26.6796005
147 2.1093050 23.7889883
148 22.1543113 2.1093050
149 20.5193993 22.1543113
150 21.0595484 20.5193993
151 13.8704131 21.0595484
152 -0.8537991 13.8704131
153 1.3271741 -0.8537991
154 -11.2298547 1.3271741
155 -9.6062574 -11.2298547
156 -0.7031127 -9.6062574
157 -6.6618447 -0.7031127
158 -1.4520292 -6.6618447
159 -4.0016233 -1.4520292
160 -2.7566843 -4.0016233
161 2.1167363 -2.7566843
162 -14.5453084 2.1167363
163 -2.0712062 -14.5453084
164 -14.6932190 -2.0712062
165 4.5235903 -14.6932190
166 -5.7580431 4.5235903
167 -4.2437083 -5.7580431
168 -6.5612783 -4.2437083
169 -7.0484084 -6.5612783
170 6.4137076 -7.0484084
171 -7.3819049 6.4137076
172 -2.3788831 -7.3819049
173 -3.3594804 -2.3788831
174 4.1586971 -3.3594804
175 -5.6790395 4.1586971
176 0.2580570 -5.6790395
177 0.1408169 0.2580570
178 -2.1710372 0.1408169
179 -1.5559614 -2.1710372
180 3.2953389 -1.5559614
181 2.1914164 3.2953389
182 0.4472874 2.1914164
183 6.3375972 0.4472874
184 4.0026439 6.3375972
185 -5.2945756 4.0026439
186 1.8957198 -5.2945756
187 -8.5015589 1.8957198
188 -6.1831542 -8.5015589
189 -4.7900368 -6.1831542
190 -4.9085099 -4.7900368
191 -2.5059264 -4.9085099
192 2.1552754 -2.5059264
193 -8.1001855 2.1552754
194 -1.7198029 -8.1001855
195 NA -1.7198029
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.7676156 -1.7198029
[2,] -5.3263585 -0.7676156
[3,] -11.1276978 -5.3263585
[4,] -12.6108813 -11.1276978
[5,] 7.2522256 -12.6108813
[6,] 4.4731329 7.2522256
[7,] -1.1720609 4.4731329
[8,] -0.6953854 -1.1720609
[9,] -0.4557283 -0.6953854
[10,] 2.3110808 -0.4557283
[11,] -3.2816927 2.3110808
[12,] -1.4234414 -3.2816927
[13,] -1.5613318 -1.4234414
[14,] -1.6007992 -1.5613318
[15,] -3.1882185 -1.6007992
[16,] -11.2627624 -3.1882185
[17,] 4.6789474 -11.2627624
[18,] 2.4750395 4.6789474
[19,] -13.3002576 2.4750395
[20,] 2.8351254 -13.3002576
[21,] -10.8135023 2.8351254
[22,] 1.9975118 -10.8135023
[23,] -1.4464437 1.9975118
[24,] -0.3477339 -1.4464437
[25,] -0.3611564 -0.3477339
[26,] -3.1085475 -0.3611564
[27,] -0.2610348 -3.1085475
[28,] -5.3548546 -0.2610348
[29,] -30.4869422 -5.3548546
[30,] 20.9945584 -30.4869422
[31,] 14.1216074 20.9945584
[32,] 27.4547387 14.1216074
[33,] 23.2008652 27.4547387
[34,] -6.5339208 23.2008652
[35,] 16.8674038 -6.5339208
[36,] 11.4296483 16.8674038
[37,] -1.2937865 11.4296483
[38,] 17.4889123 -1.2937865
[39,] 26.8233549 17.4889123
[40,] -16.9048826 26.8233549
[41,] -22.9181328 -16.9048826
[42,] -17.1906044 -22.9181328
[43,] -36.6840865 -17.1906044
[44,] 3.2235703 -36.6840865
[45,] -6.5024285 3.2235703
[46,] -0.1679460 -6.5024285
[47,] 2.5117993 -0.1679460
[48,] 2.5214481 2.5117993
[49,] 0.8320744 2.5214481
[50,] -1.7071332 0.8320744
[51,] 1.8414930 -1.7071332
[52,] -1.0542861 1.8414930
[53,] -3.2150303 -1.0542861
[54,] -5.5442976 -3.2150303
[55,] -0.7709546 -5.5442976
[56,] 5.7858967 -0.7709546
[57,] -1.2995938 5.7858967
[58,] 0.8640695 -1.2995938
[59,] -0.1213737 0.8640695
[60,] 2.4990824 -0.1213737
[61,] -10.1632459 2.4990824
[62,] -4.8945749 -10.1632459
[63,] -5.1355732 -4.8945749
[64,] 3.1197703 -5.1355732
[65,] 4.9476343 3.1197703
[66,] 3.7305428 4.9476343
[67,] 5.3852397 3.7305428
[68,] -3.9815502 5.3852397
[69,] 5.9501096 -3.9815502
[70,] -3.8954133 5.9501096
[71,] -6.7730941 -3.8954133
[72,] 0.9218946 -6.7730941
[73,] -5.6213858 0.9218946
[74,] -6.3322730 -5.6213858
[75,] 6.4848151 -6.3322730
[76,] -4.8335039 6.4848151
[77,] 1.8001773 -4.8335039
[78,] 1.1737859 1.8001773
[79,] -2.3672398 1.1737859
[80,] -7.2435436 -2.3672398
[81,] -13.9690655 -7.2435436
[82,] 0.3002240 -13.9690655
[83,] 7.4769879 0.3002240
[84,] -0.4371550 7.4769879
[85,] 0.5189475 -0.4371550
[86,] -8.8461593 0.5189475
[87,] 3.3216352 -8.8461593
[88,] 1.8268288 3.3216352
[89,] -0.8012721 1.8268288
[90,] -2.9952447 -0.8012721
[91,] 1.8058491 -2.9952447
[92,] 4.7803808 1.8058491
[93,] 2.7528515 4.7803808
[94,] -2.2795110 2.7528515
[95,] -3.3210637 -2.2795110
[96,] -3.0757932 -3.3210637
[97,] 4.2204877 -3.0757932
[98,] -9.2988204 4.2204877
[99,] 0.3799923 -9.2988204
[100,] -8.4677747 0.3799923
[101,] -0.3072005 -8.4677747
[102,] 0.3260557 -0.3072005
[103,] 0.5510663 0.3260557
[104,] -7.2042913 0.5510663
[105,] 5.5318005 -7.2042913
[106,] -3.3506114 5.5318005
[107,] 3.8559452 -3.3506114
[108,] -3.3953500 3.8559452
[109,] 2.2237201 -3.3953500
[110,] 1.9510623 2.2237201
[111,] -9.7805601 1.9510623
[112,] -4.4885721 -9.7805601
[113,] -1.9073413 -4.4885721
[114,] 4.4567243 -1.9073413
[115,] 3.1500409 4.4567243
[116,] -7.5594323 3.1500409
[117,] -7.5516119 -7.5594323
[118,] -12.2615312 -7.5516119
[119,] 7.3867977 -12.2615312
[120,] 3.0924123 7.3867977
[121,] -2.5066961 3.0924123
[122,] -12.0942890 -2.5066961
[123,] 3.7050115 -12.0942890
[124,] 9.7137392 3.7050115
[125,] 18.1912564 9.7137392
[126,] 4.2647852 18.1912564
[127,] -1.3709353 4.2647852
[128,] 3.1444008 -1.3709353
[129,] 1.8075136 3.1444008
[130,] -7.2188379 1.8075136
[131,] 12.1776915 -7.2188379
[132,] 2.8493670 12.1776915
[133,] 5.3007752 2.8493670
[134,] 6.7211232 5.3007752
[135,] 6.0797181 6.7211232
[136,] 6.0787774 6.0797181
[137,] -2.3210953 6.0787774
[138,] 0.5570756 -2.3210953
[139,] 11.3444475 0.5570756
[140,] 10.1432516 11.3444475
[141,] -5.2047227 10.1432516
[142,] 7.5144077 -5.2047227
[143,] 4.0854560 7.5144077
[144,] 22.5236895 4.0854560
[145,] 26.6796005 22.5236895
[146,] 23.7889883 26.6796005
[147,] 2.1093050 23.7889883
[148,] 22.1543113 2.1093050
[149,] 20.5193993 22.1543113
[150,] 21.0595484 20.5193993
[151,] 13.8704131 21.0595484
[152,] -0.8537991 13.8704131
[153,] 1.3271741 -0.8537991
[154,] -11.2298547 1.3271741
[155,] -9.6062574 -11.2298547
[156,] -0.7031127 -9.6062574
[157,] -6.6618447 -0.7031127
[158,] -1.4520292 -6.6618447
[159,] -4.0016233 -1.4520292
[160,] -2.7566843 -4.0016233
[161,] 2.1167363 -2.7566843
[162,] -14.5453084 2.1167363
[163,] -2.0712062 -14.5453084
[164,] -14.6932190 -2.0712062
[165,] 4.5235903 -14.6932190
[166,] -5.7580431 4.5235903
[167,] -4.2437083 -5.7580431
[168,] -6.5612783 -4.2437083
[169,] -7.0484084 -6.5612783
[170,] 6.4137076 -7.0484084
[171,] -7.3819049 6.4137076
[172,] -2.3788831 -7.3819049
[173,] -3.3594804 -2.3788831
[174,] 4.1586971 -3.3594804
[175,] -5.6790395 4.1586971
[176,] 0.2580570 -5.6790395
[177,] 0.1408169 0.2580570
[178,] -2.1710372 0.1408169
[179,] -1.5559614 -2.1710372
[180,] 3.2953389 -1.5559614
[181,] 2.1914164 3.2953389
[182,] 0.4472874 2.1914164
[183,] 6.3375972 0.4472874
[184,] 4.0026439 6.3375972
[185,] -5.2945756 4.0026439
[186,] 1.8957198 -5.2945756
[187,] -8.5015589 1.8957198
[188,] -6.1831542 -8.5015589
[189,] -4.7900368 -6.1831542
[190,] -4.9085099 -4.7900368
[191,] -2.5059264 -4.9085099
[192,] 2.1552754 -2.5059264
[193,] -8.1001855 2.1552754
[194,] -1.7198029 -8.1001855
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.7676156 -1.7198029
2 -5.3263585 -0.7676156
3 -11.1276978 -5.3263585
4 -12.6108813 -11.1276978
5 7.2522256 -12.6108813
6 4.4731329 7.2522256
7 -1.1720609 4.4731329
8 -0.6953854 -1.1720609
9 -0.4557283 -0.6953854
10 2.3110808 -0.4557283
11 -3.2816927 2.3110808
12 -1.4234414 -3.2816927
13 -1.5613318 -1.4234414
14 -1.6007992 -1.5613318
15 -3.1882185 -1.6007992
16 -11.2627624 -3.1882185
17 4.6789474 -11.2627624
18 2.4750395 4.6789474
19 -13.3002576 2.4750395
20 2.8351254 -13.3002576
21 -10.8135023 2.8351254
22 1.9975118 -10.8135023
23 -1.4464437 1.9975118
24 -0.3477339 -1.4464437
25 -0.3611564 -0.3477339
26 -3.1085475 -0.3611564
27 -0.2610348 -3.1085475
28 -5.3548546 -0.2610348
29 -30.4869422 -5.3548546
30 20.9945584 -30.4869422
31 14.1216074 20.9945584
32 27.4547387 14.1216074
33 23.2008652 27.4547387
34 -6.5339208 23.2008652
35 16.8674038 -6.5339208
36 11.4296483 16.8674038
37 -1.2937865 11.4296483
38 17.4889123 -1.2937865
39 26.8233549 17.4889123
40 -16.9048826 26.8233549
41 -22.9181328 -16.9048826
42 -17.1906044 -22.9181328
43 -36.6840865 -17.1906044
44 3.2235703 -36.6840865
45 -6.5024285 3.2235703
46 -0.1679460 -6.5024285
47 2.5117993 -0.1679460
48 2.5214481 2.5117993
49 0.8320744 2.5214481
50 -1.7071332 0.8320744
51 1.8414930 -1.7071332
52 -1.0542861 1.8414930
53 -3.2150303 -1.0542861
54 -5.5442976 -3.2150303
55 -0.7709546 -5.5442976
56 5.7858967 -0.7709546
57 -1.2995938 5.7858967
58 0.8640695 -1.2995938
59 -0.1213737 0.8640695
60 2.4990824 -0.1213737
61 -10.1632459 2.4990824
62 -4.8945749 -10.1632459
63 -5.1355732 -4.8945749
64 3.1197703 -5.1355732
65 4.9476343 3.1197703
66 3.7305428 4.9476343
67 5.3852397 3.7305428
68 -3.9815502 5.3852397
69 5.9501096 -3.9815502
70 -3.8954133 5.9501096
71 -6.7730941 -3.8954133
72 0.9218946 -6.7730941
73 -5.6213858 0.9218946
74 -6.3322730 -5.6213858
75 6.4848151 -6.3322730
76 -4.8335039 6.4848151
77 1.8001773 -4.8335039
78 1.1737859 1.8001773
79 -2.3672398 1.1737859
80 -7.2435436 -2.3672398
81 -13.9690655 -7.2435436
82 0.3002240 -13.9690655
83 7.4769879 0.3002240
84 -0.4371550 7.4769879
85 0.5189475 -0.4371550
86 -8.8461593 0.5189475
87 3.3216352 -8.8461593
88 1.8268288 3.3216352
89 -0.8012721 1.8268288
90 -2.9952447 -0.8012721
91 1.8058491 -2.9952447
92 4.7803808 1.8058491
93 2.7528515 4.7803808
94 -2.2795110 2.7528515
95 -3.3210637 -2.2795110
96 -3.0757932 -3.3210637
97 4.2204877 -3.0757932
98 -9.2988204 4.2204877
99 0.3799923 -9.2988204
100 -8.4677747 0.3799923
101 -0.3072005 -8.4677747
102 0.3260557 -0.3072005
103 0.5510663 0.3260557
104 -7.2042913 0.5510663
105 5.5318005 -7.2042913
106 -3.3506114 5.5318005
107 3.8559452 -3.3506114
108 -3.3953500 3.8559452
109 2.2237201 -3.3953500
110 1.9510623 2.2237201
111 -9.7805601 1.9510623
112 -4.4885721 -9.7805601
113 -1.9073413 -4.4885721
114 4.4567243 -1.9073413
115 3.1500409 4.4567243
116 -7.5594323 3.1500409
117 -7.5516119 -7.5594323
118 -12.2615312 -7.5516119
119 7.3867977 -12.2615312
120 3.0924123 7.3867977
121 -2.5066961 3.0924123
122 -12.0942890 -2.5066961
123 3.7050115 -12.0942890
124 9.7137392 3.7050115
125 18.1912564 9.7137392
126 4.2647852 18.1912564
127 -1.3709353 4.2647852
128 3.1444008 -1.3709353
129 1.8075136 3.1444008
130 -7.2188379 1.8075136
131 12.1776915 -7.2188379
132 2.8493670 12.1776915
133 5.3007752 2.8493670
134 6.7211232 5.3007752
135 6.0797181 6.7211232
136 6.0787774 6.0797181
137 -2.3210953 6.0787774
138 0.5570756 -2.3210953
139 11.3444475 0.5570756
140 10.1432516 11.3444475
141 -5.2047227 10.1432516
142 7.5144077 -5.2047227
143 4.0854560 7.5144077
144 22.5236895 4.0854560
145 26.6796005 22.5236895
146 23.7889883 26.6796005
147 2.1093050 23.7889883
148 22.1543113 2.1093050
149 20.5193993 22.1543113
150 21.0595484 20.5193993
151 13.8704131 21.0595484
152 -0.8537991 13.8704131
153 1.3271741 -0.8537991
154 -11.2298547 1.3271741
155 -9.6062574 -11.2298547
156 -0.7031127 -9.6062574
157 -6.6618447 -0.7031127
158 -1.4520292 -6.6618447
159 -4.0016233 -1.4520292
160 -2.7566843 -4.0016233
161 2.1167363 -2.7566843
162 -14.5453084 2.1167363
163 -2.0712062 -14.5453084
164 -14.6932190 -2.0712062
165 4.5235903 -14.6932190
166 -5.7580431 4.5235903
167 -4.2437083 -5.7580431
168 -6.5612783 -4.2437083
169 -7.0484084 -6.5612783
170 6.4137076 -7.0484084
171 -7.3819049 6.4137076
172 -2.3788831 -7.3819049
173 -3.3594804 -2.3788831
174 4.1586971 -3.3594804
175 -5.6790395 4.1586971
176 0.2580570 -5.6790395
177 0.1408169 0.2580570
178 -2.1710372 0.1408169
179 -1.5559614 -2.1710372
180 3.2953389 -1.5559614
181 2.1914164 3.2953389
182 0.4472874 2.1914164
183 6.3375972 0.4472874
184 4.0026439 6.3375972
185 -5.2945756 4.0026439
186 1.8957198 -5.2945756
187 -8.5015589 1.8957198
188 -6.1831542 -8.5015589
189 -4.7900368 -6.1831542
190 -4.9085099 -4.7900368
191 -2.5059264 -4.9085099
192 2.1552754 -2.5059264
193 -8.1001855 2.1552754
194 -1.7198029 -8.1001855
> 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/www/html/rcomp/tmp/7nlh01291198216.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/www/html/rcomp/tmp/8nlh01291198216.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/www/html/rcomp/tmp/9nlh01291198216.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/www/html/rcomp/tmp/10xuyk1291198216.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/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/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/www/html/rcomp/tmp/11jue81291198216.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/www/html/rcomp/tmp/124vve1291198216.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/www/html/rcomp/tmp/13beaq1291198216.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/www/html/rcomp/tmp/14m5rb1291198216.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/www/html/rcomp/tmp/15p68h1291198216.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/www/html/rcomp/tmp/163yoq1291198216.tab")
+ }
>
> try(system("convert tmp/19t191291198216.ps tmp/19t191291198216.png",intern=TRUE))
character(0)
> try(system("convert tmp/21k0c1291198216.ps tmp/21k0c1291198216.png",intern=TRUE))
character(0)
> try(system("convert tmp/31k0c1291198216.ps tmp/31k0c1291198216.png",intern=TRUE))
character(0)
> try(system("convert tmp/41k0c1291198216.ps tmp/41k0c1291198216.png",intern=TRUE))
character(0)
> try(system("convert tmp/51k0c1291198216.ps tmp/51k0c1291198216.png",intern=TRUE))
character(0)
> try(system("convert tmp/6utzf1291198216.ps tmp/6utzf1291198216.png",intern=TRUE))
character(0)
> try(system("convert tmp/7nlh01291198216.ps tmp/7nlh01291198216.png",intern=TRUE))
character(0)
> try(system("convert tmp/8nlh01291198216.ps tmp/8nlh01291198216.png",intern=TRUE))
character(0)
> try(system("convert tmp/9nlh01291198216.ps tmp/9nlh01291198216.png",intern=TRUE))
character(0)
> try(system("convert tmp/10xuyk1291198216.ps tmp/10xuyk1291198216.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.999 1.872 65.751