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(2000
+ ,1
+ ,75.5
+ ,78.4
+ ,67.3
+ ,75.3
+ ,106.1
+ ,125.7
+ ,101.6
+ ,2000
+ ,2
+ ,83.2
+ ,79.3
+ ,75.2
+ ,83.6
+ ,112.7
+ ,153.8
+ ,113.4
+ ,2000
+ ,3
+ ,94.5
+ ,84.3
+ ,91.1
+ ,91.2
+ ,123.2
+ ,134.9
+ ,122.2
+ ,2000
+ ,4
+ ,83.3
+ ,81.2
+ ,83.7
+ ,85.2
+ ,101.7
+ ,95.3
+ ,102.2
+ ,2000
+ ,5
+ ,92.7
+ ,88.4
+ ,105.0
+ ,100.0
+ ,118.7
+ ,96.6
+ ,113.2
+ ,2000
+ ,6
+ ,89.8
+ ,83.1
+ ,106.2
+ ,89.8
+ ,107.1
+ ,100.5
+ ,115.3
+ ,2000
+ ,7
+ ,74.8
+ ,76.6
+ ,88.5
+ ,88.9
+ ,93.6
+ ,106.2
+ ,87.4
+ ,2000
+ ,8
+ ,81.5
+ ,82.6
+ ,100.1
+ ,85.6
+ ,77.5
+ ,153.4
+ ,98.7
+ ,2000
+ ,9
+ ,92.8
+ ,84.4
+ ,90.3
+ ,83.2
+ ,117.2
+ ,132.1
+ ,117.3
+ ,2000
+ ,10
+ ,92.8
+ ,94.6
+ ,85.3
+ ,97.1
+ ,124.5
+ ,110.9
+ ,121.2
+ ,2000
+ ,11
+ ,91.7
+ ,91.8
+ ,81.9
+ ,85.8
+ ,120.8
+ ,94.3
+ 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.2
+ ,128.3
+ ,74.5
+ ,67.6
+ ,94.0
+ ,2012
+ ,146
+ ,103.7
+ ,113.8
+ ,92.6
+ ,128.4
+ ,84.8
+ ,72.8
+ ,100.7
+ ,2012
+ ,147
+ ,117.0
+ ,130.4
+ ,112.0
+ ,134.1
+ ,80.7
+ ,53.8
+ ,111.9
+ ,2012
+ ,148
+ ,101.2
+ ,112.8
+ ,108.6
+ ,133.3
+ ,69.9
+ ,39.6
+ ,95.9
+ ,2012
+ ,149
+ ,105.4
+ ,119.4
+ ,125.8
+ ,130.6
+ ,74.1
+ ,39.4
+ ,88.8
+ ,2012
+ ,150
+ ,110.3
+ ,117.5
+ ,138.7
+ ,165.7
+ ,76.1
+ ,41.2
+ ,102.0
+ ,2012
+ ,151
+ ,97.7
+ ,117.5
+ ,115.2
+ ,146.8
+ ,71.3
+ ,49.6
+ ,81.6)
+ ,dim=c(9
+ ,151)
+ ,dimnames=list(c('jaar'
+ ,'t'
+ ,'Totaal'
+ ,'voeding'
+ ,'dranken'
+ ,'tabak'
+ ,'textiel'
+ ,'kleding'
+ ,'apparatuur
')
+ ,1:151))
> y <- array(NA,dim=c(9,151),dimnames=list(c('jaar','t','Totaal','voeding','dranken','tabak','textiel','kleding','apparatuur
'),1:151))
> 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 = '3'
> par3 <- 'No Linear Trend'
> par2 <- 'Do not include Seasonal Dummies'
> par1 <- '3'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following object(s) are masked from 'package:base':
as.Date, 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
Totaal jaar t voeding dranken tabak textiel kleding apparatuur\r
1 75.5 2000 1 78.4 67.3 75.3 106.1 125.7 101.6
2 83.2 2000 2 79.3 75.2 83.6 112.7 153.8 113.4
3 94.5 2000 3 84.3 91.1 91.2 123.2 134.9 122.2
4 83.3 2000 4 81.2 83.7 85.2 101.7 95.3 102.2
5 92.7 2000 5 88.4 105.0 100.0 118.7 96.6 113.2
6 89.8 2000 6 83.1 106.2 89.8 107.1 100.5 115.3
7 74.8 2000 7 76.6 88.5 88.9 93.6 106.2 87.4
8 81.5 2000 8 82.6 100.1 85.6 77.5 153.4 98.7
9 92.8 2000 9 84.4 90.3 83.2 117.2 132.1 117.3
10 92.8 2000 10 94.6 85.3 97.1 124.5 110.9 121.2
11 91.7 2000 11 91.8 81.9 85.8 120.8 94.3 118.7
12 83.5 2000 12 89.3 77.2 80.9 97.0 91.7 112.1
13 92.8 2001 13 87.7 78.6 81.3 115.1 138.6 102.9
14 91.3 2001 14 83.1 75.1 83.2 112.9 154.3 108.8
15 99.5 2001 15 93.6 90.3 90.7 122.7 149.8 118.6
16 87.6 2001 16 85.1 88.5 88.4 106.9 99.2 99.2
17 95.3 2001 17 90.8 112.5 94.1 115.0 97.7 102.2
18 98.5 2001 18 90.5 101.1 92.0 114.9 107.7 108.8
19 80.1 2001 19 86.1 114.0 92.0 103.1 120.1 94.0
20 84.2 2001 20 93.3 107.7 89.3 80.8 164.5 96.2
21 92.4 2001 21 94.9 77.8 87.0 118.2 136.1 118.4
22 98.0 2001 22 102.6 101.4 97.7 129.6 117.5 120.0
23 92.2 2001 23 98.3 87.2 82.5 118.7 98.2 117.5
24 80.0 2001 24 93.4 75.9 96.5 88.4 91.9 102.6
25 88.7 2002 25 92.8 78.8 86.2 113.1 141.8 92.8
26 87.4 2002 26 86.5 82.3 84.9 109.8 154.2 100.3
27 96.1 2002 27 93.8 89.1 100.0 116.1 138.6 106.3
28 94.1 2002 28 90.4 100.1 92.7 113.6 97.9 103.9
29 91.9 2002 29 91.0 101.8 96.7 107.9 90.3 102.4
30 93.6 2002 30 89.1 98.5 105.8 107.4 90.9 114.5
31 83.5 2002 31 89.6 106.6 88.5 102.7 127.0 89.0
32 80.8 2002 32 89.3 101.8 78.7 78.3 156.8 94.3
33 96.3 2002 33 95.3 92.4 99.9 121.0 127.2 115.7
34 101.5 2002 34 104.1 94.4 107.8 132.2 111.3 120.2
35 91.6 2002 35 94.7 81.0 102.4 113.2 93.0 109.5
36 84.0 2002 36 97.6 94.6 106.0 89.2 89.5 99.4
37 91.8 2003 37 96.8 83.8 87.3 113.2 141.8 86.4
38 90.4 2003 38 92.8 79.4 93.3 107.6 152.0 95.1
39 98.0 2003 39 94.7 95.6 98.2 107.3 120.2 101.5
40 95.5 2003 40 95.8 106.0 102.0 110.9 88.8 92.9
41 90.5 2003 41 88.9 106.2 93.9 96.4 82.8 90.8
42 97.1 2003 42 91.2 115.0 106.6 101.2 82.8 100.4
43 87.9 2003 43 91.6 122.4 92.9 94.0 121.7 82.2
44 79.8 2003 44 87.3 113.7 78.0 70.5 147.1 75.3
45 102.0 2003 45 97.8 98.0 104.2 116.4 132.5 110.3
46 104.3 2003 46 105.1 105.8 115.9 121.9 107.5 113.5
47 92.1 2003 47 93.8 88.3 99.9 109.5 77.9 94.9
48 95.9 2003 48 99.0 95.7 103.9 91.1 85.5 95.7
49 89.1 2004 49 91.4 85.8 93.5 104.0 126.5 85.3
50 92.2 2004 50 89.0 83.9 101.7 101.2 135.4 92.5
51 107.5 2004 51 101.4 114.1 124.6 118.4 122.5 107.7
52 99.7 2004 52 95.4 102.0 124.2 106.9 79.2 97.9
53 92.2 2004 53 90.5 108.1 103.3 95.6 66.1 93.9
54 108.9 2004 54 98.7 125.4 120.5 114.2 77.9 111.5
55 89.8 2004 55 91.2 108.1 98.0 92.4 109.6 88.6
56 89.4 2004 56 91.7 110.4 100.4 75.3 142.9 82.5
57 107.6 2004 57 102.9 102.4 126.8 120.4 120.5 108.6
58 105.6 2004 58 105.5 89.6 120.2 115.9 96.3 113.8
59 100.9 2004 59 102.6 95.0 114.0 109.8 82.6 103.4
60 102.9 2004 60 107.2 93.7 109.1 94.9 78.4 99.0
61 96.2 2005 61 96.9 77.7 94.2 97.5 104.5 89.9
62 94.7 2005 62 88.9 80.1 86.0 101.3 137.9 97.9
63 107.3 2005 63 99.6 103.6 112.9 108.7 125.8 107.8
64 103.0 2005 64 96.7 103.1 99.7 105.1 78.0 103.7
65 96.1 2005 65 93.8 112.4 104.5 94.9 67.7 98.2
66 109.8 2005 66 101.9 119.2 111.6 108.9 78.4 111.7
67 85.4 2005 67 87.6 105.3 99.2 87.5 101.7 82.6
68 89.9 2005 68 100.0 107.2 90.9 73.0 154.1 86.1
69 109.3 2005 69 105.8 108.7 111.4 115.2 107.3 111.2
70 101.2 2005 70 105.5 93.7 98.2 107.5 86.5 105.3
71 104.7 2005 71 111.3 96.1 101.7 109.8 82.1 106.3
72 102.4 2005 72 112.1 92.9 89.7 90.7 76.1 99.4
73 97.7 2006 73 102.0 81.1 89.5 97.6 115.5 91.9
74 98.9 2006 74 93.2 83.2 85.1 98.7 129.6 96.2
75 115.0 2006 75 108.4 99.7 95.9 113.9 121.6 105.4
76 97.5 2006 76 97.9 96.8 88.9 96.6 64.0 95.0
77 107.3 2006 77 106.4 108.7 98.1 104.4 58.1 100.5
78 112.3 2006 78 102.8 120.9 109.7 115.1 79.7 111.6
79 88.5 2006 79 96.3 114.8 92.0 91.4 108.9 88.5
80 92.9 2006 80 105.7 108.7 74.3 76.2 138.5 83.7
81 108.8 2006 81 108.4 97.4 96.9 117.4 117.9 113.9
82 112.3 2006 82 115.8 98.6 100.3 122.0 96.7 115.2
83 107.3 2006 83 113.8 91.7 97.1 120.2 78.6 111.0
84 101.8 2006 84 106.4 91.2 86.0 93.6 64.1 96.9
85 105.0 2007 85 107.9 83.5 97.3 106.6 112.0 102.1
86 103.4 2007 86 98.2 82.4 86.4 108.4 139.4 101.5
87 116.7 2007 87 111.1 103.1 97.7 121.4 116.2 115.0
88 103.6 2007 88 99.8 110.3 90.6 104.8 63.4 105.0
89 108.8 2007 89 103.5 115.8 99.2 104.2 61.1 105.4
90 117.0 2007 90 105.4 120.1 107.4 115.0 65.5 119.7
91 100.9 2007 91 102.6 105.1 107.1 99.0 90.9 91.8
92 100.8 2007 92 107.4 108.6 78.9 82.8 115.3 89.1
93 109.7 2007 93 108.2 95.7 92.8 112.5 85.2 106.2
94 121.0 2007 94 121.7 103.2 106.2 127.9 87.0 119.9
95 114.1 2007 95 118.0 96.9 97.2 114.4 62.6 111.6
96 105.5 2007 96 109.6 95.7 80.0 83.7 62.7 95.1
97 112.5 2008 97 116.7 92.7 109.3 108.5 91.6 101.3
98 113.8 2008 98 110.6 81.3 111.3 109.7 104.3 118.3
99 115.3 2008 99 109.6 94.5 119.5 104.7 88.1 126.2
100 120.4 2008 100 117.4 105.6 119.8 112.2 62.3 113.2
101 111.1 2008 101 109.2 112.9 112.5 96.9 50.3 103.6
102 120.1 2008 102 110.8 102.6 125.6 103.8 64.1 116.2
103 106.1 2008 103 112.8 116.2 105.1 95.1 75.7 98.3
104 95.9 2008 104 106.5 104.9 91.9 66.7 85.5 84.2
105 119.4 2008 105 119.6 100.4 128.2 103.4 71.9 118.3
106 117.4 2008 106 127.2 97.1 122.6 105.4 66.9 117.4
107 98.6 2008 107 113.9 90.2 109.6 89.2 50.5 94.5
108 99.7 2008 108 120.0 100.5 120.4 72.5 57.9 93.3
109 87.4 2009 109 107.6 81.1 103.8 78.0 84.1 90.2
110 90.8 2009 110 105.2 87.2 96.6 77.3 87.0 88.5
111 101.3 2009 111 115.3 102.0 110.7 85.1 71.9 101.0
112 93.2 2009 112 113.9 107.0 111.7 80.9 45.0 87.0
113 95.1 2009 113 106.1 107.6 111.9 72.5 39.5 81.2
114 101.9 2009 114 114.3 123.5 131.5 82.1 53.8 98.1
115 87.0 2009 115 112.0 116.6 122.8 78.3 59.5 75.5
116 86.2 2009 116 109.0 103.2 98.3 57.8 68.4 70.7
117 105.0 2009 117 119.1 103.9 133.7 89.3 56.9 103.7
118 104.1 2009 118 124.4 95.4 120.0 91.4 61.9 100.4
119 99.2 2009 119 116.6 93.6 119.6 84.2 40.4 91.3
120 95.2 2009 120 118.5 102.1 108.7 72.5 49.4 97.2
121 92.7 2010 121 108.9 69.0 112.5 74.6 65.2 85.4
122 99.3 2010 122 107.5 88.9 102.7 80.3 82.1 86.5
123 113.5 2010 123 125.9 106.2 123.4 92.6 69.0 105.3
124 104.7 2010 124 117.7 103.0 116.5 86.3 45.9 97.7
125 100.5 2010 125 109.2 103.5 102.3 80.3 39.1 84.3
126 116.2 2010 126 118.8 124.5 148.4 93.6 56.9 109.8
127 94.1 2010 127 108.1 117.9 126.6 79.5 51.6 79.1
128 94.8 2010 128 112.1 104.2 106.6 61.8 62.9 83.4
129 115.1 2010 129 117.8 99.9 144.4 94.8 58.3 101.9
130 110.0 2010 130 121.8 89.4 132.4 91.6 56.9 113.0
131 108.4 2010 131 121.0 93.5 136.2 89.2 41.3 98.6
132 103.9 2010 132 121.7 89.6 121.6 74.1 46.9 94.7
133 102.9 2011 133 114.2 85.0 135.1 78.6 61.9 94.5
134 107.7 2011 134 109.8 90.0 124.7 78.2 74.8 90.7
135 126.7 2011 135 124.1 113.7 148.8 95.1 67.0 113.0
136 108.8 2011 136 112.9 112.1 145.6 78.7 53.3 89.9
137 117.1 2011 137 118.7 129.8 140.3 85.9 51.4 98.7
138 112.2 2011 138 113.3 119.1 138.5 81.2 50.3 102.2
139 94.7 2011 139 106.8 103.5 127.3 73.1 52.7 74.3
140 102.7 2011 140 119.3 105.5 117.9 58.7 70.3 84.5
141 119.1 2011 141 126.4 111.7 145.3 85.7 59.7 110.1
142 110.6 2011 142 126.6 98.6 120.7 81.8 52.0 100.4
143 109.1 2011 143 127.2 102.8 134.7 79.6 36.1 92.8
144 105.3 2011 144 123.8 101.1 124.4 70.7 39.7 92.2
145 103.4 2012 145 116.8 94.2 128.3 74.5 67.6 94.0
146 103.7 2012 146 113.8 92.6 128.4 84.8 72.8 100.7
147 117.0 2012 147 130.4 112.0 134.1 80.7 53.8 111.9
148 101.2 2012 148 112.8 108.6 133.3 69.9 39.6 95.9
149 105.4 2012 149 119.4 125.8 130.6 74.1 39.4 88.8
150 110.3 2012 150 117.5 138.7 165.7 76.1 41.2 102.0
151 97.7 2012 151 117.5 115.2 146.8 71.3 49.6 81.6
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) jaar t voeding
-5.680e+03 2.833e+00 -6.647e-02 2.765e-01
dranken tabak textiel kleding
1.574e-01 -1.886e-02 2.806e-01 2.341e-02
`apparatuur\\r`
3.061e-01
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-10.0999 -2.1887 0.2731 2.1959 8.6875
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -5.680e+03 2.685e+03 -2.115 0.036149 *
jaar 2.833e+00 1.342e+00 2.111 0.036539 *
t -6.647e-02 1.286e-01 -0.517 0.606006
voeding 2.765e-01 7.666e-02 3.607 0.000429 ***
dranken 1.574e-01 2.622e-02 6.003 1.54e-08 ***
tabak -1.886e-02 2.797e-02 -0.674 0.501206
textiel 2.806e-01 3.626e-02 7.740 1.69e-12 ***
kleding 2.341e-02 1.519e-02 1.541 0.125456
`apparatuur\\r` 3.061e-01 4.586e-02 6.674 5.16e-10 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 3.632 on 142 degrees of freedom
Multiple R-squared: 0.8877, Adjusted R-squared: 0.8814
F-statistic: 140.3 on 8 and 142 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.3030683196 6.061366e-01 6.969317e-01
[2,] 0.1619568694 3.239137e-01 8.380431e-01
[3,] 0.0811122009 1.622244e-01 9.188878e-01
[4,] 0.0607206409 1.214413e-01 9.392794e-01
[5,] 0.0395293570 7.905871e-02 9.604706e-01
[6,] 0.0336908449 6.738169e-02 9.663092e-01
[7,] 0.0210211103 4.204222e-02 9.789789e-01
[8,] 0.5001032022 9.997936e-01 4.998968e-01
[9,] 0.4392692014 8.785384e-01 5.607308e-01
[10,] 0.4514195768 9.028392e-01 5.485804e-01
[11,] 0.4695169930 9.390340e-01 5.304830e-01
[12,] 0.4879792918 9.759586e-01 5.120207e-01
[13,] 0.4608329864 9.216660e-01 5.391670e-01
[14,] 0.3854342896 7.708686e-01 6.145657e-01
[15,] 0.3593676273 7.187353e-01 6.406324e-01
[16,] 0.2987081077 5.974162e-01 7.012919e-01
[17,] 0.2431076156 4.862152e-01 7.568924e-01
[18,] 0.1994651125 3.989302e-01 8.005349e-01
[19,] 0.1707000876 3.414002e-01 8.292999e-01
[20,] 0.1608979372 3.217959e-01 8.391021e-01
[21,] 0.1452099330 2.904199e-01 8.547901e-01
[22,] 0.1309774551 2.619549e-01 8.690225e-01
[23,] 0.1306951720 2.613903e-01 8.693048e-01
[24,] 0.1232202013 2.464404e-01 8.767798e-01
[25,] 0.1260873759 2.521748e-01 8.739126e-01
[26,] 0.1030141696 2.060283e-01 8.969858e-01
[27,] 0.0814803094 1.629606e-01 9.185197e-01
[28,] 0.0761298309 1.522597e-01 9.238702e-01
[29,] 0.0587596731 1.175193e-01 9.412403e-01
[30,] 0.0456695451 9.133909e-02 9.543305e-01
[31,] 0.0377521735 7.550435e-02 9.622478e-01
[32,] 0.0274164368 5.483287e-02 9.725836e-01
[33,] 0.0203236562 4.064731e-02 9.796763e-01
[34,] 0.0243845021 4.876900e-02 9.756155e-01
[35,] 0.0214648378 4.292968e-02 9.785352e-01
[36,] 0.0211295832 4.225917e-02 9.788704e-01
[37,] 0.0559592423 1.119185e-01 9.440408e-01
[38,] 0.0476873237 9.537465e-02 9.523127e-01
[39,] 0.0354035501 7.080710e-02 9.645964e-01
[40,] 0.0261853592 5.237072e-02 9.738146e-01
[41,] 0.0191906249 3.838125e-02 9.808094e-01
[42,] 0.0173778506 3.475570e-02 9.826221e-01
[43,] 0.0125054457 2.501089e-02 9.874946e-01
[44,] 0.0094291347 1.885827e-02 9.905709e-01
[45,] 0.0091239292 1.824786e-02 9.908761e-01
[46,] 0.0076181469 1.523629e-02 9.923819e-01
[47,] 0.0056756389 1.135128e-02 9.943244e-01
[48,] 0.0041280868 8.256174e-03 9.958719e-01
[49,] 0.0099840899 1.996818e-02 9.900159e-01
[50,] 0.0084532960 1.690659e-02 9.915467e-01
[51,] 0.0060323036 1.206461e-02 9.939677e-01
[52,] 0.0042576537 8.515307e-03 9.957423e-01
[53,] 0.0030097979 6.019596e-03 9.969902e-01
[54,] 0.0033590723 6.718145e-03 9.966409e-01
[55,] 0.0022958662 4.591732e-03 9.977041e-01
[56,] 0.0023629424 4.725885e-03 9.976371e-01
[57,] 0.0017684490 3.536898e-03 9.982316e-01
[58,] 0.0011925755 2.385151e-03 9.988074e-01
[59,] 0.0009094873 1.818975e-03 9.990905e-01
[60,] 0.0006223927 1.244785e-03 9.993776e-01
[61,] 0.0006035371 1.207074e-03 9.993965e-01
[62,] 0.0004795488 9.590976e-04 9.995205e-01
[63,] 0.0003724416 7.448831e-04 9.996276e-01
[64,] 0.0008412457 1.682491e-03 9.991588e-01
[65,] 0.0006842436 1.368487e-03 9.993158e-01
[66,] 0.0005729044 1.145809e-03 9.994271e-01
[67,] 0.0003737474 7.474949e-04 9.996263e-01
[68,] 0.0029064620 5.812924e-03 9.970935e-01
[69,] 0.0020468490 4.093698e-03 9.979532e-01
[70,] 0.0019710373 3.942075e-03 9.980290e-01
[71,] 0.0018105958 3.621192e-03 9.981894e-01
[72,] 0.0022465507 4.493101e-03 9.977534e-01
[73,] 0.0027361745 5.472349e-03 9.972638e-01
[74,] 0.0028407125 5.681425e-03 9.971593e-01
[75,] 0.0020102749 4.020550e-03 9.979897e-01
[76,] 0.0014125939 2.825188e-03 9.985874e-01
[77,] 0.0014493039 2.898608e-03 9.985507e-01
[78,] 0.0009698150 1.939630e-03 9.990302e-01
[79,] 0.0006760929 1.352186e-03 9.993239e-01
[80,] 0.0004667926 9.335852e-04 9.995332e-01
[81,] 0.0003587505 7.175010e-04 9.996412e-01
[82,] 0.0002644749 5.289497e-04 9.997355e-01
[83,] 0.0002362660 4.725319e-04 9.997637e-01
[84,] 0.0001667675 3.335349e-04 9.998332e-01
[85,] 0.0006764036 1.352807e-03 9.993236e-01
[86,] 0.0007372380 1.474476e-03 9.992628e-01
[87,] 0.0006428030 1.285606e-03 9.993572e-01
[88,] 0.0007896237 1.579247e-03 9.992104e-01
[89,] 0.0007204211 1.440842e-03 9.992796e-01
[90,] 0.0007213984 1.442797e-03 9.992786e-01
[91,] 0.0015357172 3.071434e-03 9.984643e-01
[92,] 0.0016021849 3.204370e-03 9.983978e-01
[93,] 0.0022514081 4.502816e-03 9.977486e-01
[94,] 0.0022740439 4.548088e-03 9.977260e-01
[95,] 0.0020631634 4.126327e-03 9.979368e-01
[96,] 0.0026700063 5.340013e-03 9.973300e-01
[97,] 0.0034958295 6.991659e-03 9.965042e-01
[98,] 0.0488031927 9.760639e-02 9.511968e-01
[99,] 0.0722779781 1.445560e-01 9.277220e-01
[100,] 0.0952923754 1.905848e-01 9.047076e-01
[101,] 0.1568329616 3.136659e-01 8.431670e-01
[102,] 0.1714174813 3.428350e-01 8.285825e-01
[103,] 0.1792095185 3.584190e-01 8.207905e-01
[104,] 0.4536214805 9.072430e-01 5.463785e-01
[105,] 0.4000910243 8.001820e-01 5.999090e-01
[106,] 0.4140103591 8.280207e-01 5.859896e-01
[107,] 0.5136358735 9.727283e-01 4.863641e-01
[108,] 0.4619971679 9.239943e-01 5.380028e-01
[109,] 0.6253998093 7.492004e-01 3.746002e-01
[110,] 0.5754321812 8.491356e-01 4.245678e-01
[111,] 0.5073075716 9.853849e-01 4.926924e-01
[112,] 0.5463422461 9.073155e-01 4.536578e-01
[113,] 0.5718574394 8.562851e-01 4.281426e-01
[114,] 0.5319355467 9.361289e-01 4.680645e-01
[115,] 0.5507120432 8.985759e-01 4.492880e-01
[116,] 0.8399665934 3.200668e-01 1.600334e-01
[117,] 0.9510139299 9.797214e-02 4.898607e-02
[118,] 0.9302306962 1.395386e-01 6.976930e-02
[119,] 0.9791818361 4.163633e-02 2.081816e-02
[120,] 0.9770667864 4.586643e-02 2.293321e-02
[121,] 0.9896559079 2.068818e-02 1.034409e-02
[122,] 0.9997865855 4.268290e-04 2.134145e-04
[123,] 0.9999292664 1.414672e-04 7.073359e-05
[124,] 0.9999514692 9.706154e-05 4.853077e-05
[125,] 0.9997626842 4.746315e-04 2.373158e-04
[126,] 0.9987674498 2.465100e-03 1.232550e-03
[127,] 0.9938802180 1.223956e-02 6.119782e-03
[128,] 0.9889625550 2.207489e-02 1.103744e-02
> postscript(file="/var/fisher/rcomp/tmp/15mmj1352101460.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/2b6nt1352101460.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/3miei1352101460.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/4l9c11352101460.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/5coq61352101460.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 = 151
Frequency = 1
1 2 3 4 5 6
-4.86876903 -4.55984881 -2.13253651 1.72513128 -2.04017941 -1.26847725
7 8 9 10 11 12
0.55914227 3.73320093 -0.23708597 -4.68774914 -2.43305119 -0.46799977
13 14 15 16 17 18
2.93391082 1.80260111 -0.72917500 1.58420984 0.94909581 3.82655501
19 20 21 22 23 24
-7.76895322 -0.10734675 -4.24765952 -7.47568313 -5.79650556 -1.32132206
25 26 27 28 29 30
-0.97249264 -2.69959105 0.02388740 -0.44942327 -0.70424637 -1.29918130
31 32 33 34 35 36
-4.79222831 -2.24491448 -4.29886931 -5.77943283 -1.97146931 -2.47032638
37 38 39 40 41 42
0.15113763 -0.60130690 2.95237240 1.00708983 2.64937653 3.24896966
43 44 45 46 47 48
-0.73695122 1.61879511 0.69419075 -1.90217574 1.40700394 7.48751574
49 50 51 52 53 54
-0.01245349 2.64465530 1.08449151 4.14718216 1.41638774 2.63421781
55 56 57 58 59 60
0.35794734 5.45603568 2.26141051 1.73644256 2.15404118 8.68747941
61 62 63 64 65 66
5.75039319 1.69913647 3.39264801 3.17485274 0.55724590 2.83629741
67 68 69 70 71 72
-1.22221835 1.23152877 0.81466035 -0.57055170 0.23214950 5.66731933
73 74 75 76 77 78
2.28344959 3.61436920 6.29103609 1.47161545 3.55448862 1.00894910
79 80 81 82 83 84
-7.26285804 0.27284909 -2.62685347 -2.42356297 -3.56414620 5.03788325
85 86 87 88 89 90
0.12019787 0.27308630 -0.20896400 -2.42978184 1.21020185 0.91816311
91 92 93 94 95 96
0.44966867 2.80785133 0.98082036 -0.87016725 1.04132488 8.35840005
97 98 99 100 101 102
2.11959374 1.16634937 0.45077284 4.19828736 3.45854682 7.83429031
103 104 105 106 107 108
-1.52978106 3.66441215 4.58283295 0.79308433 -1.48264981 1.46076846
109 110 111 112 113 114
-8.64557116 -4.96239336 -4.91324278 -7.23378481 1.06001509 -4.67514217
115 116 117 118 119 120
-10.09994425 -1.34353717 -3.38416220 -4.29997315 -1.39184573 -6.12730594
121 122 123 124 125 126
-0.80621560 0.59886548 -1.45379444 -2.91165141 0.90315600 -0.37459704
127 128 129 130 131 132
-5.34385724 -0.51822850 4.84591009 -2.33453639 1.22627952 2.23781378
133 134 135 136 137 138
-0.02945410 6.04397178 6.49546120 3.94407571 3.15173156 1.73438500
139 140 141 142 143 144
-0.90091615 3.72431353 2.60365717 -0.04366089 1.27609726 1.15281371
145 146 147 148 149 150
-2.68958522 -6.30317505 -2.30472361 -4.39135881 -3.70787736 -4.22815314
151
-6.02492170
> postscript(file="/var/fisher/rcomp/tmp/61e3a1352101460.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 = 151
Frequency = 1
lag(myerror, k = 1) myerror
0 -4.86876903 NA
1 -4.55984881 -4.86876903
2 -2.13253651 -4.55984881
3 1.72513128 -2.13253651
4 -2.04017941 1.72513128
5 -1.26847725 -2.04017941
6 0.55914227 -1.26847725
7 3.73320093 0.55914227
8 -0.23708597 3.73320093
9 -4.68774914 -0.23708597
10 -2.43305119 -4.68774914
11 -0.46799977 -2.43305119
12 2.93391082 -0.46799977
13 1.80260111 2.93391082
14 -0.72917500 1.80260111
15 1.58420984 -0.72917500
16 0.94909581 1.58420984
17 3.82655501 0.94909581
18 -7.76895322 3.82655501
19 -0.10734675 -7.76895322
20 -4.24765952 -0.10734675
21 -7.47568313 -4.24765952
22 -5.79650556 -7.47568313
23 -1.32132206 -5.79650556
24 -0.97249264 -1.32132206
25 -2.69959105 -0.97249264
26 0.02388740 -2.69959105
27 -0.44942327 0.02388740
28 -0.70424637 -0.44942327
29 -1.29918130 -0.70424637
30 -4.79222831 -1.29918130
31 -2.24491448 -4.79222831
32 -4.29886931 -2.24491448
33 -5.77943283 -4.29886931
34 -1.97146931 -5.77943283
35 -2.47032638 -1.97146931
36 0.15113763 -2.47032638
37 -0.60130690 0.15113763
38 2.95237240 -0.60130690
39 1.00708983 2.95237240
40 2.64937653 1.00708983
41 3.24896966 2.64937653
42 -0.73695122 3.24896966
43 1.61879511 -0.73695122
44 0.69419075 1.61879511
45 -1.90217574 0.69419075
46 1.40700394 -1.90217574
47 7.48751574 1.40700394
48 -0.01245349 7.48751574
49 2.64465530 -0.01245349
50 1.08449151 2.64465530
51 4.14718216 1.08449151
52 1.41638774 4.14718216
53 2.63421781 1.41638774
54 0.35794734 2.63421781
55 5.45603568 0.35794734
56 2.26141051 5.45603568
57 1.73644256 2.26141051
58 2.15404118 1.73644256
59 8.68747941 2.15404118
60 5.75039319 8.68747941
61 1.69913647 5.75039319
62 3.39264801 1.69913647
63 3.17485274 3.39264801
64 0.55724590 3.17485274
65 2.83629741 0.55724590
66 -1.22221835 2.83629741
67 1.23152877 -1.22221835
68 0.81466035 1.23152877
69 -0.57055170 0.81466035
70 0.23214950 -0.57055170
71 5.66731933 0.23214950
72 2.28344959 5.66731933
73 3.61436920 2.28344959
74 6.29103609 3.61436920
75 1.47161545 6.29103609
76 3.55448862 1.47161545
77 1.00894910 3.55448862
78 -7.26285804 1.00894910
79 0.27284909 -7.26285804
80 -2.62685347 0.27284909
81 -2.42356297 -2.62685347
82 -3.56414620 -2.42356297
83 5.03788325 -3.56414620
84 0.12019787 5.03788325
85 0.27308630 0.12019787
86 -0.20896400 0.27308630
87 -2.42978184 -0.20896400
88 1.21020185 -2.42978184
89 0.91816311 1.21020185
90 0.44966867 0.91816311
91 2.80785133 0.44966867
92 0.98082036 2.80785133
93 -0.87016725 0.98082036
94 1.04132488 -0.87016725
95 8.35840005 1.04132488
96 2.11959374 8.35840005
97 1.16634937 2.11959374
98 0.45077284 1.16634937
99 4.19828736 0.45077284
100 3.45854682 4.19828736
101 7.83429031 3.45854682
102 -1.52978106 7.83429031
103 3.66441215 -1.52978106
104 4.58283295 3.66441215
105 0.79308433 4.58283295
106 -1.48264981 0.79308433
107 1.46076846 -1.48264981
108 -8.64557116 1.46076846
109 -4.96239336 -8.64557116
110 -4.91324278 -4.96239336
111 -7.23378481 -4.91324278
112 1.06001509 -7.23378481
113 -4.67514217 1.06001509
114 -10.09994425 -4.67514217
115 -1.34353717 -10.09994425
116 -3.38416220 -1.34353717
117 -4.29997315 -3.38416220
118 -1.39184573 -4.29997315
119 -6.12730594 -1.39184573
120 -0.80621560 -6.12730594
121 0.59886548 -0.80621560
122 -1.45379444 0.59886548
123 -2.91165141 -1.45379444
124 0.90315600 -2.91165141
125 -0.37459704 0.90315600
126 -5.34385724 -0.37459704
127 -0.51822850 -5.34385724
128 4.84591009 -0.51822850
129 -2.33453639 4.84591009
130 1.22627952 -2.33453639
131 2.23781378 1.22627952
132 -0.02945410 2.23781378
133 6.04397178 -0.02945410
134 6.49546120 6.04397178
135 3.94407571 6.49546120
136 3.15173156 3.94407571
137 1.73438500 3.15173156
138 -0.90091615 1.73438500
139 3.72431353 -0.90091615
140 2.60365717 3.72431353
141 -0.04366089 2.60365717
142 1.27609726 -0.04366089
143 1.15281371 1.27609726
144 -2.68958522 1.15281371
145 -6.30317505 -2.68958522
146 -2.30472361 -6.30317505
147 -4.39135881 -2.30472361
148 -3.70787736 -4.39135881
149 -4.22815314 -3.70787736
150 -6.02492170 -4.22815314
151 NA -6.02492170
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -4.55984881 -4.86876903
[2,] -2.13253651 -4.55984881
[3,] 1.72513128 -2.13253651
[4,] -2.04017941 1.72513128
[5,] -1.26847725 -2.04017941
[6,] 0.55914227 -1.26847725
[7,] 3.73320093 0.55914227
[8,] -0.23708597 3.73320093
[9,] -4.68774914 -0.23708597
[10,] -2.43305119 -4.68774914
[11,] -0.46799977 -2.43305119
[12,] 2.93391082 -0.46799977
[13,] 1.80260111 2.93391082
[14,] -0.72917500 1.80260111
[15,] 1.58420984 -0.72917500
[16,] 0.94909581 1.58420984
[17,] 3.82655501 0.94909581
[18,] -7.76895322 3.82655501
[19,] -0.10734675 -7.76895322
[20,] -4.24765952 -0.10734675
[21,] -7.47568313 -4.24765952
[22,] -5.79650556 -7.47568313
[23,] -1.32132206 -5.79650556
[24,] -0.97249264 -1.32132206
[25,] -2.69959105 -0.97249264
[26,] 0.02388740 -2.69959105
[27,] -0.44942327 0.02388740
[28,] -0.70424637 -0.44942327
[29,] -1.29918130 -0.70424637
[30,] -4.79222831 -1.29918130
[31,] -2.24491448 -4.79222831
[32,] -4.29886931 -2.24491448
[33,] -5.77943283 -4.29886931
[34,] -1.97146931 -5.77943283
[35,] -2.47032638 -1.97146931
[36,] 0.15113763 -2.47032638
[37,] -0.60130690 0.15113763
[38,] 2.95237240 -0.60130690
[39,] 1.00708983 2.95237240
[40,] 2.64937653 1.00708983
[41,] 3.24896966 2.64937653
[42,] -0.73695122 3.24896966
[43,] 1.61879511 -0.73695122
[44,] 0.69419075 1.61879511
[45,] -1.90217574 0.69419075
[46,] 1.40700394 -1.90217574
[47,] 7.48751574 1.40700394
[48,] -0.01245349 7.48751574
[49,] 2.64465530 -0.01245349
[50,] 1.08449151 2.64465530
[51,] 4.14718216 1.08449151
[52,] 1.41638774 4.14718216
[53,] 2.63421781 1.41638774
[54,] 0.35794734 2.63421781
[55,] 5.45603568 0.35794734
[56,] 2.26141051 5.45603568
[57,] 1.73644256 2.26141051
[58,] 2.15404118 1.73644256
[59,] 8.68747941 2.15404118
[60,] 5.75039319 8.68747941
[61,] 1.69913647 5.75039319
[62,] 3.39264801 1.69913647
[63,] 3.17485274 3.39264801
[64,] 0.55724590 3.17485274
[65,] 2.83629741 0.55724590
[66,] -1.22221835 2.83629741
[67,] 1.23152877 -1.22221835
[68,] 0.81466035 1.23152877
[69,] -0.57055170 0.81466035
[70,] 0.23214950 -0.57055170
[71,] 5.66731933 0.23214950
[72,] 2.28344959 5.66731933
[73,] 3.61436920 2.28344959
[74,] 6.29103609 3.61436920
[75,] 1.47161545 6.29103609
[76,] 3.55448862 1.47161545
[77,] 1.00894910 3.55448862
[78,] -7.26285804 1.00894910
[79,] 0.27284909 -7.26285804
[80,] -2.62685347 0.27284909
[81,] -2.42356297 -2.62685347
[82,] -3.56414620 -2.42356297
[83,] 5.03788325 -3.56414620
[84,] 0.12019787 5.03788325
[85,] 0.27308630 0.12019787
[86,] -0.20896400 0.27308630
[87,] -2.42978184 -0.20896400
[88,] 1.21020185 -2.42978184
[89,] 0.91816311 1.21020185
[90,] 0.44966867 0.91816311
[91,] 2.80785133 0.44966867
[92,] 0.98082036 2.80785133
[93,] -0.87016725 0.98082036
[94,] 1.04132488 -0.87016725
[95,] 8.35840005 1.04132488
[96,] 2.11959374 8.35840005
[97,] 1.16634937 2.11959374
[98,] 0.45077284 1.16634937
[99,] 4.19828736 0.45077284
[100,] 3.45854682 4.19828736
[101,] 7.83429031 3.45854682
[102,] -1.52978106 7.83429031
[103,] 3.66441215 -1.52978106
[104,] 4.58283295 3.66441215
[105,] 0.79308433 4.58283295
[106,] -1.48264981 0.79308433
[107,] 1.46076846 -1.48264981
[108,] -8.64557116 1.46076846
[109,] -4.96239336 -8.64557116
[110,] -4.91324278 -4.96239336
[111,] -7.23378481 -4.91324278
[112,] 1.06001509 -7.23378481
[113,] -4.67514217 1.06001509
[114,] -10.09994425 -4.67514217
[115,] -1.34353717 -10.09994425
[116,] -3.38416220 -1.34353717
[117,] -4.29997315 -3.38416220
[118,] -1.39184573 -4.29997315
[119,] -6.12730594 -1.39184573
[120,] -0.80621560 -6.12730594
[121,] 0.59886548 -0.80621560
[122,] -1.45379444 0.59886548
[123,] -2.91165141 -1.45379444
[124,] 0.90315600 -2.91165141
[125,] -0.37459704 0.90315600
[126,] -5.34385724 -0.37459704
[127,] -0.51822850 -5.34385724
[128,] 4.84591009 -0.51822850
[129,] -2.33453639 4.84591009
[130,] 1.22627952 -2.33453639
[131,] 2.23781378 1.22627952
[132,] -0.02945410 2.23781378
[133,] 6.04397178 -0.02945410
[134,] 6.49546120 6.04397178
[135,] 3.94407571 6.49546120
[136,] 3.15173156 3.94407571
[137,] 1.73438500 3.15173156
[138,] -0.90091615 1.73438500
[139,] 3.72431353 -0.90091615
[140,] 2.60365717 3.72431353
[141,] -0.04366089 2.60365717
[142,] 1.27609726 -0.04366089
[143,] 1.15281371 1.27609726
[144,] -2.68958522 1.15281371
[145,] -6.30317505 -2.68958522
[146,] -2.30472361 -6.30317505
[147,] -4.39135881 -2.30472361
[148,] -3.70787736 -4.39135881
[149,] -4.22815314 -3.70787736
[150,] -6.02492170 -4.22815314
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -4.55984881 -4.86876903
2 -2.13253651 -4.55984881
3 1.72513128 -2.13253651
4 -2.04017941 1.72513128
5 -1.26847725 -2.04017941
6 0.55914227 -1.26847725
7 3.73320093 0.55914227
8 -0.23708597 3.73320093
9 -4.68774914 -0.23708597
10 -2.43305119 -4.68774914
11 -0.46799977 -2.43305119
12 2.93391082 -0.46799977
13 1.80260111 2.93391082
14 -0.72917500 1.80260111
15 1.58420984 -0.72917500
16 0.94909581 1.58420984
17 3.82655501 0.94909581
18 -7.76895322 3.82655501
19 -0.10734675 -7.76895322
20 -4.24765952 -0.10734675
21 -7.47568313 -4.24765952
22 -5.79650556 -7.47568313
23 -1.32132206 -5.79650556
24 -0.97249264 -1.32132206
25 -2.69959105 -0.97249264
26 0.02388740 -2.69959105
27 -0.44942327 0.02388740
28 -0.70424637 -0.44942327
29 -1.29918130 -0.70424637
30 -4.79222831 -1.29918130
31 -2.24491448 -4.79222831
32 -4.29886931 -2.24491448
33 -5.77943283 -4.29886931
34 -1.97146931 -5.77943283
35 -2.47032638 -1.97146931
36 0.15113763 -2.47032638
37 -0.60130690 0.15113763
38 2.95237240 -0.60130690
39 1.00708983 2.95237240
40 2.64937653 1.00708983
41 3.24896966 2.64937653
42 -0.73695122 3.24896966
43 1.61879511 -0.73695122
44 0.69419075 1.61879511
45 -1.90217574 0.69419075
46 1.40700394 -1.90217574
47 7.48751574 1.40700394
48 -0.01245349 7.48751574
49 2.64465530 -0.01245349
50 1.08449151 2.64465530
51 4.14718216 1.08449151
52 1.41638774 4.14718216
53 2.63421781 1.41638774
54 0.35794734 2.63421781
55 5.45603568 0.35794734
56 2.26141051 5.45603568
57 1.73644256 2.26141051
58 2.15404118 1.73644256
59 8.68747941 2.15404118
60 5.75039319 8.68747941
61 1.69913647 5.75039319
62 3.39264801 1.69913647
63 3.17485274 3.39264801
64 0.55724590 3.17485274
65 2.83629741 0.55724590
66 -1.22221835 2.83629741
67 1.23152877 -1.22221835
68 0.81466035 1.23152877
69 -0.57055170 0.81466035
70 0.23214950 -0.57055170
71 5.66731933 0.23214950
72 2.28344959 5.66731933
73 3.61436920 2.28344959
74 6.29103609 3.61436920
75 1.47161545 6.29103609
76 3.55448862 1.47161545
77 1.00894910 3.55448862
78 -7.26285804 1.00894910
79 0.27284909 -7.26285804
80 -2.62685347 0.27284909
81 -2.42356297 -2.62685347
82 -3.56414620 -2.42356297
83 5.03788325 -3.56414620
84 0.12019787 5.03788325
85 0.27308630 0.12019787
86 -0.20896400 0.27308630
87 -2.42978184 -0.20896400
88 1.21020185 -2.42978184
89 0.91816311 1.21020185
90 0.44966867 0.91816311
91 2.80785133 0.44966867
92 0.98082036 2.80785133
93 -0.87016725 0.98082036
94 1.04132488 -0.87016725
95 8.35840005 1.04132488
96 2.11959374 8.35840005
97 1.16634937 2.11959374
98 0.45077284 1.16634937
99 4.19828736 0.45077284
100 3.45854682 4.19828736
101 7.83429031 3.45854682
102 -1.52978106 7.83429031
103 3.66441215 -1.52978106
104 4.58283295 3.66441215
105 0.79308433 4.58283295
106 -1.48264981 0.79308433
107 1.46076846 -1.48264981
108 -8.64557116 1.46076846
109 -4.96239336 -8.64557116
110 -4.91324278 -4.96239336
111 -7.23378481 -4.91324278
112 1.06001509 -7.23378481
113 -4.67514217 1.06001509
114 -10.09994425 -4.67514217
115 -1.34353717 -10.09994425
116 -3.38416220 -1.34353717
117 -4.29997315 -3.38416220
118 -1.39184573 -4.29997315
119 -6.12730594 -1.39184573
120 -0.80621560 -6.12730594
121 0.59886548 -0.80621560
122 -1.45379444 0.59886548
123 -2.91165141 -1.45379444
124 0.90315600 -2.91165141
125 -0.37459704 0.90315600
126 -5.34385724 -0.37459704
127 -0.51822850 -5.34385724
128 4.84591009 -0.51822850
129 -2.33453639 4.84591009
130 1.22627952 -2.33453639
131 2.23781378 1.22627952
132 -0.02945410 2.23781378
133 6.04397178 -0.02945410
134 6.49546120 6.04397178
135 3.94407571 6.49546120
136 3.15173156 3.94407571
137 1.73438500 3.15173156
138 -0.90091615 1.73438500
139 3.72431353 -0.90091615
140 2.60365717 3.72431353
141 -0.04366089 2.60365717
142 1.27609726 -0.04366089
143 1.15281371 1.27609726
144 -2.68958522 1.15281371
145 -6.30317505 -2.68958522
146 -2.30472361 -6.30317505
147 -4.39135881 -2.30472361
148 -3.70787736 -4.39135881
149 -4.22815314 -3.70787736
150 -6.02492170 -4.22815314
> 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/7nnak1352101460.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/81n691352101460.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/9f8jn1352101460.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/10li2z1352101460.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/11txnr1352101460.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/1217kb1352101460.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/13mh9d1352101461.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/14sj4b1352101461.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/15qqms1352101461.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/16yi6d1352101461.tab")
+ }
>
> try(system("convert tmp/15mmj1352101460.ps tmp/15mmj1352101460.png",intern=TRUE))
character(0)
> try(system("convert tmp/2b6nt1352101460.ps tmp/2b6nt1352101460.png",intern=TRUE))
character(0)
> try(system("convert tmp/3miei1352101460.ps tmp/3miei1352101460.png",intern=TRUE))
character(0)
> try(system("convert tmp/4l9c11352101460.ps tmp/4l9c11352101460.png",intern=TRUE))
character(0)
> try(system("convert tmp/5coq61352101460.ps tmp/5coq61352101460.png",intern=TRUE))
character(0)
> try(system("convert tmp/61e3a1352101460.ps tmp/61e3a1352101460.png",intern=TRUE))
character(0)
> try(system("convert tmp/7nnak1352101460.ps tmp/7nnak1352101460.png",intern=TRUE))
character(0)
> try(system("convert tmp/81n691352101460.ps tmp/81n691352101460.png",intern=TRUE))
character(0)
> try(system("convert tmp/9f8jn1352101460.ps tmp/9f8jn1352101460.png",intern=TRUE))
character(0)
> try(system("convert tmp/10li2z1352101460.ps tmp/10li2z1352101460.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
7.881 1.105 9.128