R version 2.11.1 (2010-05-31)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(24
+ ,24
+ ,0
+ ,14
+ ,0
+ ,11
+ ,0
+ ,12
+ ,0
+ ,26
+ ,0
+ ,25
+ ,25
+ ,25
+ ,11
+ ,11
+ ,7
+ ,7
+ ,8
+ ,8
+ ,23
+ ,23
+ ,30
+ ,17
+ ,17
+ ,6
+ ,6
+ ,17
+ ,17
+ ,8
+ ,8
+ ,25
+ ,25
+ ,19
+ ,18
+ ,0
+ ,12
+ ,0
+ ,10
+ ,0
+ ,8
+ ,0
+ ,23
+ ,0
+ ,22
+ ,18
+ ,18
+ ,8
+ ,8
+ ,12
+ ,12
+ ,9
+ ,9
+ ,19
+ ,19
+ ,22
+ ,16
+ ,16
+ ,10
+ ,10
+ ,12
+ ,12
+ ,7
+ ,7
+ ,29
+ ,29
+ ,25
+ ,20
+ ,20
+ ,10
+ ,10
+ ,11
+ ,11
+ ,4
+ ,4
+ ,25
+ ,25
+ ,23
+ ,16
+ ,16
+ ,11
+ ,11
+ ,11
+ ,11
+ ,11
+ ,11
+ ,21
+ ,21
+ ,17
+ ,18
+ ,18
+ ,16
+ ,16
+ ,12
+ ,12
+ ,7
+ ,7
+ ,22
+ ,22
+ ,21
+ ,17
+ ,17
+ ,11
+ ,11
+ ,13
+ ,13
+ ,7
+ ,7
+ ,25
+ ,25
+ ,19
+ ,23
+ ,0
+ ,13
+ ,0
+ ,14
+ ,0
+ ,12
+ ,0
+ ,24
+ ,0
+ ,19
+ ,30
+ ,30
+ ,12
+ ,12
+ ,16
+ ,16
+ ,10
+ ,10
+ ,18
+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,21
+ ,7
+ ,7
+ ,29
+ ,29
+ ,19
+ ,22
+ ,22
+ ,9
+ ,9
+ ,14
+ ,14
+ ,6
+ ,6
+ ,12
+ ,12
+ ,24
+ ,20
+ ,20
+ ,11
+ ,11
+ ,20
+ ,20
+ ,13
+ ,13
+ ,20
+ ,20
+ ,19
+ ,17
+ ,17
+ ,9
+ ,9
+ ,13
+ ,13
+ ,6
+ ,6
+ ,21
+ ,21
+ ,24
+ ,28
+ ,0
+ ,14
+ ,0
+ ,11
+ ,0
+ ,8
+ ,0
+ ,24
+ ,0
+ ,22
+ ,22
+ ,22
+ ,13
+ ,13
+ ,15
+ ,15
+ ,10
+ ,10
+ ,22
+ ,22
+ ,17
+ ,31
+ ,31
+ ,16
+ ,16
+ ,19
+ ,19
+ ,16
+ ,16
+ ,20
+ ,20)
+ ,dim=c(11
+ ,158)
+ ,dimnames=list(c('O'
+ ,''
+ ,'CM'
+ ,'CM*G'
+ ,'DD*G'
+ ,'PE'
+ ,'PE*G'
+ ,'PC'
+ ,'PC*G'
+ ,'PS'
+ ,'PS*G')
+ ,1:158))
> y <- array(NA,dim=c(11,158),dimnames=list(c('O','','CM','CM*G','DD*G','PE','PE*G','PC','PC*G','PS','PS*G'),1:158))
> 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 = '9'
> 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
PC*G O CM CM*G DD*G PE PE*G PC PS PS*G
1 0 24 24 0 14 0 11 0 12 26 0
2 8 25 25 25 11 11 7 7 8 23 23
3 8 30 17 17 6 6 17 17 8 25 25
4 0 19 18 0 12 0 10 0 8 23 0
5 9 22 18 18 8 8 12 12 9 19 19
6 7 22 16 16 10 10 12 12 7 29 29
7 4 25 20 20 10 10 11 11 4 25 25
8 11 23 16 16 11 11 11 11 11 21 21
9 7 17 18 18 16 16 12 12 7 22 22
10 7 21 17 17 11 11 13 13 7 25 25
11 0 19 23 0 13 0 14 0 12 24 0
12 10 19 30 30 12 12 16 16 10 18 18
13 10 15 23 23 8 8 11 11 10 22 22
14 8 16 18 18 12 12 10 10 8 15 15
15 0 23 15 0 11 0 11 0 8 22 0
16 0 27 12 0 4 0 15 0 4 28 0
17 9 22 21 21 9 9 9 9 9 20 20
18 0 14 15 0 8 0 11 0 8 12 0
19 0 22 20 0 8 0 17 0 7 24 0
20 11 23 31 31 14 14 17 17 11 20 20
21 9 23 27 27 15 15 11 11 9 21 21
22 0 21 34 0 16 0 18 0 11 20 0
23 13 19 21 21 9 9 14 14 13 21 21
24 0 18 31 0 14 0 10 0 8 23 0
25 0 20 19 0 11 0 11 0 8 28 0
26 9 23 16 16 8 8 15 15 9 24 24
27 6 25 20 20 9 9 15 15 6 24 24
28 0 19 21 0 9 0 13 0 9 24 0
29 0 24 22 0 9 0 16 0 9 23 0
30 6 22 17 17 9 9 13 13 6 23 23
31 0 25 24 0 10 0 9 0 6 29 0
32 16 26 25 25 16 16 18 18 16 24 24
33 5 29 26 26 11 11 18 18 5 18 18
34 7 32 25 25 8 8 12 12 7 25 25
35 9 25 17 17 9 9 17 17 9 21 21
36 0 29 32 0 16 0 9 0 6 26 0
37 0 28 33 0 11 0 9 0 6 22 0
38 0 17 13 0 16 0 12 0 5 22 0
39 12 28 32 32 12 12 18 18 12 22 22
40 0 29 25 0 12 0 12 0 7 23 0
41 0 26 29 0 14 0 18 0 10 30 0
42 9 25 22 22 9 9 14 14 9 23 23
43 0 14 18 0 10 0 15 0 8 17 0
44 5 25 17 17 9 9 16 16 5 23 23
45 0 26 20 0 10 0 10 0 8 23 0
46 0 20 15 0 12 0 11 0 8 25 0
47 10 18 20 20 14 14 14 14 10 24 24
48 0 32 33 0 14 0 9 0 6 24 0
49 8 25 29 29 10 10 12 12 8 23 23
50 7 25 23 23 14 14 17 17 7 21 21
51 0 23 26 0 16 0 5 0 4 24 0
52 0 21 18 0 9 0 12 0 8 24 0
53 8 20 20 20 10 10 12 12 8 28 28
54 4 15 11 11 6 6 6 6 4 16 16
55 0 30 28 0 8 0 24 0 20 20 0
56 8 24 26 26 13 13 12 12 8 29 29
57 8 26 22 22 10 10 12 12 8 27 27
58 0 24 17 0 8 0 14 0 6 22 0
59 0 22 12 0 7 0 7 0 4 28 0
60 8 14 14 14 15 15 13 13 8 16 16
61 0 24 17 0 9 0 12 0 9 25 0
62 0 24 21 0 10 0 13 0 6 24 0
63 7 24 19 19 12 12 14 14 7 28 28
64 0 24 18 0 13 0 8 0 9 24 0
65 0 19 10 0 10 0 11 0 5 23 0
66 0 31 29 0 11 0 9 0 5 30 0
67 0 22 31 0 8 0 11 0 8 24 0
68 0 27 19 0 9 0 13 0 8 21 0
69 0 19 9 0 13 0 10 0 6 25 0
70 8 25 20 20 11 11 11 11 8 25 25
71 7 20 28 28 8 8 12 12 7 22 22
72 7 21 19 19 9 9 9 9 7 23 23
73 9 27 30 30 9 9 15 15 9 26 26
74 11 23 29 29 15 15 18 18 11 23 23
75 6 25 26 26 9 9 15 15 6 25 25
76 8 20 23 23 10 10 12 12 8 21 21
77 9 22 21 21 12 12 14 14 9 24 24
78 0 23 19 0 12 0 10 0 8 29 0
79 6 25 28 28 11 11 13 13 6 22 22
80 10 25 23 23 14 14 13 13 10 27 27
81 8 17 18 18 6 6 11 11 8 26 26
82 0 19 21 0 12 0 13 0 8 22 0
83 10 25 20 20 8 8 16 16 10 24 24
84 0 19 23 0 14 0 8 0 5 27 0
85 0 20 21 0 11 0 16 0 7 24 0
86 5 26 21 21 10 10 11 11 5 24 24
87 0 23 15 0 14 0 9 0 8 29 0
88 14 27 28 28 12 12 16 16 14 22 22
89 0 17 19 0 10 0 12 0 7 21 0
90 0 17 26 0 14 0 14 0 8 24 0
91 6 19 10 10 5 5 8 8 6 24 24
92 0 17 16 0 11 0 9 0 5 23 0
93 6 22 22 22 10 10 15 15 6 20 20
94 0 21 19 0 9 0 11 0 10 27 0
95 12 32 31 31 10 10 21 21 12 26 26
96 0 21 31 0 16 0 14 0 9 25 0
97 12 21 29 29 13 13 18 18 12 21 21
98 0 18 19 0 9 0 12 0 7 21 0
99 8 18 22 22 10 10 13 13 8 19 19
100 10 23 23 23 10 10 15 15 10 21 21
101 0 19 15 0 7 0 12 0 6 21 0
102 10 20 20 20 9 9 19 19 10 16 16
103 10 21 18 18 8 8 15 15 10 22 22
104 0 20 23 0 14 0 11 0 10 29 0
105 5 17 25 25 14 14 11 11 5 15 15
106 7 18 21 21 8 8 10 10 7 17 17
107 10 19 24 24 9 9 13 13 10 15 15
108 11 22 25 25 14 14 15 15 11 21 21
109 0 15 17 0 14 0 12 0 6 21 0
110 7 14 13 13 8 8 12 12 7 19 19
111 12 18 28 28 8 8 16 16 12 24 24
112 0 24 21 0 8 0 9 0 11 20 0
113 11 35 25 25 7 7 18 18 11 17 17
114 11 29 9 9 6 6 8 8 11 23 23
115 5 21 16 16 8 8 13 13 5 24 24
116 8 25 19 19 6 6 17 17 8 14 14
117 0 20 17 0 11 0 9 0 6 19 0
118 0 22 25 0 14 0 15 0 9 24 0
119 0 13 20 0 11 0 8 0 4 13 0
120 4 26 29 29 11 11 7 7 4 22 22
121 7 17 14 14 11 11 12 12 7 16 16
122 11 25 22 22 14 14 14 14 11 19 19
123 6 20 15 15 8 8 6 6 6 25 25
124 0 19 19 0 20 0 8 0 7 25 0
125 0 21 20 0 11 0 17 0 8 23 0
126 4 22 15 15 8 8 10 10 4 24 24
127 8 24 20 20 11 11 11 11 8 26 26
128 9 21 18 18 10 10 14 14 9 26 26
129 8 26 33 33 14 14 11 11 8 25 25
130 11 24 22 22 11 11 13 13 11 18 18
131 8 16 16 16 9 9 12 12 8 21 21
132 0 23 17 0 9 0 11 0 5 26 0
133 4 18 16 16 8 8 9 9 4 23 23
134 0 16 21 0 10 0 12 0 8 23 0
135 0 26 26 0 13 0 20 0 10 22 0
136 6 19 18 18 13 13 12 12 6 20 20
137 9 21 18 18 12 12 13 13 9 13 13
138 0 21 17 0 8 0 12 0 9 24 0
139 13 22 22 22 13 13 12 12 13 15 15
140 9 23 30 30 14 14 9 9 9 14 14
141 10 29 30 30 12 12 15 15 10 22 22
142 20 21 24 24 14 14 24 24 20 10 10
143 0 21 21 0 15 0 7 0 5 24 0
144 11 23 21 21 13 13 17 17 11 22 22
145 6 27 29 29 16 16 11 11 6 24 24
146 9 25 31 31 9 9 17 17 9 19 19
147 7 21 20 20 9 9 11 11 7 20 20
148 9 10 16 16 9 9 12 12 9 13 13
149 10 20 22 22 8 8 14 14 10 20 20
150 9 26 20 20 7 7 11 11 9 22 22
151 8 24 28 28 16 16 16 16 8 24 24
152 7 29 38 38 11 11 21 21 7 29 29
153 6 19 22 22 9 9 14 14 6 12 12
154 13 24 20 20 11 11 20 20 13 20 20
155 6 19 17 17 9 9 13 13 6 21 21
156 0 24 28 0 14 0 11 0 8 24 0
157 10 22 22 22 13 13 15 15 10 22 22
158 16 17 31 31 16 16 19 19 16 20 20
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) O V3 CM `CM*G` `DD*G`
0.70025 -0.01091 -0.05167 0.05820 -0.04213 0.10875
PE `PE*G` PC PS `PS*G`
-0.31023 0.45561 0.67276 -0.01470 -0.00626
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-4.30467 -0.58342 0.09607 0.49529 2.75697
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.700252 0.699693 1.001 0.3186
O -0.010912 0.024540 -0.445 0.6572
V3 -0.051670 0.026807 -1.927 0.0559 .
CM 0.058198 0.033998 1.712 0.0890 .
`CM*G` -0.042134 0.050508 -0.834 0.4055
`DD*G` 0.108753 0.063971 1.700 0.0912 .
PE -0.310229 0.040721 -7.618 2.9e-12 ***
`PE*G` 0.455614 0.048066 9.479 < 2e-16 ***
PC 0.672755 0.038807 17.336 < 2e-16 ***
PS -0.014700 0.033146 -0.443 0.6581
`PS*G` -0.006259 0.031774 -0.197 0.8441
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.018 on 147 degrees of freedom
Multiple R-squared: 0.9567, Adjusted R-squared: 0.9538
F-statistic: 324.9 on 10 and 147 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,] 6.727713e-45 1.345543e-44 1.000000e+00
[2,] 5.070532e-57 1.014106e-56 1.000000e+00
[3,] 2.142851e-02 4.285702e-02 9.785715e-01
[4,] 7.335447e-03 1.467089e-02 9.926646e-01
[5,] 2.909969e-03 5.819939e-03 9.970900e-01
[6,] 1.489689e-01 2.979378e-01 8.510311e-01
[7,] 9.205887e-02 1.841177e-01 9.079411e-01
[8,] 5.440819e-02 1.088164e-01 9.455918e-01
[9,] 4.400033e-01 8.800065e-01 5.599967e-01
[10,] 4.193216e-01 8.386432e-01 5.806784e-01
[11,] 4.162495e-01 8.324991e-01 5.837505e-01
[12,] 3.440921e-01 6.881842e-01 6.559079e-01
[13,] 2.722898e-01 5.445795e-01 7.277102e-01
[14,] 2.330679e-01 4.661359e-01 7.669321e-01
[15,] 3.925933e-01 7.851866e-01 6.074067e-01
[16,] 3.857795e-01 7.715590e-01 6.142205e-01
[17,] 3.307757e-01 6.615513e-01 6.692243e-01
[18,] 2.739984e-01 5.479968e-01 7.260016e-01
[19,] 2.732372e-01 5.464745e-01 7.267628e-01
[20,] 2.920718e-01 5.841437e-01 7.079282e-01
[21,] 2.382388e-01 4.764775e-01 7.617612e-01
[22,] 1.905849e-01 3.811699e-01 8.094151e-01
[23,] 5.018219e-01 9.963562e-01 4.981781e-01
[24,] 5.063800e-01 9.872400e-01 4.936200e-01
[25,] 9.556758e-01 8.864839e-02 4.432420e-02
[26,] 9.412267e-01 1.175465e-01 5.877325e-02
[27,] 9.297293e-01 1.405415e-01 7.027075e-02
[28,] 9.176544e-01 1.646912e-01 8.234558e-02
[29,] 8.945228e-01 2.109543e-01 1.054772e-01
[30,] 8.692380e-01 2.615241e-01 1.307620e-01
[31,] 8.724750e-01 2.550499e-01 1.275250e-01
[32,] 8.661957e-01 2.676087e-01 1.338043e-01
[33,] 8.445848e-01 3.108303e-01 1.554152e-01
[34,] 8.107649e-01 3.784703e-01 1.892351e-01
[35,] 8.141329e-01 3.717342e-01 1.858671e-01
[36,] 7.797267e-01 4.405465e-01 2.202733e-01
[37,] 7.859100e-01 4.281801e-01 2.140900e-01
[38,] 8.125567e-01 3.748865e-01 1.874433e-01
[39,] 7.855053e-01 4.289893e-01 2.144947e-01
[40,] 7.457615e-01 5.084770e-01 2.542385e-01
[41,] 7.036487e-01 5.927027e-01 2.963513e-01
[42,] 9.967692e-01 6.461655e-03 3.230828e-03
[43,] 9.956610e-01 8.677913e-03 4.338956e-03
[44,] 9.937961e-01 1.240778e-02 6.203892e-03
[45,] 9.949466e-01 1.010680e-02 5.053402e-03
[46,] 9.958106e-01 8.378770e-03 4.189385e-03
[47,] 9.943069e-01 1.138623e-02 5.693113e-03
[48,] 9.948437e-01 1.031261e-02 5.156304e-03
[49,] 9.962631e-01 7.473839e-03 3.736920e-03
[50,] 9.951987e-01 9.602522e-03 4.801261e-03
[51,] 9.986597e-01 2.680577e-03 1.340289e-03
[52,] 9.986948e-01 2.610483e-03 1.305242e-03
[53,] 9.998923e-01 2.153103e-04 1.076552e-04
[54,] 9.999064e-01 1.872318e-04 9.361589e-05
[55,] 9.998556e-01 2.888019e-04 1.444010e-04
[56,] 9.997891e-01 4.217889e-04 2.108945e-04
[57,] 9.996733e-01 6.534577e-04 3.267289e-04
[58,] 9.995578e-01 8.843977e-04 4.421988e-04
[59,] 9.993241e-01 1.351878e-03 6.759392e-04
[60,] 9.989847e-01 2.030655e-03 1.015328e-03
[61,] 9.984838e-01 3.032436e-03 1.516218e-03
[62,] 9.983946e-01 3.210897e-03 1.605448e-03
[63,] 9.976308e-01 4.738305e-03 2.369152e-03
[64,] 9.965619e-01 6.876287e-03 3.438143e-03
[65,] 9.956849e-01 8.630142e-03 4.315071e-03
[66,] 9.953541e-01 9.291801e-03 4.645900e-03
[67,] 9.936920e-01 1.261603e-02 6.308015e-03
[68,] 9.916022e-01 1.679565e-02 8.397825e-03
[69,] 9.890975e-01 2.180505e-02 1.090253e-02
[70,] 9.865289e-01 2.694218e-02 1.347109e-02
[71,] 9.968514e-01 6.297107e-03 3.148554e-03
[72,] 9.980369e-01 3.926164e-03 1.963082e-03
[73,] 9.975653e-01 4.869406e-03 2.434703e-03
[74,] 9.977687e-01 4.462574e-03 2.231287e-03
[75,] 9.983707e-01 3.258632e-03 1.629316e-03
[76,] 9.975909e-01 4.818107e-03 2.409053e-03
[77,] 9.970974e-01 5.805271e-03 2.902636e-03
[78,] 9.958982e-01 8.203634e-03 4.101817e-03
[79,] 9.965834e-01 6.833287e-03 3.416643e-03
[80,] 9.961194e-01 7.761194e-03 3.880597e-03
[81,] 9.980473e-01 3.905469e-03 1.952734e-03
[82,] 9.972204e-01 5.559176e-03 2.779588e-03
[83,] 9.968048e-01 6.390386e-03 3.195193e-03
[84,] 9.954200e-01 9.159915e-03 4.579957e-03
[85,] 9.936786e-01 1.264274e-02 6.321370e-03
[86,] 9.909603e-01 1.807939e-02 9.039693e-03
[87,] 9.875789e-01 2.484216e-02 1.242108e-02
[88,] 9.862826e-01 2.743476e-02 1.371738e-02
[89,] 9.813544e-01 3.729119e-02 1.864559e-02
[90,] 9.758139e-01 4.837223e-02 2.418611e-02
[91,] 9.819148e-01 3.617037e-02 1.808518e-02
[92,] 9.814915e-01 3.701699e-02 1.850849e-02
[93,] 9.742533e-01 5.149338e-02 2.574669e-02
[94,] 9.664480e-01 6.710401e-02 3.355201e-02
[95,] 9.557685e-01 8.846301e-02 4.423150e-02
[96,] 9.444294e-01 1.111411e-01 5.557057e-02
[97,] 9.274151e-01 1.451697e-01 7.258486e-02
[98,] 9.140207e-01 1.719587e-01 8.597934e-02
[99,] 9.999743e-01 5.131155e-05 2.565578e-05
[100,] 9.999569e-01 8.616767e-05 4.308384e-05
[101,] 9.999663e-01 6.742351e-05 3.371175e-05
[102,] 9.999436e-01 1.128428e-04 5.642142e-05
[103,] 9.999028e-01 1.944190e-04 9.720951e-05
[104,] 9.998398e-01 3.203035e-04 1.601518e-04
[105,] 9.997359e-01 5.282666e-04 2.641333e-04
[106,] 9.998274e-01 3.452690e-04 1.726345e-04
[107,] 9.997022e-01 5.956668e-04 2.978334e-04
[108,] 9.994548e-01 1.090376e-03 5.451880e-04
[109,] 9.990553e-01 1.889317e-03 9.446583e-04
[110,] 9.984050e-01 3.189987e-03 1.594994e-03
[111,] 9.998735e-01 2.529220e-04 1.264610e-04
[112,] 9.997799e-01 4.402232e-04 2.201116e-04
[113,] 9.995821e-01 8.358318e-04 4.179159e-04
[114,] 9.991609e-01 1.678171e-03 8.390854e-04
[115,] 9.983678e-01 3.264386e-03 1.632193e-03
[116,] 9.969211e-01 6.157779e-03 3.078890e-03
[117,] 9.946242e-01 1.075163e-02 5.375813e-03
[118,] 9.904548e-01 1.909040e-02 9.545202e-03
[119,] 1.000000e+00 2.670061e-12 1.335031e-12
[120,] 1.000000e+00 2.268294e-11 1.134147e-11
[121,] 1.000000e+00 4.301139e-193 2.150569e-193
[122,] 1.000000e+00 1.464491e-178 7.322454e-179
[123,] 1.000000e+00 1.879450e-161 9.397250e-162
[124,] 1.000000e+00 6.143140e-147 3.071570e-147
[125,] 1.000000e+00 1.421048e-134 7.105239e-135
[126,] 1.000000e+00 1.341933e-119 6.709667e-120
[127,] 1.000000e+00 7.879895e-102 3.939947e-102
[128,] 1.000000e+00 1.075696e-89 5.378482e-90
[129,] 1.000000e+00 7.900440e-75 3.950220e-75
[130,] 1.000000e+00 1.080298e-60 5.401489e-61
[131,] 1.000000e+00 2.842701e-45 1.421351e-45
> postscript(file="/var/www/rcomp/tmp/17i9u1290535707.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/2dojr1290535707.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/3dojr1290535707.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/4dojr1290535707.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/56xiu1290535707.ps",horizontal=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 = 158
Frequency = 1
1 2 3 4 5 6
-2.886751610 0.758865416 -0.213180076 -0.998907115 0.488166735 -0.076908014
7 8 9 10 11 12
-0.990472610 1.154073234 -0.690958261 -0.390191369 -2.133830832 -0.164645716
13 14 15 16 17 18
0.914644740 0.035903410 -0.856871065 2.756968575 0.859076612 -1.228485897
19 20 21 22 23 24
1.827690558 -0.036983829 0.161292509 0.437631554 1.429352270 -0.253847822
25 26 27 28 29 30
-0.594730073 0.180778891 -0.871864088 -0.697669334 0.324549087 -0.615204776
31 32 33 34 35 36
0.415798359 1.476364315 -1.889781528 0.022858323 -0.224192681 1.081508555
37 38 39 40 41 42
0.852794970 1.513480324 0.368066442 0.765116984 0.969333885 0.221238392
43 44 45 46 47 48
0.325206686 -1.345867487 -0.903449130 -0.803374168 0.173017939 1.052247131
49 50 51 52 53 54
0.072444227 -1.250949074 0.781211598 -0.468326606 0.181437642 -0.236073526
55 56 57 58 59 60
-4.304669956 0.007018047 0.212895473 1.407175366 0.346977327 -0.574859561
61 62 63 64 65 66
-1.145313963 1.417292758 -0.519636820 -2.180723797 0.831963337 1.469209974
67 68 69 70 71 72
-0.138073580 -0.085053656 -0.046887965 0.251887393 -0.190555674 0.269610611
73 74 75 76 77 78
0.108327496 -0.173051975 -0.890076529 0.015134882 0.016132294 -0.815387494
79 80 81 82 83 84
-0.808480230 0.438082815 0.531699583 0.072088071 0.358348780 0.800316741
85 86 87 88 89 90
1.673708515 -0.679803616 -1.248026251 1.328528347 0.210482282 0.732507884
91 92 93 94 95 96
0.412119513 0.541831742 -1.068115900 -2.028296355 0.199165712 0.460718180
97 98 99 100 101 102
0.223686764 0.179260646 -0.187465534 0.266206412 0.571982155 -0.366664072
103 104 105 106 107 108
0.431222336 -1.592460247 -1.259242096 0.019292585 0.447659912 0.303005447
109 110 111 112 113 114
0.926609970 -0.220979037 0.884221822 -3.330467521 0.391206709 2.076417881
115 116 117 118 119 120
-0.859254787 -0.511354573 -0.105316870 0.372874279 0.920385782 -0.586275314
121 122 123 124 125 126
-0.457505920 0.458794812 0.502261441 -0.528467378 1.255725060 -0.732903109
127 128 129 130 131 132
0.261934483 0.199962880 -0.021929731 0.772164880 0.083804712 1.239265745
133 134 135 136 137 138
-0.658656004 -0.340446303 1.275048674 -0.838440235 -0.060363986 -1.234885450
139 140 141 142 143 144
1.354097996 0.352378941 0.173702036 1.704803522 0.406607648 0.136840864
145 146 147 148 149 150
-0.793589629 -0.357513044 -0.090566876 0.177898454 0.497661260 0.793641909
151 152 153 154 155 156
-0.892234340 -1.519236381 -1.056525469 0.463935049 -0.689861201 -0.018452682
157 158
0.082925213 1.109757033
> postscript(file="/var/www/rcomp/tmp/66xiu1290535707.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 158
Frequency = 1
lag(myerror, k = 1) myerror
0 -2.886751610 NA
1 0.758865416 -2.886751610
2 -0.213180076 0.758865416
3 -0.998907115 -0.213180076
4 0.488166735 -0.998907115
5 -0.076908014 0.488166735
6 -0.990472610 -0.076908014
7 1.154073234 -0.990472610
8 -0.690958261 1.154073234
9 -0.390191369 -0.690958261
10 -2.133830832 -0.390191369
11 -0.164645716 -2.133830832
12 0.914644740 -0.164645716
13 0.035903410 0.914644740
14 -0.856871065 0.035903410
15 2.756968575 -0.856871065
16 0.859076612 2.756968575
17 -1.228485897 0.859076612
18 1.827690558 -1.228485897
19 -0.036983829 1.827690558
20 0.161292509 -0.036983829
21 0.437631554 0.161292509
22 1.429352270 0.437631554
23 -0.253847822 1.429352270
24 -0.594730073 -0.253847822
25 0.180778891 -0.594730073
26 -0.871864088 0.180778891
27 -0.697669334 -0.871864088
28 0.324549087 -0.697669334
29 -0.615204776 0.324549087
30 0.415798359 -0.615204776
31 1.476364315 0.415798359
32 -1.889781528 1.476364315
33 0.022858323 -1.889781528
34 -0.224192681 0.022858323
35 1.081508555 -0.224192681
36 0.852794970 1.081508555
37 1.513480324 0.852794970
38 0.368066442 1.513480324
39 0.765116984 0.368066442
40 0.969333885 0.765116984
41 0.221238392 0.969333885
42 0.325206686 0.221238392
43 -1.345867487 0.325206686
44 -0.903449130 -1.345867487
45 -0.803374168 -0.903449130
46 0.173017939 -0.803374168
47 1.052247131 0.173017939
48 0.072444227 1.052247131
49 -1.250949074 0.072444227
50 0.781211598 -1.250949074
51 -0.468326606 0.781211598
52 0.181437642 -0.468326606
53 -0.236073526 0.181437642
54 -4.304669956 -0.236073526
55 0.007018047 -4.304669956
56 0.212895473 0.007018047
57 1.407175366 0.212895473
58 0.346977327 1.407175366
59 -0.574859561 0.346977327
60 -1.145313963 -0.574859561
61 1.417292758 -1.145313963
62 -0.519636820 1.417292758
63 -2.180723797 -0.519636820
64 0.831963337 -2.180723797
65 1.469209974 0.831963337
66 -0.138073580 1.469209974
67 -0.085053656 -0.138073580
68 -0.046887965 -0.085053656
69 0.251887393 -0.046887965
70 -0.190555674 0.251887393
71 0.269610611 -0.190555674
72 0.108327496 0.269610611
73 -0.173051975 0.108327496
74 -0.890076529 -0.173051975
75 0.015134882 -0.890076529
76 0.016132294 0.015134882
77 -0.815387494 0.016132294
78 -0.808480230 -0.815387494
79 0.438082815 -0.808480230
80 0.531699583 0.438082815
81 0.072088071 0.531699583
82 0.358348780 0.072088071
83 0.800316741 0.358348780
84 1.673708515 0.800316741
85 -0.679803616 1.673708515
86 -1.248026251 -0.679803616
87 1.328528347 -1.248026251
88 0.210482282 1.328528347
89 0.732507884 0.210482282
90 0.412119513 0.732507884
91 0.541831742 0.412119513
92 -1.068115900 0.541831742
93 -2.028296355 -1.068115900
94 0.199165712 -2.028296355
95 0.460718180 0.199165712
96 0.223686764 0.460718180
97 0.179260646 0.223686764
98 -0.187465534 0.179260646
99 0.266206412 -0.187465534
100 0.571982155 0.266206412
101 -0.366664072 0.571982155
102 0.431222336 -0.366664072
103 -1.592460247 0.431222336
104 -1.259242096 -1.592460247
105 0.019292585 -1.259242096
106 0.447659912 0.019292585
107 0.303005447 0.447659912
108 0.926609970 0.303005447
109 -0.220979037 0.926609970
110 0.884221822 -0.220979037
111 -3.330467521 0.884221822
112 0.391206709 -3.330467521
113 2.076417881 0.391206709
114 -0.859254787 2.076417881
115 -0.511354573 -0.859254787
116 -0.105316870 -0.511354573
117 0.372874279 -0.105316870
118 0.920385782 0.372874279
119 -0.586275314 0.920385782
120 -0.457505920 -0.586275314
121 0.458794812 -0.457505920
122 0.502261441 0.458794812
123 -0.528467378 0.502261441
124 1.255725060 -0.528467378
125 -0.732903109 1.255725060
126 0.261934483 -0.732903109
127 0.199962880 0.261934483
128 -0.021929731 0.199962880
129 0.772164880 -0.021929731
130 0.083804712 0.772164880
131 1.239265745 0.083804712
132 -0.658656004 1.239265745
133 -0.340446303 -0.658656004
134 1.275048674 -0.340446303
135 -0.838440235 1.275048674
136 -0.060363986 -0.838440235
137 -1.234885450 -0.060363986
138 1.354097996 -1.234885450
139 0.352378941 1.354097996
140 0.173702036 0.352378941
141 1.704803522 0.173702036
142 0.406607648 1.704803522
143 0.136840864 0.406607648
144 -0.793589629 0.136840864
145 -0.357513044 -0.793589629
146 -0.090566876 -0.357513044
147 0.177898454 -0.090566876
148 0.497661260 0.177898454
149 0.793641909 0.497661260
150 -0.892234340 0.793641909
151 -1.519236381 -0.892234340
152 -1.056525469 -1.519236381
153 0.463935049 -1.056525469
154 -0.689861201 0.463935049
155 -0.018452682 -0.689861201
156 0.082925213 -0.018452682
157 1.109757033 0.082925213
158 NA 1.109757033
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.758865416 -2.886751610
[2,] -0.213180076 0.758865416
[3,] -0.998907115 -0.213180076
[4,] 0.488166735 -0.998907115
[5,] -0.076908014 0.488166735
[6,] -0.990472610 -0.076908014
[7,] 1.154073234 -0.990472610
[8,] -0.690958261 1.154073234
[9,] -0.390191369 -0.690958261
[10,] -2.133830832 -0.390191369
[11,] -0.164645716 -2.133830832
[12,] 0.914644740 -0.164645716
[13,] 0.035903410 0.914644740
[14,] -0.856871065 0.035903410
[15,] 2.756968575 -0.856871065
[16,] 0.859076612 2.756968575
[17,] -1.228485897 0.859076612
[18,] 1.827690558 -1.228485897
[19,] -0.036983829 1.827690558
[20,] 0.161292509 -0.036983829
[21,] 0.437631554 0.161292509
[22,] 1.429352270 0.437631554
[23,] -0.253847822 1.429352270
[24,] -0.594730073 -0.253847822
[25,] 0.180778891 -0.594730073
[26,] -0.871864088 0.180778891
[27,] -0.697669334 -0.871864088
[28,] 0.324549087 -0.697669334
[29,] -0.615204776 0.324549087
[30,] 0.415798359 -0.615204776
[31,] 1.476364315 0.415798359
[32,] -1.889781528 1.476364315
[33,] 0.022858323 -1.889781528
[34,] -0.224192681 0.022858323
[35,] 1.081508555 -0.224192681
[36,] 0.852794970 1.081508555
[37,] 1.513480324 0.852794970
[38,] 0.368066442 1.513480324
[39,] 0.765116984 0.368066442
[40,] 0.969333885 0.765116984
[41,] 0.221238392 0.969333885
[42,] 0.325206686 0.221238392
[43,] -1.345867487 0.325206686
[44,] -0.903449130 -1.345867487
[45,] -0.803374168 -0.903449130
[46,] 0.173017939 -0.803374168
[47,] 1.052247131 0.173017939
[48,] 0.072444227 1.052247131
[49,] -1.250949074 0.072444227
[50,] 0.781211598 -1.250949074
[51,] -0.468326606 0.781211598
[52,] 0.181437642 -0.468326606
[53,] -0.236073526 0.181437642
[54,] -4.304669956 -0.236073526
[55,] 0.007018047 -4.304669956
[56,] 0.212895473 0.007018047
[57,] 1.407175366 0.212895473
[58,] 0.346977327 1.407175366
[59,] -0.574859561 0.346977327
[60,] -1.145313963 -0.574859561
[61,] 1.417292758 -1.145313963
[62,] -0.519636820 1.417292758
[63,] -2.180723797 -0.519636820
[64,] 0.831963337 -2.180723797
[65,] 1.469209974 0.831963337
[66,] -0.138073580 1.469209974
[67,] -0.085053656 -0.138073580
[68,] -0.046887965 -0.085053656
[69,] 0.251887393 -0.046887965
[70,] -0.190555674 0.251887393
[71,] 0.269610611 -0.190555674
[72,] 0.108327496 0.269610611
[73,] -0.173051975 0.108327496
[74,] -0.890076529 -0.173051975
[75,] 0.015134882 -0.890076529
[76,] 0.016132294 0.015134882
[77,] -0.815387494 0.016132294
[78,] -0.808480230 -0.815387494
[79,] 0.438082815 -0.808480230
[80,] 0.531699583 0.438082815
[81,] 0.072088071 0.531699583
[82,] 0.358348780 0.072088071
[83,] 0.800316741 0.358348780
[84,] 1.673708515 0.800316741
[85,] -0.679803616 1.673708515
[86,] -1.248026251 -0.679803616
[87,] 1.328528347 -1.248026251
[88,] 0.210482282 1.328528347
[89,] 0.732507884 0.210482282
[90,] 0.412119513 0.732507884
[91,] 0.541831742 0.412119513
[92,] -1.068115900 0.541831742
[93,] -2.028296355 -1.068115900
[94,] 0.199165712 -2.028296355
[95,] 0.460718180 0.199165712
[96,] 0.223686764 0.460718180
[97,] 0.179260646 0.223686764
[98,] -0.187465534 0.179260646
[99,] 0.266206412 -0.187465534
[100,] 0.571982155 0.266206412
[101,] -0.366664072 0.571982155
[102,] 0.431222336 -0.366664072
[103,] -1.592460247 0.431222336
[104,] -1.259242096 -1.592460247
[105,] 0.019292585 -1.259242096
[106,] 0.447659912 0.019292585
[107,] 0.303005447 0.447659912
[108,] 0.926609970 0.303005447
[109,] -0.220979037 0.926609970
[110,] 0.884221822 -0.220979037
[111,] -3.330467521 0.884221822
[112,] 0.391206709 -3.330467521
[113,] 2.076417881 0.391206709
[114,] -0.859254787 2.076417881
[115,] -0.511354573 -0.859254787
[116,] -0.105316870 -0.511354573
[117,] 0.372874279 -0.105316870
[118,] 0.920385782 0.372874279
[119,] -0.586275314 0.920385782
[120,] -0.457505920 -0.586275314
[121,] 0.458794812 -0.457505920
[122,] 0.502261441 0.458794812
[123,] -0.528467378 0.502261441
[124,] 1.255725060 -0.528467378
[125,] -0.732903109 1.255725060
[126,] 0.261934483 -0.732903109
[127,] 0.199962880 0.261934483
[128,] -0.021929731 0.199962880
[129,] 0.772164880 -0.021929731
[130,] 0.083804712 0.772164880
[131,] 1.239265745 0.083804712
[132,] -0.658656004 1.239265745
[133,] -0.340446303 -0.658656004
[134,] 1.275048674 -0.340446303
[135,] -0.838440235 1.275048674
[136,] -0.060363986 -0.838440235
[137,] -1.234885450 -0.060363986
[138,] 1.354097996 -1.234885450
[139,] 0.352378941 1.354097996
[140,] 0.173702036 0.352378941
[141,] 1.704803522 0.173702036
[142,] 0.406607648 1.704803522
[143,] 0.136840864 0.406607648
[144,] -0.793589629 0.136840864
[145,] -0.357513044 -0.793589629
[146,] -0.090566876 -0.357513044
[147,] 0.177898454 -0.090566876
[148,] 0.497661260 0.177898454
[149,] 0.793641909 0.497661260
[150,] -0.892234340 0.793641909
[151,] -1.519236381 -0.892234340
[152,] -1.056525469 -1.519236381
[153,] 0.463935049 -1.056525469
[154,] -0.689861201 0.463935049
[155,] -0.018452682 -0.689861201
[156,] 0.082925213 -0.018452682
[157,] 1.109757033 0.082925213
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.758865416 -2.886751610
2 -0.213180076 0.758865416
3 -0.998907115 -0.213180076
4 0.488166735 -0.998907115
5 -0.076908014 0.488166735
6 -0.990472610 -0.076908014
7 1.154073234 -0.990472610
8 -0.690958261 1.154073234
9 -0.390191369 -0.690958261
10 -2.133830832 -0.390191369
11 -0.164645716 -2.133830832
12 0.914644740 -0.164645716
13 0.035903410 0.914644740
14 -0.856871065 0.035903410
15 2.756968575 -0.856871065
16 0.859076612 2.756968575
17 -1.228485897 0.859076612
18 1.827690558 -1.228485897
19 -0.036983829 1.827690558
20 0.161292509 -0.036983829
21 0.437631554 0.161292509
22 1.429352270 0.437631554
23 -0.253847822 1.429352270
24 -0.594730073 -0.253847822
25 0.180778891 -0.594730073
26 -0.871864088 0.180778891
27 -0.697669334 -0.871864088
28 0.324549087 -0.697669334
29 -0.615204776 0.324549087
30 0.415798359 -0.615204776
31 1.476364315 0.415798359
32 -1.889781528 1.476364315
33 0.022858323 -1.889781528
34 -0.224192681 0.022858323
35 1.081508555 -0.224192681
36 0.852794970 1.081508555
37 1.513480324 0.852794970
38 0.368066442 1.513480324
39 0.765116984 0.368066442
40 0.969333885 0.765116984
41 0.221238392 0.969333885
42 0.325206686 0.221238392
43 -1.345867487 0.325206686
44 -0.903449130 -1.345867487
45 -0.803374168 -0.903449130
46 0.173017939 -0.803374168
47 1.052247131 0.173017939
48 0.072444227 1.052247131
49 -1.250949074 0.072444227
50 0.781211598 -1.250949074
51 -0.468326606 0.781211598
52 0.181437642 -0.468326606
53 -0.236073526 0.181437642
54 -4.304669956 -0.236073526
55 0.007018047 -4.304669956
56 0.212895473 0.007018047
57 1.407175366 0.212895473
58 0.346977327 1.407175366
59 -0.574859561 0.346977327
60 -1.145313963 -0.574859561
61 1.417292758 -1.145313963
62 -0.519636820 1.417292758
63 -2.180723797 -0.519636820
64 0.831963337 -2.180723797
65 1.469209974 0.831963337
66 -0.138073580 1.469209974
67 -0.085053656 -0.138073580
68 -0.046887965 -0.085053656
69 0.251887393 -0.046887965
70 -0.190555674 0.251887393
71 0.269610611 -0.190555674
72 0.108327496 0.269610611
73 -0.173051975 0.108327496
74 -0.890076529 -0.173051975
75 0.015134882 -0.890076529
76 0.016132294 0.015134882
77 -0.815387494 0.016132294
78 -0.808480230 -0.815387494
79 0.438082815 -0.808480230
80 0.531699583 0.438082815
81 0.072088071 0.531699583
82 0.358348780 0.072088071
83 0.800316741 0.358348780
84 1.673708515 0.800316741
85 -0.679803616 1.673708515
86 -1.248026251 -0.679803616
87 1.328528347 -1.248026251
88 0.210482282 1.328528347
89 0.732507884 0.210482282
90 0.412119513 0.732507884
91 0.541831742 0.412119513
92 -1.068115900 0.541831742
93 -2.028296355 -1.068115900
94 0.199165712 -2.028296355
95 0.460718180 0.199165712
96 0.223686764 0.460718180
97 0.179260646 0.223686764
98 -0.187465534 0.179260646
99 0.266206412 -0.187465534
100 0.571982155 0.266206412
101 -0.366664072 0.571982155
102 0.431222336 -0.366664072
103 -1.592460247 0.431222336
104 -1.259242096 -1.592460247
105 0.019292585 -1.259242096
106 0.447659912 0.019292585
107 0.303005447 0.447659912
108 0.926609970 0.303005447
109 -0.220979037 0.926609970
110 0.884221822 -0.220979037
111 -3.330467521 0.884221822
112 0.391206709 -3.330467521
113 2.076417881 0.391206709
114 -0.859254787 2.076417881
115 -0.511354573 -0.859254787
116 -0.105316870 -0.511354573
117 0.372874279 -0.105316870
118 0.920385782 0.372874279
119 -0.586275314 0.920385782
120 -0.457505920 -0.586275314
121 0.458794812 -0.457505920
122 0.502261441 0.458794812
123 -0.528467378 0.502261441
124 1.255725060 -0.528467378
125 -0.732903109 1.255725060
126 0.261934483 -0.732903109
127 0.199962880 0.261934483
128 -0.021929731 0.199962880
129 0.772164880 -0.021929731
130 0.083804712 0.772164880
131 1.239265745 0.083804712
132 -0.658656004 1.239265745
133 -0.340446303 -0.658656004
134 1.275048674 -0.340446303
135 -0.838440235 1.275048674
136 -0.060363986 -0.838440235
137 -1.234885450 -0.060363986
138 1.354097996 -1.234885450
139 0.352378941 1.354097996
140 0.173702036 0.352378941
141 1.704803522 0.173702036
142 0.406607648 1.704803522
143 0.136840864 0.406607648
144 -0.793589629 0.136840864
145 -0.357513044 -0.793589629
146 -0.090566876 -0.357513044
147 0.177898454 -0.090566876
148 0.497661260 0.177898454
149 0.793641909 0.497661260
150 -0.892234340 0.793641909
151 -1.519236381 -0.892234340
152 -1.056525469 -1.519236381
153 0.463935049 -1.056525469
154 -0.689861201 0.463935049
155 -0.018452682 -0.689861201
156 0.082925213 -0.018452682
157 1.109757033 0.082925213
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/7y6zx1290535707.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/8y6zx1290535707.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/99fyi1290535707.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/www/rcomp/tmp/109fyi1290535707.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/11npw81290535707.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/1288ve1290535707.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/13f9sq1290535707.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/1480rb1290535707.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/www/rcomp/tmp/15t18h1290535707.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/www/rcomp/tmp/16pan71290535707.tab")
+ }
>
> try(system("convert tmp/17i9u1290535707.ps tmp/17i9u1290535707.png",intern=TRUE))
character(0)
> try(system("convert tmp/2dojr1290535707.ps tmp/2dojr1290535707.png",intern=TRUE))
character(0)
> try(system("convert tmp/3dojr1290535707.ps tmp/3dojr1290535707.png",intern=TRUE))
character(0)
> try(system("convert tmp/4dojr1290535707.ps tmp/4dojr1290535707.png",intern=TRUE))
character(0)
> try(system("convert tmp/56xiu1290535707.ps tmp/56xiu1290535707.png",intern=TRUE))
character(0)
> try(system("convert tmp/66xiu1290535707.ps tmp/66xiu1290535707.png",intern=TRUE))
character(0)
> try(system("convert tmp/7y6zx1290535707.ps tmp/7y6zx1290535707.png",intern=TRUE))
character(0)
> try(system("convert tmp/8y6zx1290535707.ps tmp/8y6zx1290535707.png",intern=TRUE))
character(0)
> try(system("convert tmp/99fyi1290535707.ps tmp/99fyi1290535707.png",intern=TRUE))
character(0)
> try(system("convert tmp/109fyi1290535707.ps tmp/109fyi1290535707.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
6.22 2.12 8.39