R version 2.15.2 (2012-10-26) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i686-pc-linux-gnu (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(11.73
+ ,2582.5
+ ,2666
+ ,36.98
+ ,1
+ ,4.5
+ ,11.75
+ ,2502.5
+ ,2584
+ ,37.79
+ ,1
+ ,4.5
+ ,11.39
+ ,2483.5
+ ,2547.5
+ ,36.66
+ ,1
+ ,4.5
+ ,11.54
+ ,2458.5
+ ,2469
+ ,36.8
+ ,1
+ ,4.5
+ ,9.62
+ ,2493.5
+ ,2493.5
+ ,37.02
+ ,1
+ ,4.5
+ ,9.82
+ ,2517.5
+ ,2531
+ ,37
+ ,1
+ ,4.5
+ ,9.94
+ ,2497.5
+ ,2541.5
+ ,37
+ ,1
+ ,5.8
+ ,9.9
+ ,2487.5
+ ,2542
+ ,36.5
+ ,1
+ ,5.8
+ ,9.8
+ ,2516
+ ,2611.5
+ ,36.33
+ ,1
+ ,5.8
+ ,9.86
+ ,2493
+ ,2637.5
+ ,36.22
+ ,1
+ ,5.8
+ ,10.5
+ ,2417.5
+ ,2588.5
+ ,36
+ ,1
+ ,5.8
+ ,10.33
+ ,2390
+ ,2567.5
+ ,35.59
+ ,1
+ ,5.8
+ ,10.16
+ ,2327.5
+ ,2535.5
+ ,35.11
+ ,1
+ ,5.8
+ ,9.91
+ ,2272.5
+ ,2413
+ ,35.17
+ ,1
+ ,5.8
+ ,9.96
+ ,2277.5
+ ,2427.5
+ ,34.49
+ ,1
+ ,5.8
+ ,10.03
+ ,2312.5
+ ,2481.5
+ ,35.27
+ ,1
+ ,5.8
+ ,9.55
+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
+ ,26.66
+ ,1.5
+ ,-10.4
+ ,6.37
+ ,1951.5
+ ,2038.5
+ ,26.63
+ ,1.5
+ ,-10.4
+ ,6.446
+ ,1937.5
+ ,2012.5
+ ,27.61
+ ,1.5
+ ,-10.4
+ ,6.54
+ ,1986.5
+ ,2032.5
+ ,26.72
+ ,1.5
+ ,-10.4
+ ,6.374
+ ,1946.5
+ ,1986
+ ,26.96
+ ,1.5
+ ,-10.4
+ ,6.33
+ ,1877.5
+ ,1940
+ ,27.73
+ ,1.5
+ ,-10.4
+ ,6.63
+ ,1907.5
+ ,1997.5
+ ,26.96
+ ,1.5
+ ,-10.4
+ ,6.498
+ ,1947.5
+ ,2017.5
+ ,27.33
+ ,1.5
+ ,-10.4
+ ,6.485
+ ,1937.5
+ ,2022
+ ,27.1
+ ,1.5
+ ,-10.4
+ ,6.36
+ ,1936
+ ,2016.5
+ ,26.58
+ ,1.5
+ ,-10.4)
+ ,dim=c(6
+ ,191)
+ ,dimnames=list(c('koers-nyrstar'
+ ,'Zink-prijs'
+ ,'Lood-prijs'
+ ,'NYSE-eindkoers-vorige-dag'
+ ,'Rente-op-LT-leningen-in-%'
+ ,'Conjunctuurenquete
')
+ ,1:191))
> y <- array(NA,dim=c(6,191),dimnames=list(c('koers-nyrstar','Zink-prijs','Lood-prijs','NYSE-eindkoers-vorige-dag','Rente-op-LT-leningen-in-%','Conjunctuurenquete
'),1:191))
> 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'
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following object(s) are masked from 'package:base':
as.Date, as.Date.numeric
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
koers-nyrstar Zink-prijs Lood-prijs NYSE-eindkoers-vorige-dag
1 11.730 2582.5 2666.0 36.98
2 11.750 2502.5 2584.0 37.79
3 11.390 2483.5 2547.5 36.66
4 11.540 2458.5 2469.0 36.80
5 9.620 2493.5 2493.5 37.02
6 9.820 2517.5 2531.0 37.00
7 9.940 2497.5 2541.5 37.00
8 9.900 2487.5 2542.0 36.50
9 9.800 2516.0 2611.5 36.33
10 9.860 2493.0 2637.5 36.22
11 10.500 2417.5 2588.5 36.00
12 10.330 2390.0 2567.5 35.59
13 10.160 2327.5 2535.5 35.11
14 9.910 2272.5 2413.0 35.17
15 9.960 2277.5 2427.5 34.49
16 10.030 2312.5 2481.5 35.27
17 9.550 2282.0 2492.5 36.55
18 9.510 2319.0 2582.5 35.81
19 9.800 2322.5 2657.0 36.02
20 10.080 2327.5 2687.5 35.33
21 10.200 2289.5 2632.5 34.59
22 10.230 2337.5 2682.5 34.44
23 10.200 2412.5 2721.5 34.88
24 10.070 2425.0 2693.5 34.59
25 10.010 2372.5 2652.5 35.08
26 10.050 2337.5 2627.5 34.48
27 9.920 2367.5 2652.5 35.38
28 10.030 2348.5 2637.5 35.30
29 10.180 2337.5 2672.5 35.51
30 10.100 2331.0 2669.0 35.17
31 10.160 2407.5 2751.0 39.60
32 10.150 2428.5 2772.5 39.60
33 10.130 2429.5 2787.5 38.98
34 10.090 2469.0 2802.5 39.81
35 10.180 2497.5 2842.5 39.52
36 10.060 2542.5 2862.5 38.70
37 9.650 2467.5 2757.5 37.59
38 9.740 2447.5 2692.0 37.85
39 9.530 2412.5 2622.5 37.84
40 9.500 2402.5 2634.0 38.90
41 9.000 2350.5 2582.5 39.01
42 9.150 2353.0 2557.5 38.32
43 9.320 2358.0 2627.5 38.70
44 9.620 2366.5 2625.0 39.08
45 9.590 2284.5 2556.0 39.03
46 9.370 2225.5 2528.0 38.76
47 9.350 2253.0 2492.5 39.29
48 9.320 2253.0 2492.5 39.39
49 9.490 2253.0 2492.5 39.75
50 9.520 2237.5 2507.5 40.05
51 9.590 2173.5 2467.5 40.40
52 9.350 2122.5 2352.5 39.99
53 9.200 2162.5 2302.5 39.66
54 9.570 2164.5 2306.5 39.57
55 9.780 2169.0 2337.5 39.98
56 9.790 2124.0 2274.5 40.64
57 9.570 2154.0 2297.5 41.55
58 9.530 2167.5 2340.5 40.68
59 9.650 2130.5 2297.5 40.60
60 9.360 2111.0 2287.5 40.89
61 9.400 2182.5 2401.5 35.73
62 9.320 2176.5 2482.0 34.50
63 9.310 2152.5 2467.5 35.16
64 9.190 2127.5 2429.5 35.82
65 9.390 2189.5 2480.5 35.76
66 9.280 2239.0 2516.5 35.24
67 9.280 2264.0 2512.5 35.36
68 9.310 2282.0 2512.5 35.60
69 9.280 2282.0 2512.5 35.52
70 9.310 2271.0 2512.5 35.67
71 9.350 2252.5 2508.5 36.41
72 9.190 2220.5 2425.5 35.49
73 9.070 2237.5 2427.5 35.61
74 8.960 2281.0 2467.5 35.80
75 8.690 2274.0 2537.5 35.50
76 8.580 2272.5 2567.5 35.27
77 8.560 2286.5 2589.5 34.55
78 8.470 2267.5 2552.5 34.70
79 8.460 2237.5 2522.5 34.24
80 8.750 2270.5 2577.5 34.50
81 8.950 2267.5 2562.5 34.61
82 9.330 2207.5 2492.5 34.04
83 9.510 2217.5 2477.5 33.57
84 9.561 2170.0 2422.5 33.34
85 9.940 2222.5 2485.5 33.32
86 9.900 2242.5 2497.5 34.02
87 9.275 2232.5 2536.5 33.67
88 9.560 2245.5 2573.5 32.50
89 9.779 2257.5 2561.5 32.27
90 9.746 2270.5 2579.5 32.65
91 9.991 2302.5 2632.5 33.24
92 9.980 2363.5 2645.5 33.92
93 10.195 2377.5 2667.5 34.27
94 10.310 2392.5 2681.0 34.72
95 10.250 2411.0 2687.5 34.67
96 9.871 2391.0 2682.5 34.36
97 10.060 2400.0 2722.5 35.40
98 9.894 2357.5 2700.5 35.44
99 9.590 2302.5 2664.0 33.64
100 9.640 2342.5 2704.0 33.19
101 9.890 2387.5 2771.0 33.85
102 9.530 2351.0 2674.5 33.81
103 9.388 2369.0 2692.5 34.35
104 9.160 2417.5 2715.5 34.07
105 9.418 2483.5 2761.0 34.23
106 9.570 2462.5 2722.0 34.52
107 9.857 2458.5 2737.5 35.00
108 9.877 2468.5 2682.5 35.06
109 9.760 2471.0 2677.5 35.18
110 9.760 2512.0 2717.5 35.28
111 9.695 2515.0 2702.5 34.24
112 9.475 2512.5 2692.5 34.29
113 9.262 2493.5 2633.5 33.46
114 9.097 2477.5 2617.5 33.00
115 8.550 2437.5 2571.0 31.40
116 8.160 2380.5 2532.5 31.24
117 7.532 2337.5 2497.5 29.20
118 7.325 2267.5 2399.5 28.00
119 6.749 2051.0 2287.5 25.38
120 7.130 2130.5 2284.5 28.22
121 6.995 2112.5 2297.5 26.87
122 7.346 2171.5 2332.5 28.37
123 7.730 2205.5 2397.5 28.16
124 7.837 2182.5 2382.5 28.86
125 7.514 2175.5 2377.5 26.54
126 7.580 2209.0 2397.5 27.16
127 6.830 2162.0 2312.5 25.31
128 6.617 2201.0 2312.5 25.25
129 6.715 2157.5 2282.5 24.94
130 6.630 2182.5 2307.5 26.23
131 6.891 2192.5 2342.5 27.28
132 7.002 2202.5 2387.5 26.68
133 7.090 2247.5 2450.5 27.15
134 7.360 2247.5 2450.5 27.93
135 7.477 2277.5 2511.5 27.45
136 7.826 2290.0 2572.5 27.28
137 7.790 2242.5 2537.5 26.88
138 7.578 2187.5 2480.5 25.88
139 7.204 2172.5 2427.5 25.09
140 7.198 2173.0 2387.5 27.23
141 7.685 2237.5 2427.5 26.50
142 7.795 2241.0 2435.5 25.67
143 7.460 2197.5 2442.5 25.42
144 7.274 2174.0 2417.5 26.28
145 7.330 2217.5 2402.5 27.66
146 7.655 2155.0 2333.5 28.16
147 7.767 2194.0 2392.5 27.73
148 7.840 2187.5 2382.5 26.28
149 7.424 2107.5 2312.5 26.39
150 7.540 2095.0 2326.5 25.70
151 7.351 2067.5 2236.5 24.33
152 6.735 2031.0 2132.5 24.72
153 6.777 1957.5 2027.5 25.30
154 6.679 1867.5 1902.5 25.61
155 7.340 1995.5 2015.0 24.01
156 6.978 1960.0 2005.0 24.45
157 6.920 1926.5 2012.5 23.75
158 6.628 1872.5 1992.5 21.98
159 6.385 1877.5 1936.5 23.51
160 5.984 1876.0 1912.5 24.25
161 6.268 1831.0 1872.5 24.45
162 6.596 1862.5 1932.5 24.37
163 6.395 1892.5 1952.5 25.87
164 6.715 1947.5 1991.5 26.46
165 6.804 1908.5 1972.5 27.71
166 6.929 1967.5 2032.5 26.99
167 6.846 1912.5 2000.5 27.50
168 6.992 1922.5 2028.5 26.89
169 6.774 1897.5 1992.5 27.19
170 6.750 1869.5 1932.5 26.53
171 6.485 1851.0 1902.5 27.03
172 6.270 1762.5 1807.5 26.78
173 6.470 1803.5 1867.5 27.49
174 6.780 1873.5 1987.5 26.49
175 6.710 1868.5 1997.5 26.05
176 6.141 1862.5 1943.5 27.51
177 6.720 1919.0 1987.5 28.00
178 6.680 1947.0 2023.5 26.57
179 6.371 1962.5 2077.5 24.76
180 6.097 1922.5 2007.5 25.53
181 6.270 1942.5 2022.5 27.08
182 6.447 1946.0 2032.5 26.66
183 6.370 1951.5 2038.5 26.63
184 6.446 1937.5 2012.5 27.61
185 6.540 1986.5 2032.5 26.72
186 6.374 1946.5 1986.0 26.96
187 6.330 1877.5 1940.0 27.73
188 6.630 1907.5 1997.5 26.96
189 6.498 1947.5 2017.5 27.33
190 6.485 1937.5 2022.0 27.10
191 6.360 1936.0 2016.5 26.58
Rente-op-LT-leningen-in-% Conjunctuurenquete\r
1 1.00 4.5
2 1.00 4.5
3 1.00 4.5
4 1.00 4.5
5 1.00 4.5
6 1.00 4.5
7 1.00 5.8
8 1.00 5.8
9 1.00 5.8
10 1.00 5.8
11 1.00 5.8
12 1.00 5.8
13 1.00 5.8
14 1.00 5.8
15 1.00 5.8
16 1.00 5.8
17 1.00 5.8
18 1.00 5.8
19 1.00 5.8
20 1.00 5.8
21 1.00 5.8
22 1.00 5.8
23 1.00 5.8
24 1.00 5.8
25 1.00 5.8
26 1.00 5.8
27 1.00 5.8
28 1.00 5.8
29 1.00 5.8
30 1.00 6.2
31 1.00 6.2
32 1.00 6.2
33 1.00 6.2
34 1.00 6.2
35 1.00 6.2
36 1.00 6.2
37 1.25 6.2
38 1.25 6.2
39 1.25 6.2
40 1.25 6.2
41 1.25 6.2
42 1.25 6.2
43 1.25 6.2
44 1.25 6.2
45 1.25 6.2
46 1.25 6.2
47 1.25 6.2
48 1.25 6.2
49 1.25 2.8
50 1.25 2.8
51 1.25 2.8
52 1.25 2.8
53 1.25 2.8
54 1.25 2.8
55 1.25 2.8
56 1.25 2.8
57 1.25 2.8
58 1.25 2.8
59 1.25 2.8
60 1.25 2.8
61 1.25 2.8
62 1.25 2.8
63 1.25 2.8
64 1.25 2.8
65 1.25 2.8
66 1.25 2.8
67 1.25 2.8
68 1.25 2.8
69 1.25 2.8
70 1.25 2.8
71 1.25 -0.5
72 1.25 -0.5
73 1.25 -0.5
74 1.25 -0.5
75 1.25 -0.5
76 1.25 -0.5
77 1.25 -0.5
78 1.25 -0.5
79 1.25 -0.5
80 1.25 -0.5
81 1.25 -0.5
82 1.25 -0.5
83 1.25 -0.5
84 1.25 -0.5
85 1.25 -0.5
86 1.25 -0.5
87 1.25 -0.5
88 1.25 -0.5
89 1.25 -0.5
90 1.25 -0.5
91 1.25 -0.5
92 1.25 -0.5
93 1.25 -1.1
94 1.25 -1.1
95 1.25 -1.1
96 1.25 -1.1
97 1.25 -1.1
98 1.25 -1.1
99 1.25 -1.1
100 1.50 -1.1
101 1.50 -1.1
102 1.50 -1.1
103 1.50 -1.1
104 1.50 -1.1
105 1.50 -1.1
106 1.50 -1.1
107 1.50 -1.1
108 1.50 -1.1
109 1.50 -1.1
110 1.50 -1.1
111 1.50 -1.1
112 1.50 -1.1
113 1.50 -1.1
114 1.50 -2.5
115 1.50 -2.5
116 1.50 -2.5
117 1.50 -2.5
118 1.50 -2.5
119 1.50 -2.5
120 1.50 -2.5
121 1.50 -2.5
122 1.50 -2.5
123 1.50 -2.5
124 1.50 -2.5
125 1.50 -2.5
126 1.50 -2.5
127 1.50 -2.5
128 1.50 -2.5
129 1.50 -2.5
130 1.50 -2.5
131 1.50 -2.5
132 1.50 -2.5
133 1.50 -2.5
134 1.50 -2.5
135 1.50 -2.5
136 1.50 -2.5
137 1.50 -7.8
138 1.50 -7.8
139 1.50 -7.8
140 1.50 -7.8
141 1.50 -7.8
142 1.50 -7.8
143 1.50 -7.8
144 1.50 -7.8
145 1.50 -7.8
146 1.50 -7.8
147 1.50 -7.8
148 1.50 -7.8
149 1.50 -7.8
150 1.50 -7.8
151 1.50 -7.8
152 1.50 -7.8
153 1.50 -7.8
154 1.50 -7.8
155 1.50 -7.8
156 1.50 -7.8
157 1.50 -7.8
158 1.50 -7.8
159 1.50 -9.4
160 1.50 -9.4
161 1.50 -9.4
162 1.50 -9.4
163 1.50 -9.4
164 1.50 -9.4
165 1.50 -9.4
166 1.50 -9.4
167 1.50 -9.4
168 1.50 -9.4
169 1.50 -9.4
170 1.50 -9.4
171 1.50 -9.4
172 1.50 -9.4
173 1.50 -9.4
174 1.50 -9.4
175 1.50 -9.4
176 1.50 -9.4
177 1.50 -9.4
178 1.50 -9.4
179 1.50 -9.4
180 1.50 -10.4
181 1.50 -10.4
182 1.50 -10.4
183 1.50 -10.4
184 1.50 -10.4
185 1.50 -10.4
186 1.50 -10.4
187 1.50 -10.4
188 1.50 -10.4
189 1.50 -10.4
190 1.50 -10.4
191 1.50 -10.4
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `Zink-prijs`
0.540428 0.001693
`Lood-prijs` `NYSE-eindkoers-vorige-dag`
0.001423 0.127615
`Rente-op-LT-leningen-in-%` `Conjunctuurenquete\\r`
-2.507532 -0.044378
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1.01263 -0.35492 0.02333 0.28977 1.33638
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.5404276 0.7969156 0.678 0.498525
`Zink-prijs` 0.0016928 0.0005407 3.131 0.002027 **
`Lood-prijs` 0.0014226 0.0004107 3.464 0.000662 ***
`NYSE-eindkoers-vorige-dag` 0.1276151 0.0130448 9.783 < 2e-16 ***
`Rente-op-LT-leningen-in-%` -2.5075320 0.3231607 -7.759 5.59e-13 ***
`Conjunctuurenquete\\r` -0.0443778 0.0169362 -2.620 0.009515 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.4447 on 185 degrees of freedom
Multiple R-squared: 0.908, Adjusted R-squared: 0.9056
F-statistic: 365.4 on 5 and 185 DF, p-value: < 2.2e-16
> if (n > n25) {
+ kp3 <- k + 3
+ nmkm3 <- n - k - 3
+ gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
+ numgqtests <- 0
+ numsignificant1 <- 0
+ numsignificant5 <- 0
+ numsignificant10 <- 0
+ for (mypoint in kp3:nmkm3) {
+ j <- 0
+ numgqtests <- numgqtests + 1
+ for (myalt in c('greater', 'two.sided', 'less')) {
+ j <- j + 1
+ gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
+ }
+ if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
+ }
+ gqarr
+ }
[,1] [,2] [,3]
[1,] 0.9939753 1.204940e-02 6.024700e-03
[2,] 0.9987365 2.527073e-03 1.263537e-03
[3,] 0.9975389 4.922140e-03 2.461070e-03
[4,] 0.9952158 9.568323e-03 4.784161e-03
[5,] 0.9924037 1.519264e-02 7.596321e-03
[6,] 0.9873447 2.531055e-02 1.265527e-02
[7,] 0.9842232 3.155359e-02 1.577680e-02
[8,] 0.9773172 4.536557e-02 2.268278e-02
[9,] 0.9916902 1.661952e-02 8.309761e-03
[10,] 0.9965609 6.878163e-03 3.439081e-03
[11,] 0.9962125 7.575046e-03 3.787523e-03
[12,] 0.9942139 1.157216e-02 5.786079e-03
[13,] 0.9912947 1.741058e-02 8.705291e-03
[14,] 0.9874233 2.515334e-02 1.257667e-02
[15,] 0.9818985 3.620308e-02 1.810154e-02
[16,] 0.9757344 4.853113e-02 2.426557e-02
[17,] 0.9664707 6.705865e-02 3.352932e-02
[18,] 0.9562765 8.744701e-02 4.372350e-02
[19,] 0.9425100 1.149800e-01 5.748998e-02
[20,] 0.9254474 1.491052e-01 7.455258e-02
[21,] 0.9063158 1.873684e-01 9.368419e-02
[22,] 0.8954922 2.090157e-01 1.045078e-01
[23,] 0.8794218 2.411564e-01 1.205782e-01
[24,] 0.8543406 2.913188e-01 1.456594e-01
[25,] 0.8258193 3.483615e-01 1.741807e-01
[26,] 0.8054841 3.890319e-01 1.945159e-01
[27,] 0.7873060 4.253880e-01 2.126940e-01
[28,] 0.7836023 4.327954e-01 2.163977e-01
[29,] 0.7482605 5.034790e-01 2.517395e-01
[30,] 0.7080164 5.839672e-01 2.919836e-01
[31,] 0.6614445 6.771111e-01 3.385555e-01
[32,] 0.6219044 7.561912e-01 3.780956e-01
[33,] 0.6544752 6.910496e-01 3.455248e-01
[34,] 0.6273268 7.453464e-01 3.726732e-01
[35,] 0.6032778 7.934444e-01 3.967222e-01
[36,] 0.5738148 8.523705e-01 4.261852e-01
[37,] 0.5425183 9.149634e-01 4.574817e-01
[38,] 0.4985693 9.971387e-01 5.014307e-01
[39,] 0.4580167 9.160334e-01 5.419833e-01
[40,] 0.4206777 8.413555e-01 5.793223e-01
[41,] 0.7771442 4.457115e-01 2.228558e-01
[42,] 0.7889917 4.220166e-01 2.110083e-01
[43,] 0.7620384 4.759232e-01 2.379616e-01
[44,] 0.7332460 5.335081e-01 2.667540e-01
[45,] 0.7184500 5.630999e-01 2.815500e-01
[46,] 0.6782729 6.434541e-01 3.217271e-01
[47,] 0.6478709 7.042582e-01 3.521291e-01
[48,] 0.6316137 7.367725e-01 3.683863e-01
[49,] 0.5873818 8.252363e-01 4.126182e-01
[50,] 0.5437632 9.124735e-01 4.562368e-01
[51,] 0.5019769 9.960462e-01 4.980231e-01
[52,] 0.4618008 9.236017e-01 5.381992e-01
[53,] 0.4415753 8.831506e-01 5.584247e-01
[54,] 0.4162671 8.325342e-01 5.837329e-01
[55,] 0.3798641 7.597282e-01 6.201359e-01
[56,] 0.3464282 6.928563e-01 6.535718e-01
[57,] 0.3088869 6.177739e-01 6.911131e-01
[58,] 0.2853894 5.707788e-01 7.146106e-01
[59,] 0.2642186 5.284372e-01 7.357814e-01
[60,] 0.2417765 4.835530e-01 7.582235e-01
[61,] 0.2202274 4.404549e-01 7.797726e-01
[62,] 0.1949400 3.898800e-01 8.050600e-01
[63,] 0.1962910 3.925820e-01 8.037090e-01
[64,] 0.1923188 3.846376e-01 8.076812e-01
[65,] 0.1984013 3.968027e-01 8.015987e-01
[66,] 0.2278305 4.556611e-01 7.721695e-01
[67,] 0.3230135 6.460270e-01 6.769865e-01
[68,] 0.4645922 9.291844e-01 5.354078e-01
[69,] 0.6027259 7.945481e-01 3.972741e-01
[70,] 0.7622709 4.754582e-01 2.377291e-01
[71,] 0.8676192 2.647617e-01 1.323808e-01
[72,] 0.9228926 1.542147e-01 7.710735e-02
[73,] 0.9489932 1.020135e-01 5.100675e-02
[74,] 0.9496466 1.007068e-01 5.035342e-02
[75,] 0.9513808 9.723836e-02 4.861918e-02
[76,] 0.9553258 8.934839e-02 4.467419e-02
[77,] 0.9762183 4.756345e-02 2.378173e-02
[78,] 0.9829749 3.405025e-02 1.702512e-02
[79,] 0.9811639 3.767222e-02 1.883611e-02
[80,] 0.9804463 3.910731e-02 1.955366e-02
[81,] 0.9842111 3.157786e-02 1.578893e-02
[82,] 0.9850864 2.982728e-02 1.491364e-02
[83,] 0.9887796 2.244073e-02 1.122037e-02
[84,] 0.9891612 2.167759e-02 1.083880e-02
[85,] 0.9914935 1.701297e-02 8.506487e-03
[86,] 0.9937656 1.246877e-02 6.234386e-03
[87,] 0.9946963 1.060742e-02 5.303712e-03
[88,] 0.9932659 1.346825e-02 6.734124e-03
[89,] 0.9919220 1.615605e-02 8.078023e-03
[90,] 0.9897864 2.042722e-02 1.021361e-02
[91,] 0.9865985 2.680305e-02 1.340152e-02
[92,] 0.9898326 2.033481e-02 1.016741e-02
[93,] 0.9930663 1.386736e-02 6.933681e-03
[94,] 0.9931561 1.368780e-02 6.843900e-03
[95,] 0.9913605 1.727904e-02 8.639519e-03
[96,] 0.9888269 2.234620e-02 1.117310e-02
[97,] 0.9853125 2.937497e-02 1.468749e-02
[98,] 0.9821282 3.574365e-02 1.787183e-02
[99,] 0.9838070 3.238607e-02 1.619303e-02
[100,] 0.9878689 2.426216e-02 1.213108e-02
[101,] 0.9901350 1.973006e-02 9.865030e-03
[102,] 0.9915648 1.687037e-02 8.435187e-03
[103,] 0.9948771 1.024586e-02 5.122928e-03
[104,] 0.9965868 6.826379e-03 3.413189e-03
[105,] 0.9984397 3.120527e-03 1.560263e-03
[106,] 0.9995390 9.220830e-04 4.610415e-04
[107,] 0.9998588 2.824372e-04 1.412186e-04
[108,] 0.9999484 1.031305e-04 5.156524e-05
[109,] 0.9999788 4.248557e-05 2.124279e-05
[110,] 0.9999857 2.860637e-05 1.430318e-05
[111,] 0.9999906 1.882303e-05 9.411517e-06
[112,] 0.9999885 2.296075e-05 1.148037e-05
[113,] 0.9999857 2.850984e-05 1.425492e-05
[114,] 0.9999804 3.918781e-05 1.959390e-05
[115,] 0.9999804 3.916422e-05 1.958211e-05
[116,] 0.9999889 2.214748e-05 1.107374e-05
[117,] 0.9999863 2.731550e-05 1.365775e-05
[118,] 0.9999864 2.728054e-05 1.364027e-05
[119,] 0.9999820 3.595586e-05 1.797793e-05
[120,] 0.9999873 2.548524e-05 1.274262e-05
[121,] 0.9999861 2.777754e-05 1.388877e-05
[122,] 0.9999930 1.401331e-05 7.006656e-06
[123,] 0.9999942 1.151591e-05 5.757955e-06
[124,] 0.9999959 8.174199e-06 4.087100e-06
[125,] 0.9999987 2.550746e-06 1.275373e-06
[126,] 0.9999993 1.467801e-06 7.339003e-07
[127,] 0.9999999 1.741839e-07 8.709196e-08
[128,] 1.0000000 1.005688e-09 5.028439e-10
[129,] 1.0000000 1.966166e-09 9.830830e-10
[130,] 1.0000000 4.265106e-09 2.132553e-09
[131,] 1.0000000 5.343319e-09 2.671660e-09
[132,] 1.0000000 2.037079e-09 1.018539e-09
[133,] 1.0000000 4.783886e-09 2.391943e-09
[134,] 1.0000000 7.703464e-09 3.851732e-09
[135,] 1.0000000 1.692215e-08 8.461077e-09
[136,] 1.0000000 1.281248e-08 6.406241e-09
[137,] 1.0000000 3.083143e-09 1.541572e-09
[138,] 1.0000000 6.977161e-09 3.488580e-09
[139,] 1.0000000 1.647336e-08 8.236682e-09
[140,] 1.0000000 3.035118e-08 1.517559e-08
[141,] 1.0000000 6.290190e-08 3.145095e-08
[142,] 0.9999999 1.474202e-07 7.371010e-08
[143,] 0.9999999 2.886343e-07 1.443172e-07
[144,] 1.0000000 8.088098e-08 4.044049e-08
[145,] 1.0000000 4.636336e-08 2.318168e-08
[146,] 1.0000000 4.939023e-08 2.469511e-08
[147,] 1.0000000 2.749101e-08 1.374551e-08
[148,] 1.0000000 7.148947e-08 3.574473e-08
[149,] 0.9999999 1.790516e-07 8.952580e-08
[150,] 0.9999998 3.780878e-07 1.890439e-07
[151,] 0.9999996 7.303460e-07 3.651730e-07
[152,] 0.9999997 5.511645e-07 2.755823e-07
[153,] 0.9999993 1.481965e-06 7.409824e-07
[154,] 0.9999994 1.101185e-06 5.505924e-07
[155,] 0.9999987 2.654570e-06 1.327285e-06
[156,] 0.9999967 6.593939e-06 3.296970e-06
[157,] 0.9999917 1.669806e-05 8.349031e-06
[158,] 0.9999843 3.141210e-05 1.570605e-05
[159,] 0.9999630 7.398851e-05 3.699426e-05
[160,] 0.9999609 7.829415e-05 3.914708e-05
[161,] 0.9999149 1.702765e-04 8.513826e-05
[162,] 0.9999307 1.385991e-04 6.929954e-05
[163,] 0.9998264 3.471503e-04 1.735752e-04
[164,] 0.9995746 8.507943e-04 4.253972e-04
[165,] 0.9991049 1.790209e-03 8.951045e-04
[166,] 0.9990552 1.889609e-03 9.448046e-04
[167,] 0.9996453 7.094414e-04 3.547207e-04
[168,] 0.9998616 2.767819e-04 1.383910e-04
[169,] 0.9995360 9.279993e-04 4.639997e-04
[170,] 0.9985618 2.876372e-03 1.438186e-03
[171,] 0.9951567 9.686637e-03 4.843318e-03
[172,] 0.9909179 1.816430e-02 9.082148e-03
[173,] 0.9865252 2.694961e-02 1.347480e-02
[174,] 0.9516984 9.660314e-02 4.830157e-02
> postscript(file="/var/fisher/rcomp/tmp/1y0uw1352721092.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/fisher/rcomp/tmp/2f7vx1352721092.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/fisher/rcomp/tmp/3x09l1352721092.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/fisher/rcomp/tmp/49ssy1352721092.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/fisher/rcomp/tmp/5czl41352721092.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 = 191
Frequency = 1
1 2 3 4 5
1.0132480402 1.1819584151 1.0502514790 1.3363787181 -0.7057991503
6 7 8 9 10
-0.5972216730 -0.4006108230 -0.3605861809 -0.5860067097 -0.5100207502
11 12 13 14 15
0.3555702940 0.3143197015 0.3568999202 0.3666149832 0.4743016479
16 17 18 19 20
0.3086933049 -0.2986707039 -0.4349026309 -0.2836087689 0.0325928039
21 22 23 24 25
0.3895976423 0.2863546950 0.0177605342 -0.0565594251 -0.0318910168
26 27 28 29 30
0.1794918634 -0.1517113344 0.0220004967 0.1140323571 0.1111550718
31 32 33 34 35
-0.6403332785 -0.7164683397 -0.6803785072 -0.9145048551 -0.8926455359
36 37 38 39 40
-1.0126305431 -0.3777611549 -0.1939054328 -0.2445107327 -0.4092139387
41 42 43 44 45
-0.7619611622 -0.4925744295 -0.4791127884 -0.2384392078 -0.0250877104
46 47 48 49 50
-0.0709219052 -0.1546094827 -0.1973709887 -0.2241968618 -0.2275810234
51 52 53 54 55
-0.0370014233 0.0252520253 -0.0792197254 0.2931896393 0.3991497770
56 57 58 59 60
0.4907240329 0.0710898397 0.0580907620 0.3121058888 0.0323336794
61 62 63 64 65
0.4476154722 0.4202215358 0.3872511339 0.2794041469 0.3095535054
66 67 68 69 70
0.1309049573 0.0789604587 0.0478617229 0.0280709277 0.0575499095
71 72 73 74 75
-0.1063240564 0.0233266266 -0.1436106172 -0.4083991282 -0.7278451652
76 77 78 79 80
-0.8486317707 -0.8317453968 -0.8560883212 -0.7139228616 -0.5912082707
81 82 83 84 85
-0.3788287423 0.2750626823 0.5194520246 0.7584551631 0.9615109681
86 87 88 89 90
0.7812526925 0.1623658360 0.5220331623 0.7671414770 0.6380344354
91 92 93 94 95
0.6781740518 0.4586390566 0.5473506482 0.5603264716 0.4661429284
96 97 98 99 100
0.1676732869 0.1518149575 0.0839527668 0.1546901638 0.7643832437
101 102 103 104 105
0.7586667977 0.6028388064 0.3358491547 0.0287593418 0.0898862038
106 107 108 109 110
0.2959080064 0.5063741842 0.5800306506 0.4505976315 0.3115265761
111 112 113 114 115
0.3955063833 0.1875835070 0.1966000499 0.0780207696 -0.1309316701
116 117 118 119 120
-0.3492521364 -0.5943350723 -0.3902855847 -0.1061055528 -0.2178453772
121 122 123 124 125
-0.1685874339 -0.1586778067 0.1020972459 0.1800406903 0.1720703989
126 127 128 129 130
0.0737873658 -0.2396421886 -0.5110060481 -0.2571295065 -0.5846383774
131 132 133 134 135
-0.5243528092 -0.4177281682 -0.5555074421 -0.3850471891 -0.3443543993
136 137 138 139 140
-0.0815975768 -0.1715536641 -0.0817454734 -0.2541403591 -0.4771799020
141 142 143 144 145
-0.0631121992 0.1355027393 -0.1039129958 -0.3243157644 -0.4967244262
146 147 148 149 150
-0.0315715934 -0.0146499620 0.2686211123 0.0735910976 0.2788899030
151 152 153 154 155
0.4393076264 -0.0167255085 0.2250521558 0.4176693007 0.9061298811
156 157 158 159 160
0.5623008539 0.6396722064 0.6934157803 0.2553604385 -0.2033935823
161 162 163 164 165
0.1881643153 0.3876943985 -0.0839649472 0.0121554345 0.0346863477
166 167 168 169 170
0.0663369673 0.0568819757 0.2239665875 0.0612158668 0.2541959879
171 172 173 174 175
-0.0006166712 0.1012483177 0.0558805226 0.2042874591 0.1846765095
176 177 178 179 180
-0.4836652448 -0.1254355054 -0.0815582870 -0.2626332424 -0.5119805798
181 182 183 184 185
-0.5919793895 -0.3815317810 -0.4725494155 -0.4609253945 -0.3647487078
186 187 188 189 190
-0.4275128583 -0.3875319172 -0.1218517382 -0.3972344667 -0.3703562015
191
-0.4186329329
> postscript(file="/var/fisher/rcomp/tmp/6l0771352721092.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 = 191
Frequency = 1
lag(myerror, k = 1) myerror
0 1.0132480402 NA
1 1.1819584151 1.0132480402
2 1.0502514790 1.1819584151
3 1.3363787181 1.0502514790
4 -0.7057991503 1.3363787181
5 -0.5972216730 -0.7057991503
6 -0.4006108230 -0.5972216730
7 -0.3605861809 -0.4006108230
8 -0.5860067097 -0.3605861809
9 -0.5100207502 -0.5860067097
10 0.3555702940 -0.5100207502
11 0.3143197015 0.3555702940
12 0.3568999202 0.3143197015
13 0.3666149832 0.3568999202
14 0.4743016479 0.3666149832
15 0.3086933049 0.4743016479
16 -0.2986707039 0.3086933049
17 -0.4349026309 -0.2986707039
18 -0.2836087689 -0.4349026309
19 0.0325928039 -0.2836087689
20 0.3895976423 0.0325928039
21 0.2863546950 0.3895976423
22 0.0177605342 0.2863546950
23 -0.0565594251 0.0177605342
24 -0.0318910168 -0.0565594251
25 0.1794918634 -0.0318910168
26 -0.1517113344 0.1794918634
27 0.0220004967 -0.1517113344
28 0.1140323571 0.0220004967
29 0.1111550718 0.1140323571
30 -0.6403332785 0.1111550718
31 -0.7164683397 -0.6403332785
32 -0.6803785072 -0.7164683397
33 -0.9145048551 -0.6803785072
34 -0.8926455359 -0.9145048551
35 -1.0126305431 -0.8926455359
36 -0.3777611549 -1.0126305431
37 -0.1939054328 -0.3777611549
38 -0.2445107327 -0.1939054328
39 -0.4092139387 -0.2445107327
40 -0.7619611622 -0.4092139387
41 -0.4925744295 -0.7619611622
42 -0.4791127884 -0.4925744295
43 -0.2384392078 -0.4791127884
44 -0.0250877104 -0.2384392078
45 -0.0709219052 -0.0250877104
46 -0.1546094827 -0.0709219052
47 -0.1973709887 -0.1546094827
48 -0.2241968618 -0.1973709887
49 -0.2275810234 -0.2241968618
50 -0.0370014233 -0.2275810234
51 0.0252520253 -0.0370014233
52 -0.0792197254 0.0252520253
53 0.2931896393 -0.0792197254
54 0.3991497770 0.2931896393
55 0.4907240329 0.3991497770
56 0.0710898397 0.4907240329
57 0.0580907620 0.0710898397
58 0.3121058888 0.0580907620
59 0.0323336794 0.3121058888
60 0.4476154722 0.0323336794
61 0.4202215358 0.4476154722
62 0.3872511339 0.4202215358
63 0.2794041469 0.3872511339
64 0.3095535054 0.2794041469
65 0.1309049573 0.3095535054
66 0.0789604587 0.1309049573
67 0.0478617229 0.0789604587
68 0.0280709277 0.0478617229
69 0.0575499095 0.0280709277
70 -0.1063240564 0.0575499095
71 0.0233266266 -0.1063240564
72 -0.1436106172 0.0233266266
73 -0.4083991282 -0.1436106172
74 -0.7278451652 -0.4083991282
75 -0.8486317707 -0.7278451652
76 -0.8317453968 -0.8486317707
77 -0.8560883212 -0.8317453968
78 -0.7139228616 -0.8560883212
79 -0.5912082707 -0.7139228616
80 -0.3788287423 -0.5912082707
81 0.2750626823 -0.3788287423
82 0.5194520246 0.2750626823
83 0.7584551631 0.5194520246
84 0.9615109681 0.7584551631
85 0.7812526925 0.9615109681
86 0.1623658360 0.7812526925
87 0.5220331623 0.1623658360
88 0.7671414770 0.5220331623
89 0.6380344354 0.7671414770
90 0.6781740518 0.6380344354
91 0.4586390566 0.6781740518
92 0.5473506482 0.4586390566
93 0.5603264716 0.5473506482
94 0.4661429284 0.5603264716
95 0.1676732869 0.4661429284
96 0.1518149575 0.1676732869
97 0.0839527668 0.1518149575
98 0.1546901638 0.0839527668
99 0.7643832437 0.1546901638
100 0.7586667977 0.7643832437
101 0.6028388064 0.7586667977
102 0.3358491547 0.6028388064
103 0.0287593418 0.3358491547
104 0.0898862038 0.0287593418
105 0.2959080064 0.0898862038
106 0.5063741842 0.2959080064
107 0.5800306506 0.5063741842
108 0.4505976315 0.5800306506
109 0.3115265761 0.4505976315
110 0.3955063833 0.3115265761
111 0.1875835070 0.3955063833
112 0.1966000499 0.1875835070
113 0.0780207696 0.1966000499
114 -0.1309316701 0.0780207696
115 -0.3492521364 -0.1309316701
116 -0.5943350723 -0.3492521364
117 -0.3902855847 -0.5943350723
118 -0.1061055528 -0.3902855847
119 -0.2178453772 -0.1061055528
120 -0.1685874339 -0.2178453772
121 -0.1586778067 -0.1685874339
122 0.1020972459 -0.1586778067
123 0.1800406903 0.1020972459
124 0.1720703989 0.1800406903
125 0.0737873658 0.1720703989
126 -0.2396421886 0.0737873658
127 -0.5110060481 -0.2396421886
128 -0.2571295065 -0.5110060481
129 -0.5846383774 -0.2571295065
130 -0.5243528092 -0.5846383774
131 -0.4177281682 -0.5243528092
132 -0.5555074421 -0.4177281682
133 -0.3850471891 -0.5555074421
134 -0.3443543993 -0.3850471891
135 -0.0815975768 -0.3443543993
136 -0.1715536641 -0.0815975768
137 -0.0817454734 -0.1715536641
138 -0.2541403591 -0.0817454734
139 -0.4771799020 -0.2541403591
140 -0.0631121992 -0.4771799020
141 0.1355027393 -0.0631121992
142 -0.1039129958 0.1355027393
143 -0.3243157644 -0.1039129958
144 -0.4967244262 -0.3243157644
145 -0.0315715934 -0.4967244262
146 -0.0146499620 -0.0315715934
147 0.2686211123 -0.0146499620
148 0.0735910976 0.2686211123
149 0.2788899030 0.0735910976
150 0.4393076264 0.2788899030
151 -0.0167255085 0.4393076264
152 0.2250521558 -0.0167255085
153 0.4176693007 0.2250521558
154 0.9061298811 0.4176693007
155 0.5623008539 0.9061298811
156 0.6396722064 0.5623008539
157 0.6934157803 0.6396722064
158 0.2553604385 0.6934157803
159 -0.2033935823 0.2553604385
160 0.1881643153 -0.2033935823
161 0.3876943985 0.1881643153
162 -0.0839649472 0.3876943985
163 0.0121554345 -0.0839649472
164 0.0346863477 0.0121554345
165 0.0663369673 0.0346863477
166 0.0568819757 0.0663369673
167 0.2239665875 0.0568819757
168 0.0612158668 0.2239665875
169 0.2541959879 0.0612158668
170 -0.0006166712 0.2541959879
171 0.1012483177 -0.0006166712
172 0.0558805226 0.1012483177
173 0.2042874591 0.0558805226
174 0.1846765095 0.2042874591
175 -0.4836652448 0.1846765095
176 -0.1254355054 -0.4836652448
177 -0.0815582870 -0.1254355054
178 -0.2626332424 -0.0815582870
179 -0.5119805798 -0.2626332424
180 -0.5919793895 -0.5119805798
181 -0.3815317810 -0.5919793895
182 -0.4725494155 -0.3815317810
183 -0.4609253945 -0.4725494155
184 -0.3647487078 -0.4609253945
185 -0.4275128583 -0.3647487078
186 -0.3875319172 -0.4275128583
187 -0.1218517382 -0.3875319172
188 -0.3972344667 -0.1218517382
189 -0.3703562015 -0.3972344667
190 -0.4186329329 -0.3703562015
191 NA -0.4186329329
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 1.1819584151 1.0132480402
[2,] 1.0502514790 1.1819584151
[3,] 1.3363787181 1.0502514790
[4,] -0.7057991503 1.3363787181
[5,] -0.5972216730 -0.7057991503
[6,] -0.4006108230 -0.5972216730
[7,] -0.3605861809 -0.4006108230
[8,] -0.5860067097 -0.3605861809
[9,] -0.5100207502 -0.5860067097
[10,] 0.3555702940 -0.5100207502
[11,] 0.3143197015 0.3555702940
[12,] 0.3568999202 0.3143197015
[13,] 0.3666149832 0.3568999202
[14,] 0.4743016479 0.3666149832
[15,] 0.3086933049 0.4743016479
[16,] -0.2986707039 0.3086933049
[17,] -0.4349026309 -0.2986707039
[18,] -0.2836087689 -0.4349026309
[19,] 0.0325928039 -0.2836087689
[20,] 0.3895976423 0.0325928039
[21,] 0.2863546950 0.3895976423
[22,] 0.0177605342 0.2863546950
[23,] -0.0565594251 0.0177605342
[24,] -0.0318910168 -0.0565594251
[25,] 0.1794918634 -0.0318910168
[26,] -0.1517113344 0.1794918634
[27,] 0.0220004967 -0.1517113344
[28,] 0.1140323571 0.0220004967
[29,] 0.1111550718 0.1140323571
[30,] -0.6403332785 0.1111550718
[31,] -0.7164683397 -0.6403332785
[32,] -0.6803785072 -0.7164683397
[33,] -0.9145048551 -0.6803785072
[34,] -0.8926455359 -0.9145048551
[35,] -1.0126305431 -0.8926455359
[36,] -0.3777611549 -1.0126305431
[37,] -0.1939054328 -0.3777611549
[38,] -0.2445107327 -0.1939054328
[39,] -0.4092139387 -0.2445107327
[40,] -0.7619611622 -0.4092139387
[41,] -0.4925744295 -0.7619611622
[42,] -0.4791127884 -0.4925744295
[43,] -0.2384392078 -0.4791127884
[44,] -0.0250877104 -0.2384392078
[45,] -0.0709219052 -0.0250877104
[46,] -0.1546094827 -0.0709219052
[47,] -0.1973709887 -0.1546094827
[48,] -0.2241968618 -0.1973709887
[49,] -0.2275810234 -0.2241968618
[50,] -0.0370014233 -0.2275810234
[51,] 0.0252520253 -0.0370014233
[52,] -0.0792197254 0.0252520253
[53,] 0.2931896393 -0.0792197254
[54,] 0.3991497770 0.2931896393
[55,] 0.4907240329 0.3991497770
[56,] 0.0710898397 0.4907240329
[57,] 0.0580907620 0.0710898397
[58,] 0.3121058888 0.0580907620
[59,] 0.0323336794 0.3121058888
[60,] 0.4476154722 0.0323336794
[61,] 0.4202215358 0.4476154722
[62,] 0.3872511339 0.4202215358
[63,] 0.2794041469 0.3872511339
[64,] 0.3095535054 0.2794041469
[65,] 0.1309049573 0.3095535054
[66,] 0.0789604587 0.1309049573
[67,] 0.0478617229 0.0789604587
[68,] 0.0280709277 0.0478617229
[69,] 0.0575499095 0.0280709277
[70,] -0.1063240564 0.0575499095
[71,] 0.0233266266 -0.1063240564
[72,] -0.1436106172 0.0233266266
[73,] -0.4083991282 -0.1436106172
[74,] -0.7278451652 -0.4083991282
[75,] -0.8486317707 -0.7278451652
[76,] -0.8317453968 -0.8486317707
[77,] -0.8560883212 -0.8317453968
[78,] -0.7139228616 -0.8560883212
[79,] -0.5912082707 -0.7139228616
[80,] -0.3788287423 -0.5912082707
[81,] 0.2750626823 -0.3788287423
[82,] 0.5194520246 0.2750626823
[83,] 0.7584551631 0.5194520246
[84,] 0.9615109681 0.7584551631
[85,] 0.7812526925 0.9615109681
[86,] 0.1623658360 0.7812526925
[87,] 0.5220331623 0.1623658360
[88,] 0.7671414770 0.5220331623
[89,] 0.6380344354 0.7671414770
[90,] 0.6781740518 0.6380344354
[91,] 0.4586390566 0.6781740518
[92,] 0.5473506482 0.4586390566
[93,] 0.5603264716 0.5473506482
[94,] 0.4661429284 0.5603264716
[95,] 0.1676732869 0.4661429284
[96,] 0.1518149575 0.1676732869
[97,] 0.0839527668 0.1518149575
[98,] 0.1546901638 0.0839527668
[99,] 0.7643832437 0.1546901638
[100,] 0.7586667977 0.7643832437
[101,] 0.6028388064 0.7586667977
[102,] 0.3358491547 0.6028388064
[103,] 0.0287593418 0.3358491547
[104,] 0.0898862038 0.0287593418
[105,] 0.2959080064 0.0898862038
[106,] 0.5063741842 0.2959080064
[107,] 0.5800306506 0.5063741842
[108,] 0.4505976315 0.5800306506
[109,] 0.3115265761 0.4505976315
[110,] 0.3955063833 0.3115265761
[111,] 0.1875835070 0.3955063833
[112,] 0.1966000499 0.1875835070
[113,] 0.0780207696 0.1966000499
[114,] -0.1309316701 0.0780207696
[115,] -0.3492521364 -0.1309316701
[116,] -0.5943350723 -0.3492521364
[117,] -0.3902855847 -0.5943350723
[118,] -0.1061055528 -0.3902855847
[119,] -0.2178453772 -0.1061055528
[120,] -0.1685874339 -0.2178453772
[121,] -0.1586778067 -0.1685874339
[122,] 0.1020972459 -0.1586778067
[123,] 0.1800406903 0.1020972459
[124,] 0.1720703989 0.1800406903
[125,] 0.0737873658 0.1720703989
[126,] -0.2396421886 0.0737873658
[127,] -0.5110060481 -0.2396421886
[128,] -0.2571295065 -0.5110060481
[129,] -0.5846383774 -0.2571295065
[130,] -0.5243528092 -0.5846383774
[131,] -0.4177281682 -0.5243528092
[132,] -0.5555074421 -0.4177281682
[133,] -0.3850471891 -0.5555074421
[134,] -0.3443543993 -0.3850471891
[135,] -0.0815975768 -0.3443543993
[136,] -0.1715536641 -0.0815975768
[137,] -0.0817454734 -0.1715536641
[138,] -0.2541403591 -0.0817454734
[139,] -0.4771799020 -0.2541403591
[140,] -0.0631121992 -0.4771799020
[141,] 0.1355027393 -0.0631121992
[142,] -0.1039129958 0.1355027393
[143,] -0.3243157644 -0.1039129958
[144,] -0.4967244262 -0.3243157644
[145,] -0.0315715934 -0.4967244262
[146,] -0.0146499620 -0.0315715934
[147,] 0.2686211123 -0.0146499620
[148,] 0.0735910976 0.2686211123
[149,] 0.2788899030 0.0735910976
[150,] 0.4393076264 0.2788899030
[151,] -0.0167255085 0.4393076264
[152,] 0.2250521558 -0.0167255085
[153,] 0.4176693007 0.2250521558
[154,] 0.9061298811 0.4176693007
[155,] 0.5623008539 0.9061298811
[156,] 0.6396722064 0.5623008539
[157,] 0.6934157803 0.6396722064
[158,] 0.2553604385 0.6934157803
[159,] -0.2033935823 0.2553604385
[160,] 0.1881643153 -0.2033935823
[161,] 0.3876943985 0.1881643153
[162,] -0.0839649472 0.3876943985
[163,] 0.0121554345 -0.0839649472
[164,] 0.0346863477 0.0121554345
[165,] 0.0663369673 0.0346863477
[166,] 0.0568819757 0.0663369673
[167,] 0.2239665875 0.0568819757
[168,] 0.0612158668 0.2239665875
[169,] 0.2541959879 0.0612158668
[170,] -0.0006166712 0.2541959879
[171,] 0.1012483177 -0.0006166712
[172,] 0.0558805226 0.1012483177
[173,] 0.2042874591 0.0558805226
[174,] 0.1846765095 0.2042874591
[175,] -0.4836652448 0.1846765095
[176,] -0.1254355054 -0.4836652448
[177,] -0.0815582870 -0.1254355054
[178,] -0.2626332424 -0.0815582870
[179,] -0.5119805798 -0.2626332424
[180,] -0.5919793895 -0.5119805798
[181,] -0.3815317810 -0.5919793895
[182,] -0.4725494155 -0.3815317810
[183,] -0.4609253945 -0.4725494155
[184,] -0.3647487078 -0.4609253945
[185,] -0.4275128583 -0.3647487078
[186,] -0.3875319172 -0.4275128583
[187,] -0.1218517382 -0.3875319172
[188,] -0.3972344667 -0.1218517382
[189,] -0.3703562015 -0.3972344667
[190,] -0.4186329329 -0.3703562015
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 1.1819584151 1.0132480402
2 1.0502514790 1.1819584151
3 1.3363787181 1.0502514790
4 -0.7057991503 1.3363787181
5 -0.5972216730 -0.7057991503
6 -0.4006108230 -0.5972216730
7 -0.3605861809 -0.4006108230
8 -0.5860067097 -0.3605861809
9 -0.5100207502 -0.5860067097
10 0.3555702940 -0.5100207502
11 0.3143197015 0.3555702940
12 0.3568999202 0.3143197015
13 0.3666149832 0.3568999202
14 0.4743016479 0.3666149832
15 0.3086933049 0.4743016479
16 -0.2986707039 0.3086933049
17 -0.4349026309 -0.2986707039
18 -0.2836087689 -0.4349026309
19 0.0325928039 -0.2836087689
20 0.3895976423 0.0325928039
21 0.2863546950 0.3895976423
22 0.0177605342 0.2863546950
23 -0.0565594251 0.0177605342
24 -0.0318910168 -0.0565594251
25 0.1794918634 -0.0318910168
26 -0.1517113344 0.1794918634
27 0.0220004967 -0.1517113344
28 0.1140323571 0.0220004967
29 0.1111550718 0.1140323571
30 -0.6403332785 0.1111550718
31 -0.7164683397 -0.6403332785
32 -0.6803785072 -0.7164683397
33 -0.9145048551 -0.6803785072
34 -0.8926455359 -0.9145048551
35 -1.0126305431 -0.8926455359
36 -0.3777611549 -1.0126305431
37 -0.1939054328 -0.3777611549
38 -0.2445107327 -0.1939054328
39 -0.4092139387 -0.2445107327
40 -0.7619611622 -0.4092139387
41 -0.4925744295 -0.7619611622
42 -0.4791127884 -0.4925744295
43 -0.2384392078 -0.4791127884
44 -0.0250877104 -0.2384392078
45 -0.0709219052 -0.0250877104
46 -0.1546094827 -0.0709219052
47 -0.1973709887 -0.1546094827
48 -0.2241968618 -0.1973709887
49 -0.2275810234 -0.2241968618
50 -0.0370014233 -0.2275810234
51 0.0252520253 -0.0370014233
52 -0.0792197254 0.0252520253
53 0.2931896393 -0.0792197254
54 0.3991497770 0.2931896393
55 0.4907240329 0.3991497770
56 0.0710898397 0.4907240329
57 0.0580907620 0.0710898397
58 0.3121058888 0.0580907620
59 0.0323336794 0.3121058888
60 0.4476154722 0.0323336794
61 0.4202215358 0.4476154722
62 0.3872511339 0.4202215358
63 0.2794041469 0.3872511339
64 0.3095535054 0.2794041469
65 0.1309049573 0.3095535054
66 0.0789604587 0.1309049573
67 0.0478617229 0.0789604587
68 0.0280709277 0.0478617229
69 0.0575499095 0.0280709277
70 -0.1063240564 0.0575499095
71 0.0233266266 -0.1063240564
72 -0.1436106172 0.0233266266
73 -0.4083991282 -0.1436106172
74 -0.7278451652 -0.4083991282
75 -0.8486317707 -0.7278451652
76 -0.8317453968 -0.8486317707
77 -0.8560883212 -0.8317453968
78 -0.7139228616 -0.8560883212
79 -0.5912082707 -0.7139228616
80 -0.3788287423 -0.5912082707
81 0.2750626823 -0.3788287423
82 0.5194520246 0.2750626823
83 0.7584551631 0.5194520246
84 0.9615109681 0.7584551631
85 0.7812526925 0.9615109681
86 0.1623658360 0.7812526925
87 0.5220331623 0.1623658360
88 0.7671414770 0.5220331623
89 0.6380344354 0.7671414770
90 0.6781740518 0.6380344354
91 0.4586390566 0.6781740518
92 0.5473506482 0.4586390566
93 0.5603264716 0.5473506482
94 0.4661429284 0.5603264716
95 0.1676732869 0.4661429284
96 0.1518149575 0.1676732869
97 0.0839527668 0.1518149575
98 0.1546901638 0.0839527668
99 0.7643832437 0.1546901638
100 0.7586667977 0.7643832437
101 0.6028388064 0.7586667977
102 0.3358491547 0.6028388064
103 0.0287593418 0.3358491547
104 0.0898862038 0.0287593418
105 0.2959080064 0.0898862038
106 0.5063741842 0.2959080064
107 0.5800306506 0.5063741842
108 0.4505976315 0.5800306506
109 0.3115265761 0.4505976315
110 0.3955063833 0.3115265761
111 0.1875835070 0.3955063833
112 0.1966000499 0.1875835070
113 0.0780207696 0.1966000499
114 -0.1309316701 0.0780207696
115 -0.3492521364 -0.1309316701
116 -0.5943350723 -0.3492521364
117 -0.3902855847 -0.5943350723
118 -0.1061055528 -0.3902855847
119 -0.2178453772 -0.1061055528
120 -0.1685874339 -0.2178453772
121 -0.1586778067 -0.1685874339
122 0.1020972459 -0.1586778067
123 0.1800406903 0.1020972459
124 0.1720703989 0.1800406903
125 0.0737873658 0.1720703989
126 -0.2396421886 0.0737873658
127 -0.5110060481 -0.2396421886
128 -0.2571295065 -0.5110060481
129 -0.5846383774 -0.2571295065
130 -0.5243528092 -0.5846383774
131 -0.4177281682 -0.5243528092
132 -0.5555074421 -0.4177281682
133 -0.3850471891 -0.5555074421
134 -0.3443543993 -0.3850471891
135 -0.0815975768 -0.3443543993
136 -0.1715536641 -0.0815975768
137 -0.0817454734 -0.1715536641
138 -0.2541403591 -0.0817454734
139 -0.4771799020 -0.2541403591
140 -0.0631121992 -0.4771799020
141 0.1355027393 -0.0631121992
142 -0.1039129958 0.1355027393
143 -0.3243157644 -0.1039129958
144 -0.4967244262 -0.3243157644
145 -0.0315715934 -0.4967244262
146 -0.0146499620 -0.0315715934
147 0.2686211123 -0.0146499620
148 0.0735910976 0.2686211123
149 0.2788899030 0.0735910976
150 0.4393076264 0.2788899030
151 -0.0167255085 0.4393076264
152 0.2250521558 -0.0167255085
153 0.4176693007 0.2250521558
154 0.9061298811 0.4176693007
155 0.5623008539 0.9061298811
156 0.6396722064 0.5623008539
157 0.6934157803 0.6396722064
158 0.2553604385 0.6934157803
159 -0.2033935823 0.2553604385
160 0.1881643153 -0.2033935823
161 0.3876943985 0.1881643153
162 -0.0839649472 0.3876943985
163 0.0121554345 -0.0839649472
164 0.0346863477 0.0121554345
165 0.0663369673 0.0346863477
166 0.0568819757 0.0663369673
167 0.2239665875 0.0568819757
168 0.0612158668 0.2239665875
169 0.2541959879 0.0612158668
170 -0.0006166712 0.2541959879
171 0.1012483177 -0.0006166712
172 0.0558805226 0.1012483177
173 0.2042874591 0.0558805226
174 0.1846765095 0.2042874591
175 -0.4836652448 0.1846765095
176 -0.1254355054 -0.4836652448
177 -0.0815582870 -0.1254355054
178 -0.2626332424 -0.0815582870
179 -0.5119805798 -0.2626332424
180 -0.5919793895 -0.5119805798
181 -0.3815317810 -0.5919793895
182 -0.4725494155 -0.3815317810
183 -0.4609253945 -0.4725494155
184 -0.3647487078 -0.4609253945
185 -0.4275128583 -0.3647487078
186 -0.3875319172 -0.4275128583
187 -0.1218517382 -0.3875319172
188 -0.3972344667 -0.1218517382
189 -0.3703562015 -0.3972344667
190 -0.4186329329 -0.3703562015
> 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/fisher/rcomp/tmp/7fi041352721092.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/fisher/rcomp/tmp/8tg101352721092.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/fisher/rcomp/tmp/92byp1352721092.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/fisher/rcomp/tmp/10yrom1352721092.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/fisher/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/fisher/rcomp/tmp/11qxsn1352721092.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/fisher/rcomp/tmp/12p8eu1352721092.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/fisher/rcomp/tmp/138bht1352721092.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/fisher/rcomp/tmp/14kcjp1352721092.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/fisher/rcomp/tmp/15fhbw1352721092.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/fisher/rcomp/tmp/16tjsz1352721092.tab")
+ }
>
> try(system("convert tmp/1y0uw1352721092.ps tmp/1y0uw1352721092.png",intern=TRUE))
character(0)
> try(system("convert tmp/2f7vx1352721092.ps tmp/2f7vx1352721092.png",intern=TRUE))
character(0)
> try(system("convert tmp/3x09l1352721092.ps tmp/3x09l1352721092.png",intern=TRUE))
character(0)
> try(system("convert tmp/49ssy1352721092.ps tmp/49ssy1352721092.png",intern=TRUE))
character(0)
> try(system("convert tmp/5czl41352721092.ps tmp/5czl41352721092.png",intern=TRUE))
character(0)
> try(system("convert tmp/6l0771352721092.ps tmp/6l0771352721092.png",intern=TRUE))
character(0)
> try(system("convert tmp/7fi041352721092.ps tmp/7fi041352721092.png",intern=TRUE))
character(0)
> try(system("convert tmp/8tg101352721092.ps tmp/8tg101352721092.png",intern=TRUE))
character(0)
> try(system("convert tmp/92byp1352721092.ps tmp/92byp1352721092.png",intern=TRUE))
character(0)
> try(system("convert tmp/10yrom1352721092.ps tmp/10yrom1352721092.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
8.806 1.235 10.044