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
+ ,1
+ ,27
+ ,5
+ ,26
+ ,49
+ ,35
+ ,4
+ ,1
+ ,36
+ ,4
+ ,25
+ ,45
+ ,34
+ ,5
+ ,1
+ ,25
+ ,4
+ ,17
+ ,54
+ ,13
+ ,2
+ ,1
+ ,27
+ ,3
+ ,37
+ ,36
+ ,35
+ ,3
+ ,2
+ ,25
+ ,3
+ ,35
+ ,36
+ ,28
+ ,5
+ ,2
+ ,44
+ ,3
+ ,15
+ ,53
+ ,32
+ ,4
+ ,1
+ ,50
+ ,4
+ ,27
+ ,46
+ ,35
+ ,4
+ ,1
+ ,41
+ ,4
+ ,36
+ ,42
+ ,36
+ ,4
+ ,1
+ ,48
+ ,5
+ ,25
+ ,41
+ ,27
+ ,4
+ ,2
+ ,43
+ ,4
+ ,30
+ ,45
+ ,29
+ ,5
+ ,2
+ ,47
+ ,2
+ ,27
+ ,47
+ ,27
+ ,4
+ ,2
+ ,41
+ ,3
+ ,33
+ ,42
+ ,28
+ ,3
+ ,1
+ ,44
+ ,2
+ ,29
+ ,45
+ ,29
+ ,4
+ ,2
+ ,47
+ ,5
+ ,30
+ ,40
+ ,28
+ ,3
+ ,2
+ ,40
+ ,3
+ ,25
+ ,45
+ ,30
+ ,3
+ ,2
+ ,46
+ ,3
+ ,23
+ ,40
+ ,25
+ ,4
+ ,1
+ ,28
+ ,3
+ ,26
+ ,42
+ ,15
+ ,3
+ ,1
+ ,56
+ ,3
+ ,24
+ ,45
+ ,33
+ ,4
+ ,2
+ ,49
+ ,4
+ ,35
+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+ ,4
+ ,23
+ ,43
+ ,30
+ ,4
+ ,2
+ ,43
+ ,4
+ ,32
+ ,41
+ ,22
+ ,3
+ ,2
+ ,31
+ ,3
+ ,22
+ ,45
+ ,28
+ ,2
+ ,2
+ ,51
+ ,3
+ ,17
+ ,39
+ ,24
+ ,4
+ ,2
+ ,58
+ ,4
+ ,35
+ ,38
+ ,33
+ ,2
+ ,2
+ ,25
+ ,5
+ ,34
+ ,41
+ ,37)
+ ,dim=c(7
+ ,195)
+ ,dimnames=list(c('Teamwork33'
+ ,'geslacht'
+ ,'leeftijd'
+ ,'opleiding'
+ ,'Neuroticisme'
+ ,'Extraversie'
+ ,'Openheid')
+ ,1:195))
> y <- array(NA,dim=c(7,195),dimnames=list(c('Teamwork33','geslacht','leeftijd','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
Teamwork33 geslacht leeftijd opleiding Neuroticisme Extraversie Openheid
1 4 1 27 5 26 49 35
2 4 1 36 4 25 45 34
3 5 1 25 4 17 54 13
4 2 1 27 3 37 36 35
5 3 2 25 3 35 36 28
6 5 2 44 3 15 53 32
7 4 1 50 4 27 46 35
8 4 1 41 4 36 42 36
9 4 1 48 5 25 41 27
10 4 2 43 4 30 45 29
11 5 2 47 2 27 47 27
12 4 2 41 3 33 42 28
13 3 1 44 2 29 45 29
14 4 2 47 5 30 40 28
15 3 2 40 3 25 45 30
16 3 2 46 3 23 40 25
17 4 1 28 3 26 42 15
18 3 1 56 3 24 45 33
19 4 2 49 4 35 47 31
20 2 2 25 4 39 31 37
21 4 2 41 4 23 46 37
22 3 2 26 3 32 34 34
23 4 1 50 5 29 43 32
24 4 1 47 4 26 45 21
25 3 1 52 2 21 42 25
26 3 2 37 5 35 51 32
27 2 2 41 3 23 44 28
28 4 1 45 4 21 47 22
29 5 2 26 4 28 47 25
30 4 1 0 3 30 41 26
31 2 1 52 4 21 44 34
32 5 1 46 2 29 51 34
33 4 1 58 3 28 46 36
34 3 1 54 5 19 47 36
35 4 1 29 3 26 46 26
36 2 2 50 3 33 38 26
37 3 1 43 2 34 50 34
38 3 2 30 3 33 48 33
39 3 2 47 2 40 36 31
40 5 1 45 3 24 51 33
41 0 2 48 1 35 35 22
42 4 2 48 3 35 49 29
43 4 2 26 4 32 38 24
44 4 1 46 5 20 47 37
45 2 2 0 3 35 36 32
46 4 2 50 3 35 47 23
47 3 1 25 4 21 46 29
48 4 1 47 2 33 43 35
49 1 2 47 2 40 53 20
50 2 1 41 3 22 55 28
51 2 2 45 2 35 39 26
52 4 2 41 4 20 55 36
53 3 2 45 5 28 41 26
54 4 2 40 3 46 33 33
55 3 1 29 4 18 52 25
56 3 2 34 5 22 42 29
57 5 1 45 5 20 56 32
58 3 2 52 3 25 46 35
59 2 2 41 4 31 33 24
60 1 2 48 3 21 51 31
61 2 2 45 3 23 46 29
62 5 1 54 2 26 46 27
63 4 2 25 3 34 50 29
64 4 2 26 4 31 46 29
65 3 1 28 4 23 51 27
66 4 2 50 4 31 48 34
67 4 2 48 4 26 44 32
68 2 2 51 3 36 38 31
69 3 2 53 3 28 42 31
70 4 1 37 3 34 39 31
71 3 1 56 2 25 45 16
72 2 1 43 3 33 31 25
73 4 1 34 3 46 29 27
74 4 1 42 3 24 48 32
75 3 2 32 3 32 38 28
76 5 2 31 5 33 55 25
77 1 1 46 3 42 32 25
78 3 2 30 5 17 51 36
79 3 2 47 4 36 53 36
80 5 2 33 4 40 47 36
81 2 1 25 4 30 45 27
82 3 1 25 5 19 33 29
83 3 2 21 4 33 49 32
84 4 2 36 5 35 46 29
85 2 2 50 3 23 42 31
86 4 2 48 3 15 56 34
87 3 2 48 2 38 35 27
88 3 1 25 3 37 40 28
89 3 1 48 4 23 44 32
90 2 2 49 5 41 46 33
91 3 1 27 5 34 46 29
92 2 1 28 3 38 39 32
93 4 2 43 2 45 35 35
94 4 2 48 3 27 48 33
95 2 2 48 4 46 42 27
96 1 1 25 1 26 39 16
97 5 2 49 4 44 39 32
98 4 1 26 3 36 41 26
99 4 1 51 3 20 52 32
100 4 2 25 4 44 45 38
101 3 1 29 3 27 42 24
102 3 1 29 4 27 44 26
103 1 1 43 2 41 33 19
104 5 2 46 3 30 42 37
105 3 1 44 3 33 46 25
106 3 1 25 3 37 45 24
107 2 1 51 2 30 40 23
108 4 1 42 5 20 48 28
109 4 2 53 5 44 32 38
110 3 1 25 4 20 53 28
111 4 2 49 2 33 39 28
112 4 1 51 3 31 45 26
113 2 2 20 3 23 36 21
114 3 2 44 3 33 38 35
115 3 2 38 4 33 49 31
116 3 1 46 5 32 46 34
117 4 2 42 4 25 43 30
118 5 1 29 0 22 37 30
119 3 2 46 4 16 48 24
120 3 2 49 2 36 45 27
121 2 2 51 3 35 32 26
122 3 1 38 3 25 46 30
123 1 1 41 1 27 20 15
124 4 2 47 3 32 42 28
125 4 2 44 3 36 45 34
126 4 2 47 3 51 29 29
127 3 2 46 3 30 51 26
128 5 1 44 4 20 55 31
129 2 2 28 3 29 50 28
130 2 2 47 4 26 44 33
131 3 2 28 4 20 41 32
132 3 1 41 5 40 40 33
133 2 2 45 4 29 47 31
134 1 2 46 4 32 42 37
135 3 1 46 4 33 40 27
136 5 2 22 3 32 51 19
137 4 2 33 3 34 43 27
138 4 1 41 4 24 45 31
139 4 2 47 5 25 41 38
140 3 1 25 3 41 41 22
141 5 2 42 3 39 37 35
142 3 2 47 3 21 46 35
143 3 2 50 3 38 38 30
144 3 1 55 5 28 39 41
145 3 1 21 3 37 45 25
146 4 1 0 3 26 46 28
147 2 1 52 3 30 39 45
148 2 2 49 4 25 21 21
149 4 2 46 4 38 31 33
150 3 1 0 4 31 35 25
151 3 2 45 3 31 49 29
152 2 2 52 3 27 40 31
153 3 1 0 3 21 45 29
154 3 2 40 4 26 46 31
155 4 2 49 4 37 45 31
156 1 1 38 5 28 34 25
157 1 1 32 5 29 41 27
158 5 2 46 4 33 43 26
159 4 2 32 3 41 45 26
160 3 2 41 3 19 48 23
161 3 2 43 3 37 43 27
162 4 1 44 4 36 45 24
163 3 1 47 5 27 45 35
164 2 2 28 3 33 34 24
165 1 1 52 1 29 40 32
166 1 1 27 2 42 40 24
167 5 2 45 5 27 55 24
168 4 1 27 4 47 44 38
169 3 1 25 4 17 44 36
170 4 1 28 4 34 48 24
171 5 1 25 3 32 51 18
172 4 1 52 4 25 49 34
173 4 1 44 3 27 33 23
174 2 2 43 3 37 43 35
175 3 2 47 4 34 44 22
176 4 2 52 4 27 44 34
177 3 2 40 2 37 41 28
178 4 1 42 3 32 45 34
179 3 1 45 5 26 44 32
180 4 1 45 2 29 44 24
181 1 1 50 5 28 40 34
182 2 1 49 3 19 48 33
183 3 1 52 2 46 49 33
184 3 2 48 3 31 46 29
185 5 2 51 3 42 49 38
186 4 2 49 4 33 55 24
187 3 2 31 4 39 51 25
188 3 2 43 3 27 46 37
189 3 2 31 3 35 37 33
190 3 2 28 4 23 43 30
191 4 2 43 4 32 41 22
192 3 2 31 3 22 45 28
193 2 2 51 3 17 39 24
194 4 2 58 4 35 38 33
195 2 2 25 5 34 41 37
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) geslacht leeftijd opleiding Neuroticisme
-0.6278112 0.0005599 -0.0013455 0.0961985 0.0166752
Extraversie Openheid
0.0635976 0.0110399
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-2.760941 -0.624160 -0.005276 0.707078 2.615111
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.6278112 0.8163521 -0.769 0.443
geslacht 0.0005599 0.1491915 0.004 0.997
leeftijd -0.0013455 0.0064773 -0.208 0.836
opleiding 0.0961985 0.0787212 1.222 0.223
Neuroticisme 0.0166752 0.0108540 1.536 0.126
Extraversie 0.0635976 0.0124889 5.092 8.55e-07 ***
Openheid 0.0110399 0.0146231 0.755 0.451
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1 on 188 degrees of freedom
Multiple R-squared: 0.1493, Adjusted R-squared: 0.1221
F-statistic: 5.498 on 6 and 188 DF, p-value: 2.879e-05
> 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.1120368804 0.2240737608 0.8879631
[2,] 0.0625846745 0.1251693491 0.9374153
[3,] 0.0235730748 0.0471461496 0.9764269
[4,] 0.0353953665 0.0707907330 0.9646046
[5,] 0.0180466631 0.0360933263 0.9819533
[6,] 0.0404879030 0.0809758060 0.9595121
[7,] 0.0238242710 0.0476485419 0.9761757
[8,] 0.0178164722 0.0356329444 0.9821835
[9,] 0.0144192487 0.0288384975 0.9855808
[10,] 0.0143795842 0.0287591684 0.9856204
[11,] 0.0077913465 0.0155826930 0.9922087
[12,] 0.0040667913 0.0081335827 0.9959332
[13,] 0.0033282511 0.0066565022 0.9966717
[14,] 0.0017464990 0.0034929980 0.9982535
[15,] 0.0009016232 0.0018032464 0.9990984
[16,] 0.0004410418 0.0008820836 0.9995590
[17,] 0.0053008636 0.0106017271 0.9946991
[18,] 0.0284795344 0.0569590688 0.9715205
[19,] 0.0196212288 0.0392424575 0.9803788
[20,] 0.0231513987 0.0463027973 0.9768486
[21,] 0.0186733332 0.0373466664 0.9813267
[22,] 0.0355360462 0.0710720923 0.9644640
[23,] 0.0410922875 0.0821845750 0.9589077
[24,] 0.0320636228 0.0641272456 0.9679364
[25,] 0.0248461054 0.0496922108 0.9751539
[26,] 0.0175582568 0.0351165136 0.9824417
[27,] 0.0209910611 0.0419821222 0.9790089
[28,] 0.0261112865 0.0522225731 0.9738887
[29,] 0.0273918470 0.0547836939 0.9726082
[30,] 0.0206803456 0.0413606911 0.9793197
[31,] 0.0231299173 0.0462598345 0.9768701
[32,] 0.1148810941 0.2297621883 0.8851189
[33,] 0.0909181330 0.1818362660 0.9090819
[34,] 0.0872046855 0.1744093709 0.9127953
[35,] 0.0688286343 0.1376572686 0.9311714
[36,] 0.0700706498 0.1401412996 0.9299294
[37,] 0.0554451755 0.1108903510 0.9445548
[38,] 0.0557605487 0.1115210974 0.9442395
[39,] 0.0571608696 0.1143217393 0.9428391
[40,] 0.3272900294 0.6545800587 0.6727100
[41,] 0.5195029422 0.9609941156 0.4804971
[42,] 0.4919076325 0.9838152651 0.5080924
[43,] 0.4490730081 0.8981460162 0.5509270
[44,] 0.4113071223 0.8226142446 0.5886929
[45,] 0.4765892951 0.9531785901 0.5234107
[46,] 0.4813703910 0.9627407820 0.5186296
[47,] 0.4481291433 0.8962582866 0.5518709
[48,] 0.4304252550 0.8608505101 0.5695747
[49,] 0.3885596669 0.7771193338 0.6114403
[50,] 0.3646395629 0.7292791257 0.6353604
[51,] 0.5990425697 0.8019148606 0.4009574
[52,] 0.6094187844 0.7811624312 0.3905812
[53,] 0.7074245358 0.5851509283 0.2925755
[54,] 0.6735781727 0.6528436547 0.3264218
[55,] 0.6415185241 0.7169629517 0.3584815
[56,] 0.6359442624 0.7281114753 0.3640557
[57,] 0.6004222946 0.7991554108 0.3995777
[58,] 0.5809426644 0.8381146713 0.4190573
[59,] 0.5730011827 0.8539976346 0.4269988
[60,] 0.5295296533 0.9409406935 0.4704703
[61,] 0.5192756093 0.9614487813 0.4807244
[62,] 0.4766742886 0.9533485772 0.5233257
[63,] 0.4484646449 0.8969292898 0.5515354
[64,] 0.4752111811 0.9504223622 0.5247888
[65,] 0.4458837427 0.8917674853 0.5541163
[66,] 0.4042263845 0.8084527690 0.5957736
[67,] 0.3864233926 0.7728467852 0.6135766
[68,] 0.4814525126 0.9629050252 0.5185475
[69,] 0.4667317977 0.9334635953 0.5332682
[70,] 0.4705896190 0.9411792381 0.5294104
[71,] 0.4898475586 0.9796951171 0.5101524
[72,] 0.5553140861 0.8893718279 0.4446859
[73,] 0.5248475797 0.9503048406 0.4751524
[74,] 0.5082141547 0.9835716906 0.4917858
[75,] 0.4704143708 0.9408287415 0.5295856
[76,] 0.4631527241 0.9263054483 0.5368473
[77,] 0.4263120766 0.8526241532 0.5736879
[78,] 0.3944300300 0.7888600601 0.6055700
[79,] 0.3568867199 0.7137734398 0.6431133
[80,] 0.3238352887 0.6476705773 0.6761647
[81,] 0.4085694876 0.8171389752 0.5914305
[82,] 0.3909574969 0.7819149937 0.6090425
[83,] 0.4008522648 0.8017045296 0.5991477
[84,] 0.4176116111 0.8352232222 0.5823884
[85,] 0.3896383362 0.7792766724 0.6103617
[86,] 0.4292144955 0.8584289910 0.5707855
[87,] 0.4871488386 0.9742976773 0.5128512
[88,] 0.5686993461 0.8626013078 0.4313007
[89,] 0.5585999818 0.8828000363 0.4414000
[90,] 0.5270027653 0.9459944694 0.4729972
[91,] 0.4869918857 0.9739837715 0.5130081
[92,] 0.4456978282 0.8913956564 0.5543022
[93,] 0.4083067428 0.8166134856 0.5916933
[94,] 0.4629221713 0.9258443426 0.5370778
[95,] 0.5586200298 0.8827599404 0.4413800
[96,] 0.5213332029 0.9573335942 0.4786668
[97,] 0.4848845411 0.9697690822 0.5151155
[98,] 0.4721058916 0.9442117833 0.5278941
[99,] 0.4502008973 0.9004017945 0.5497991
[100,] 0.4523981431 0.9047962862 0.5476019
[101,] 0.4289610894 0.8579221788 0.5710389
[102,] 0.4383398875 0.8766797750 0.5616601
[103,] 0.4190813757 0.8381627515 0.5809186
[104,] 0.3919878836 0.7839757673 0.6080121
[105,] 0.3518288268 0.7036576535 0.6481712
[106,] 0.3302741275 0.6605482551 0.6697259
[107,] 0.3069588695 0.6139177389 0.6930411
[108,] 0.2968217224 0.5936434447 0.7031783
[109,] 0.5487507130 0.9024985739 0.4512493
[110,] 0.5077411711 0.9845176578 0.4922588
[111,] 0.4683097572 0.9366195143 0.5316902
[112,] 0.4393834850 0.8787669700 0.5606165
[113,] 0.4005383713 0.8010767426 0.5994616
[114,] 0.3642807653 0.7285615306 0.6357192
[115,] 0.3542897974 0.7085795949 0.6457102
[116,] 0.3287555801 0.6575111602 0.6712444
[117,] 0.3535685248 0.7071370496 0.6464315
[118,] 0.3302002774 0.6604005547 0.6697997
[119,] 0.3615615915 0.7231231829 0.6384384
[120,] 0.4250157846 0.8500315692 0.5749842
[121,] 0.4483015471 0.8966030943 0.5516985
[122,] 0.4053521795 0.8107043590 0.5946478
[123,] 0.3671114748 0.7342229495 0.6328885
[124,] 0.4234586948 0.8469173897 0.5765413
[125,] 0.6170688152 0.7658623697 0.3829312
[126,] 0.5725992636 0.8548014729 0.4274007
[127,] 0.5952210068 0.8095579864 0.4047790
[128,] 0.5715939115 0.8568121770 0.4284061
[129,] 0.5679333472 0.8641333056 0.4320667
[130,] 0.5563831257 0.8872337487 0.4436169
[131,] 0.5107375843 0.9785248314 0.4892624
[132,] 0.6612328596 0.6775342807 0.3387671
[133,] 0.6176836776 0.7646326449 0.3823163
[134,] 0.5701949473 0.8596101055 0.4298051
[135,] 0.5365576416 0.9268847168 0.4634424
[136,] 0.4937514809 0.9875029618 0.5062485
[137,] 0.4918792111 0.9837584222 0.5081208
[138,] 0.4673350847 0.9346701694 0.5326649
[139,] 0.4230376399 0.8460752797 0.5769624
[140,] 0.5042734533 0.9914530934 0.4957265
[141,] 0.4862557346 0.9725114692 0.5137443
[142,] 0.4598862073 0.9197724146 0.5401138
[143,] 0.4382090094 0.8764180189 0.5617910
[144,] 0.4096109545 0.8192219090 0.5903890
[145,] 0.3638524968 0.7277049936 0.6361475
[146,] 0.3213589279 0.6427178559 0.6786411
[147,] 0.3584797531 0.7169595063 0.6415202
[148,] 0.5367545933 0.9264908134 0.4632454
[149,] 0.6149227924 0.7701544152 0.3850772
[150,] 0.5764416501 0.8471166999 0.4235583
[151,] 0.5246195739 0.9507608523 0.4753804
[152,] 0.4688411948 0.9376823897 0.5311588
[153,] 0.4183584582 0.8367169163 0.5816415
[154,] 0.3672906029 0.7345812057 0.6327094
[155,] 0.3205045179 0.6410090357 0.6794955
[156,] 0.3866325043 0.7732650086 0.6133675
[157,] 0.6566674909 0.6866650181 0.3433325
[158,] 0.6830876620 0.6338246761 0.3169123
[159,] 0.6364724196 0.7270551607 0.3635276
[160,] 0.5886558526 0.8226882948 0.4113441
[161,] 0.5261370485 0.9477259030 0.4738630
[162,] 0.5700592238 0.8598815525 0.4299408
[163,] 0.5738527343 0.8522945314 0.4261473
[164,] 0.6340853658 0.7318292683 0.3659146
[165,] 0.7195957746 0.5608084508 0.2804042
[166,] 0.6633465422 0.6733069155 0.3366535
[167,] 0.6404110068 0.7191779864 0.3595890
[168,] 0.6069555417 0.7860889166 0.3930445
[169,] 0.6658383751 0.6683232497 0.3341616
[170,] 0.7481810899 0.5036378201 0.2518189
[171,] 0.8776338424 0.2447323152 0.1223662
[172,] 0.8409866705 0.3180266590 0.1590133
[173,] 0.7850985135 0.4298029731 0.2149015
[174,] 0.6711384901 0.6577230198 0.3288615
[175,] 0.6090558822 0.7818882356 0.3909441
[176,] 0.5054879596 0.9890240808 0.4945120
> postscript(file="/var/www/html/rcomp/tmp/14b2p1293197533.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/24b2p1293197533.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/34b2p1293197533.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/4ek1a1293197533.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/5ek1a1293197533.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
0.246356282 0.636769933 1.414830128 -0.917904930 0.189473695 1.423223523
7 8 9 10 11 12
0.547619582 0.628783798 0.888387404 0.617452447 1.760141730 0.862767061
13 14 15 16 17 18
-0.171569889 0.855663825 -0.218049756 0.196561124 1.106079923 -0.212405869
19 20 21 22 23 24
0.392874905 -0.754796700 0.579570673 0.301800422 0.641983184 0.778414358
25 26 27 28 29 30
0.207547934 -0.984900185 -1.097676536 0.720864021 1.544893192 0.943863072
31 32 33 34 35 36
-1.211403375 1.394336216 0.626867290 -0.484433047 0.731596227 -0.848653058
37 38 39 40 41 42
-0.629478579 -0.588818739 0.198778413 1.391207846 -2.457345062 0.382612549
43 44 45 46 47 48
1.061610638 0.477087646 -0.888324195 0.578738177 -0.319728348 0.826721814
49 50 51 52 53 54
-2.760941409 -1.780014749 -0.856130080 0.068257877 -0.155194695 1.161823163
55 56 57 58 59 60
-0.601746590 -0.166661889 0.958563465 -0.320700471 -0.583543371 -2.533210233
61 62 63 64 65 66
-1.230529461 1.850393120 0.304742915 0.514305688 -0.644950128 0.364203774
67 68 69 70 71 72
0.721358588 -0.952532507 -0.070830499 0.998942737 0.054795843 -0.401288914
73 74 75 76 77 78
1.474939632 0.589003877 0.121722731 0.863265964 -1.610926290 -0.738325722
79 80 81 82 83 84
-1.063276270 1.232771116 -1.384127365 0.444191903 -0.749684707 0.364861862
85 86 87 88 89 90
-0.991491317 0.215733121 0.341231440 -0.097706967 -0.228056004 -1.761856776
91 92 93 94 95 96
-0.630012820 -1.090907567 1.129458475 0.535451752 -1.429749852 -1.525806817
97 98 99 100 101 102
1.740539196 0.878795951 0.413423982 0.260421588 -0.008608827 -0.254082298
103 104 105 106 107 108
-1.499447367 1.820161056 -0.353906989 -0.371535224 -0.794599040 0.507467074
109 110 111 112 113 114
1.028666402 -0.737196307 1.160522549 0.741419710 -0.539872779 0.043914629
115 116 117 118 119 120
-0.715770775 -0.626296933 0.815637936 2.615110953 -0.280651995 -0.260048456
121 122 123 124 125 126
-0.499072394 -0.283778449 -0.301559669 0.887515403 0.559746050 1.386416012
127 128 129 130 131 132
-0.630778176 1.128053928 -1.596804814 -1.291026846 -0.014708383 -0.373800484
133 134 135 136 137 138
-1.512456289 -2.309387772 -0.087908808 1.380858087 0.782769986 0.693292452
139 140 141 142 143 144
0.765042998 -0.161765744 2.004770210 -0.260727506 0.023811555 -0.179582836
145 146 147 148 149 150
-0.387957252 0.670496018 -1.068732316 0.323562403 1.334294220 0.223614745
151 152 153 154 155 156
-0.554723424 -0.928305727 -0.193570535 -0.405560906 0.486719742 -1.707830550
157 158 159 160 161 162
-2.199841714 1.731778431 0.548543124 -0.230166696 -0.253800168 0.574506505
163 164 165 166 167 168
-0.489017956 -0.601784642 -1.779738962 -2.038033551 0.993194233 0.277244702
169 170 171 172 173 174
-0.203111901 0.395535596 1.396494526 0.403908136 1.594992207 -1.342119391
175 176 177 178 179 180
-0.302989155 0.687985751 -0.045482999 0.624315551 -0.378316580 0.948572731
181 182 183 184 185 186
-2.172628746 -1.329241533 -0.742833183 -0.359894109 1.170563931 -0.005276055
187 188 189 190 191 192
-0.886196154 -0.388240367 0.078749794 -0.169849190 0.915771752 -0.158054266
193 194 195
-0.622022813 0.955283043 -1.403595180
> postscript(file="/var/www/html/rcomp/tmp/6ek1a1293197533.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 0.246356282 NA
1 0.636769933 0.246356282
2 1.414830128 0.636769933
3 -0.917904930 1.414830128
4 0.189473695 -0.917904930
5 1.423223523 0.189473695
6 0.547619582 1.423223523
7 0.628783798 0.547619582
8 0.888387404 0.628783798
9 0.617452447 0.888387404
10 1.760141730 0.617452447
11 0.862767061 1.760141730
12 -0.171569889 0.862767061
13 0.855663825 -0.171569889
14 -0.218049756 0.855663825
15 0.196561124 -0.218049756
16 1.106079923 0.196561124
17 -0.212405869 1.106079923
18 0.392874905 -0.212405869
19 -0.754796700 0.392874905
20 0.579570673 -0.754796700
21 0.301800422 0.579570673
22 0.641983184 0.301800422
23 0.778414358 0.641983184
24 0.207547934 0.778414358
25 -0.984900185 0.207547934
26 -1.097676536 -0.984900185
27 0.720864021 -1.097676536
28 1.544893192 0.720864021
29 0.943863072 1.544893192
30 -1.211403375 0.943863072
31 1.394336216 -1.211403375
32 0.626867290 1.394336216
33 -0.484433047 0.626867290
34 0.731596227 -0.484433047
35 -0.848653058 0.731596227
36 -0.629478579 -0.848653058
37 -0.588818739 -0.629478579
38 0.198778413 -0.588818739
39 1.391207846 0.198778413
40 -2.457345062 1.391207846
41 0.382612549 -2.457345062
42 1.061610638 0.382612549
43 0.477087646 1.061610638
44 -0.888324195 0.477087646
45 0.578738177 -0.888324195
46 -0.319728348 0.578738177
47 0.826721814 -0.319728348
48 -2.760941409 0.826721814
49 -1.780014749 -2.760941409
50 -0.856130080 -1.780014749
51 0.068257877 -0.856130080
52 -0.155194695 0.068257877
53 1.161823163 -0.155194695
54 -0.601746590 1.161823163
55 -0.166661889 -0.601746590
56 0.958563465 -0.166661889
57 -0.320700471 0.958563465
58 -0.583543371 -0.320700471
59 -2.533210233 -0.583543371
60 -1.230529461 -2.533210233
61 1.850393120 -1.230529461
62 0.304742915 1.850393120
63 0.514305688 0.304742915
64 -0.644950128 0.514305688
65 0.364203774 -0.644950128
66 0.721358588 0.364203774
67 -0.952532507 0.721358588
68 -0.070830499 -0.952532507
69 0.998942737 -0.070830499
70 0.054795843 0.998942737
71 -0.401288914 0.054795843
72 1.474939632 -0.401288914
73 0.589003877 1.474939632
74 0.121722731 0.589003877
75 0.863265964 0.121722731
76 -1.610926290 0.863265964
77 -0.738325722 -1.610926290
78 -1.063276270 -0.738325722
79 1.232771116 -1.063276270
80 -1.384127365 1.232771116
81 0.444191903 -1.384127365
82 -0.749684707 0.444191903
83 0.364861862 -0.749684707
84 -0.991491317 0.364861862
85 0.215733121 -0.991491317
86 0.341231440 0.215733121
87 -0.097706967 0.341231440
88 -0.228056004 -0.097706967
89 -1.761856776 -0.228056004
90 -0.630012820 -1.761856776
91 -1.090907567 -0.630012820
92 1.129458475 -1.090907567
93 0.535451752 1.129458475
94 -1.429749852 0.535451752
95 -1.525806817 -1.429749852
96 1.740539196 -1.525806817
97 0.878795951 1.740539196
98 0.413423982 0.878795951
99 0.260421588 0.413423982
100 -0.008608827 0.260421588
101 -0.254082298 -0.008608827
102 -1.499447367 -0.254082298
103 1.820161056 -1.499447367
104 -0.353906989 1.820161056
105 -0.371535224 -0.353906989
106 -0.794599040 -0.371535224
107 0.507467074 -0.794599040
108 1.028666402 0.507467074
109 -0.737196307 1.028666402
110 1.160522549 -0.737196307
111 0.741419710 1.160522549
112 -0.539872779 0.741419710
113 0.043914629 -0.539872779
114 -0.715770775 0.043914629
115 -0.626296933 -0.715770775
116 0.815637936 -0.626296933
117 2.615110953 0.815637936
118 -0.280651995 2.615110953
119 -0.260048456 -0.280651995
120 -0.499072394 -0.260048456
121 -0.283778449 -0.499072394
122 -0.301559669 -0.283778449
123 0.887515403 -0.301559669
124 0.559746050 0.887515403
125 1.386416012 0.559746050
126 -0.630778176 1.386416012
127 1.128053928 -0.630778176
128 -1.596804814 1.128053928
129 -1.291026846 -1.596804814
130 -0.014708383 -1.291026846
131 -0.373800484 -0.014708383
132 -1.512456289 -0.373800484
133 -2.309387772 -1.512456289
134 -0.087908808 -2.309387772
135 1.380858087 -0.087908808
136 0.782769986 1.380858087
137 0.693292452 0.782769986
138 0.765042998 0.693292452
139 -0.161765744 0.765042998
140 2.004770210 -0.161765744
141 -0.260727506 2.004770210
142 0.023811555 -0.260727506
143 -0.179582836 0.023811555
144 -0.387957252 -0.179582836
145 0.670496018 -0.387957252
146 -1.068732316 0.670496018
147 0.323562403 -1.068732316
148 1.334294220 0.323562403
149 0.223614745 1.334294220
150 -0.554723424 0.223614745
151 -0.928305727 -0.554723424
152 -0.193570535 -0.928305727
153 -0.405560906 -0.193570535
154 0.486719742 -0.405560906
155 -1.707830550 0.486719742
156 -2.199841714 -1.707830550
157 1.731778431 -2.199841714
158 0.548543124 1.731778431
159 -0.230166696 0.548543124
160 -0.253800168 -0.230166696
161 0.574506505 -0.253800168
162 -0.489017956 0.574506505
163 -0.601784642 -0.489017956
164 -1.779738962 -0.601784642
165 -2.038033551 -1.779738962
166 0.993194233 -2.038033551
167 0.277244702 0.993194233
168 -0.203111901 0.277244702
169 0.395535596 -0.203111901
170 1.396494526 0.395535596
171 0.403908136 1.396494526
172 1.594992207 0.403908136
173 -1.342119391 1.594992207
174 -0.302989155 -1.342119391
175 0.687985751 -0.302989155
176 -0.045482999 0.687985751
177 0.624315551 -0.045482999
178 -0.378316580 0.624315551
179 0.948572731 -0.378316580
180 -2.172628746 0.948572731
181 -1.329241533 -2.172628746
182 -0.742833183 -1.329241533
183 -0.359894109 -0.742833183
184 1.170563931 -0.359894109
185 -0.005276055 1.170563931
186 -0.886196154 -0.005276055
187 -0.388240367 -0.886196154
188 0.078749794 -0.388240367
189 -0.169849190 0.078749794
190 0.915771752 -0.169849190
191 -0.158054266 0.915771752
192 -0.622022813 -0.158054266
193 0.955283043 -0.622022813
194 -1.403595180 0.955283043
195 NA -1.403595180
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.636769933 0.246356282
[2,] 1.414830128 0.636769933
[3,] -0.917904930 1.414830128
[4,] 0.189473695 -0.917904930
[5,] 1.423223523 0.189473695
[6,] 0.547619582 1.423223523
[7,] 0.628783798 0.547619582
[8,] 0.888387404 0.628783798
[9,] 0.617452447 0.888387404
[10,] 1.760141730 0.617452447
[11,] 0.862767061 1.760141730
[12,] -0.171569889 0.862767061
[13,] 0.855663825 -0.171569889
[14,] -0.218049756 0.855663825
[15,] 0.196561124 -0.218049756
[16,] 1.106079923 0.196561124
[17,] -0.212405869 1.106079923
[18,] 0.392874905 -0.212405869
[19,] -0.754796700 0.392874905
[20,] 0.579570673 -0.754796700
[21,] 0.301800422 0.579570673
[22,] 0.641983184 0.301800422
[23,] 0.778414358 0.641983184
[24,] 0.207547934 0.778414358
[25,] -0.984900185 0.207547934
[26,] -1.097676536 -0.984900185
[27,] 0.720864021 -1.097676536
[28,] 1.544893192 0.720864021
[29,] 0.943863072 1.544893192
[30,] -1.211403375 0.943863072
[31,] 1.394336216 -1.211403375
[32,] 0.626867290 1.394336216
[33,] -0.484433047 0.626867290
[34,] 0.731596227 -0.484433047
[35,] -0.848653058 0.731596227
[36,] -0.629478579 -0.848653058
[37,] -0.588818739 -0.629478579
[38,] 0.198778413 -0.588818739
[39,] 1.391207846 0.198778413
[40,] -2.457345062 1.391207846
[41,] 0.382612549 -2.457345062
[42,] 1.061610638 0.382612549
[43,] 0.477087646 1.061610638
[44,] -0.888324195 0.477087646
[45,] 0.578738177 -0.888324195
[46,] -0.319728348 0.578738177
[47,] 0.826721814 -0.319728348
[48,] -2.760941409 0.826721814
[49,] -1.780014749 -2.760941409
[50,] -0.856130080 -1.780014749
[51,] 0.068257877 -0.856130080
[52,] -0.155194695 0.068257877
[53,] 1.161823163 -0.155194695
[54,] -0.601746590 1.161823163
[55,] -0.166661889 -0.601746590
[56,] 0.958563465 -0.166661889
[57,] -0.320700471 0.958563465
[58,] -0.583543371 -0.320700471
[59,] -2.533210233 -0.583543371
[60,] -1.230529461 -2.533210233
[61,] 1.850393120 -1.230529461
[62,] 0.304742915 1.850393120
[63,] 0.514305688 0.304742915
[64,] -0.644950128 0.514305688
[65,] 0.364203774 -0.644950128
[66,] 0.721358588 0.364203774
[67,] -0.952532507 0.721358588
[68,] -0.070830499 -0.952532507
[69,] 0.998942737 -0.070830499
[70,] 0.054795843 0.998942737
[71,] -0.401288914 0.054795843
[72,] 1.474939632 -0.401288914
[73,] 0.589003877 1.474939632
[74,] 0.121722731 0.589003877
[75,] 0.863265964 0.121722731
[76,] -1.610926290 0.863265964
[77,] -0.738325722 -1.610926290
[78,] -1.063276270 -0.738325722
[79,] 1.232771116 -1.063276270
[80,] -1.384127365 1.232771116
[81,] 0.444191903 -1.384127365
[82,] -0.749684707 0.444191903
[83,] 0.364861862 -0.749684707
[84,] -0.991491317 0.364861862
[85,] 0.215733121 -0.991491317
[86,] 0.341231440 0.215733121
[87,] -0.097706967 0.341231440
[88,] -0.228056004 -0.097706967
[89,] -1.761856776 -0.228056004
[90,] -0.630012820 -1.761856776
[91,] -1.090907567 -0.630012820
[92,] 1.129458475 -1.090907567
[93,] 0.535451752 1.129458475
[94,] -1.429749852 0.535451752
[95,] -1.525806817 -1.429749852
[96,] 1.740539196 -1.525806817
[97,] 0.878795951 1.740539196
[98,] 0.413423982 0.878795951
[99,] 0.260421588 0.413423982
[100,] -0.008608827 0.260421588
[101,] -0.254082298 -0.008608827
[102,] -1.499447367 -0.254082298
[103,] 1.820161056 -1.499447367
[104,] -0.353906989 1.820161056
[105,] -0.371535224 -0.353906989
[106,] -0.794599040 -0.371535224
[107,] 0.507467074 -0.794599040
[108,] 1.028666402 0.507467074
[109,] -0.737196307 1.028666402
[110,] 1.160522549 -0.737196307
[111,] 0.741419710 1.160522549
[112,] -0.539872779 0.741419710
[113,] 0.043914629 -0.539872779
[114,] -0.715770775 0.043914629
[115,] -0.626296933 -0.715770775
[116,] 0.815637936 -0.626296933
[117,] 2.615110953 0.815637936
[118,] -0.280651995 2.615110953
[119,] -0.260048456 -0.280651995
[120,] -0.499072394 -0.260048456
[121,] -0.283778449 -0.499072394
[122,] -0.301559669 -0.283778449
[123,] 0.887515403 -0.301559669
[124,] 0.559746050 0.887515403
[125,] 1.386416012 0.559746050
[126,] -0.630778176 1.386416012
[127,] 1.128053928 -0.630778176
[128,] -1.596804814 1.128053928
[129,] -1.291026846 -1.596804814
[130,] -0.014708383 -1.291026846
[131,] -0.373800484 -0.014708383
[132,] -1.512456289 -0.373800484
[133,] -2.309387772 -1.512456289
[134,] -0.087908808 -2.309387772
[135,] 1.380858087 -0.087908808
[136,] 0.782769986 1.380858087
[137,] 0.693292452 0.782769986
[138,] 0.765042998 0.693292452
[139,] -0.161765744 0.765042998
[140,] 2.004770210 -0.161765744
[141,] -0.260727506 2.004770210
[142,] 0.023811555 -0.260727506
[143,] -0.179582836 0.023811555
[144,] -0.387957252 -0.179582836
[145,] 0.670496018 -0.387957252
[146,] -1.068732316 0.670496018
[147,] 0.323562403 -1.068732316
[148,] 1.334294220 0.323562403
[149,] 0.223614745 1.334294220
[150,] -0.554723424 0.223614745
[151,] -0.928305727 -0.554723424
[152,] -0.193570535 -0.928305727
[153,] -0.405560906 -0.193570535
[154,] 0.486719742 -0.405560906
[155,] -1.707830550 0.486719742
[156,] -2.199841714 -1.707830550
[157,] 1.731778431 -2.199841714
[158,] 0.548543124 1.731778431
[159,] -0.230166696 0.548543124
[160,] -0.253800168 -0.230166696
[161,] 0.574506505 -0.253800168
[162,] -0.489017956 0.574506505
[163,] -0.601784642 -0.489017956
[164,] -1.779738962 -0.601784642
[165,] -2.038033551 -1.779738962
[166,] 0.993194233 -2.038033551
[167,] 0.277244702 0.993194233
[168,] -0.203111901 0.277244702
[169,] 0.395535596 -0.203111901
[170,] 1.396494526 0.395535596
[171,] 0.403908136 1.396494526
[172,] 1.594992207 0.403908136
[173,] -1.342119391 1.594992207
[174,] -0.302989155 -1.342119391
[175,] 0.687985751 -0.302989155
[176,] -0.045482999 0.687985751
[177,] 0.624315551 -0.045482999
[178,] -0.378316580 0.624315551
[179,] 0.948572731 -0.378316580
[180,] -2.172628746 0.948572731
[181,] -1.329241533 -2.172628746
[182,] -0.742833183 -1.329241533
[183,] -0.359894109 -0.742833183
[184,] 1.170563931 -0.359894109
[185,] -0.005276055 1.170563931
[186,] -0.886196154 -0.005276055
[187,] -0.388240367 -0.886196154
[188,] 0.078749794 -0.388240367
[189,] -0.169849190 0.078749794
[190,] 0.915771752 -0.169849190
[191,] -0.158054266 0.915771752
[192,] -0.622022813 -0.158054266
[193,] 0.955283043 -0.622022813
[194,] -1.403595180 0.955283043
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.636769933 0.246356282
2 1.414830128 0.636769933
3 -0.917904930 1.414830128
4 0.189473695 -0.917904930
5 1.423223523 0.189473695
6 0.547619582 1.423223523
7 0.628783798 0.547619582
8 0.888387404 0.628783798
9 0.617452447 0.888387404
10 1.760141730 0.617452447
11 0.862767061 1.760141730
12 -0.171569889 0.862767061
13 0.855663825 -0.171569889
14 -0.218049756 0.855663825
15 0.196561124 -0.218049756
16 1.106079923 0.196561124
17 -0.212405869 1.106079923
18 0.392874905 -0.212405869
19 -0.754796700 0.392874905
20 0.579570673 -0.754796700
21 0.301800422 0.579570673
22 0.641983184 0.301800422
23 0.778414358 0.641983184
24 0.207547934 0.778414358
25 -0.984900185 0.207547934
26 -1.097676536 -0.984900185
27 0.720864021 -1.097676536
28 1.544893192 0.720864021
29 0.943863072 1.544893192
30 -1.211403375 0.943863072
31 1.394336216 -1.211403375
32 0.626867290 1.394336216
33 -0.484433047 0.626867290
34 0.731596227 -0.484433047
35 -0.848653058 0.731596227
36 -0.629478579 -0.848653058
37 -0.588818739 -0.629478579
38 0.198778413 -0.588818739
39 1.391207846 0.198778413
40 -2.457345062 1.391207846
41 0.382612549 -2.457345062
42 1.061610638 0.382612549
43 0.477087646 1.061610638
44 -0.888324195 0.477087646
45 0.578738177 -0.888324195
46 -0.319728348 0.578738177
47 0.826721814 -0.319728348
48 -2.760941409 0.826721814
49 -1.780014749 -2.760941409
50 -0.856130080 -1.780014749
51 0.068257877 -0.856130080
52 -0.155194695 0.068257877
53 1.161823163 -0.155194695
54 -0.601746590 1.161823163
55 -0.166661889 -0.601746590
56 0.958563465 -0.166661889
57 -0.320700471 0.958563465
58 -0.583543371 -0.320700471
59 -2.533210233 -0.583543371
60 -1.230529461 -2.533210233
61 1.850393120 -1.230529461
62 0.304742915 1.850393120
63 0.514305688 0.304742915
64 -0.644950128 0.514305688
65 0.364203774 -0.644950128
66 0.721358588 0.364203774
67 -0.952532507 0.721358588
68 -0.070830499 -0.952532507
69 0.998942737 -0.070830499
70 0.054795843 0.998942737
71 -0.401288914 0.054795843
72 1.474939632 -0.401288914
73 0.589003877 1.474939632
74 0.121722731 0.589003877
75 0.863265964 0.121722731
76 -1.610926290 0.863265964
77 -0.738325722 -1.610926290
78 -1.063276270 -0.738325722
79 1.232771116 -1.063276270
80 -1.384127365 1.232771116
81 0.444191903 -1.384127365
82 -0.749684707 0.444191903
83 0.364861862 -0.749684707
84 -0.991491317 0.364861862
85 0.215733121 -0.991491317
86 0.341231440 0.215733121
87 -0.097706967 0.341231440
88 -0.228056004 -0.097706967
89 -1.761856776 -0.228056004
90 -0.630012820 -1.761856776
91 -1.090907567 -0.630012820
92 1.129458475 -1.090907567
93 0.535451752 1.129458475
94 -1.429749852 0.535451752
95 -1.525806817 -1.429749852
96 1.740539196 -1.525806817
97 0.878795951 1.740539196
98 0.413423982 0.878795951
99 0.260421588 0.413423982
100 -0.008608827 0.260421588
101 -0.254082298 -0.008608827
102 -1.499447367 -0.254082298
103 1.820161056 -1.499447367
104 -0.353906989 1.820161056
105 -0.371535224 -0.353906989
106 -0.794599040 -0.371535224
107 0.507467074 -0.794599040
108 1.028666402 0.507467074
109 -0.737196307 1.028666402
110 1.160522549 -0.737196307
111 0.741419710 1.160522549
112 -0.539872779 0.741419710
113 0.043914629 -0.539872779
114 -0.715770775 0.043914629
115 -0.626296933 -0.715770775
116 0.815637936 -0.626296933
117 2.615110953 0.815637936
118 -0.280651995 2.615110953
119 -0.260048456 -0.280651995
120 -0.499072394 -0.260048456
121 -0.283778449 -0.499072394
122 -0.301559669 -0.283778449
123 0.887515403 -0.301559669
124 0.559746050 0.887515403
125 1.386416012 0.559746050
126 -0.630778176 1.386416012
127 1.128053928 -0.630778176
128 -1.596804814 1.128053928
129 -1.291026846 -1.596804814
130 -0.014708383 -1.291026846
131 -0.373800484 -0.014708383
132 -1.512456289 -0.373800484
133 -2.309387772 -1.512456289
134 -0.087908808 -2.309387772
135 1.380858087 -0.087908808
136 0.782769986 1.380858087
137 0.693292452 0.782769986
138 0.765042998 0.693292452
139 -0.161765744 0.765042998
140 2.004770210 -0.161765744
141 -0.260727506 2.004770210
142 0.023811555 -0.260727506
143 -0.179582836 0.023811555
144 -0.387957252 -0.179582836
145 0.670496018 -0.387957252
146 -1.068732316 0.670496018
147 0.323562403 -1.068732316
148 1.334294220 0.323562403
149 0.223614745 1.334294220
150 -0.554723424 0.223614745
151 -0.928305727 -0.554723424
152 -0.193570535 -0.928305727
153 -0.405560906 -0.193570535
154 0.486719742 -0.405560906
155 -1.707830550 0.486719742
156 -2.199841714 -1.707830550
157 1.731778431 -2.199841714
158 0.548543124 1.731778431
159 -0.230166696 0.548543124
160 -0.253800168 -0.230166696
161 0.574506505 -0.253800168
162 -0.489017956 0.574506505
163 -0.601784642 -0.489017956
164 -1.779738962 -0.601784642
165 -2.038033551 -1.779738962
166 0.993194233 -2.038033551
167 0.277244702 0.993194233
168 -0.203111901 0.277244702
169 0.395535596 -0.203111901
170 1.396494526 0.395535596
171 0.403908136 1.396494526
172 1.594992207 0.403908136
173 -1.342119391 1.594992207
174 -0.302989155 -1.342119391
175 0.687985751 -0.302989155
176 -0.045482999 0.687985751
177 0.624315551 -0.045482999
178 -0.378316580 0.624315551
179 0.948572731 -0.378316580
180 -2.172628746 0.948572731
181 -1.329241533 -2.172628746
182 -0.742833183 -1.329241533
183 -0.359894109 -0.742833183
184 1.170563931 -0.359894109
185 -0.005276055 1.170563931
186 -0.886196154 -0.005276055
187 -0.388240367 -0.886196154
188 0.078749794 -0.388240367
189 -0.169849190 0.078749794
190 0.915771752 -0.169849190
191 -0.158054266 0.915771752
192 -0.622022813 -0.158054266
193 0.955283043 -0.622022813
194 -1.403595180 0.955283043
> 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/7pujv1293197533.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/8iliy1293197533.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/9iliy1293197533.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/10sczj1293197533.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/11edyp1293197533.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/12rnzp1293197534.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/13oxfg1293197534.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/14rgd41293197534.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/15ugcs1293197534.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/16yhag1293197534.tab")
+ }
>
> try(system("convert tmp/14b2p1293197533.ps tmp/14b2p1293197533.png",intern=TRUE))
character(0)
> try(system("convert tmp/24b2p1293197533.ps tmp/24b2p1293197533.png",intern=TRUE))
character(0)
> try(system("convert tmp/34b2p1293197533.ps tmp/34b2p1293197533.png",intern=TRUE))
character(0)
> try(system("convert tmp/4ek1a1293197533.ps tmp/4ek1a1293197533.png",intern=TRUE))
character(0)
> try(system("convert tmp/5ek1a1293197533.ps tmp/5ek1a1293197533.png",intern=TRUE))
character(0)
> try(system("convert tmp/6ek1a1293197533.ps tmp/6ek1a1293197533.png",intern=TRUE))
character(0)
> try(system("convert tmp/7pujv1293197533.ps tmp/7pujv1293197533.png",intern=TRUE))
character(0)
> try(system("convert tmp/8iliy1293197533.ps tmp/8iliy1293197533.png",intern=TRUE))
character(0)
> try(system("convert tmp/9iliy1293197533.ps tmp/9iliy1293197533.png",intern=TRUE))
character(0)
> try(system("convert tmp/10sczj1293197533.ps tmp/10sczj1293197533.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.947 1.794 14.257