R version 2.13.0 (2011-04-13)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-pc-linux-gnu (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(1149822
+ ,1086979
+ ,1276674
+ ,1522522
+ ,1742117
+ ,1737275
+ ,1979900
+ ,2061036
+ ,1867943
+ ,1707752
+ ,1298756
+ ,1281814
+ ,1281151
+ ,1164976
+ ,1454329
+ ,1645288
+ ,1817743
+ ,1895785
+ ,2236311
+ ,2295951
+ ,2087315
+ ,1980891
+ ,1465446
+ ,1445026
+ ,1488120
+ ,1338333
+ ,1715789
+ ,1806090
+ ,2083316
+ ,2092278
+ ,2430800
+ ,2424894
+ ,2299016
+ ,2130688
+ ,1652221
+ ,1608162
+ ,1647074
+ ,1479691
+ ,1884978
+ ,2007898
+ ,2208954
+ ,2217164
+ ,2534291
+ ,2560312
+ ,2429069
+ ,2315077
+ ,1799608
+ ,1772590
+ ,1744799
+ ,1659093
+ ,2099821
+ ,2135736
+ ,2427894
+ ,2468882
+ ,2703217
+ ,2766841
+ ,2655236
+ ,2550373
+ ,2052097
+ ,1998055
+ ,1920748
+ ,1876694
+ ,2380930
+ ,2467402
+ ,2770771
+ ,2781340
+ ,3143926
+ ,3172235
+ ,2952540
+ ,2920877
+ ,2384552
+ ,2248987
+ ,2208616
+ ,2178756
+ ,2632870
+ ,2706905
+ ,3029745
+ ,3015402
+ ,3391414
+ ,3507805
+ ,3177852
+ ,3142961
+ ,2545815
+ ,2414007
+ ,2372578
+ ,2332664
+ ,2825328
+ ,2901478
+ ,3263955
+ ,3226738
+ ,3610786
+ ,3709274
+ ,3467185
+ ,3449646
+ ,2802951
+ ,2462530
+ ,2490645
+ ,2561520
+ ,3067554
+ ,3226951
+ ,3546493
+ ,3492787
+ ,3952263
+ ,3932072
+ ,3720284
+ ,3651555
+ ,2914972
+ ,2713514
+ ,2703997
+ ,2591373
+ ,3163748
+ ,3355137
+ ,3613702
+ ,3686773
+ ,4098716
+ ,4063517
+ ,3551489
+ ,3226663
+ ,2656842
+ ,2597484
+ ,2572399
+ ,2596631
+ ,3165225
+ ,3303145
+ ,3698247
+ ,3668631
+ ,4130433
+ ,4131400
+ ,3864358
+ ,3721110
+ ,2892532
+ ,2843451
+ ,2747502
+ ,2668775
+ ,3018602
+ ,3013392
+ ,3393657
+ ,3544233
+ ,4075832
+ ,4032923
+ ,3734509
+ ,3761285
+ ,2970090
+ ,2847849
+ ,2741680
+ ,2830639
+ ,3257673
+ ,3480085
+ ,3843271
+ ,3796961
+ ,4337767
+ ,4243630
+ ,3927202
+ ,3915296
+ ,3087396
+ ,2963792
+ ,2955792
+ ,2829925
+ ,3281195
+ ,3548011
+ ,4059648
+ ,3941175
+ ,4528594
+ ,4433151
+ ,4145737
+ ,4077132
+ ,3198519
+ ,3078660
+ ,3028202
+ ,2858642
+ ,3398954
+ ,3808883
+ ,4175961
+ ,4227542
+ ,4744616
+ ,4608012
+ ,4295049
+ ,4201144
+ ,3353276
+ ,3286851
+ ,3169889
+ ,3051720
+ ,3695426
+ ,3905501
+ ,4296458
+ ,4246247
+ ,4921849
+ ,4821446
+ ,4425064
+ ,4379099
+ ,3472889
+ ,3359160
+ ,3200944
+ ,3153170
+ ,3741498
+ ,3918719
+ ,4403449
+ ,4400407
+ ,4847473
+ ,4716136
+ ,4297440
+ ,4272253
+ ,3271834
+ ,3168388
+ ,2911748
+ ,2720999
+ ,3199918
+ ,3672623
+ ,3892013
+ ,3850845
+ ,4532467
+ ,4484739
+ ,4014972
+ ,3983758
+ ,3158459
+ ,3100569
+ ,2935404
+ ,2855719
+ ,3465611
+ ,3006985
+ ,4095110
+ ,4104793
+ ,4730788
+ ,4642726
+ ,4246919
+ ,4308117)
+ ,dim=c(1
+ ,226)
+ ,dimnames=list(c('Yt')
+ ,1:226))
> y <- array(NA,dim=c(1,226),dimnames=list(c('Yt'),1:226))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par20 = ''
> par19 = ''
> par18 = ''
> par17 = ''
> par16 = ''
> par15 = ''
> par14 = ''
> par13 = ''
> par12 = ''
> par11 = ''
> par10 = ''
> par9 = ''
> par8 = ''
> par7 = ''
> par6 = ''
> par5 = ''
> par4 = ''
> par3 = 'No Linear Trend'
> par2 = 'Include Monthly Dummies'
> par1 = '1'
> library(lattice)
> library(lmtest)
Loading required package: zoo
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
Yt M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11
1 1149822 1 0 0 0 0 0 0 0 0 0 0
2 1086979 0 1 0 0 0 0 0 0 0 0 0
3 1276674 0 0 1 0 0 0 0 0 0 0 0
4 1522522 0 0 0 1 0 0 0 0 0 0 0
5 1742117 0 0 0 0 1 0 0 0 0 0 0
6 1737275 0 0 0 0 0 1 0 0 0 0 0
7 1979900 0 0 0 0 0 0 1 0 0 0 0
8 2061036 0 0 0 0 0 0 0 1 0 0 0
9 1867943 0 0 0 0 0 0 0 0 1 0 0
10 1707752 0 0 0 0 0 0 0 0 0 1 0
11 1298756 0 0 0 0 0 0 0 0 0 0 1
12 1281814 0 0 0 0 0 0 0 0 0 0 0
13 1281151 1 0 0 0 0 0 0 0 0 0 0
14 1164976 0 1 0 0 0 0 0 0 0 0 0
15 1454329 0 0 1 0 0 0 0 0 0 0 0
16 1645288 0 0 0 1 0 0 0 0 0 0 0
17 1817743 0 0 0 0 1 0 0 0 0 0 0
18 1895785 0 0 0 0 0 1 0 0 0 0 0
19 2236311 0 0 0 0 0 0 1 0 0 0 0
20 2295951 0 0 0 0 0 0 0 1 0 0 0
21 2087315 0 0 0 0 0 0 0 0 1 0 0
22 1980891 0 0 0 0 0 0 0 0 0 1 0
23 1465446 0 0 0 0 0 0 0 0 0 0 1
24 1445026 0 0 0 0 0 0 0 0 0 0 0
25 1488120 1 0 0 0 0 0 0 0 0 0 0
26 1338333 0 1 0 0 0 0 0 0 0 0 0
27 1715789 0 0 1 0 0 0 0 0 0 0 0
28 1806090 0 0 0 1 0 0 0 0 0 0 0
29 2083316 0 0 0 0 1 0 0 0 0 0 0
30 2092278 0 0 0 0 0 1 0 0 0 0 0
31 2430800 0 0 0 0 0 0 1 0 0 0 0
32 2424894 0 0 0 0 0 0 0 1 0 0 0
33 2299016 0 0 0 0 0 0 0 0 1 0 0
34 2130688 0 0 0 0 0 0 0 0 0 1 0
35 1652221 0 0 0 0 0 0 0 0 0 0 1
36 1608162 0 0 0 0 0 0 0 0 0 0 0
37 1647074 1 0 0 0 0 0 0 0 0 0 0
38 1479691 0 1 0 0 0 0 0 0 0 0 0
39 1884978 0 0 1 0 0 0 0 0 0 0 0
40 2007898 0 0 0 1 0 0 0 0 0 0 0
41 2208954 0 0 0 0 1 0 0 0 0 0 0
42 2217164 0 0 0 0 0 1 0 0 0 0 0
43 2534291 0 0 0 0 0 0 1 0 0 0 0
44 2560312 0 0 0 0 0 0 0 1 0 0 0
45 2429069 0 0 0 0 0 0 0 0 1 0 0
46 2315077 0 0 0 0 0 0 0 0 0 1 0
47 1799608 0 0 0 0 0 0 0 0 0 0 1
48 1772590 0 0 0 0 0 0 0 0 0 0 0
49 1744799 1 0 0 0 0 0 0 0 0 0 0
50 1659093 0 1 0 0 0 0 0 0 0 0 0
51 2099821 0 0 1 0 0 0 0 0 0 0 0
52 2135736 0 0 0 1 0 0 0 0 0 0 0
53 2427894 0 0 0 0 1 0 0 0 0 0 0
54 2468882 0 0 0 0 0 1 0 0 0 0 0
55 2703217 0 0 0 0 0 0 1 0 0 0 0
56 2766841 0 0 0 0 0 0 0 1 0 0 0
57 2655236 0 0 0 0 0 0 0 0 1 0 0
58 2550373 0 0 0 0 0 0 0 0 0 1 0
59 2052097 0 0 0 0 0 0 0 0 0 0 1
60 1998055 0 0 0 0 0 0 0 0 0 0 0
61 1920748 1 0 0 0 0 0 0 0 0 0 0
62 1876694 0 1 0 0 0 0 0 0 0 0 0
63 2380930 0 0 1 0 0 0 0 0 0 0 0
64 2467402 0 0 0 1 0 0 0 0 0 0 0
65 2770771 0 0 0 0 1 0 0 0 0 0 0
66 2781340 0 0 0 0 0 1 0 0 0 0 0
67 3143926 0 0 0 0 0 0 1 0 0 0 0
68 3172235 0 0 0 0 0 0 0 1 0 0 0
69 2952540 0 0 0 0 0 0 0 0 1 0 0
70 2920877 0 0 0 0 0 0 0 0 0 1 0
71 2384552 0 0 0 0 0 0 0 0 0 0 1
72 2248987 0 0 0 0 0 0 0 0 0 0 0
73 2208616 1 0 0 0 0 0 0 0 0 0 0
74 2178756 0 1 0 0 0 0 0 0 0 0 0
75 2632870 0 0 1 0 0 0 0 0 0 0 0
76 2706905 0 0 0 1 0 0 0 0 0 0 0
77 3029745 0 0 0 0 1 0 0 0 0 0 0
78 3015402 0 0 0 0 0 1 0 0 0 0 0
79 3391414 0 0 0 0 0 0 1 0 0 0 0
80 3507805 0 0 0 0 0 0 0 1 0 0 0
81 3177852 0 0 0 0 0 0 0 0 1 0 0
82 3142961 0 0 0 0 0 0 0 0 0 1 0
83 2545815 0 0 0 0 0 0 0 0 0 0 1
84 2414007 0 0 0 0 0 0 0 0 0 0 0
85 2372578 1 0 0 0 0 0 0 0 0 0 0
86 2332664 0 1 0 0 0 0 0 0 0 0 0
87 2825328 0 0 1 0 0 0 0 0 0 0 0
88 2901478 0 0 0 1 0 0 0 0 0 0 0
89 3263955 0 0 0 0 1 0 0 0 0 0 0
90 3226738 0 0 0 0 0 1 0 0 0 0 0
91 3610786 0 0 0 0 0 0 1 0 0 0 0
92 3709274 0 0 0 0 0 0 0 1 0 0 0
93 3467185 0 0 0 0 0 0 0 0 1 0 0
94 3449646 0 0 0 0 0 0 0 0 0 1 0
95 2802951 0 0 0 0 0 0 0 0 0 0 1
96 2462530 0 0 0 0 0 0 0 0 0 0 0
97 2490645 1 0 0 0 0 0 0 0 0 0 0
98 2561520 0 1 0 0 0 0 0 0 0 0 0
99 3067554 0 0 1 0 0 0 0 0 0 0 0
100 3226951 0 0 0 1 0 0 0 0 0 0 0
101 3546493 0 0 0 0 1 0 0 0 0 0 0
102 3492787 0 0 0 0 0 1 0 0 0 0 0
103 3952263 0 0 0 0 0 0 1 0 0 0 0
104 3932072 0 0 0 0 0 0 0 1 0 0 0
105 3720284 0 0 0 0 0 0 0 0 1 0 0
106 3651555 0 0 0 0 0 0 0 0 0 1 0
107 2914972 0 0 0 0 0 0 0 0 0 0 1
108 2713514 0 0 0 0 0 0 0 0 0 0 0
109 2703997 1 0 0 0 0 0 0 0 0 0 0
110 2591373 0 1 0 0 0 0 0 0 0 0 0
111 3163748 0 0 1 0 0 0 0 0 0 0 0
112 3355137 0 0 0 1 0 0 0 0 0 0 0
113 3613702 0 0 0 0 1 0 0 0 0 0 0
114 3686773 0 0 0 0 0 1 0 0 0 0 0
115 4098716 0 0 0 0 0 0 1 0 0 0 0
116 4063517 0 0 0 0 0 0 0 1 0 0 0
117 3551489 0 0 0 0 0 0 0 0 1 0 0
118 3226663 0 0 0 0 0 0 0 0 0 1 0
119 2656842 0 0 0 0 0 0 0 0 0 0 1
120 2597484 0 0 0 0 0 0 0 0 0 0 0
121 2572399 1 0 0 0 0 0 0 0 0 0 0
122 2596631 0 1 0 0 0 0 0 0 0 0 0
123 3165225 0 0 1 0 0 0 0 0 0 0 0
124 3303145 0 0 0 1 0 0 0 0 0 0 0
125 3698247 0 0 0 0 1 0 0 0 0 0 0
126 3668631 0 0 0 0 0 1 0 0 0 0 0
127 4130433 0 0 0 0 0 0 1 0 0 0 0
128 4131400 0 0 0 0 0 0 0 1 0 0 0
129 3864358 0 0 0 0 0 0 0 0 1 0 0
130 3721110 0 0 0 0 0 0 0 0 0 1 0
131 2892532 0 0 0 0 0 0 0 0 0 0 1
132 2843451 0 0 0 0 0 0 0 0 0 0 0
133 2747502 1 0 0 0 0 0 0 0 0 0 0
134 2668775 0 1 0 0 0 0 0 0 0 0 0
135 3018602 0 0 1 0 0 0 0 0 0 0 0
136 3013392 0 0 0 1 0 0 0 0 0 0 0
137 3393657 0 0 0 0 1 0 0 0 0 0 0
138 3544233 0 0 0 0 0 1 0 0 0 0 0
139 4075832 0 0 0 0 0 0 1 0 0 0 0
140 4032923 0 0 0 0 0 0 0 1 0 0 0
141 3734509 0 0 0 0 0 0 0 0 1 0 0
142 3761285 0 0 0 0 0 0 0 0 0 1 0
143 2970090 0 0 0 0 0 0 0 0 0 0 1
144 2847849 0 0 0 0 0 0 0 0 0 0 0
145 2741680 1 0 0 0 0 0 0 0 0 0 0
146 2830639 0 1 0 0 0 0 0 0 0 0 0
147 3257673 0 0 1 0 0 0 0 0 0 0 0
148 3480085 0 0 0 1 0 0 0 0 0 0 0
149 3843271 0 0 0 0 1 0 0 0 0 0 0
150 3796961 0 0 0 0 0 1 0 0 0 0 0
151 4337767 0 0 0 0 0 0 1 0 0 0 0
152 4243630 0 0 0 0 0 0 0 1 0 0 0
153 3927202 0 0 0 0 0 0 0 0 1 0 0
154 3915296 0 0 0 0 0 0 0 0 0 1 0
155 3087396 0 0 0 0 0 0 0 0 0 0 1
156 2963792 0 0 0 0 0 0 0 0 0 0 0
157 2955792 1 0 0 0 0 0 0 0 0 0 0
158 2829925 0 1 0 0 0 0 0 0 0 0 0
159 3281195 0 0 1 0 0 0 0 0 0 0 0
160 3548011 0 0 0 1 0 0 0 0 0 0 0
161 4059648 0 0 0 0 1 0 0 0 0 0 0
162 3941175 0 0 0 0 0 1 0 0 0 0 0
163 4528594 0 0 0 0 0 0 1 0 0 0 0
164 4433151 0 0 0 0 0 0 0 1 0 0 0
165 4145737 0 0 0 0 0 0 0 0 1 0 0
166 4077132 0 0 0 0 0 0 0 0 0 1 0
167 3198519 0 0 0 0 0 0 0 0 0 0 1
168 3078660 0 0 0 0 0 0 0 0 0 0 0
169 3028202 1 0 0 0 0 0 0 0 0 0 0
170 2858642 0 1 0 0 0 0 0 0 0 0 0
171 3398954 0 0 1 0 0 0 0 0 0 0 0
172 3808883 0 0 0 1 0 0 0 0 0 0 0
173 4175961 0 0 0 0 1 0 0 0 0 0 0
174 4227542 0 0 0 0 0 1 0 0 0 0 0
175 4744616 0 0 0 0 0 0 1 0 0 0 0
176 4608012 0 0 0 0 0 0 0 1 0 0 0
177 4295049 0 0 0 0 0 0 0 0 1 0 0
178 4201144 0 0 0 0 0 0 0 0 0 1 0
179 3353276 0 0 0 0 0 0 0 0 0 0 1
180 3286851 0 0 0 0 0 0 0 0 0 0 0
181 3169889 1 0 0 0 0 0 0 0 0 0 0
182 3051720 0 1 0 0 0 0 0 0 0 0 0
183 3695426 0 0 1 0 0 0 0 0 0 0 0
184 3905501 0 0 0 1 0 0 0 0 0 0 0
185 4296458 0 0 0 0 1 0 0 0 0 0 0
186 4246247 0 0 0 0 0 1 0 0 0 0 0
187 4921849 0 0 0 0 0 0 1 0 0 0 0
188 4821446 0 0 0 0 0 0 0 1 0 0 0
189 4425064 0 0 0 0 0 0 0 0 1 0 0
190 4379099 0 0 0 0 0 0 0 0 0 1 0
191 3472889 0 0 0 0 0 0 0 0 0 0 1
192 3359160 0 0 0 0 0 0 0 0 0 0 0
193 3200944 1 0 0 0 0 0 0 0 0 0 0
194 3153170 0 1 0 0 0 0 0 0 0 0 0
195 3741498 0 0 1 0 0 0 0 0 0 0 0
196 3918719 0 0 0 1 0 0 0 0 0 0 0
197 4403449 0 0 0 0 1 0 0 0 0 0 0
198 4400407 0 0 0 0 0 1 0 0 0 0 0
199 4847473 0 0 0 0 0 0 1 0 0 0 0
200 4716136 0 0 0 0 0 0 0 1 0 0 0
201 4297440 0 0 0 0 0 0 0 0 1 0 0
202 4272253 0 0 0 0 0 0 0 0 0 1 0
203 3271834 0 0 0 0 0 0 0 0 0 0 1
204 3168388 0 0 0 0 0 0 0 0 0 0 0
205 2911748 1 0 0 0 0 0 0 0 0 0 0
206 2720999 0 1 0 0 0 0 0 0 0 0 0
207 3199918 0 0 1 0 0 0 0 0 0 0 0
208 3672623 0 0 0 1 0 0 0 0 0 0 0
209 3892013 0 0 0 0 1 0 0 0 0 0 0
210 3850845 0 0 0 0 0 1 0 0 0 0 0
211 4532467 0 0 0 0 0 0 1 0 0 0 0
212 4484739 0 0 0 0 0 0 0 1 0 0 0
213 4014972 0 0 0 0 0 0 0 0 1 0 0
214 3983758 0 0 0 0 0 0 0 0 0 1 0
215 3158459 0 0 0 0 0 0 0 0 0 0 1
216 3100569 0 0 0 0 0 0 0 0 0 0 0
217 2935404 1 0 0 0 0 0 0 0 0 0 0
218 2855719 0 1 0 0 0 0 0 0 0 0 0
219 3465611 0 0 1 0 0 0 0 0 0 0 0
220 3006985 0 0 0 1 0 0 0 0 0 0 0
221 4095110 0 0 0 0 1 0 0 0 0 0 0
222 4104793 0 0 0 0 0 1 0 0 0 0 0
223 4730788 0 0 0 0 0 0 1 0 0 0 0
224 4642726 0 0 0 0 0 0 0 1 0 0 0
225 4246919 0 0 0 0 0 0 0 0 1 0 0
226 4308117 0 0 0 0 0 0 0 0 0 1 0
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) M1 M2 M3 M4 M5
2510605 -127915 -203431 264454 406908 771632
M6 M7 M8 M9 M10 M11
773356 1222629 1205611 918826 841799 99298
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1753334 -645533 273442 587847 1188615
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2510605 187597 13.383 < 2e-16 ***
M1 -127915 261788 -0.489 0.625611
M2 -203431 261788 -0.777 0.437968
M3 264454 261788 1.010 0.313548
M4 406908 261788 1.554 0.121581
M5 771632 261788 2.948 0.003558 **
M6 773356 261788 2.954 0.003486 **
M7 1222629 261788 4.670 5.31e-06 ***
M8 1205611 261788 4.605 7.06e-06 ***
M9 918826 261788 3.510 0.000547 ***
M10 841799 261788 3.216 0.001503 **
M11 99298 265302 0.374 0.708565
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 795900 on 214 degrees of freedom
Multiple R-squared: 0.2818, Adjusted R-squared: 0.2448
F-statistic: 7.632 on 11 and 214 DF, p-value: 4.525e-11
> 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,] 3.214083e-03 6.428166e-03 9.967859e-01
[2,] 5.809041e-04 1.161808e-03 9.994191e-01
[3,] 8.331929e-05 1.666386e-04 9.999167e-01
[4,] 2.243204e-05 4.486408e-05 9.999776e-01
[5,] 1.623655e-05 3.247310e-05 9.999838e-01
[6,] 7.840177e-06 1.568035e-05 9.999922e-01
[7,] 3.231941e-06 6.463881e-06 9.999968e-01
[8,] 1.988558e-06 3.977115e-06 9.999980e-01
[9,] 6.001827e-07 1.200365e-06 9.999994e-01
[10,] 1.790638e-07 3.581276e-07 9.999998e-01
[11,] 1.426043e-07 2.852086e-07 9.999999e-01
[12,] 6.725163e-08 1.345033e-07 9.999999e-01
[13,] 9.878401e-08 1.975680e-07 9.999999e-01
[14,] 5.076104e-08 1.015221e-07 9.999999e-01
[15,] 4.593648e-08 9.187296e-08 1.000000e+00
[16,] 3.396187e-08 6.792375e-08 1.000000e+00
[17,] 3.557132e-08 7.114264e-08 1.000000e+00
[18,] 2.397682e-08 4.795364e-08 1.000000e+00
[19,] 2.337348e-08 4.674696e-08 1.000000e+00
[20,] 1.960041e-08 3.920082e-08 1.000000e+00
[21,] 1.375068e-08 2.750137e-08 1.000000e+00
[22,] 8.529488e-09 1.705898e-08 1.000000e+00
[23,] 9.325757e-09 1.865151e-08 1.000000e+00
[24,] 7.532296e-09 1.506459e-08 1.000000e+00
[25,] 1.274877e-08 2.549754e-08 1.000000e+00
[26,] 1.520801e-08 3.041601e-08 1.000000e+00
[27,] 1.810971e-08 3.621942e-08 1.000000e+00
[28,] 2.006737e-08 4.013475e-08 1.000000e+00
[29,] 2.694039e-08 5.388079e-08 1.000000e+00
[30,] 3.343482e-08 6.686964e-08 1.000000e+00
[31,] 4.546146e-08 9.092292e-08 1.000000e+00
[32,] 7.546451e-08 1.509290e-07 9.999999e-01
[33,] 8.534401e-08 1.706880e-07 9.999999e-01
[34,] 9.248516e-08 1.849703e-07 9.999999e-01
[35,] 1.135619e-07 2.271238e-07 9.999999e-01
[36,] 1.671090e-07 3.342181e-07 9.999998e-01
[37,] 4.659487e-07 9.318975e-07 9.999995e-01
[38,] 7.511504e-07 1.502301e-06 9.999992e-01
[39,] 1.818809e-06 3.637618e-06 9.999982e-01
[40,] 4.465044e-06 8.930087e-06 9.999955e-01
[41,] 1.092361e-05 2.184723e-05 9.999891e-01
[42,] 2.648293e-05 5.296585e-05 9.999735e-01
[43,] 6.106614e-05 1.221323e-04 9.999389e-01
[44,] 1.605087e-04 3.210174e-04 9.998395e-01
[45,] 2.928074e-04 5.856149e-04 9.997072e-01
[46,] 4.613611e-04 9.227223e-04 9.995386e-01
[47,] 7.105676e-04 1.421135e-03 9.992894e-01
[48,] 1.274923e-03 2.549846e-03 9.987251e-01
[49,] 3.431741e-03 6.863482e-03 9.965683e-01
[50,] 7.497808e-03 1.499562e-02 9.925022e-01
[51,] 1.908956e-02 3.817912e-02 9.809104e-01
[52,] 4.110794e-02 8.221588e-02 9.588921e-01
[53,] 9.805965e-02 1.961193e-01 9.019403e-01
[54,] 1.871768e-01 3.743536e-01 8.128232e-01
[55,] 2.812117e-01 5.624234e-01 7.187883e-01
[56,] 4.180307e-01 8.360615e-01 5.819693e-01
[57,] 5.099440e-01 9.801120e-01 4.900560e-01
[58,] 5.752703e-01 8.494595e-01 4.247297e-01
[59,] 6.444059e-01 7.111882e-01 3.555941e-01
[60,] 7.200108e-01 5.599784e-01 2.799892e-01
[61,] 8.059817e-01 3.880366e-01 1.940183e-01
[62,] 8.699026e-01 2.601947e-01 1.300974e-01
[63,] 9.298651e-01 1.402698e-01 7.013491e-02
[64,] 9.640367e-01 7.192658e-02 3.596329e-02
[65,] 9.875765e-01 2.484709e-02 1.242354e-02
[66,] 9.958895e-01 8.220923e-03 4.110462e-03
[67,] 9.983494e-01 3.301251e-03 1.650626e-03
[68,] 9.994456e-01 1.108806e-03 5.544029e-04
[69,] 9.996925e-01 6.149387e-04 3.074693e-04
[70,] 9.998106e-01 3.788744e-04 1.894372e-04
[71,] 9.998873e-01 2.253412e-04 1.126706e-04
[72,] 9.999368e-01 1.264368e-04 6.321839e-05
[73,] 9.999724e-01 5.513636e-05 2.756818e-05
[74,] 9.999888e-01 2.248931e-05 1.124466e-05
[75,] 9.999969e-01 6.180172e-06 3.090086e-06
[76,] 9.999992e-01 1.676072e-06 8.380362e-07
[77,] 9.999999e-01 2.212851e-07 1.106425e-07
[78,] 1.000000e+00 4.103727e-08 2.051863e-08
[79,] 1.000000e+00 1.147582e-08 5.737910e-09
[80,] 1.000000e+00 2.971852e-09 1.485926e-09
[81,] 1.000000e+00 1.684531e-09 8.422656e-10
[82,] 1.000000e+00 9.087036e-10 4.543518e-10
[83,] 1.000000e+00 5.557957e-10 2.778979e-10
[84,] 1.000000e+00 3.432257e-10 1.716129e-10
[85,] 1.000000e+00 1.678597e-10 8.392983e-11
[86,] 1.000000e+00 7.691574e-11 3.845787e-11
[87,] 1.000000e+00 2.508871e-11 1.254436e-11
[88,] 1.000000e+00 8.385973e-12 4.192987e-12
[89,] 1.000000e+00 1.562592e-12 7.812962e-13
[90,] 1.000000e+00 4.281726e-13 2.140863e-13
[91,] 1.000000e+00 1.963627e-13 9.818136e-14
[92,] 1.000000e+00 8.827314e-14 4.413657e-14
[93,] 1.000000e+00 7.849687e-14 3.924844e-14
[94,] 1.000000e+00 6.735944e-14 3.367972e-14
[95,] 1.000000e+00 6.265986e-14 3.132993e-14
[96,] 1.000000e+00 5.948980e-14 2.974490e-14
[97,] 1.000000e+00 4.878102e-14 2.439051e-14
[98,] 1.000000e+00 3.810941e-14 1.905470e-14
[99,] 1.000000e+00 2.072955e-14 1.036477e-14
[100,] 1.000000e+00 1.267350e-14 6.336751e-15
[101,] 1.000000e+00 4.576843e-15 2.288421e-15
[102,] 1.000000e+00 2.282835e-15 1.141417e-15
[103,] 1.000000e+00 9.444218e-16 4.722109e-16
[104,] 1.000000e+00 7.581875e-17 3.790938e-17
[105,] 1.000000e+00 4.219033e-17 2.109517e-17
[106,] 1.000000e+00 2.601070e-17 1.300535e-17
[107,] 1.000000e+00 2.241141e-17 1.120571e-17
[108,] 1.000000e+00 2.578348e-17 1.289174e-17
[109,] 1.000000e+00 2.928625e-17 1.464312e-17
[110,] 1.000000e+00 3.153731e-17 1.576865e-17
[111,] 1.000000e+00 2.342379e-17 1.171190e-17
[112,] 1.000000e+00 1.721352e-17 8.606761e-18
[113,] 1.000000e+00 6.757537e-18 3.378768e-18
[114,] 1.000000e+00 4.272832e-18 2.136416e-18
[115,] 1.000000e+00 4.031171e-18 2.015586e-18
[116,] 1.000000e+00 2.575432e-18 1.287716e-18
[117,] 1.000000e+00 2.891128e-18 1.445564e-18
[118,] 1.000000e+00 3.707121e-18 1.853560e-18
[119,] 1.000000e+00 5.181904e-18 2.590952e-18
[120,] 1.000000e+00 7.642861e-18 3.821431e-18
[121,] 1.000000e+00 6.144454e-18 3.072227e-18
[122,] 1.000000e+00 1.633241e-18 8.166207e-19
[123,] 1.000000e+00 1.340887e-19 6.704436e-20
[124,] 1.000000e+00 3.739110e-20 1.869555e-20
[125,] 1.000000e+00 5.110163e-21 2.555082e-21
[126,] 1.000000e+00 1.066917e-21 5.334585e-22
[127,] 1.000000e+00 3.956411e-22 1.978205e-22
[128,] 1.000000e+00 1.929767e-22 9.648836e-23
[129,] 1.000000e+00 2.360012e-22 1.180006e-22
[130,] 1.000000e+00 2.549660e-22 1.274830e-22
[131,] 1.000000e+00 3.087366e-22 1.543683e-22
[132,] 1.000000e+00 7.178739e-22 3.589369e-22
[133,] 1.000000e+00 1.194721e-21 5.973607e-22
[134,] 1.000000e+00 2.150044e-21 1.075022e-21
[135,] 1.000000e+00 1.893131e-21 9.465657e-22
[136,] 1.000000e+00 1.544191e-21 7.720956e-22
[137,] 1.000000e+00 7.630151e-22 3.815076e-22
[138,] 1.000000e+00 4.265003e-22 2.132502e-22
[139,] 1.000000e+00 3.986726e-22 1.993363e-22
[140,] 1.000000e+00 4.031788e-22 2.015894e-22
[141,] 1.000000e+00 7.788433e-22 3.894216e-22
[142,] 1.000000e+00 1.315692e-21 6.578458e-22
[143,] 1.000000e+00 3.542267e-21 1.771134e-21
[144,] 1.000000e+00 9.855999e-21 4.927999e-21
[145,] 1.000000e+00 1.793904e-20 8.969522e-21
[146,] 1.000000e+00 4.431720e-20 2.215860e-20
[147,] 1.000000e+00 9.642709e-20 4.821355e-20
[148,] 1.000000e+00 1.556513e-19 7.782566e-20
[149,] 1.000000e+00 2.210497e-19 1.105248e-19
[150,] 1.000000e+00 3.545729e-19 1.772864e-19
[151,] 1.000000e+00 8.802965e-19 4.401482e-19
[152,] 1.000000e+00 1.936163e-18 9.680814e-19
[153,] 1.000000e+00 5.451713e-18 2.725856e-18
[154,] 1.000000e+00 1.414410e-17 7.072051e-18
[155,] 1.000000e+00 4.451456e-17 2.225728e-17
[156,] 1.000000e+00 1.363863e-16 6.819316e-17
[157,] 1.000000e+00 3.698735e-16 1.849367e-16
[158,] 1.000000e+00 7.611990e-16 3.805995e-16
[159,] 1.000000e+00 2.095811e-15 1.047906e-15
[160,] 1.000000e+00 5.384598e-15 2.692299e-15
[161,] 1.000000e+00 1.384283e-14 6.921414e-15
[162,] 1.000000e+00 3.749373e-14 1.874687e-14
[163,] 1.000000e+00 1.056556e-13 5.282779e-14
[164,] 1.000000e+00 3.008445e-13 1.504223e-13
[165,] 1.000000e+00 9.105924e-13 4.552962e-13
[166,] 1.000000e+00 2.649763e-12 1.324881e-12
[167,] 1.000000e+00 6.829055e-12 3.414527e-12
[168,] 1.000000e+00 1.829602e-11 9.148012e-12
[169,] 1.000000e+00 3.765338e-11 1.882669e-11
[170,] 1.000000e+00 4.243095e-11 2.121548e-11
[171,] 1.000000e+00 1.012545e-10 5.062726e-11
[172,] 1.000000e+00 2.671433e-10 1.335716e-10
[173,] 1.000000e+00 5.324575e-10 2.662287e-10
[174,] 1.000000e+00 1.149212e-09 5.746059e-10
[175,] 1.000000e+00 2.382048e-09 1.191024e-09
[176,] 1.000000e+00 5.617023e-09 2.808511e-09
[177,] 1.000000e+00 1.223102e-08 6.115511e-09
[178,] 1.000000e+00 2.930468e-08 1.465234e-08
[179,] 1.000000e+00 6.152553e-08 3.076276e-08
[180,] 1.000000e+00 9.490521e-08 4.745260e-08
[181,] 9.999999e-01 1.166662e-07 5.833312e-08
[182,] 1.000000e+00 4.298443e-08 2.149222e-08
[183,] 1.000000e+00 4.185640e-08 2.092820e-08
[184,] 1.000000e+00 3.296786e-08 1.648393e-08
[185,] 1.000000e+00 8.720282e-08 4.360141e-08
[186,] 9.999999e-01 2.975909e-07 1.487954e-07
[187,] 9.999995e-01 9.915675e-07 4.957837e-07
[188,] 9.999982e-01 3.638443e-06 1.819222e-06
[189,] 9.999929e-01 1.423704e-05 7.118518e-06
[190,] 9.999716e-01 5.680862e-05 2.840431e-05
[191,] 9.998880e-01 2.239683e-04 1.119842e-04
[192,] 9.996090e-01 7.820031e-04 3.910015e-04
[193,] 9.989366e-01 2.126838e-03 1.063419e-03
[194,] 9.996695e-01 6.609298e-04 3.304649e-04
[195,] 9.987985e-01 2.402908e-03 1.201454e-03
[196,] 9.963536e-01 7.292796e-03 3.646398e-03
[197,] 9.860260e-01 2.794808e-02 1.397404e-02
> postscript(file="/var/wessaorg/rcomp/tmp/14o3t1322578748.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/2kljr1322578748.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/3moc01322578748.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/48b5f1322578748.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/51mm21322578748.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 = 226
Frequency = 1
1 2 3 4 5 6
-1232868.000 -1220194.632 -1498385.105 -1394991.211 -1540120.053 -1546685.947
7 8 9 10 11 12
-1753333.842 -1655179.789 -1561487.474 -1644652.053 -1311147.056 -1228790.944
13 14 15 16 17 18
-1101539.000 -1142197.632 -1320730.105 -1272225.211 -1464494.053 -1388175.947
19 20 21 22 23 24
-1496922.842 -1420264.789 -1342115.474 -1371513.053 -1144457.056 -1065578.944
25 26 27 28 29 30
-894570.000 -968840.632 -1059270.105 -1111423.211 -1198921.053 -1191682.947
31 32 33 34 35 36
-1302433.842 -1291321.789 -1130414.474 -1221716.053 -957682.056 -902442.944
37 38 39 40 41 42
-735616.000 -827482.632 -890081.105 -909615.211 -1073283.053 -1066796.947
43 44 45 46 47 48
-1198942.842 -1155903.789 -1000361.474 -1037327.053 -810295.056 -738014.944
49 50 51 52 53 54
-637891.000 -648080.632 -675238.105 -781777.211 -854343.053 -815078.947
55 56 57 58 59 60
-1030016.842 -949374.789 -774194.474 -802031.053 -557806.056 -512549.944
61 62 63 64 65 66
-461942.000 -430479.632 -394129.105 -450111.211 -511466.053 -502620.947
67 68 69 70 71 72
-589307.842 -543980.789 -476890.474 -431527.053 -225351.056 -261617.944
73 74 75 76 77 78
-174074.000 -128417.632 -142189.105 -210608.211 -252492.053 -268558.947
79 80 81 82 83 84
-341819.842 -208410.789 -251578.474 -209443.053 -64088.056 -96597.944
85 86 87 88 89 90
-10112.000 25490.368 50268.895 -16035.211 -18282.053 -57222.947
91 92 93 94 95 96
-122447.842 -6941.789 37754.526 97241.947 193047.944 -48074.944
97 98 99 100 101 102
107955.000 254346.368 292494.895 309437.789 264255.947 208826.053
103 104 105 106 107 108
219029.158 215856.211 290853.526 299150.947 305068.944 202909.056
109 110 111 112 113 114
321307.000 284199.368 388688.895 437623.789 331464.947 402812.053
115 116 117 118 119 120
365482.158 347301.211 122058.526 -125741.053 46938.944 86879.056
121 122 123 124 125 126
189709.000 289457.368 390165.895 385631.789 416009.947 384670.053
127 128 129 130 131 132
397199.158 415184.211 434927.526 368705.947 282628.944 332846.056
133 134 135 136 137 138
364812.000 361601.368 243542.895 95878.789 111419.947 260272.053
139 140 141 142 143 144
342598.158 316707.211 305078.526 408880.947 360186.944 337244.056
145 146 147 148 149 150
358990.000 523465.368 482613.895 562571.789 561033.947 513000.053
151 152 153 154 155 156
604533.158 527414.211 497771.526 562891.947 477492.944 453187.056
157 158 159 160 161 162
573102.000 522751.368 506135.895 630497.789 777410.947 657214.053
163 164 165 166 167 168
795360.158 716935.211 716306.526 724727.947 588615.944 568055.056
169 170 171 172 173 174
645512.000 551468.368 623894.895 891369.789 893723.947 943581.053
175 176 177 178 179 180
1011382.158 891796.211 865618.526 848739.947 743372.944 776246.056
181 182 183 184 185 186
787199.000 744546.368 920366.895 987987.789 1014220.947 962286.053
187 188 189 190 191 192
1188615.158 1105230.211 995633.526 1026694.947 862985.944 848555.056
193 194 195 196 197 198
818254.000 845996.368 966438.895 1001205.789 1121211.947 1116446.053
199 200 201 202 203 204
1114239.158 999920.211 868009.526 919848.947 661930.944 657783.056
205 206 207 208 209 210
529058.000 413825.368 424858.895 755109.789 609775.947 566884.053
211 212 213 214 215 216
799233.158 768523.211 585541.526 631353.947 548555.944 589964.056
217 218 219 220 221 222
552714.000 548545.368 690551.895 89471.789 812872.947 820832.053
223 224 225 226
997554.158 926510.211 817488.526 955712.947
> postscript(file="/var/wessaorg/rcomp/tmp/6e2bg1322578748.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 = 226
Frequency = 1
lag(myerror, k = 1) myerror
0 -1232868.000 NA
1 -1220194.632 -1232868.000
2 -1498385.105 -1220194.632
3 -1394991.211 -1498385.105
4 -1540120.053 -1394991.211
5 -1546685.947 -1540120.053
6 -1753333.842 -1546685.947
7 -1655179.789 -1753333.842
8 -1561487.474 -1655179.789
9 -1644652.053 -1561487.474
10 -1311147.056 -1644652.053
11 -1228790.944 -1311147.056
12 -1101539.000 -1228790.944
13 -1142197.632 -1101539.000
14 -1320730.105 -1142197.632
15 -1272225.211 -1320730.105
16 -1464494.053 -1272225.211
17 -1388175.947 -1464494.053
18 -1496922.842 -1388175.947
19 -1420264.789 -1496922.842
20 -1342115.474 -1420264.789
21 -1371513.053 -1342115.474
22 -1144457.056 -1371513.053
23 -1065578.944 -1144457.056
24 -894570.000 -1065578.944
25 -968840.632 -894570.000
26 -1059270.105 -968840.632
27 -1111423.211 -1059270.105
28 -1198921.053 -1111423.211
29 -1191682.947 -1198921.053
30 -1302433.842 -1191682.947
31 -1291321.789 -1302433.842
32 -1130414.474 -1291321.789
33 -1221716.053 -1130414.474
34 -957682.056 -1221716.053
35 -902442.944 -957682.056
36 -735616.000 -902442.944
37 -827482.632 -735616.000
38 -890081.105 -827482.632
39 -909615.211 -890081.105
40 -1073283.053 -909615.211
41 -1066796.947 -1073283.053
42 -1198942.842 -1066796.947
43 -1155903.789 -1198942.842
44 -1000361.474 -1155903.789
45 -1037327.053 -1000361.474
46 -810295.056 -1037327.053
47 -738014.944 -810295.056
48 -637891.000 -738014.944
49 -648080.632 -637891.000
50 -675238.105 -648080.632
51 -781777.211 -675238.105
52 -854343.053 -781777.211
53 -815078.947 -854343.053
54 -1030016.842 -815078.947
55 -949374.789 -1030016.842
56 -774194.474 -949374.789
57 -802031.053 -774194.474
58 -557806.056 -802031.053
59 -512549.944 -557806.056
60 -461942.000 -512549.944
61 -430479.632 -461942.000
62 -394129.105 -430479.632
63 -450111.211 -394129.105
64 -511466.053 -450111.211
65 -502620.947 -511466.053
66 -589307.842 -502620.947
67 -543980.789 -589307.842
68 -476890.474 -543980.789
69 -431527.053 -476890.474
70 -225351.056 -431527.053
71 -261617.944 -225351.056
72 -174074.000 -261617.944
73 -128417.632 -174074.000
74 -142189.105 -128417.632
75 -210608.211 -142189.105
76 -252492.053 -210608.211
77 -268558.947 -252492.053
78 -341819.842 -268558.947
79 -208410.789 -341819.842
80 -251578.474 -208410.789
81 -209443.053 -251578.474
82 -64088.056 -209443.053
83 -96597.944 -64088.056
84 -10112.000 -96597.944
85 25490.368 -10112.000
86 50268.895 25490.368
87 -16035.211 50268.895
88 -18282.053 -16035.211
89 -57222.947 -18282.053
90 -122447.842 -57222.947
91 -6941.789 -122447.842
92 37754.526 -6941.789
93 97241.947 37754.526
94 193047.944 97241.947
95 -48074.944 193047.944
96 107955.000 -48074.944
97 254346.368 107955.000
98 292494.895 254346.368
99 309437.789 292494.895
100 264255.947 309437.789
101 208826.053 264255.947
102 219029.158 208826.053
103 215856.211 219029.158
104 290853.526 215856.211
105 299150.947 290853.526
106 305068.944 299150.947
107 202909.056 305068.944
108 321307.000 202909.056
109 284199.368 321307.000
110 388688.895 284199.368
111 437623.789 388688.895
112 331464.947 437623.789
113 402812.053 331464.947
114 365482.158 402812.053
115 347301.211 365482.158
116 122058.526 347301.211
117 -125741.053 122058.526
118 46938.944 -125741.053
119 86879.056 46938.944
120 189709.000 86879.056
121 289457.368 189709.000
122 390165.895 289457.368
123 385631.789 390165.895
124 416009.947 385631.789
125 384670.053 416009.947
126 397199.158 384670.053
127 415184.211 397199.158
128 434927.526 415184.211
129 368705.947 434927.526
130 282628.944 368705.947
131 332846.056 282628.944
132 364812.000 332846.056
133 361601.368 364812.000
134 243542.895 361601.368
135 95878.789 243542.895
136 111419.947 95878.789
137 260272.053 111419.947
138 342598.158 260272.053
139 316707.211 342598.158
140 305078.526 316707.211
141 408880.947 305078.526
142 360186.944 408880.947
143 337244.056 360186.944
144 358990.000 337244.056
145 523465.368 358990.000
146 482613.895 523465.368
147 562571.789 482613.895
148 561033.947 562571.789
149 513000.053 561033.947
150 604533.158 513000.053
151 527414.211 604533.158
152 497771.526 527414.211
153 562891.947 497771.526
154 477492.944 562891.947
155 453187.056 477492.944
156 573102.000 453187.056
157 522751.368 573102.000
158 506135.895 522751.368
159 630497.789 506135.895
160 777410.947 630497.789
161 657214.053 777410.947
162 795360.158 657214.053
163 716935.211 795360.158
164 716306.526 716935.211
165 724727.947 716306.526
166 588615.944 724727.947
167 568055.056 588615.944
168 645512.000 568055.056
169 551468.368 645512.000
170 623894.895 551468.368
171 891369.789 623894.895
172 893723.947 891369.789
173 943581.053 893723.947
174 1011382.158 943581.053
175 891796.211 1011382.158
176 865618.526 891796.211
177 848739.947 865618.526
178 743372.944 848739.947
179 776246.056 743372.944
180 787199.000 776246.056
181 744546.368 787199.000
182 920366.895 744546.368
183 987987.789 920366.895
184 1014220.947 987987.789
185 962286.053 1014220.947
186 1188615.158 962286.053
187 1105230.211 1188615.158
188 995633.526 1105230.211
189 1026694.947 995633.526
190 862985.944 1026694.947
191 848555.056 862985.944
192 818254.000 848555.056
193 845996.368 818254.000
194 966438.895 845996.368
195 1001205.789 966438.895
196 1121211.947 1001205.789
197 1116446.053 1121211.947
198 1114239.158 1116446.053
199 999920.211 1114239.158
200 868009.526 999920.211
201 919848.947 868009.526
202 661930.944 919848.947
203 657783.056 661930.944
204 529058.000 657783.056
205 413825.368 529058.000
206 424858.895 413825.368
207 755109.789 424858.895
208 609775.947 755109.789
209 566884.053 609775.947
210 799233.158 566884.053
211 768523.211 799233.158
212 585541.526 768523.211
213 631353.947 585541.526
214 548555.944 631353.947
215 589964.056 548555.944
216 552714.000 589964.056
217 548545.368 552714.000
218 690551.895 548545.368
219 89471.789 690551.895
220 812872.947 89471.789
221 820832.053 812872.947
222 997554.158 820832.053
223 926510.211 997554.158
224 817488.526 926510.211
225 955712.947 817488.526
226 NA 955712.947
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -1220194.632 -1232868.000
[2,] -1498385.105 -1220194.632
[3,] -1394991.211 -1498385.105
[4,] -1540120.053 -1394991.211
[5,] -1546685.947 -1540120.053
[6,] -1753333.842 -1546685.947
[7,] -1655179.789 -1753333.842
[8,] -1561487.474 -1655179.789
[9,] -1644652.053 -1561487.474
[10,] -1311147.056 -1644652.053
[11,] -1228790.944 -1311147.056
[12,] -1101539.000 -1228790.944
[13,] -1142197.632 -1101539.000
[14,] -1320730.105 -1142197.632
[15,] -1272225.211 -1320730.105
[16,] -1464494.053 -1272225.211
[17,] -1388175.947 -1464494.053
[18,] -1496922.842 -1388175.947
[19,] -1420264.789 -1496922.842
[20,] -1342115.474 -1420264.789
[21,] -1371513.053 -1342115.474
[22,] -1144457.056 -1371513.053
[23,] -1065578.944 -1144457.056
[24,] -894570.000 -1065578.944
[25,] -968840.632 -894570.000
[26,] -1059270.105 -968840.632
[27,] -1111423.211 -1059270.105
[28,] -1198921.053 -1111423.211
[29,] -1191682.947 -1198921.053
[30,] -1302433.842 -1191682.947
[31,] -1291321.789 -1302433.842
[32,] -1130414.474 -1291321.789
[33,] -1221716.053 -1130414.474
[34,] -957682.056 -1221716.053
[35,] -902442.944 -957682.056
[36,] -735616.000 -902442.944
[37,] -827482.632 -735616.000
[38,] -890081.105 -827482.632
[39,] -909615.211 -890081.105
[40,] -1073283.053 -909615.211
[41,] -1066796.947 -1073283.053
[42,] -1198942.842 -1066796.947
[43,] -1155903.789 -1198942.842
[44,] -1000361.474 -1155903.789
[45,] -1037327.053 -1000361.474
[46,] -810295.056 -1037327.053
[47,] -738014.944 -810295.056
[48,] -637891.000 -738014.944
[49,] -648080.632 -637891.000
[50,] -675238.105 -648080.632
[51,] -781777.211 -675238.105
[52,] -854343.053 -781777.211
[53,] -815078.947 -854343.053
[54,] -1030016.842 -815078.947
[55,] -949374.789 -1030016.842
[56,] -774194.474 -949374.789
[57,] -802031.053 -774194.474
[58,] -557806.056 -802031.053
[59,] -512549.944 -557806.056
[60,] -461942.000 -512549.944
[61,] -430479.632 -461942.000
[62,] -394129.105 -430479.632
[63,] -450111.211 -394129.105
[64,] -511466.053 -450111.211
[65,] -502620.947 -511466.053
[66,] -589307.842 -502620.947
[67,] -543980.789 -589307.842
[68,] -476890.474 -543980.789
[69,] -431527.053 -476890.474
[70,] -225351.056 -431527.053
[71,] -261617.944 -225351.056
[72,] -174074.000 -261617.944
[73,] -128417.632 -174074.000
[74,] -142189.105 -128417.632
[75,] -210608.211 -142189.105
[76,] -252492.053 -210608.211
[77,] -268558.947 -252492.053
[78,] -341819.842 -268558.947
[79,] -208410.789 -341819.842
[80,] -251578.474 -208410.789
[81,] -209443.053 -251578.474
[82,] -64088.056 -209443.053
[83,] -96597.944 -64088.056
[84,] -10112.000 -96597.944
[85,] 25490.368 -10112.000
[86,] 50268.895 25490.368
[87,] -16035.211 50268.895
[88,] -18282.053 -16035.211
[89,] -57222.947 -18282.053
[90,] -122447.842 -57222.947
[91,] -6941.789 -122447.842
[92,] 37754.526 -6941.789
[93,] 97241.947 37754.526
[94,] 193047.944 97241.947
[95,] -48074.944 193047.944
[96,] 107955.000 -48074.944
[97,] 254346.368 107955.000
[98,] 292494.895 254346.368
[99,] 309437.789 292494.895
[100,] 264255.947 309437.789
[101,] 208826.053 264255.947
[102,] 219029.158 208826.053
[103,] 215856.211 219029.158
[104,] 290853.526 215856.211
[105,] 299150.947 290853.526
[106,] 305068.944 299150.947
[107,] 202909.056 305068.944
[108,] 321307.000 202909.056
[109,] 284199.368 321307.000
[110,] 388688.895 284199.368
[111,] 437623.789 388688.895
[112,] 331464.947 437623.789
[113,] 402812.053 331464.947
[114,] 365482.158 402812.053
[115,] 347301.211 365482.158
[116,] 122058.526 347301.211
[117,] -125741.053 122058.526
[118,] 46938.944 -125741.053
[119,] 86879.056 46938.944
[120,] 189709.000 86879.056
[121,] 289457.368 189709.000
[122,] 390165.895 289457.368
[123,] 385631.789 390165.895
[124,] 416009.947 385631.789
[125,] 384670.053 416009.947
[126,] 397199.158 384670.053
[127,] 415184.211 397199.158
[128,] 434927.526 415184.211
[129,] 368705.947 434927.526
[130,] 282628.944 368705.947
[131,] 332846.056 282628.944
[132,] 364812.000 332846.056
[133,] 361601.368 364812.000
[134,] 243542.895 361601.368
[135,] 95878.789 243542.895
[136,] 111419.947 95878.789
[137,] 260272.053 111419.947
[138,] 342598.158 260272.053
[139,] 316707.211 342598.158
[140,] 305078.526 316707.211
[141,] 408880.947 305078.526
[142,] 360186.944 408880.947
[143,] 337244.056 360186.944
[144,] 358990.000 337244.056
[145,] 523465.368 358990.000
[146,] 482613.895 523465.368
[147,] 562571.789 482613.895
[148,] 561033.947 562571.789
[149,] 513000.053 561033.947
[150,] 604533.158 513000.053
[151,] 527414.211 604533.158
[152,] 497771.526 527414.211
[153,] 562891.947 497771.526
[154,] 477492.944 562891.947
[155,] 453187.056 477492.944
[156,] 573102.000 453187.056
[157,] 522751.368 573102.000
[158,] 506135.895 522751.368
[159,] 630497.789 506135.895
[160,] 777410.947 630497.789
[161,] 657214.053 777410.947
[162,] 795360.158 657214.053
[163,] 716935.211 795360.158
[164,] 716306.526 716935.211
[165,] 724727.947 716306.526
[166,] 588615.944 724727.947
[167,] 568055.056 588615.944
[168,] 645512.000 568055.056
[169,] 551468.368 645512.000
[170,] 623894.895 551468.368
[171,] 891369.789 623894.895
[172,] 893723.947 891369.789
[173,] 943581.053 893723.947
[174,] 1011382.158 943581.053
[175,] 891796.211 1011382.158
[176,] 865618.526 891796.211
[177,] 848739.947 865618.526
[178,] 743372.944 848739.947
[179,] 776246.056 743372.944
[180,] 787199.000 776246.056
[181,] 744546.368 787199.000
[182,] 920366.895 744546.368
[183,] 987987.789 920366.895
[184,] 1014220.947 987987.789
[185,] 962286.053 1014220.947
[186,] 1188615.158 962286.053
[187,] 1105230.211 1188615.158
[188,] 995633.526 1105230.211
[189,] 1026694.947 995633.526
[190,] 862985.944 1026694.947
[191,] 848555.056 862985.944
[192,] 818254.000 848555.056
[193,] 845996.368 818254.000
[194,] 966438.895 845996.368
[195,] 1001205.789 966438.895
[196,] 1121211.947 1001205.789
[197,] 1116446.053 1121211.947
[198,] 1114239.158 1116446.053
[199,] 999920.211 1114239.158
[200,] 868009.526 999920.211
[201,] 919848.947 868009.526
[202,] 661930.944 919848.947
[203,] 657783.056 661930.944
[204,] 529058.000 657783.056
[205,] 413825.368 529058.000
[206,] 424858.895 413825.368
[207,] 755109.789 424858.895
[208,] 609775.947 755109.789
[209,] 566884.053 609775.947
[210,] 799233.158 566884.053
[211,] 768523.211 799233.158
[212,] 585541.526 768523.211
[213,] 631353.947 585541.526
[214,] 548555.944 631353.947
[215,] 589964.056 548555.944
[216,] 552714.000 589964.056
[217,] 548545.368 552714.000
[218,] 690551.895 548545.368
[219,] 89471.789 690551.895
[220,] 812872.947 89471.789
[221,] 820832.053 812872.947
[222,] 997554.158 820832.053
[223,] 926510.211 997554.158
[224,] 817488.526 926510.211
[225,] 955712.947 817488.526
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -1220194.632 -1232868.000
2 -1498385.105 -1220194.632
3 -1394991.211 -1498385.105
4 -1540120.053 -1394991.211
5 -1546685.947 -1540120.053
6 -1753333.842 -1546685.947
7 -1655179.789 -1753333.842
8 -1561487.474 -1655179.789
9 -1644652.053 -1561487.474
10 -1311147.056 -1644652.053
11 -1228790.944 -1311147.056
12 -1101539.000 -1228790.944
13 -1142197.632 -1101539.000
14 -1320730.105 -1142197.632
15 -1272225.211 -1320730.105
16 -1464494.053 -1272225.211
17 -1388175.947 -1464494.053
18 -1496922.842 -1388175.947
19 -1420264.789 -1496922.842
20 -1342115.474 -1420264.789
21 -1371513.053 -1342115.474
22 -1144457.056 -1371513.053
23 -1065578.944 -1144457.056
24 -894570.000 -1065578.944
25 -968840.632 -894570.000
26 -1059270.105 -968840.632
27 -1111423.211 -1059270.105
28 -1198921.053 -1111423.211
29 -1191682.947 -1198921.053
30 -1302433.842 -1191682.947
31 -1291321.789 -1302433.842
32 -1130414.474 -1291321.789
33 -1221716.053 -1130414.474
34 -957682.056 -1221716.053
35 -902442.944 -957682.056
36 -735616.000 -902442.944
37 -827482.632 -735616.000
38 -890081.105 -827482.632
39 -909615.211 -890081.105
40 -1073283.053 -909615.211
41 -1066796.947 -1073283.053
42 -1198942.842 -1066796.947
43 -1155903.789 -1198942.842
44 -1000361.474 -1155903.789
45 -1037327.053 -1000361.474
46 -810295.056 -1037327.053
47 -738014.944 -810295.056
48 -637891.000 -738014.944
49 -648080.632 -637891.000
50 -675238.105 -648080.632
51 -781777.211 -675238.105
52 -854343.053 -781777.211
53 -815078.947 -854343.053
54 -1030016.842 -815078.947
55 -949374.789 -1030016.842
56 -774194.474 -949374.789
57 -802031.053 -774194.474
58 -557806.056 -802031.053
59 -512549.944 -557806.056
60 -461942.000 -512549.944
61 -430479.632 -461942.000
62 -394129.105 -430479.632
63 -450111.211 -394129.105
64 -511466.053 -450111.211
65 -502620.947 -511466.053
66 -589307.842 -502620.947
67 -543980.789 -589307.842
68 -476890.474 -543980.789
69 -431527.053 -476890.474
70 -225351.056 -431527.053
71 -261617.944 -225351.056
72 -174074.000 -261617.944
73 -128417.632 -174074.000
74 -142189.105 -128417.632
75 -210608.211 -142189.105
76 -252492.053 -210608.211
77 -268558.947 -252492.053
78 -341819.842 -268558.947
79 -208410.789 -341819.842
80 -251578.474 -208410.789
81 -209443.053 -251578.474
82 -64088.056 -209443.053
83 -96597.944 -64088.056
84 -10112.000 -96597.944
85 25490.368 -10112.000
86 50268.895 25490.368
87 -16035.211 50268.895
88 -18282.053 -16035.211
89 -57222.947 -18282.053
90 -122447.842 -57222.947
91 -6941.789 -122447.842
92 37754.526 -6941.789
93 97241.947 37754.526
94 193047.944 97241.947
95 -48074.944 193047.944
96 107955.000 -48074.944
97 254346.368 107955.000
98 292494.895 254346.368
99 309437.789 292494.895
100 264255.947 309437.789
101 208826.053 264255.947
102 219029.158 208826.053
103 215856.211 219029.158
104 290853.526 215856.211
105 299150.947 290853.526
106 305068.944 299150.947
107 202909.056 305068.944
108 321307.000 202909.056
109 284199.368 321307.000
110 388688.895 284199.368
111 437623.789 388688.895
112 331464.947 437623.789
113 402812.053 331464.947
114 365482.158 402812.053
115 347301.211 365482.158
116 122058.526 347301.211
117 -125741.053 122058.526
118 46938.944 -125741.053
119 86879.056 46938.944
120 189709.000 86879.056
121 289457.368 189709.000
122 390165.895 289457.368
123 385631.789 390165.895
124 416009.947 385631.789
125 384670.053 416009.947
126 397199.158 384670.053
127 415184.211 397199.158
128 434927.526 415184.211
129 368705.947 434927.526
130 282628.944 368705.947
131 332846.056 282628.944
132 364812.000 332846.056
133 361601.368 364812.000
134 243542.895 361601.368
135 95878.789 243542.895
136 111419.947 95878.789
137 260272.053 111419.947
138 342598.158 260272.053
139 316707.211 342598.158
140 305078.526 316707.211
141 408880.947 305078.526
142 360186.944 408880.947
143 337244.056 360186.944
144 358990.000 337244.056
145 523465.368 358990.000
146 482613.895 523465.368
147 562571.789 482613.895
148 561033.947 562571.789
149 513000.053 561033.947
150 604533.158 513000.053
151 527414.211 604533.158
152 497771.526 527414.211
153 562891.947 497771.526
154 477492.944 562891.947
155 453187.056 477492.944
156 573102.000 453187.056
157 522751.368 573102.000
158 506135.895 522751.368
159 630497.789 506135.895
160 777410.947 630497.789
161 657214.053 777410.947
162 795360.158 657214.053
163 716935.211 795360.158
164 716306.526 716935.211
165 724727.947 716306.526
166 588615.944 724727.947
167 568055.056 588615.944
168 645512.000 568055.056
169 551468.368 645512.000
170 623894.895 551468.368
171 891369.789 623894.895
172 893723.947 891369.789
173 943581.053 893723.947
174 1011382.158 943581.053
175 891796.211 1011382.158
176 865618.526 891796.211
177 848739.947 865618.526
178 743372.944 848739.947
179 776246.056 743372.944
180 787199.000 776246.056
181 744546.368 787199.000
182 920366.895 744546.368
183 987987.789 920366.895
184 1014220.947 987987.789
185 962286.053 1014220.947
186 1188615.158 962286.053
187 1105230.211 1188615.158
188 995633.526 1105230.211
189 1026694.947 995633.526
190 862985.944 1026694.947
191 848555.056 862985.944
192 818254.000 848555.056
193 845996.368 818254.000
194 966438.895 845996.368
195 1001205.789 966438.895
196 1121211.947 1001205.789
197 1116446.053 1121211.947
198 1114239.158 1116446.053
199 999920.211 1114239.158
200 868009.526 999920.211
201 919848.947 868009.526
202 661930.944 919848.947
203 657783.056 661930.944
204 529058.000 657783.056
205 413825.368 529058.000
206 424858.895 413825.368
207 755109.789 424858.895
208 609775.947 755109.789
209 566884.053 609775.947
210 799233.158 566884.053
211 768523.211 799233.158
212 585541.526 768523.211
213 631353.947 585541.526
214 548555.944 631353.947
215 589964.056 548555.944
216 552714.000 589964.056
217 548545.368 552714.000
218 690551.895 548545.368
219 89471.789 690551.895
220 812872.947 89471.789
221 820832.053 812872.947
222 997554.158 820832.053
223 926510.211 997554.158
224 817488.526 926510.211
225 955712.947 817488.526
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/7aa1w1322578748.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/8zzn31322578748.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/9nqw71322578748.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/wessaorg/rcomp/tmp/10cfzz1322578748.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/wessaorg/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/113bzc1322578748.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/12m5ro1322578748.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/13rdq51322578748.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/14g2mq1322578748.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/15conb1322578748.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/16nafb1322578748.tab")
+ }
>
> try(system("convert tmp/14o3t1322578748.ps tmp/14o3t1322578748.png",intern=TRUE))
character(0)
> try(system("convert tmp/2kljr1322578748.ps tmp/2kljr1322578748.png",intern=TRUE))
character(0)
> try(system("convert tmp/3moc01322578748.ps tmp/3moc01322578748.png",intern=TRUE))
character(0)
> try(system("convert tmp/48b5f1322578748.ps tmp/48b5f1322578748.png",intern=TRUE))
character(0)
> try(system("convert tmp/51mm21322578748.ps tmp/51mm21322578748.png",intern=TRUE))
character(0)
> try(system("convert tmp/6e2bg1322578748.ps tmp/6e2bg1322578748.png",intern=TRUE))
character(0)
> try(system("convert tmp/7aa1w1322578748.ps tmp/7aa1w1322578748.png",intern=TRUE))
character(0)
> try(system("convert tmp/8zzn31322578748.ps tmp/8zzn31322578748.png",intern=TRUE))
character(0)
> try(system("convert tmp/9nqw71322578748.ps tmp/9nqw71322578748.png",intern=TRUE))
character(0)
> try(system("convert tmp/10cfzz1322578748.ps tmp/10cfzz1322578748.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
6.168 0.532 6.782