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(9
+ ,26
+ ,21
+ ,21
+ ,23
+ ,17
+ ,23
+ ,4
+ ,14
+ ,12
+ ,127
+ ,9
+ ,20
+ ,16
+ ,15
+ ,24
+ ,17
+ ,20
+ ,4
+ ,18
+ ,11
+ ,108
+ ,9
+ ,19
+ ,19
+ ,18
+ ,22
+ ,18
+ ,20
+ ,6
+ ,11
+ ,14
+ ,110
+ ,9
+ ,19
+ ,18
+ ,11
+ ,20
+ ,21
+ ,21
+ ,8
+ ,12
+ ,12
+ ,102
+ ,9
+ ,20
+ ,16
+ ,8
+ ,24
+ ,20
+ ,24
+ ,8
+ ,16
+ ,21
+ ,104
+ ,9
+ ,25
+ ,23
+ ,19
+ ,27
+ ,28
+ ,22
+ ,4
+ ,18
+ ,12
+ ,140
+ ,9
+ ,25
+ ,17
+ ,4
+ ,28
+ ,19
+ ,23
+ ,4
+ ,14
+ ,22
+ ,112
+ ,9
+ ,22
+ ,12
+ ,20
+ ,27
+ ,22
+ ,20
+ ,8
+ ,14
+ ,11
+ ,115
+ ,9
+ ,26
+ ,19
+ ,16
+ ,24
+ ,16
+ ,25
+ ,5
+ ,15
+ ,10
+ ,121
+ ,9
+ ,22
+ ,16
+ ,14
+ ,23
+ ,18
+ ,23
+ ,4
+ ,15
+ ,13
+ ,112
+ ,9
+ ,17
+ ,19
+ ,10
+ ,24
+ ,25
+ ,27
+ ,4
+ ,17
+ ,10
+ ,118
+ ,9
+ ,22
+ ,20
+ ,13
+ ,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10
+ ,22
+ ,18
+ ,12
+ ,25
+ ,23
+ ,28
+ ,6
+ ,13
+ ,17
+ ,122
+ ,10
+ ,27
+ ,22
+ ,20
+ ,25
+ ,24
+ ,18
+ ,4
+ ,16
+ ,9
+ ,132
+ ,9
+ ,24
+ ,20
+ ,12
+ ,28
+ ,25
+ ,25
+ ,4
+ ,12
+ ,12
+ ,130
+ ,10
+ ,24
+ ,22
+ ,16
+ ,28
+ ,21
+ ,23
+ ,4
+ ,9
+ ,19
+ ,130
+ ,10
+ ,21
+ ,18
+ ,16
+ ,20
+ ,21
+ ,21
+ ,5
+ ,13
+ ,18
+ ,112
+ ,10
+ ,18
+ ,16
+ ,18
+ ,25
+ ,23
+ ,20
+ ,6
+ ,13
+ ,15
+ ,114
+ ,10
+ ,16
+ ,16
+ ,16
+ ,19
+ ,27
+ ,25
+ ,16
+ ,14
+ ,14
+ ,103
+ ,10
+ ,22
+ ,16
+ ,13
+ ,25
+ ,23
+ ,22
+ ,6
+ ,19
+ ,11
+ ,115
+ ,10
+ ,20
+ ,16
+ ,17
+ ,22
+ ,18
+ ,21
+ ,6
+ ,13
+ ,9
+ ,108
+ ,10
+ ,18
+ ,17
+ ,13
+ ,18
+ ,16
+ ,16
+ ,4
+ ,12
+ ,18
+ ,94
+ ,11
+ ,20
+ ,18
+ ,17
+ ,20
+ ,16
+ ,18
+ ,4
+ ,13
+ ,16
+ ,105)
+ ,dim=c(11
+ ,162)
+ ,dimnames=list(c('Month'
+ ,'I1'
+ ,'I2'
+ ,'I3'
+ ,'E1'
+ ,'E2'
+ ,'E3'
+ ,'A'
+ ,'Happiness'
+ ,'Depression'
+ ,'Motivatie
')
+ ,1:162))
> y <- array(NA,dim=c(11,162),dimnames=list(c('Month','I1','I2','I3','E1','E2','E3','A','Happiness','Depression','Motivatie
'),1:162))
> 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 = '11'
> par3 <- 'No Linear Trend'
> par2 <- 'Do not include Seasonal Dummies'
> par1 <- '11'
> #'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
Motivatie\r Month I1 I2 I3 E1 E2 E3 A Happiness Depression
1 127 9 26 21 21 23 17 23 4 14 12
2 108 9 20 16 15 24 17 20 4 18 11
3 110 9 19 19 18 22 18 20 6 11 14
4 102 9 19 18 11 20 21 21 8 12 12
5 104 9 20 16 8 24 20 24 8 16 21
6 140 9 25 23 19 27 28 22 4 18 12
7 112 9 25 17 4 28 19 23 4 14 22
8 115 9 22 12 20 27 22 20 8 14 11
9 121 9 26 19 16 24 16 25 5 15 10
10 112 9 22 16 14 23 18 23 4 15 13
11 118 9 17 19 10 24 25 27 4 17 10
12 122 9 22 20 13 27 17 27 4 19 8
13 105 9 19 13 14 27 14 22 4 10 15
14 111 9 24 20 8 28 11 24 4 16 14
15 151 9 26 27 23 27 27 25 4 18 10
16 106 9 21 17 11 23 20 22 8 14 14
17 100 9 13 8 9 24 22 28 4 14 14
18 149 9 26 25 24 28 22 28 4 17 11
19 122 9 20 26 5 27 21 27 4 14 10
20 115 9 22 13 15 25 23 25 8 16 13
21 86 9 14 19 5 19 17 16 4 18 7
22 124 9 21 15 19 24 24 28 7 11 14
23 69 9 7 5 6 20 14 21 4 14 12
24 117 9 23 16 13 28 17 24 4 12 14
25 113 9 17 14 11 26 23 27 5 17 11
26 123 9 25 24 17 23 24 14 4 9 9
27 123 9 25 24 17 23 24 14 4 16 11
28 84 9 19 9 5 20 8 27 4 14 15
29 97 9 20 19 9 11 22 20 4 15 14
30 121 9 23 19 15 24 23 21 4 11 13
31 132 9 22 25 17 25 25 22 4 16 9
32 119 9 22 19 17 23 21 21 4 13 15
33 98 9 21 18 20 18 24 12 15 17 10
34 87 9 15 15 12 20 15 20 10 15 11
35 101 9 20 12 7 20 22 24 4 14 13
36 115 9 22 21 16 24 21 19 8 16 8
37 109 9 18 12 7 23 25 28 4 9 20
38 109 9 20 15 14 25 16 23 4 15 12
39 159 9 28 28 24 28 28 27 4 17 10
40 129 9 22 25 15 26 23 22 4 13 10
41 119 9 18 19 15 26 21 27 7 15 9
42 119 9 23 20 10 23 21 26 4 16 14
43 122 9 20 24 14 22 26 22 6 16 8
44 131 9 25 26 18 24 22 21 5 12 14
45 120 9 26 25 12 21 21 19 4 12 11
46 82 9 15 12 9 20 18 24 16 11 13
47 86 9 17 12 9 22 12 19 5 15 9
48 105 9 23 15 8 20 25 26 12 15 11
49 114 9 21 17 18 25 17 22 6 17 15
50 100 9 13 14 10 20 24 28 9 13 11
51 100 9 18 16 17 22 15 21 9 16 10
52 99 9 19 11 14 23 13 23 4 14 14
53 132 9 22 20 16 25 26 28 5 11 18
54 82 9 16 11 10 23 16 10 4 12 14
55 132 9 24 22 19 23 24 24 4 12 11
56 107 9 18 20 10 22 21 21 5 15 12
57 114 9 20 19 14 24 20 21 4 16 13
58 110 9 24 17 10 25 14 24 4 15 9
59 105 9 14 21 4 21 25 24 4 12 10
60 121 9 22 23 19 12 25 25 5 12 15
61 109 9 24 18 9 17 20 25 4 8 20
62 106 9 18 17 12 20 22 23 6 13 12
63 124 9 21 27 16 23 20 21 4 11 12
64 120 9 23 25 11 23 26 16 4 14 14
65 91 9 17 19 18 20 18 17 18 15 13
66 126 10 22 22 11 28 22 25 4 10 11
67 138 10 24 24 24 24 24 24 6 11 17
68 118 10 21 20 17 24 17 23 4 12 12
69 128 10 22 19 18 24 24 25 4 15 13
70 98 10 16 11 9 24 20 23 5 15 14
71 133 10 21 22 19 28 19 28 4 14 13
72 130 10 23 22 18 25 20 26 4 16 15
73 103 10 22 16 12 21 15 22 5 15 13
74 124 10 24 20 23 25 23 19 10 15 10
75 142 10 24 24 22 25 26 26 5 13 11
76 96 10 16 16 14 18 22 18 8 12 19
77 93 10 16 16 14 17 20 18 8 17 13
78 129 10 21 22 16 26 24 25 5 13 17
79 150 10 26 24 23 28 26 27 4 15 13
80 88 10 15 16 7 21 21 12 4 13 9
81 125 10 25 27 10 27 25 15 4 15 11
82 92 10 18 11 12 22 13 21 5 16 10
83 0 10 23 21 12 21 20 23 4 15 9
84 117 10 20 20 12 25 22 22 4 16 12
85 112 10 17 20 17 22 23 21 8 15 12
86 144 10 25 27 21 23 28 24 4 14 13
87 130 10 24 20 16 26 22 27 5 15 13
88 87 10 17 12 11 19 20 22 14 14 12
89 92 10 19 8 14 25 6 28 8 13 15
90 114 10 20 21 13 21 21 26 8 7 22
91 81 10 15 18 9 13 20 10 4 17 13
92 127 10 27 24 19 24 18 19 4 13 15
93 115 10 22 16 13 25 23 22 6 15 13
94 123 10 23 18 19 26 20 21 4 14 15
95 115 10 16 20 13 25 24 24 7 13 10
96 117 10 19 20 13 25 22 25 7 16 11
97 117 10 25 19 13 22 21 21 4 12 16
98 103 10 19 17 14 21 18 20 6 14 11
99 108 10 19 16 12 23 21 21 4 17 11
100 139 10 26 26 22 25 23 24 7 15 10
101 113 10 21 15 11 24 23 23 4 17 10
102 97 10 20 22 5 21 15 18 4 12 16
103 117 10 24 17 18 21 21 24 8 16 12
104 133 10 22 23 19 25 24 24 4 11 11
105 115 10 20 21 14 22 23 19 4 15 16
106 103 10 18 19 15 20 21 20 10 9 19
107 95 10 18 14 12 20 21 18 8 16 11
108 117 10 24 17 19 23 20 20 6 15 16
109 113 10 24 12 15 28 11 27 4 10 15
110 127 10 22 24 17 23 22 23 4 10 24
111 126 10 23 18 8 28 27 26 4 15 14
112 119 10 22 20 10 24 25 23 5 11 15
113 97 10 20 16 12 18 18 17 4 13 11
114 105 10 18 20 12 20 20 21 6 14 15
115 140 10 25 22 20 28 24 25 4 18 12
116 91 10 18 12 12 21 10 23 5 16 10
117 112 10 16 16 12 21 27 27 7 14 14
118 113 10 20 17 14 25 21 24 8 14 13
119 102 10 19 22 6 19 21 20 5 14 9
120 92 10 15 12 10 18 18 27 8 14 15
121 98 10 19 14 18 21 15 21 10 12 15
122 122 10 19 23 18 22 24 24 8 14 14
123 100 10 16 15 7 24 22 21 5 15 11
124 84 10 17 17 18 15 14 15 12 15 8
125 142 10 28 28 9 28 28 25 4 15 11
126 124 10 23 20 17 26 18 25 5 13 11
127 137 10 25 23 22 23 26 22 4 17 8
128 105 10 20 13 11 26 17 24 6 17 10
129 106 10 17 18 15 20 19 21 4 19 11
130 125 10 23 23 17 22 22 22 4 15 13
131 104 10 16 19 15 20 18 23 7 13 11
132 130 10 23 23 22 23 24 22 7 9 20
133 79 10 11 12 9 22 15 20 10 15 10
134 108 10 18 16 13 24 18 23 4 15 15
135 136 10 24 23 20 23 26 25 5 15 12
136 98 10 23 13 14 22 11 23 8 16 14
137 120 10 21 22 14 26 26 22 11 11 23
138 108 10 16 18 12 23 21 25 7 14 14
139 139 10 24 23 20 27 23 26 4 11 16
140 123 10 23 20 20 23 23 22 8 15 11
141 90 10 18 10 8 21 15 24 6 13 12
142 119 10 20 17 17 26 22 24 7 15 10
143 105 10 9 18 9 23 26 25 5 16 14
144 110 10 24 15 18 21 16 20 4 14 12
145 135 10 25 23 22 27 20 26 8 15 12
146 101 10 20 17 10 19 18 21 4 16 11
147 114 10 21 17 13 23 22 26 8 16 12
148 118 10 25 22 15 25 16 21 6 11 13
149 120 10 22 20 18 23 19 22 4 12 11
150 108 10 21 20 18 22 20 16 9 9 19
151 114 10 21 19 12 22 19 26 5 16 12
152 122 10 22 18 12 25 23 28 6 13 17
153 132 10 27 22 20 25 24 18 4 16 9
154 130 9 24 20 12 28 25 25 4 12 12
155 130 10 24 22 16 28 21 23 4 9 19
156 112 10 21 18 16 20 21 21 5 13 18
157 114 10 18 16 18 25 23 20 6 13 15
158 103 10 16 16 16 19 27 25 16 14 14
159 115 10 22 16 13 25 23 22 6 19 11
160 108 10 20 16 17 22 18 21 6 13 9
161 94 10 18 17 13 18 16 16 4 12 18
162 105 11 20 18 17 20 16 18 4 13 16
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Month I1 I2 I3 E1
9.1463 -1.8148 0.6604 0.9133 1.2186 1.3791
E2 E3 A Happiness Depression
1.0589 0.8084 -0.9043 0.1065 0.4155
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-110.442 -0.491 0.773 2.002 5.733
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 9.1463 17.4612 0.524 0.601180
Month -1.8148 1.4936 -1.215 0.226258
I1 0.6604 0.2999 2.202 0.029154 *
I2 0.9133 0.2586 3.531 0.000548 ***
I3 1.2186 0.2037 5.983 1.53e-08 ***
E1 1.3791 0.2880 4.789 3.96e-06 ***
E2 1.0589 0.2206 4.799 3.79e-06 ***
E3 0.8084 0.2275 3.553 0.000509 ***
A -0.9043 0.3161 -2.861 0.004827 **
Happiness 0.1065 0.3754 0.284 0.777049
Depression 0.4155 0.2833 1.466 0.144601
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 9.211 on 151 degrees of freedom
Multiple R-squared: 0.7651, Adjusted R-squared: 0.7495
F-statistic: 49.17 on 10 and 151 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,] 7.682911e-46 1.536582e-45 1.000000e+00
[2,] 7.739654e-61 1.547931e-60 1.000000e+00
[3,] 1.523333e-75 3.046666e-75 1.000000e+00
[4,] 1.493138e-94 2.986276e-94 1.000000e+00
[5,] 1.252132e-110 2.504265e-110 1.000000e+00
[6,] 3.524430e-119 7.048860e-119 1.000000e+00
[7,] 4.435090e-134 8.870180e-134 1.000000e+00
[8,] 1.071657e-152 2.143313e-152 1.000000e+00
[9,] 3.079642e-171 6.159284e-171 1.000000e+00
[10,] 6.279311e-178 1.255862e-177 1.000000e+00
[11,] 4.161962e-194 8.323924e-194 1.000000e+00
[12,] 1.422651e-216 2.845302e-216 1.000000e+00
[13,] 9.037209e-230 1.807442e-229 1.000000e+00
[14,] 4.810812e-244 9.621625e-244 1.000000e+00
[15,] 1.680098e-261 3.360195e-261 1.000000e+00
[16,] 5.785384e-266 1.157077e-265 1.000000e+00
[17,] 1.327401e-294 2.654801e-294 1.000000e+00
[18,] 2.521932e-308 5.043863e-308 1.000000e+00
[19,] 9.387247e-323 1.877449e-322 1.000000e+00
[20,] 0.000000e+00 0.000000e+00 1.000000e+00
[21,] 0.000000e+00 0.000000e+00 1.000000e+00
[22,] 0.000000e+00 0.000000e+00 1.000000e+00
[23,] 0.000000e+00 0.000000e+00 1.000000e+00
[24,] 0.000000e+00 0.000000e+00 1.000000e+00
[25,] 0.000000e+00 0.000000e+00 1.000000e+00
[26,] 0.000000e+00 0.000000e+00 1.000000e+00
[27,] 0.000000e+00 0.000000e+00 1.000000e+00
[28,] 0.000000e+00 0.000000e+00 1.000000e+00
[29,] 0.000000e+00 0.000000e+00 1.000000e+00
[30,] 0.000000e+00 0.000000e+00 1.000000e+00
[31,] 0.000000e+00 0.000000e+00 1.000000e+00
[32,] 0.000000e+00 0.000000e+00 1.000000e+00
[33,] 0.000000e+00 0.000000e+00 1.000000e+00
[34,] 0.000000e+00 0.000000e+00 1.000000e+00
[35,] 0.000000e+00 0.000000e+00 1.000000e+00
[36,] 0.000000e+00 0.000000e+00 1.000000e+00
[37,] 0.000000e+00 0.000000e+00 1.000000e+00
[38,] 0.000000e+00 0.000000e+00 1.000000e+00
[39,] 0.000000e+00 0.000000e+00 1.000000e+00
[40,] 0.000000e+00 0.000000e+00 1.000000e+00
[41,] 0.000000e+00 0.000000e+00 1.000000e+00
[42,] 0.000000e+00 0.000000e+00 1.000000e+00
[43,] 0.000000e+00 0.000000e+00 1.000000e+00
[44,] 0.000000e+00 0.000000e+00 1.000000e+00
[45,] 0.000000e+00 0.000000e+00 1.000000e+00
[46,] 0.000000e+00 0.000000e+00 1.000000e+00
[47,] 0.000000e+00 0.000000e+00 1.000000e+00
[48,] 0.000000e+00 0.000000e+00 1.000000e+00
[49,] 0.000000e+00 0.000000e+00 1.000000e+00
[50,] 0.000000e+00 0.000000e+00 1.000000e+00
[51,] 0.000000e+00 0.000000e+00 1.000000e+00
[52,] 0.000000e+00 0.000000e+00 1.000000e+00
[53,] 0.000000e+00 0.000000e+00 1.000000e+00
[54,] 0.000000e+00 0.000000e+00 1.000000e+00
[55,] 0.000000e+00 0.000000e+00 1.000000e+00
[56,] 0.000000e+00 0.000000e+00 1.000000e+00
[57,] 0.000000e+00 0.000000e+00 1.000000e+00
[58,] 0.000000e+00 0.000000e+00 1.000000e+00
[59,] 0.000000e+00 0.000000e+00 1.000000e+00
[60,] 0.000000e+00 0.000000e+00 1.000000e+00
[61,] 0.000000e+00 0.000000e+00 1.000000e+00
[62,] 0.000000e+00 0.000000e+00 1.000000e+00
[63,] 0.000000e+00 0.000000e+00 1.000000e+00
[64,] 0.000000e+00 0.000000e+00 1.000000e+00
[65,] 0.000000e+00 0.000000e+00 1.000000e+00
[66,] 0.000000e+00 0.000000e+00 1.000000e+00
[67,] 0.000000e+00 0.000000e+00 1.000000e+00
[68,] 0.000000e+00 0.000000e+00 1.000000e+00
[69,] 0.000000e+00 0.000000e+00 1.000000e+00
[70,] 1.000000e+00 0.000000e+00 0.000000e+00
[71,] 1.000000e+00 0.000000e+00 0.000000e+00
[72,] 1.000000e+00 0.000000e+00 0.000000e+00
[73,] 1.000000e+00 0.000000e+00 0.000000e+00
[74,] 1.000000e+00 0.000000e+00 0.000000e+00
[75,] 1.000000e+00 0.000000e+00 0.000000e+00
[76,] 1.000000e+00 0.000000e+00 0.000000e+00
[77,] 1.000000e+00 0.000000e+00 0.000000e+00
[78,] 1.000000e+00 0.000000e+00 0.000000e+00
[79,] 1.000000e+00 0.000000e+00 0.000000e+00
[80,] 1.000000e+00 0.000000e+00 0.000000e+00
[81,] 1.000000e+00 0.000000e+00 0.000000e+00
[82,] 1.000000e+00 0.000000e+00 0.000000e+00
[83,] 1.000000e+00 0.000000e+00 0.000000e+00
[84,] 1.000000e+00 0.000000e+00 0.000000e+00
[85,] 1.000000e+00 0.000000e+00 0.000000e+00
[86,] 1.000000e+00 0.000000e+00 0.000000e+00
[87,] 1.000000e+00 0.000000e+00 0.000000e+00
[88,] 1.000000e+00 0.000000e+00 0.000000e+00
[89,] 1.000000e+00 0.000000e+00 0.000000e+00
[90,] 1.000000e+00 0.000000e+00 0.000000e+00
[91,] 1.000000e+00 0.000000e+00 0.000000e+00
[92,] 1.000000e+00 0.000000e+00 0.000000e+00
[93,] 1.000000e+00 0.000000e+00 0.000000e+00
[94,] 1.000000e+00 0.000000e+00 0.000000e+00
[95,] 1.000000e+00 0.000000e+00 0.000000e+00
[96,] 1.000000e+00 0.000000e+00 0.000000e+00
[97,] 1.000000e+00 0.000000e+00 0.000000e+00
[98,] 1.000000e+00 0.000000e+00 0.000000e+00
[99,] 1.000000e+00 0.000000e+00 0.000000e+00
[100,] 1.000000e+00 0.000000e+00 0.000000e+00
[101,] 1.000000e+00 0.000000e+00 0.000000e+00
[102,] 1.000000e+00 0.000000e+00 0.000000e+00
[103,] 1.000000e+00 0.000000e+00 0.000000e+00
[104,] 1.000000e+00 0.000000e+00 0.000000e+00
[105,] 1.000000e+00 0.000000e+00 0.000000e+00
[106,] 1.000000e+00 0.000000e+00 0.000000e+00
[107,] 1.000000e+00 0.000000e+00 0.000000e+00
[108,] 1.000000e+00 0.000000e+00 0.000000e+00
[109,] 1.000000e+00 0.000000e+00 0.000000e+00
[110,] 1.000000e+00 0.000000e+00 0.000000e+00
[111,] 1.000000e+00 0.000000e+00 0.000000e+00
[112,] 1.000000e+00 0.000000e+00 0.000000e+00
[113,] 1.000000e+00 0.000000e+00 0.000000e+00
[114,] 1.000000e+00 0.000000e+00 0.000000e+00
[115,] 1.000000e+00 0.000000e+00 0.000000e+00
[116,] 1.000000e+00 0.000000e+00 0.000000e+00
[117,] 1.000000e+00 1.570714e-313 7.853571e-314
[118,] 1.000000e+00 2.383735e-302 1.191868e-302
[119,] 1.000000e+00 1.215229e-285 6.076145e-286
[120,] 1.000000e+00 2.800914e-265 1.400457e-265
[121,] 1.000000e+00 1.573345e-266 7.866724e-267
[122,] 1.000000e+00 1.477946e-248 7.389729e-249
[123,] 1.000000e+00 1.931102e-226 9.655510e-227
[124,] 1.000000e+00 4.363949e-209 2.181975e-209
[125,] 1.000000e+00 3.967779e-198 1.983889e-198
[126,] 1.000000e+00 5.036578e-183 2.518289e-183
[127,] 1.000000e+00 3.990999e-164 1.995500e-164
[128,] 1.000000e+00 5.522143e-149 2.761072e-149
[129,] 1.000000e+00 3.912017e-140 1.956008e-140
[130,] 1.000000e+00 1.921132e-124 9.605659e-125
[131,] 1.000000e+00 7.189026e-110 3.594513e-110
[132,] 1.000000e+00 3.541868e-94 1.770934e-94
[133,] 1.000000e+00 1.143223e-75 5.716116e-76
[134,] 1.000000e+00 4.221994e-60 2.110997e-60
[135,] 1.000000e+00 6.990665e-48 3.495332e-48
> postscript(file="/var/wessaorg/rcomp/tmp/1hj7x1353437364.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/24k271353437364.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/3qcg91353437364.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/4lk6k1353437364.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/570cn1353437364.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 = 162
Frequency = 1
1 2 3 4 5
1.07317731 -1.05056899 -1.77898615 0.97057614 -3.25557489
6 7 8 9 10
-1.43742363 -2.06551719 -3.19943020 2.68448853 0.23062380
11 12 13 14 15
0.67577091 1.75640484 -2.81907245 0.75428567 -0.16074796
16 17 18 19 20
-0.36769046 -2.39170839 -0.37157529 2.81185622 -1.40659593
21 22 23 24 25
2.14873027 -1.33944903 -2.55633654 -0.95216657 -1.12778821
26 27 28 29 30
1.51033864 -0.06609474 2.34019897 4.22749656 -0.01903853
31 32 33 34 35
0.54862423 -1.34290016 -1.83160987 -0.80001993 1.93457427
36 37 38 39 40
0.49299387 -1.66807173 -0.76010286 0.43824030 0.62842097
41 42 43 44 45
-0.25875842 1.66737684 1.74098002 0.05234289 3.77176640
46 47 48 49 50
-0.79377081 0.81114585 3.16028303 -3.02279864 0.18286839
51 52 53 54 55
-0.94933531 -1.23610979 -1.87820289 -3.83498626 1.32578857
56 57 58 59 60
0.23238556 -1.17500755 3.20168460 2.23673022 3.27821005
61 62 63 64 65
2.55284611 0.73496876 0.74788727 -0.11520004 -3.43356234
66 67 68 69 70
2.83693269 -0.73590703 1.81159065 1.08199533 -0.34061070
71 72 73 74 75
0.24325710 0.79215253 3.13002950 -0.04250040 1.96330208
76 77 78 79 80
-1.84645846 0.61090820 -0.86325498 0.52995856 1.54728301
81 82 83 84 85
2.26161461 2.02542265 -110.44210492 1.27384605 -0.22725935
86 87 88 89 90
2.19689144 1.93207055 1.42853292 0.23882531 -0.09579603
91 92 93 94 95
1.90384060 1.58034189 0.82843145 -0.89722918 0.82581424
96 97 98 99 100
1.41891746 2.43494299 2.04280741 1.52199619 2.62037082
101 102 103 104 105
2.63489855 2.90323603 2.63628299 1.89642419 -0.12856322
106 107 108 109 110
-1.31383807 1.29521611 -0.41207827 1.14386159 -2.19042590
111 112 113 114 115
1.60376452 1.97444656 3.59315668 1.19134466 0.50332399
116 117 118 119 120
3.05101194 0.84366008 0.43345171 5.73298913 1.75045504
121 122 123 124 125
-0.55506847 0.28476829 1.18878978 2.60719633 4.94586829
126 127 128 129 130
2.27021651 3.12417663 1.71729167 1.40249954 2.28796983
131 132 133 134 135
1.94354852 -1.85834290 -0.29052537 -0.30440401 2.25184170
136 137 138 139 140
2.01138519 -3.97283237 0.22893199 -0.03657015 1.38248385
141 142 143 144 145
3.04193401 0.57547770 -1.80834882 2.58667150 0.89574768
146 147 148 149 150
4.18482673 2.27658862 2.57659275 2.41781239 -2.23413635
151 152 153 154 155
3.51131028 0.92094820 2.43798287 0.50426829 -1.11859475
156 157 158 159 160
0.05923046 -2.62393271 -0.51691139 1.23346354 2.38999503
161 162
-0.09372129 1.96213260
> postscript(file="/var/wessaorg/rcomp/tmp/68h8z1353437364.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 = 162
Frequency = 1
lag(myerror, k = 1) myerror
0 1.07317731 NA
1 -1.05056899 1.07317731
2 -1.77898615 -1.05056899
3 0.97057614 -1.77898615
4 -3.25557489 0.97057614
5 -1.43742363 -3.25557489
6 -2.06551719 -1.43742363
7 -3.19943020 -2.06551719
8 2.68448853 -3.19943020
9 0.23062380 2.68448853
10 0.67577091 0.23062380
11 1.75640484 0.67577091
12 -2.81907245 1.75640484
13 0.75428567 -2.81907245
14 -0.16074796 0.75428567
15 -0.36769046 -0.16074796
16 -2.39170839 -0.36769046
17 -0.37157529 -2.39170839
18 2.81185622 -0.37157529
19 -1.40659593 2.81185622
20 2.14873027 -1.40659593
21 -1.33944903 2.14873027
22 -2.55633654 -1.33944903
23 -0.95216657 -2.55633654
24 -1.12778821 -0.95216657
25 1.51033864 -1.12778821
26 -0.06609474 1.51033864
27 2.34019897 -0.06609474
28 4.22749656 2.34019897
29 -0.01903853 4.22749656
30 0.54862423 -0.01903853
31 -1.34290016 0.54862423
32 -1.83160987 -1.34290016
33 -0.80001993 -1.83160987
34 1.93457427 -0.80001993
35 0.49299387 1.93457427
36 -1.66807173 0.49299387
37 -0.76010286 -1.66807173
38 0.43824030 -0.76010286
39 0.62842097 0.43824030
40 -0.25875842 0.62842097
41 1.66737684 -0.25875842
42 1.74098002 1.66737684
43 0.05234289 1.74098002
44 3.77176640 0.05234289
45 -0.79377081 3.77176640
46 0.81114585 -0.79377081
47 3.16028303 0.81114585
48 -3.02279864 3.16028303
49 0.18286839 -3.02279864
50 -0.94933531 0.18286839
51 -1.23610979 -0.94933531
52 -1.87820289 -1.23610979
53 -3.83498626 -1.87820289
54 1.32578857 -3.83498626
55 0.23238556 1.32578857
56 -1.17500755 0.23238556
57 3.20168460 -1.17500755
58 2.23673022 3.20168460
59 3.27821005 2.23673022
60 2.55284611 3.27821005
61 0.73496876 2.55284611
62 0.74788727 0.73496876
63 -0.11520004 0.74788727
64 -3.43356234 -0.11520004
65 2.83693269 -3.43356234
66 -0.73590703 2.83693269
67 1.81159065 -0.73590703
68 1.08199533 1.81159065
69 -0.34061070 1.08199533
70 0.24325710 -0.34061070
71 0.79215253 0.24325710
72 3.13002950 0.79215253
73 -0.04250040 3.13002950
74 1.96330208 -0.04250040
75 -1.84645846 1.96330208
76 0.61090820 -1.84645846
77 -0.86325498 0.61090820
78 0.52995856 -0.86325498
79 1.54728301 0.52995856
80 2.26161461 1.54728301
81 2.02542265 2.26161461
82 -110.44210492 2.02542265
83 1.27384605 -110.44210492
84 -0.22725935 1.27384605
85 2.19689144 -0.22725935
86 1.93207055 2.19689144
87 1.42853292 1.93207055
88 0.23882531 1.42853292
89 -0.09579603 0.23882531
90 1.90384060 -0.09579603
91 1.58034189 1.90384060
92 0.82843145 1.58034189
93 -0.89722918 0.82843145
94 0.82581424 -0.89722918
95 1.41891746 0.82581424
96 2.43494299 1.41891746
97 2.04280741 2.43494299
98 1.52199619 2.04280741
99 2.62037082 1.52199619
100 2.63489855 2.62037082
101 2.90323603 2.63489855
102 2.63628299 2.90323603
103 1.89642419 2.63628299
104 -0.12856322 1.89642419
105 -1.31383807 -0.12856322
106 1.29521611 -1.31383807
107 -0.41207827 1.29521611
108 1.14386159 -0.41207827
109 -2.19042590 1.14386159
110 1.60376452 -2.19042590
111 1.97444656 1.60376452
112 3.59315668 1.97444656
113 1.19134466 3.59315668
114 0.50332399 1.19134466
115 3.05101194 0.50332399
116 0.84366008 3.05101194
117 0.43345171 0.84366008
118 5.73298913 0.43345171
119 1.75045504 5.73298913
120 -0.55506847 1.75045504
121 0.28476829 -0.55506847
122 1.18878978 0.28476829
123 2.60719633 1.18878978
124 4.94586829 2.60719633
125 2.27021651 4.94586829
126 3.12417663 2.27021651
127 1.71729167 3.12417663
128 1.40249954 1.71729167
129 2.28796983 1.40249954
130 1.94354852 2.28796983
131 -1.85834290 1.94354852
132 -0.29052537 -1.85834290
133 -0.30440401 -0.29052537
134 2.25184170 -0.30440401
135 2.01138519 2.25184170
136 -3.97283237 2.01138519
137 0.22893199 -3.97283237
138 -0.03657015 0.22893199
139 1.38248385 -0.03657015
140 3.04193401 1.38248385
141 0.57547770 3.04193401
142 -1.80834882 0.57547770
143 2.58667150 -1.80834882
144 0.89574768 2.58667150
145 4.18482673 0.89574768
146 2.27658862 4.18482673
147 2.57659275 2.27658862
148 2.41781239 2.57659275
149 -2.23413635 2.41781239
150 3.51131028 -2.23413635
151 0.92094820 3.51131028
152 2.43798287 0.92094820
153 0.50426829 2.43798287
154 -1.11859475 0.50426829
155 0.05923046 -1.11859475
156 -2.62393271 0.05923046
157 -0.51691139 -2.62393271
158 1.23346354 -0.51691139
159 2.38999503 1.23346354
160 -0.09372129 2.38999503
161 1.96213260 -0.09372129
162 NA 1.96213260
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -1.05056899 1.07317731
[2,] -1.77898615 -1.05056899
[3,] 0.97057614 -1.77898615
[4,] -3.25557489 0.97057614
[5,] -1.43742363 -3.25557489
[6,] -2.06551719 -1.43742363
[7,] -3.19943020 -2.06551719
[8,] 2.68448853 -3.19943020
[9,] 0.23062380 2.68448853
[10,] 0.67577091 0.23062380
[11,] 1.75640484 0.67577091
[12,] -2.81907245 1.75640484
[13,] 0.75428567 -2.81907245
[14,] -0.16074796 0.75428567
[15,] -0.36769046 -0.16074796
[16,] -2.39170839 -0.36769046
[17,] -0.37157529 -2.39170839
[18,] 2.81185622 -0.37157529
[19,] -1.40659593 2.81185622
[20,] 2.14873027 -1.40659593
[21,] -1.33944903 2.14873027
[22,] -2.55633654 -1.33944903
[23,] -0.95216657 -2.55633654
[24,] -1.12778821 -0.95216657
[25,] 1.51033864 -1.12778821
[26,] -0.06609474 1.51033864
[27,] 2.34019897 -0.06609474
[28,] 4.22749656 2.34019897
[29,] -0.01903853 4.22749656
[30,] 0.54862423 -0.01903853
[31,] -1.34290016 0.54862423
[32,] -1.83160987 -1.34290016
[33,] -0.80001993 -1.83160987
[34,] 1.93457427 -0.80001993
[35,] 0.49299387 1.93457427
[36,] -1.66807173 0.49299387
[37,] -0.76010286 -1.66807173
[38,] 0.43824030 -0.76010286
[39,] 0.62842097 0.43824030
[40,] -0.25875842 0.62842097
[41,] 1.66737684 -0.25875842
[42,] 1.74098002 1.66737684
[43,] 0.05234289 1.74098002
[44,] 3.77176640 0.05234289
[45,] -0.79377081 3.77176640
[46,] 0.81114585 -0.79377081
[47,] 3.16028303 0.81114585
[48,] -3.02279864 3.16028303
[49,] 0.18286839 -3.02279864
[50,] -0.94933531 0.18286839
[51,] -1.23610979 -0.94933531
[52,] -1.87820289 -1.23610979
[53,] -3.83498626 -1.87820289
[54,] 1.32578857 -3.83498626
[55,] 0.23238556 1.32578857
[56,] -1.17500755 0.23238556
[57,] 3.20168460 -1.17500755
[58,] 2.23673022 3.20168460
[59,] 3.27821005 2.23673022
[60,] 2.55284611 3.27821005
[61,] 0.73496876 2.55284611
[62,] 0.74788727 0.73496876
[63,] -0.11520004 0.74788727
[64,] -3.43356234 -0.11520004
[65,] 2.83693269 -3.43356234
[66,] -0.73590703 2.83693269
[67,] 1.81159065 -0.73590703
[68,] 1.08199533 1.81159065
[69,] -0.34061070 1.08199533
[70,] 0.24325710 -0.34061070
[71,] 0.79215253 0.24325710
[72,] 3.13002950 0.79215253
[73,] -0.04250040 3.13002950
[74,] 1.96330208 -0.04250040
[75,] -1.84645846 1.96330208
[76,] 0.61090820 -1.84645846
[77,] -0.86325498 0.61090820
[78,] 0.52995856 -0.86325498
[79,] 1.54728301 0.52995856
[80,] 2.26161461 1.54728301
[81,] 2.02542265 2.26161461
[82,] -110.44210492 2.02542265
[83,] 1.27384605 -110.44210492
[84,] -0.22725935 1.27384605
[85,] 2.19689144 -0.22725935
[86,] 1.93207055 2.19689144
[87,] 1.42853292 1.93207055
[88,] 0.23882531 1.42853292
[89,] -0.09579603 0.23882531
[90,] 1.90384060 -0.09579603
[91,] 1.58034189 1.90384060
[92,] 0.82843145 1.58034189
[93,] -0.89722918 0.82843145
[94,] 0.82581424 -0.89722918
[95,] 1.41891746 0.82581424
[96,] 2.43494299 1.41891746
[97,] 2.04280741 2.43494299
[98,] 1.52199619 2.04280741
[99,] 2.62037082 1.52199619
[100,] 2.63489855 2.62037082
[101,] 2.90323603 2.63489855
[102,] 2.63628299 2.90323603
[103,] 1.89642419 2.63628299
[104,] -0.12856322 1.89642419
[105,] -1.31383807 -0.12856322
[106,] 1.29521611 -1.31383807
[107,] -0.41207827 1.29521611
[108,] 1.14386159 -0.41207827
[109,] -2.19042590 1.14386159
[110,] 1.60376452 -2.19042590
[111,] 1.97444656 1.60376452
[112,] 3.59315668 1.97444656
[113,] 1.19134466 3.59315668
[114,] 0.50332399 1.19134466
[115,] 3.05101194 0.50332399
[116,] 0.84366008 3.05101194
[117,] 0.43345171 0.84366008
[118,] 5.73298913 0.43345171
[119,] 1.75045504 5.73298913
[120,] -0.55506847 1.75045504
[121,] 0.28476829 -0.55506847
[122,] 1.18878978 0.28476829
[123,] 2.60719633 1.18878978
[124,] 4.94586829 2.60719633
[125,] 2.27021651 4.94586829
[126,] 3.12417663 2.27021651
[127,] 1.71729167 3.12417663
[128,] 1.40249954 1.71729167
[129,] 2.28796983 1.40249954
[130,] 1.94354852 2.28796983
[131,] -1.85834290 1.94354852
[132,] -0.29052537 -1.85834290
[133,] -0.30440401 -0.29052537
[134,] 2.25184170 -0.30440401
[135,] 2.01138519 2.25184170
[136,] -3.97283237 2.01138519
[137,] 0.22893199 -3.97283237
[138,] -0.03657015 0.22893199
[139,] 1.38248385 -0.03657015
[140,] 3.04193401 1.38248385
[141,] 0.57547770 3.04193401
[142,] -1.80834882 0.57547770
[143,] 2.58667150 -1.80834882
[144,] 0.89574768 2.58667150
[145,] 4.18482673 0.89574768
[146,] 2.27658862 4.18482673
[147,] 2.57659275 2.27658862
[148,] 2.41781239 2.57659275
[149,] -2.23413635 2.41781239
[150,] 3.51131028 -2.23413635
[151,] 0.92094820 3.51131028
[152,] 2.43798287 0.92094820
[153,] 0.50426829 2.43798287
[154,] -1.11859475 0.50426829
[155,] 0.05923046 -1.11859475
[156,] -2.62393271 0.05923046
[157,] -0.51691139 -2.62393271
[158,] 1.23346354 -0.51691139
[159,] 2.38999503 1.23346354
[160,] -0.09372129 2.38999503
[161,] 1.96213260 -0.09372129
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -1.05056899 1.07317731
2 -1.77898615 -1.05056899
3 0.97057614 -1.77898615
4 -3.25557489 0.97057614
5 -1.43742363 -3.25557489
6 -2.06551719 -1.43742363
7 -3.19943020 -2.06551719
8 2.68448853 -3.19943020
9 0.23062380 2.68448853
10 0.67577091 0.23062380
11 1.75640484 0.67577091
12 -2.81907245 1.75640484
13 0.75428567 -2.81907245
14 -0.16074796 0.75428567
15 -0.36769046 -0.16074796
16 -2.39170839 -0.36769046
17 -0.37157529 -2.39170839
18 2.81185622 -0.37157529
19 -1.40659593 2.81185622
20 2.14873027 -1.40659593
21 -1.33944903 2.14873027
22 -2.55633654 -1.33944903
23 -0.95216657 -2.55633654
24 -1.12778821 -0.95216657
25 1.51033864 -1.12778821
26 -0.06609474 1.51033864
27 2.34019897 -0.06609474
28 4.22749656 2.34019897
29 -0.01903853 4.22749656
30 0.54862423 -0.01903853
31 -1.34290016 0.54862423
32 -1.83160987 -1.34290016
33 -0.80001993 -1.83160987
34 1.93457427 -0.80001993
35 0.49299387 1.93457427
36 -1.66807173 0.49299387
37 -0.76010286 -1.66807173
38 0.43824030 -0.76010286
39 0.62842097 0.43824030
40 -0.25875842 0.62842097
41 1.66737684 -0.25875842
42 1.74098002 1.66737684
43 0.05234289 1.74098002
44 3.77176640 0.05234289
45 -0.79377081 3.77176640
46 0.81114585 -0.79377081
47 3.16028303 0.81114585
48 -3.02279864 3.16028303
49 0.18286839 -3.02279864
50 -0.94933531 0.18286839
51 -1.23610979 -0.94933531
52 -1.87820289 -1.23610979
53 -3.83498626 -1.87820289
54 1.32578857 -3.83498626
55 0.23238556 1.32578857
56 -1.17500755 0.23238556
57 3.20168460 -1.17500755
58 2.23673022 3.20168460
59 3.27821005 2.23673022
60 2.55284611 3.27821005
61 0.73496876 2.55284611
62 0.74788727 0.73496876
63 -0.11520004 0.74788727
64 -3.43356234 -0.11520004
65 2.83693269 -3.43356234
66 -0.73590703 2.83693269
67 1.81159065 -0.73590703
68 1.08199533 1.81159065
69 -0.34061070 1.08199533
70 0.24325710 -0.34061070
71 0.79215253 0.24325710
72 3.13002950 0.79215253
73 -0.04250040 3.13002950
74 1.96330208 -0.04250040
75 -1.84645846 1.96330208
76 0.61090820 -1.84645846
77 -0.86325498 0.61090820
78 0.52995856 -0.86325498
79 1.54728301 0.52995856
80 2.26161461 1.54728301
81 2.02542265 2.26161461
82 -110.44210492 2.02542265
83 1.27384605 -110.44210492
84 -0.22725935 1.27384605
85 2.19689144 -0.22725935
86 1.93207055 2.19689144
87 1.42853292 1.93207055
88 0.23882531 1.42853292
89 -0.09579603 0.23882531
90 1.90384060 -0.09579603
91 1.58034189 1.90384060
92 0.82843145 1.58034189
93 -0.89722918 0.82843145
94 0.82581424 -0.89722918
95 1.41891746 0.82581424
96 2.43494299 1.41891746
97 2.04280741 2.43494299
98 1.52199619 2.04280741
99 2.62037082 1.52199619
100 2.63489855 2.62037082
101 2.90323603 2.63489855
102 2.63628299 2.90323603
103 1.89642419 2.63628299
104 -0.12856322 1.89642419
105 -1.31383807 -0.12856322
106 1.29521611 -1.31383807
107 -0.41207827 1.29521611
108 1.14386159 -0.41207827
109 -2.19042590 1.14386159
110 1.60376452 -2.19042590
111 1.97444656 1.60376452
112 3.59315668 1.97444656
113 1.19134466 3.59315668
114 0.50332399 1.19134466
115 3.05101194 0.50332399
116 0.84366008 3.05101194
117 0.43345171 0.84366008
118 5.73298913 0.43345171
119 1.75045504 5.73298913
120 -0.55506847 1.75045504
121 0.28476829 -0.55506847
122 1.18878978 0.28476829
123 2.60719633 1.18878978
124 4.94586829 2.60719633
125 2.27021651 4.94586829
126 3.12417663 2.27021651
127 1.71729167 3.12417663
128 1.40249954 1.71729167
129 2.28796983 1.40249954
130 1.94354852 2.28796983
131 -1.85834290 1.94354852
132 -0.29052537 -1.85834290
133 -0.30440401 -0.29052537
134 2.25184170 -0.30440401
135 2.01138519 2.25184170
136 -3.97283237 2.01138519
137 0.22893199 -3.97283237
138 -0.03657015 0.22893199
139 1.38248385 -0.03657015
140 3.04193401 1.38248385
141 0.57547770 3.04193401
142 -1.80834882 0.57547770
143 2.58667150 -1.80834882
144 0.89574768 2.58667150
145 4.18482673 0.89574768
146 2.27658862 4.18482673
147 2.57659275 2.27658862
148 2.41781239 2.57659275
149 -2.23413635 2.41781239
150 3.51131028 -2.23413635
151 0.92094820 3.51131028
152 2.43798287 0.92094820
153 0.50426829 2.43798287
154 -1.11859475 0.50426829
155 0.05923046 -1.11859475
156 -2.62393271 0.05923046
157 -0.51691139 -2.62393271
158 1.23346354 -0.51691139
159 2.38999503 1.23346354
160 -0.09372129 2.38999503
161 1.96213260 -0.09372129
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/7jcme1353437364.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/8705k1353437364.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/9e8we1353437364.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/wessaorg/rcomp/tmp/102bt81353437364.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/wessaorg/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/11q7fv1353437364.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/12vle41353437364.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/13htry1353437364.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/147evp1353437364.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/153i6f1353437364.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/16wy2q1353437364.tab")
+ }
>
> try(system("convert tmp/1hj7x1353437364.ps tmp/1hj7x1353437364.png",intern=TRUE))
character(0)
> try(system("convert tmp/24k271353437364.ps tmp/24k271353437364.png",intern=TRUE))
character(0)
> try(system("convert tmp/3qcg91353437364.ps tmp/3qcg91353437364.png",intern=TRUE))
character(0)
> try(system("convert tmp/4lk6k1353437364.ps tmp/4lk6k1353437364.png",intern=TRUE))
character(0)
> try(system("convert tmp/570cn1353437364.ps tmp/570cn1353437364.png",intern=TRUE))
character(0)
> try(system("convert tmp/68h8z1353437364.ps tmp/68h8z1353437364.png",intern=TRUE))
character(0)
> try(system("convert tmp/7jcme1353437364.ps tmp/7jcme1353437364.png",intern=TRUE))
character(0)
> try(system("convert tmp/8705k1353437364.ps tmp/8705k1353437364.png",intern=TRUE))
character(0)
> try(system("convert tmp/9e8we1353437364.ps tmp/9e8we1353437364.png",intern=TRUE))
character(0)
> try(system("convert tmp/102bt81353437364.ps tmp/102bt81353437364.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
10.377 1.123 11.507