R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
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(41
+ ,38
+ ,13
+ ,14
+ ,12
+ ,39
+ ,32
+ ,16
+ ,18
+ ,11
+ ,30
+ ,35
+ ,19
+ ,11
+ ,14
+ ,31
+ ,33
+ ,15
+ ,12
+ ,12
+ ,34
+ ,37
+ ,14
+ ,16
+ ,21
+ ,35
+ ,29
+ ,13
+ ,18
+ ,12
+ ,39
+ ,31
+ ,19
+ ,14
+ ,22
+ ,34
+ ,36
+ ,15
+ ,14
+ ,11
+ ,36
+ ,35
+ ,14
+ ,15
+ ,10
+ ,37
+ ,38
+ ,15
+ ,15
+ ,13
+ ,38
+ ,31
+ ,16
+ ,17
+ ,10
+ ,36
+ ,34
+ ,16
+ ,19
+ ,8
+ ,38
+ ,35
+ ,16
+ ,10
+ ,15
+ ,39
+ ,38
+ ,16
+ ,16
+ ,14
+ ,33
+ ,37
+ ,17
+ ,18
+ ,10
+ ,32
+ ,33
+ ,15
+ ,14
+ ,14
+ ,36
+ ,32
+ ,15
+ ,14
+ ,14
+ ,38
+ ,38
+ ,20
+ ,17
+ ,11
+ ,39
+ ,38
+ ,18
+ ,14
+ ,10
+ ,32
+ ,32
+ ,16
+ ,16
+ ,13
+ ,32
+ ,33
+ ,16
+ ,18
+ ,9.5
+ ,31
+ ,31
+ ,16
+ ,11
+ ,14
+ ,39
+ ,38
+ ,19
+ ,14
+ ,12
+ ,37
+ ,39
+ ,16
+ ,12
+ ,14
+ ,39
+ ,32
+ ,17
+ ,17
+ ,11
+ ,41
+ ,32
+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c(5
+ ,264)
+ ,dimnames=list(c('Connected'
+ ,'Separate'
+ ,'Learning'
+ ,'Happiness'
+ ,'Depression')
+ ,1:264))
> y <- array(NA,dim=c(5,264),dimnames=list(c('Connected','Separate','Learning','Happiness','Depression'),1:264))
> 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 = '5'
> par3 <- 'No Linear Trend'
> par2 <- 'Do not include Seasonal Dummies'
> par1 <- '5'
> #'GNU S' R Code compiled by R2WASP v. 1.2.327 ()
> #Author: root
> #To cite this work: Wessa P., (2013), Multiple Regression (v1.0.29) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_multipleregression.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following objects 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
Depression Connected Separate Learning Happiness
1 12.0 41 38 13 14
2 11.0 39 32 16 18
3 14.0 30 35 19 11
4 12.0 31 33 15 12
5 21.0 34 37 14 16
6 12.0 35 29 13 18
7 22.0 39 31 19 14
8 11.0 34 36 15 14
9 10.0 36 35 14 15
10 13.0 37 38 15 15
11 10.0 38 31 16 17
12 8.0 36 34 16 19
13 15.0 38 35 16 10
14 14.0 39 38 16 16
15 10.0 33 37 17 18
16 14.0 32 33 15 14
17 14.0 36 32 15 14
18 11.0 38 38 20 17
19 10.0 39 38 18 14
20 13.0 32 32 16 16
21 9.5 32 33 16 18
22 14.0 31 31 16 11
23 12.0 39 38 19 14
24 14.0 37 39 16 12
25 11.0 39 32 17 17
26 9.0 41 32 17 9
27 11.0 36 35 16 16
28 15.0 33 37 15 14
29 14.0 33 33 16 15
30 13.0 34 33 14 11
31 9.0 31 31 15 16
32 15.0 27 32 12 13
33 10.0 37 31 14 17
34 11.0 34 37 16 15
35 13.0 34 30 14 14
36 8.0 32 33 10 16
37 20.0 29 31 10 9
38 12.0 36 33 14 15
39 10.0 29 31 16 17
40 10.0 35 33 16 13
41 9.0 37 32 16 15
42 14.0 34 33 14 16
43 8.0 38 32 20 16
44 14.0 35 33 14 12
45 11.0 38 28 14 15
46 13.0 37 35 11 11
47 9.0 38 39 14 15
48 11.0 33 34 15 15
49 15.0 36 38 16 17
50 11.0 38 32 14 13
51 10.0 32 38 16 16
52 14.0 32 30 14 14
53 18.0 32 33 12 11
54 14.0 34 38 16 12
55 11.0 32 32 9 12
56 14.5 37 35 14 15
57 13.0 39 34 16 16
58 9.0 29 34 16 15
59 10.0 37 36 15 12
60 15.0 35 34 16 12
61 20.0 30 28 12 8
62 12.0 38 34 16 13
63 12.0 34 35 16 11
64 14.0 31 35 14 14
65 13.0 34 31 16 15
66 11.0 35 37 17 10
67 17.0 36 35 18 11
68 12.0 30 27 18 12
69 13.0 39 40 12 15
70 14.0 35 37 16 15
71 13.0 38 36 10 14
72 15.0 31 38 14 16
73 13.0 34 39 18 15
74 10.0 38 41 18 15
75 11.0 34 27 16 13
76 19.0 39 30 17 12
77 13.0 37 37 16 17
78 17.0 34 31 16 13
79 13.0 28 31 13 15
80 9.0 37 27 16 13
81 11.0 33 36 16 15
82 9.0 35 37 16 15
83 12.0 37 33 15 16
84 12.0 32 34 15 15
85 13.0 33 31 16 14
86 13.0 38 39 14 15
87 12.0 33 34 16 14
88 15.0 29 32 16 13
89 22.0 33 33 15 7
90 13.0 31 36 12 17
91 15.0 36 32 17 13
92 13.0 35 41 16 15
93 15.0 32 28 15 14
94 12.5 29 30 13 13
95 11.0 39 36 16 16
96 16.0 37 35 16 12
97 11.0 35 31 16 14
98 11.0 37 34 16 17
99 10.0 32 36 14 15
100 10.0 38 36 16 17
101 16.0 37 35 16 12
102 12.0 36 37 20 16
103 11.0 32 28 15 11
104 16.0 33 39 16 15
105 19.0 40 32 13 9
106 11.0 38 35 17 16
107 16.0 41 39 16 15
108 15.0 36 35 16 10
109 24.0 43 42 12 10
110 14.0 30 34 16 15
111 15.0 31 33 16 11
112 11.0 32 41 17 13
113 15.0 32 33 13 14
114 12.0 37 34 12 18
115 10.0 37 32 18 16
116 14.0 33 40 14 14
117 13.0 34 40 14 14
118 9.0 33 35 13 14
119 15.0 38 36 16 14
120 15.0 33 37 13 12
121 14.0 31 27 16 14
122 11.0 38 39 13 15
123 8.0 37 38 16 15
124 11.0 36 31 15 15
125 11.0 31 33 16 13
126 8.0 39 32 15 17
127 10.0 44 39 17 17
128 11.0 33 36 15 19
129 13.0 35 33 12 15
130 11.0 32 33 16 13
131 20.0 28 32 10 9
132 10.0 40 37 16 15
133 15.0 27 30 12 15
134 12.0 37 38 14 15
135 14.0 32 29 15 16
136 23.0 28 22 13 11
137 14.0 34 35 15 14
138 16.0 30 35 11 11
139 11.0 35 34 12 15
140 12.0 31 35 11 13
141 10.0 32 34 16 15
142 14.0 30 37 15 16
143 12.0 30 35 17 14
144 12.0 31 23 16 15
145 11.0 40 31 10 16
146 12.0 32 27 18 16
147 13.0 36 36 13 11
148 11.0 32 31 16 12
149 19.0 35 32 13 9
150 12.0 38 39 10 16
151 17.0 42 37 15 13
152 9.0 34 38 16 16
153 12.0 35 39 16 12
154 19.0 38 34 14 9
155 18.0 33 31 10 13
156 15.0 36 32 17 13
157 14.0 32 37 13 14
158 11.0 33 36 15 19
159 9.0 34 32 16 13
160 18.0 32 38 12 12
161 16.0 34 36 13 13
162 24.0 27 26 13 10
163 14.0 31 26 12 14
164 20.0 38 33 17 16
165 18.0 34 39 15 10
166 23.0 24 30 10 11
167 12.0 30 33 14 14
168 14.0 26 25 11 12
169 16.0 34 38 13 9
170 18.0 27 37 16 9
171 20.0 37 31 12 11
172 12.0 36 37 16 16
173 12.0 41 35 12 9
174 17.0 29 25 9 13
175 13.0 36 28 12 16
176 9.0 32 35 15 13
177 16.0 37 33 12 9
178 18.0 30 30 12 12
179 10.0 31 31 14 16
180 14.0 38 37 12 11
181 11.0 36 36 16 14
182 9.0 35 30 11 13
183 11.0 31 36 19 15
184 10.0 38 32 15 14
185 11.0 22 28 8 16
186 19.0 32 36 16 13
187 14.0 36 34 17 14
188 12.0 39 31 12 15
189 14.0 28 28 11 13
190 21.0 32 36 11 11
191 13.0 32 36 14 11
192 10.0 38 40 16 14
193 15.0 32 33 12 15
194 16.0 35 37 16 11
195 14.0 32 32 13 15
196 12.0 37 38 15 12
197 19.0 34 31 16 14
198 15.0 33 37 16 14
199 19.0 33 33 14 8
200 13.0 26 32 16 13
201 17.0 30 30 16 9
202 12.0 24 30 14 15
203 11.0 34 31 11 17
204 14.0 34 32 12 13
205 11.0 33 34 15 15
206 13.0 34 36 15 15
207 12.0 35 37 16 14
208 15.0 35 36 16 16
209 14.0 36 33 11 13
210 12.0 34 33 15 16
211 17.0 34 33 12 9
212 11.0 41 44 12 16
213 18.0 32 39 15 11
214 13.0 30 32 15 10
215 17.0 35 35 16 11
216 13.0 28 25 14 15
217 11.0 33 35 17 17
218 12.0 39 34 14 14
219 22.0 36 35 13 8
220 14.0 36 39 15 15
221 12.0 35 33 13 11
222 12.0 38 36 14 16
223 17.0 33 32 15 10
224 9.0 31 32 12 15
225 21.0 34 36 13 9
226 10.0 32 36 8 16
227 11.0 31 32 14 19
228 12.0 33 34 14 12
229 23.0 34 33 11 8
230 13.0 34 35 12 11
231 12.0 34 30 13 14
232 16.0 33 38 10 9
233 9.0 32 34 16 15
234 17.0 41 33 18 13
235 9.0 34 32 13 16
236 14.0 36 31 11 11
237 17.0 37 30 4 12
238 13.0 36 27 13 13
239 11.0 29 31 16 10
240 12.0 37 30 10 11
241 10.0 27 32 12 12
242 19.0 35 35 12 8
243 16.0 28 28 10 12
244 16.0 35 33 13 12
245 14.0 37 31 15 15
246 20.0 29 35 12 11
247 15.0 32 35 14 13
248 23.0 36 32 10 14
249 20.0 19 21 12 10
250 16.0 21 20 12 12
251 14.0 31 34 11 15
252 17.0 33 32 10 13
253 11.0 36 34 12 13
254 13.0 33 32 16 13
255 17.0 37 33 12 12
256 15.0 34 33 14 12
257 21.0 35 37 16 9
258 18.0 31 32 14 9
259 15.0 37 34 13 15
260 8.0 35 30 4 10
261 12.0 27 30 15 14
262 12.0 34 38 11 15
263 22.0 40 36 11 7
264 12.0 29 32 14 14
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Connected Separate Learning Happiness
27.13113 -0.04252 0.00149 -0.11834 -0.77219
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-9.4924 -1.7298 -0.0909 1.6942 9.5401
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 27.13113 2.01783 13.446 <2e-16 ***
Connected -0.04252 0.05189 -0.819 0.413
Separate 0.00149 0.05334 0.028 0.978
Learning -0.11834 0.07497 -1.579 0.116
Happiness -0.77219 0.07213 -10.706 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.819 on 259 degrees of freedom
Multiple R-squared: 0.3497, Adjusted R-squared: 0.3397
F-statistic: 34.82 on 4 and 259 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.997847114 0.004305772 0.002152886
[2,] 0.996794335 0.006411329 0.003205665
[3,] 0.993769356 0.012461288 0.006230644
[4,] 0.995044292 0.009911416 0.004955708
[5,] 0.997053381 0.005893238 0.002946619
[6,] 0.994549017 0.010901966 0.005450983
[7,] 0.990417511 0.019164979 0.009582489
[8,] 0.985744500 0.028511001 0.014255500
[9,] 0.978464513 0.043070973 0.021535487
[10,] 0.966479627 0.067040746 0.033520373
[11,] 0.958380771 0.083238458 0.041619229
[12,] 0.962753776 0.074492448 0.037246224
[13,] 0.946594009 0.106811981 0.053405991
[14,] 0.930092513 0.139814975 0.069907487
[15,] 0.908008262 0.183983475 0.091991738
[16,] 0.882795808 0.234408385 0.117204192
[17,] 0.847527587 0.304944826 0.152472413
[18,] 0.815947101 0.368105798 0.184052899
[19,] 0.925948532 0.148102937 0.074051468
[20,] 0.905331339 0.189337321 0.094668661
[21,] 0.889117945 0.221764109 0.110882055
[22,] 0.864478675 0.271042649 0.135521325
[23,] 0.836985533 0.326028935 0.163014467
[24,] 0.845912762 0.308174476 0.154087238
[25,] 0.816618969 0.366762061 0.183381031
[26,] 0.785897942 0.428204115 0.214102058
[27,] 0.757384607 0.485230786 0.242615393
[28,] 0.713171716 0.573656568 0.286828284
[29,] 0.745120121 0.509759758 0.254879879
[30,] 0.806554599 0.386890803 0.193445401
[31,] 0.768933513 0.462132974 0.231066487
[32,] 0.742522243 0.514955515 0.257477757
[33,] 0.753956336 0.492087327 0.246043664
[34,] 0.753791399 0.492417202 0.246208601
[35,] 0.736570089 0.526859823 0.263429911
[36,] 0.733102891 0.533794219 0.266897109
[37,] 0.692345131 0.615309738 0.307654869
[38,] 0.650715807 0.698568386 0.349284193
[39,] 0.622760959 0.754478082 0.377239041
[40,] 0.634974458 0.730051084 0.365025542
[41,] 0.599926763 0.800146474 0.400073237
[42,] 0.636916557 0.726166886 0.363083443
[43,] 0.611282099 0.777435801 0.388717901
[44,] 0.594403327 0.811193346 0.405596673
[45,] 0.557253695 0.885492611 0.442746305
[46,] 0.569151215 0.861697570 0.430848785
[47,] 0.524802522 0.950394957 0.475197478
[48,] 0.548847445 0.902305111 0.451152555
[49,] 0.538487237 0.923025525 0.461512763
[50,] 0.512790883 0.974418234 0.487209117
[51,] 0.541110910 0.917778181 0.458889090
[52,] 0.573467754 0.853064492 0.426532246
[53,] 0.542022938 0.915954124 0.457977062
[54,] 0.567105604 0.865788792 0.432894396
[55,] 0.531257807 0.937484387 0.468742193
[56,] 0.524028451 0.951943097 0.475971549
[57,] 0.485606760 0.971213520 0.514393240
[58,] 0.447384880 0.894769761 0.552615120
[59,] 0.485884686 0.971769372 0.514115314
[60,] 0.493022504 0.986045007 0.506977496
[61,] 0.475321322 0.950642644 0.524678678
[62,] 0.437597230 0.875194460 0.562402770
[63,] 0.414970563 0.829941127 0.585029437
[64,] 0.375988913 0.751977826 0.624011087
[65,] 0.376775552 0.753551103 0.623224448
[66,] 0.341897602 0.683795205 0.658102398
[67,] 0.322313151 0.644626301 0.677686849
[68,] 0.309107219 0.618214438 0.690892781
[69,] 0.428546934 0.857093869 0.571453066
[70,] 0.411649741 0.823299481 0.588350259
[71,] 0.436916969 0.873833938 0.563083031
[72,] 0.398557783 0.797115566 0.601442217
[73,] 0.447520234 0.895040469 0.552479766
[74,] 0.418321644 0.836643289 0.581678356
[75,] 0.430836700 0.861673401 0.569163300
[76,] 0.394140708 0.788281416 0.605859292
[77,] 0.358344888 0.716689776 0.641655112
[78,] 0.323441453 0.646882906 0.676558547
[79,] 0.292160477 0.584320954 0.707839523
[80,] 0.263464169 0.526928337 0.736535831
[81,] 0.239855535 0.479711069 0.760144465
[82,] 0.300458527 0.600917055 0.699541473
[83,] 0.277654806 0.555309613 0.722345194
[84,] 0.258607546 0.517215091 0.741392454
[85,] 0.230829400 0.461658800 0.769170600
[86,] 0.215990230 0.431980460 0.784009770
[87,] 0.198660313 0.397320626 0.801339687
[88,] 0.173781602 0.347563204 0.826218398
[89,] 0.162316078 0.324632156 0.837683922
[90,] 0.150035990 0.300071980 0.849964010
[91,] 0.129474882 0.258949765 0.870525118
[92,] 0.126728198 0.253456395 0.873271802
[93,] 0.109559281 0.219118562 0.890440719
[94,] 0.101008215 0.202016430 0.898991785
[95,] 0.086756255 0.173512511 0.913243745
[96,] 0.105940463 0.211880925 0.894059537
[97,] 0.117611130 0.235222259 0.882388870
[98,] 0.120174475 0.240348950 0.879825525
[99,] 0.102995181 0.205990363 0.897004819
[100,] 0.119727295 0.239454591 0.880272705
[101,] 0.104328020 0.208656039 0.895671980
[102,] 0.252036914 0.504073827 0.747963086
[103,] 0.234842249 0.469684499 0.765157751
[104,] 0.209079512 0.418159025 0.790920488
[105,] 0.210573618 0.421147236 0.789426382
[106,] 0.194392373 0.388784746 0.805607627
[107,] 0.178167924 0.356335848 0.821832076
[108,] 0.159161895 0.318323791 0.840838105
[109,] 0.139646150 0.279292300 0.860353850
[110,] 0.121529998 0.243059995 0.878470002
[111,] 0.149702464 0.299404929 0.850297536
[112,] 0.140000952 0.280001903 0.859999048
[113,] 0.121008824 0.242017647 0.878991176
[114,] 0.108516888 0.217033776 0.891483112
[115,] 0.098708202 0.197416404 0.901291798
[116,] 0.120939847 0.241879695 0.879060153
[117,] 0.107281320 0.214562640 0.892718680
[118,] 0.106858131 0.213716263 0.893141869
[119,] 0.106609209 0.213218418 0.893390791
[120,] 0.092172444 0.184344887 0.907827556
[121,] 0.082878019 0.165756038 0.917121981
[122,] 0.070301351 0.140602702 0.929698649
[123,] 0.070191536 0.140383072 0.929808464
[124,] 0.068652447 0.137304893 0.931347553
[125,] 0.064169722 0.128339445 0.935830278
[126,] 0.059988522 0.119977043 0.940011478
[127,] 0.050430705 0.100861410 0.949569295
[128,] 0.047915427 0.095830855 0.952084573
[129,] 0.120147002 0.240294003 0.879852998
[130,] 0.104657937 0.209315873 0.895342063
[131,] 0.089400350 0.178800700 0.910599650
[132,] 0.080895977 0.161791953 0.919104023
[133,] 0.077752161 0.155504322 0.922247839
[134,] 0.073968427 0.147936854 0.926031573
[135,] 0.069375450 0.138750900 0.930624550
[136,] 0.059875947 0.119751894 0.940124053
[137,] 0.050542692 0.101085383 0.949457308
[138,] 0.043090100 0.086180200 0.956909900
[139,] 0.035915498 0.071830997 0.964084502
[140,] 0.034661713 0.069323425 0.965338287
[141,] 0.040202664 0.080405328 0.959797336
[142,] 0.036209547 0.072419093 0.963790453
[143,] 0.029852741 0.059705482 0.970147259
[144,] 0.032132323 0.064264645 0.967867677
[145,] 0.030811237 0.061622475 0.969188763
[146,] 0.029786017 0.059572034 0.970213983
[147,] 0.026942660 0.053885320 0.973057340
[148,] 0.029809515 0.059619031 0.970190485
[149,] 0.025328696 0.050657391 0.974671304
[150,] 0.020632983 0.041265966 0.979367017
[151,] 0.017800763 0.035601526 0.982199237
[152,] 0.027781446 0.055562892 0.972218554
[153,] 0.028443479 0.056886957 0.971556521
[154,] 0.025230724 0.050461448 0.974769276
[155,] 0.067924989 0.135849978 0.932075011
[156,] 0.056887104 0.113774208 0.943112896
[157,] 0.197935833 0.395871665 0.802064167
[158,] 0.182001116 0.364002232 0.817998884
[159,] 0.306033344 0.612066687 0.693966656
[160,] 0.282338107 0.564676215 0.717661893
[161,] 0.260869436 0.521738871 0.739130564
[162,] 0.237465317 0.474930633 0.762534683
[163,] 0.212043982 0.424087964 0.787956018
[164,] 0.244222274 0.488444548 0.755777726
[165,] 0.216937546 0.433875091 0.783062454
[166,] 0.288261039 0.576522078 0.711738961
[167,] 0.281008901 0.562017802 0.718991099
[168,] 0.256932965 0.513865930 0.743067035
[169,] 0.329439702 0.658879404 0.670560298
[170,] 0.304482739 0.608965477 0.695517261
[171,] 0.305533887 0.611067773 0.694466113
[172,] 0.285288142 0.570576283 0.714711858
[173,] 0.266545115 0.533090231 0.733454885
[174,] 0.255310811 0.510621623 0.744689189
[175,] 0.335785011 0.671570022 0.664214989
[176,] 0.311389519 0.622779038 0.688610481
[177,] 0.327022607 0.654045213 0.672977393
[178,] 0.304348729 0.608697459 0.695651271
[179,] 0.371445967 0.742891934 0.628554033
[180,] 0.337775045 0.675550090 0.662224955
[181,] 0.305132810 0.610265619 0.694867190
[182,] 0.272579405 0.545158809 0.727420595
[183,] 0.358408441 0.716816882 0.641591559
[184,] 0.354118646 0.708237293 0.645881354
[185,] 0.372547984 0.745095969 0.627452016
[186,] 0.363996414 0.727992829 0.636003586
[187,] 0.328333545 0.656667091 0.671666455
[188,] 0.301909097 0.603818195 0.698090903
[189,] 0.313209440 0.626418880 0.686790560
[190,] 0.417242363 0.834484726 0.582757637
[191,] 0.390072924 0.780145848 0.609927076
[192,] 0.353076062 0.706152124 0.646923938
[193,] 0.319740489 0.639480979 0.680259511
[194,] 0.285456932 0.570913864 0.714543068
[195,] 0.252654950 0.505309900 0.747345050
[196,] 0.221808169 0.443616338 0.778191831
[197,] 0.191688061 0.383376121 0.808311939
[198,] 0.171449544 0.342899088 0.828550456
[199,] 0.146077919 0.292155839 0.853922081
[200,] 0.129522541 0.259045083 0.870477459
[201,] 0.134563364 0.269126728 0.865436636
[202,] 0.112486280 0.224972561 0.887513720
[203,] 0.093187139 0.186374278 0.906812861
[204,] 0.077056075 0.154112150 0.922943925
[205,] 0.063303366 0.126606732 0.936696634
[206,] 0.056665987 0.113331973 0.943334013
[207,] 0.065299415 0.130598830 0.934700585
[208,] 0.053548387 0.107096773 0.946451613
[209,] 0.043022214 0.086044427 0.956977786
[210,] 0.033594323 0.067188646 0.966405677
[211,] 0.027855519 0.055711038 0.972144481
[212,] 0.029506225 0.059012451 0.970493775
[213,] 0.024015052 0.048030104 0.975984948
[214,] 0.029680979 0.059361957 0.970319021
[215,] 0.022520253 0.045040506 0.977479747
[216,] 0.016911228 0.033822456 0.983088772
[217,] 0.017952640 0.035905281 0.982047360
[218,] 0.019188913 0.038377826 0.980811087
[219,] 0.015291286 0.030582572 0.984708714
[220,] 0.012714756 0.025429513 0.987285244
[221,] 0.012567581 0.025135162 0.987432419
[222,] 0.018487271 0.036974542 0.981512729
[223,] 0.017399293 0.034798585 0.982600707
[224,] 0.013563266 0.027126531 0.986436734
[225,] 0.010233859 0.020467717 0.989766141
[226,] 0.012663645 0.025327289 0.987336355
[227,] 0.010638300 0.021276600 0.989361700
[228,] 0.011033619 0.022067239 0.988966381
[229,] 0.008687019 0.017374039 0.991312981
[230,] 0.007425236 0.014850471 0.992574764
[231,] 0.005510320 0.011020641 0.994489680
[232,] 0.020547278 0.041094556 0.979452722
[233,] 0.026870273 0.053740545 0.973129727
[234,] 0.051897042 0.103794084 0.948102958
[235,] 0.036893802 0.073787605 0.963106198
[236,] 0.025841239 0.051682479 0.974158761
[237,] 0.017276248 0.034552496 0.982723752
[238,] 0.011322911 0.022645822 0.988677089
[239,] 0.015612159 0.031224318 0.984387841
[240,] 0.009679525 0.019359050 0.990320475
[241,] 0.277611752 0.555223504 0.722388248
[242,] 0.300440378 0.600880756 0.699559622
[243,] 0.455715439 0.911430879 0.544284561
[244,] 0.454927538 0.909855076 0.545072462
[245,] 0.834659346 0.330681307 0.165340654
[246,] 0.904294915 0.191410170 0.095705085
[247,] 0.982425968 0.035148064 0.017574032
[248,] 0.962579245 0.074841510 0.037420755
[249,] 0.958062196 0.083875608 0.041937804
> postscript(file="/var/wessaorg/rcomp/tmp/1mivm1384991261.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/2gkyu1384991261.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/3ouvo1384991261.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/4di5k1384991261.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/5toae1384991261.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 = 264
Frequency = 1
1 2 3 4 5 6
-1.09530663 1.27239978 -1.16507190 -2.82074841 9.27128164 1.75176720
7 8 9 10 11 12
9.54014096 -2.15327392 -2.41289435 0.74349663 -0.54082307 -1.08594314
13 14 15 16 17 18
-0.95214195 2.71907094 0.12817813 0.76615862 0.93772439 0.92211580
19 20 21 22 23 24
-2.58863231 1.43037928 -0.52672273 -1.47161979 -0.47028988 -0.45623323
25 26 27 28 29 30
0.61854815 -7.47396648 -0.40401543 1.80271705 1.69921402 -2.58372816
31 32 33 34 35 36
-2.72899194 0.42783283 -0.82002684 -1.26422755 -0.26267563 -4.28116542
37 38 39 40 41 42
2.18889969 -0.40991411 -0.92349328 -3.76013627 -3.12922022 2.27724213
43 44 45 46 47 48
-2.84113753 -0.76901519 -1.31742568 -2.81417895 -3.33381700 -1.42061853
49 50 51 52 53 54
4.36370826 -2.86777428 -1.57856144 0.65228655 2.09454916 -0.58229984
55 56 57 58 59 60
-4.48679395 2.12962456 1.72503142 -3.47235175 -4.57010530 0.46617955
61 62 63 64 65 66
1.70037977 -1.63406966 -3.35002354 0.60231704 0.74471317 -4.96433649
67 68 69 70 71 72
1.97169915 -2.49929931 0.47052693 1.77829136 -0.57491042 3.14223479
73 74 75 76 77 78
0.96947707 -1.86342753 -2.79371446 4.76055811 2.40771730 3.20032506
79 80 81 82 83 84
0.13457241 -4.66615773 -1.30525634 -3.22170864 0.52314129 -0.46313745
85 86 87 88 89 90
-0.06999980 0.66618300 -1.07447016 0.98624038 3.40331914 1.68072423
91 92 93 94 95 96
1.40221519 0.77233088 1.77360922 -1.86580667 -0.27794882 1.54972725
97 98 99 100 101 102
-1.98496198 0.41218766 -2.58446012 -0.54827367 1.54972725 1.06637404
103 104 105 106 107 108
-4.54297295 3.69027329 2.01014489 -0.20063518 4.03042459 -1.03717977
109 110 111 112 113 114
7.77665205 1.57016716 -0.47460003 -2.78127154 1.52947376 1.71101200
115 116 117 118 119 120
-1.12034130 0.67990426 -0.27757683 -4.43098757 2.13514416 0.02164408
121 122 123 124 125 126
0.85092286 -1.45215943 -4.13816094 -1.28859144 -2.93021192 -2.61813671
127 128 129 130 131 132
-0.17928813 1.66517745 0.31088212 -2.88769301 2.14489066 -2.00911408
133 134 135 136 137 138
1.97520119 -0.37484580 2.31650721 7.05920727 0.84821620 -0.11181133
139 140 141 142 143 144
-1.69060800 -2.52490431 -2.34479502 2.21954843 -1.08517459 -0.37092260
145 146 147 148 149 150
-0.93803388 0.67451474 -2.62150312 -3.65690682 1.79755033 -0.03499267
151 152 153 154 155 156
3.41319320 -2.49352362 -2.54127105 2.04046926 3.44775157 1.40221519
157 158 159 160 161 162
0.52351328 1.66517745 -4.80116506 2.85929262 1.83784717 7.23853382
163 164 165 166 167 168
0.37904326 8.80234506 1.75347950 6.52218337 -1.43722163 -1.49479172
169 170 171 172 173 174
-1.25390930 0.80497572 4.31012396 0.59300433 -5.07014898 2.16827421
175 176 177 178 179 180
1.13304569 -5.00901568 -1.23724439 2.78617575 -1.84733437 -1.65629785
181 182 183 184 185 186
-1.94989367 -5.34737806 -1.03526688 -2.97723779 -1.93558879 5.10783663
187 188 189 190 191 192
1.17142900 -0.51606199 -0.64203020 4.97173637 -2.67323634 -2.87081632
193 194 195 196 197 198
2.18332539 0.68951513 1.30315794 -2.57308554 5.97251911 1.92105948
199 200 201 202 203 204
1.05717076 -1.14131636 -0.05703670 -0.91567069 -0.30261087 -0.27453478
205 206 207 208 209 210
-1.42061853 0.61892014 -0.99390270 3.55197554 -0.30932951 0.39558456
211 212 213 214 215 216
-0.36480113 -0.67820167 2.44063573 -3.40616531 1.69249537 0.26185556
217 218 219 220 221 222
0.35896432 -1.05604155 4.06340483 1.69948760 -3.65955167 0.44284741
223 224 225 226 227 228
0.72139143 -3.85770341 3.74907094 -2.52232064 1.46775768 -2.85554313
229 230 231 232 233 234
4.74466239 -2.82339326 -1.38101806 -1.65145550 -3.34479502 3.73166206
235 236 237 238 239 240
-2.83961018 -1.85073738 1.13706870 -1.06370393 -5.32885167 -3.92507078
241 242 243 244 245 246
-5.34436122 0.90254349 0.46743331 1.11264238 1.75392748 3.96401218
247 248 249 250 251 252
0.87264189 9.34601224 2.78749069 0.41840675 1.02097392 2.44626145
253 254 255 256 257 258
-3.19247720 -0.84368398 2.07933778 0.18846590 4.14512702 0.74581712
259 260 261 262 263 264
2.51277226 -9.49235723 -1.44196558 -0.85742982 3.22311144 -1.47825043
> postscript(file="/var/wessaorg/rcomp/tmp/6xqzd1384991261.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 = 264
Frequency = 1
lag(myerror, k = 1) myerror
0 -1.09530663 NA
1 1.27239978 -1.09530663
2 -1.16507190 1.27239978
3 -2.82074841 -1.16507190
4 9.27128164 -2.82074841
5 1.75176720 9.27128164
6 9.54014096 1.75176720
7 -2.15327392 9.54014096
8 -2.41289435 -2.15327392
9 0.74349663 -2.41289435
10 -0.54082307 0.74349663
11 -1.08594314 -0.54082307
12 -0.95214195 -1.08594314
13 2.71907094 -0.95214195
14 0.12817813 2.71907094
15 0.76615862 0.12817813
16 0.93772439 0.76615862
17 0.92211580 0.93772439
18 -2.58863231 0.92211580
19 1.43037928 -2.58863231
20 -0.52672273 1.43037928
21 -1.47161979 -0.52672273
22 -0.47028988 -1.47161979
23 -0.45623323 -0.47028988
24 0.61854815 -0.45623323
25 -7.47396648 0.61854815
26 -0.40401543 -7.47396648
27 1.80271705 -0.40401543
28 1.69921402 1.80271705
29 -2.58372816 1.69921402
30 -2.72899194 -2.58372816
31 0.42783283 -2.72899194
32 -0.82002684 0.42783283
33 -1.26422755 -0.82002684
34 -0.26267563 -1.26422755
35 -4.28116542 -0.26267563
36 2.18889969 -4.28116542
37 -0.40991411 2.18889969
38 -0.92349328 -0.40991411
39 -3.76013627 -0.92349328
40 -3.12922022 -3.76013627
41 2.27724213 -3.12922022
42 -2.84113753 2.27724213
43 -0.76901519 -2.84113753
44 -1.31742568 -0.76901519
45 -2.81417895 -1.31742568
46 -3.33381700 -2.81417895
47 -1.42061853 -3.33381700
48 4.36370826 -1.42061853
49 -2.86777428 4.36370826
50 -1.57856144 -2.86777428
51 0.65228655 -1.57856144
52 2.09454916 0.65228655
53 -0.58229984 2.09454916
54 -4.48679395 -0.58229984
55 2.12962456 -4.48679395
56 1.72503142 2.12962456
57 -3.47235175 1.72503142
58 -4.57010530 -3.47235175
59 0.46617955 -4.57010530
60 1.70037977 0.46617955
61 -1.63406966 1.70037977
62 -3.35002354 -1.63406966
63 0.60231704 -3.35002354
64 0.74471317 0.60231704
65 -4.96433649 0.74471317
66 1.97169915 -4.96433649
67 -2.49929931 1.97169915
68 0.47052693 -2.49929931
69 1.77829136 0.47052693
70 -0.57491042 1.77829136
71 3.14223479 -0.57491042
72 0.96947707 3.14223479
73 -1.86342753 0.96947707
74 -2.79371446 -1.86342753
75 4.76055811 -2.79371446
76 2.40771730 4.76055811
77 3.20032506 2.40771730
78 0.13457241 3.20032506
79 -4.66615773 0.13457241
80 -1.30525634 -4.66615773
81 -3.22170864 -1.30525634
82 0.52314129 -3.22170864
83 -0.46313745 0.52314129
84 -0.06999980 -0.46313745
85 0.66618300 -0.06999980
86 -1.07447016 0.66618300
87 0.98624038 -1.07447016
88 3.40331914 0.98624038
89 1.68072423 3.40331914
90 1.40221519 1.68072423
91 0.77233088 1.40221519
92 1.77360922 0.77233088
93 -1.86580667 1.77360922
94 -0.27794882 -1.86580667
95 1.54972725 -0.27794882
96 -1.98496198 1.54972725
97 0.41218766 -1.98496198
98 -2.58446012 0.41218766
99 -0.54827367 -2.58446012
100 1.54972725 -0.54827367
101 1.06637404 1.54972725
102 -4.54297295 1.06637404
103 3.69027329 -4.54297295
104 2.01014489 3.69027329
105 -0.20063518 2.01014489
106 4.03042459 -0.20063518
107 -1.03717977 4.03042459
108 7.77665205 -1.03717977
109 1.57016716 7.77665205
110 -0.47460003 1.57016716
111 -2.78127154 -0.47460003
112 1.52947376 -2.78127154
113 1.71101200 1.52947376
114 -1.12034130 1.71101200
115 0.67990426 -1.12034130
116 -0.27757683 0.67990426
117 -4.43098757 -0.27757683
118 2.13514416 -4.43098757
119 0.02164408 2.13514416
120 0.85092286 0.02164408
121 -1.45215943 0.85092286
122 -4.13816094 -1.45215943
123 -1.28859144 -4.13816094
124 -2.93021192 -1.28859144
125 -2.61813671 -2.93021192
126 -0.17928813 -2.61813671
127 1.66517745 -0.17928813
128 0.31088212 1.66517745
129 -2.88769301 0.31088212
130 2.14489066 -2.88769301
131 -2.00911408 2.14489066
132 1.97520119 -2.00911408
133 -0.37484580 1.97520119
134 2.31650721 -0.37484580
135 7.05920727 2.31650721
136 0.84821620 7.05920727
137 -0.11181133 0.84821620
138 -1.69060800 -0.11181133
139 -2.52490431 -1.69060800
140 -2.34479502 -2.52490431
141 2.21954843 -2.34479502
142 -1.08517459 2.21954843
143 -0.37092260 -1.08517459
144 -0.93803388 -0.37092260
145 0.67451474 -0.93803388
146 -2.62150312 0.67451474
147 -3.65690682 -2.62150312
148 1.79755033 -3.65690682
149 -0.03499267 1.79755033
150 3.41319320 -0.03499267
151 -2.49352362 3.41319320
152 -2.54127105 -2.49352362
153 2.04046926 -2.54127105
154 3.44775157 2.04046926
155 1.40221519 3.44775157
156 0.52351328 1.40221519
157 1.66517745 0.52351328
158 -4.80116506 1.66517745
159 2.85929262 -4.80116506
160 1.83784717 2.85929262
161 7.23853382 1.83784717
162 0.37904326 7.23853382
163 8.80234506 0.37904326
164 1.75347950 8.80234506
165 6.52218337 1.75347950
166 -1.43722163 6.52218337
167 -1.49479172 -1.43722163
168 -1.25390930 -1.49479172
169 0.80497572 -1.25390930
170 4.31012396 0.80497572
171 0.59300433 4.31012396
172 -5.07014898 0.59300433
173 2.16827421 -5.07014898
174 1.13304569 2.16827421
175 -5.00901568 1.13304569
176 -1.23724439 -5.00901568
177 2.78617575 -1.23724439
178 -1.84733437 2.78617575
179 -1.65629785 -1.84733437
180 -1.94989367 -1.65629785
181 -5.34737806 -1.94989367
182 -1.03526688 -5.34737806
183 -2.97723779 -1.03526688
184 -1.93558879 -2.97723779
185 5.10783663 -1.93558879
186 1.17142900 5.10783663
187 -0.51606199 1.17142900
188 -0.64203020 -0.51606199
189 4.97173637 -0.64203020
190 -2.67323634 4.97173637
191 -2.87081632 -2.67323634
192 2.18332539 -2.87081632
193 0.68951513 2.18332539
194 1.30315794 0.68951513
195 -2.57308554 1.30315794
196 5.97251911 -2.57308554
197 1.92105948 5.97251911
198 1.05717076 1.92105948
199 -1.14131636 1.05717076
200 -0.05703670 -1.14131636
201 -0.91567069 -0.05703670
202 -0.30261087 -0.91567069
203 -0.27453478 -0.30261087
204 -1.42061853 -0.27453478
205 0.61892014 -1.42061853
206 -0.99390270 0.61892014
207 3.55197554 -0.99390270
208 -0.30932951 3.55197554
209 0.39558456 -0.30932951
210 -0.36480113 0.39558456
211 -0.67820167 -0.36480113
212 2.44063573 -0.67820167
213 -3.40616531 2.44063573
214 1.69249537 -3.40616531
215 0.26185556 1.69249537
216 0.35896432 0.26185556
217 -1.05604155 0.35896432
218 4.06340483 -1.05604155
219 1.69948760 4.06340483
220 -3.65955167 1.69948760
221 0.44284741 -3.65955167
222 0.72139143 0.44284741
223 -3.85770341 0.72139143
224 3.74907094 -3.85770341
225 -2.52232064 3.74907094
226 1.46775768 -2.52232064
227 -2.85554313 1.46775768
228 4.74466239 -2.85554313
229 -2.82339326 4.74466239
230 -1.38101806 -2.82339326
231 -1.65145550 -1.38101806
232 -3.34479502 -1.65145550
233 3.73166206 -3.34479502
234 -2.83961018 3.73166206
235 -1.85073738 -2.83961018
236 1.13706870 -1.85073738
237 -1.06370393 1.13706870
238 -5.32885167 -1.06370393
239 -3.92507078 -5.32885167
240 -5.34436122 -3.92507078
241 0.90254349 -5.34436122
242 0.46743331 0.90254349
243 1.11264238 0.46743331
244 1.75392748 1.11264238
245 3.96401218 1.75392748
246 0.87264189 3.96401218
247 9.34601224 0.87264189
248 2.78749069 9.34601224
249 0.41840675 2.78749069
250 1.02097392 0.41840675
251 2.44626145 1.02097392
252 -3.19247720 2.44626145
253 -0.84368398 -3.19247720
254 2.07933778 -0.84368398
255 0.18846590 2.07933778
256 4.14512702 0.18846590
257 0.74581712 4.14512702
258 2.51277226 0.74581712
259 -9.49235723 2.51277226
260 -1.44196558 -9.49235723
261 -0.85742982 -1.44196558
262 3.22311144 -0.85742982
263 -1.47825043 3.22311144
264 NA -1.47825043
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 1.27239978 -1.09530663
[2,] -1.16507190 1.27239978
[3,] -2.82074841 -1.16507190
[4,] 9.27128164 -2.82074841
[5,] 1.75176720 9.27128164
[6,] 9.54014096 1.75176720
[7,] -2.15327392 9.54014096
[8,] -2.41289435 -2.15327392
[9,] 0.74349663 -2.41289435
[10,] -0.54082307 0.74349663
[11,] -1.08594314 -0.54082307
[12,] -0.95214195 -1.08594314
[13,] 2.71907094 -0.95214195
[14,] 0.12817813 2.71907094
[15,] 0.76615862 0.12817813
[16,] 0.93772439 0.76615862
[17,] 0.92211580 0.93772439
[18,] -2.58863231 0.92211580
[19,] 1.43037928 -2.58863231
[20,] -0.52672273 1.43037928
[21,] -1.47161979 -0.52672273
[22,] -0.47028988 -1.47161979
[23,] -0.45623323 -0.47028988
[24,] 0.61854815 -0.45623323
[25,] -7.47396648 0.61854815
[26,] -0.40401543 -7.47396648
[27,] 1.80271705 -0.40401543
[28,] 1.69921402 1.80271705
[29,] -2.58372816 1.69921402
[30,] -2.72899194 -2.58372816
[31,] 0.42783283 -2.72899194
[32,] -0.82002684 0.42783283
[33,] -1.26422755 -0.82002684
[34,] -0.26267563 -1.26422755
[35,] -4.28116542 -0.26267563
[36,] 2.18889969 -4.28116542
[37,] -0.40991411 2.18889969
[38,] -0.92349328 -0.40991411
[39,] -3.76013627 -0.92349328
[40,] -3.12922022 -3.76013627
[41,] 2.27724213 -3.12922022
[42,] -2.84113753 2.27724213
[43,] -0.76901519 -2.84113753
[44,] -1.31742568 -0.76901519
[45,] -2.81417895 -1.31742568
[46,] -3.33381700 -2.81417895
[47,] -1.42061853 -3.33381700
[48,] 4.36370826 -1.42061853
[49,] -2.86777428 4.36370826
[50,] -1.57856144 -2.86777428
[51,] 0.65228655 -1.57856144
[52,] 2.09454916 0.65228655
[53,] -0.58229984 2.09454916
[54,] -4.48679395 -0.58229984
[55,] 2.12962456 -4.48679395
[56,] 1.72503142 2.12962456
[57,] -3.47235175 1.72503142
[58,] -4.57010530 -3.47235175
[59,] 0.46617955 -4.57010530
[60,] 1.70037977 0.46617955
[61,] -1.63406966 1.70037977
[62,] -3.35002354 -1.63406966
[63,] 0.60231704 -3.35002354
[64,] 0.74471317 0.60231704
[65,] -4.96433649 0.74471317
[66,] 1.97169915 -4.96433649
[67,] -2.49929931 1.97169915
[68,] 0.47052693 -2.49929931
[69,] 1.77829136 0.47052693
[70,] -0.57491042 1.77829136
[71,] 3.14223479 -0.57491042
[72,] 0.96947707 3.14223479
[73,] -1.86342753 0.96947707
[74,] -2.79371446 -1.86342753
[75,] 4.76055811 -2.79371446
[76,] 2.40771730 4.76055811
[77,] 3.20032506 2.40771730
[78,] 0.13457241 3.20032506
[79,] -4.66615773 0.13457241
[80,] -1.30525634 -4.66615773
[81,] -3.22170864 -1.30525634
[82,] 0.52314129 -3.22170864
[83,] -0.46313745 0.52314129
[84,] -0.06999980 -0.46313745
[85,] 0.66618300 -0.06999980
[86,] -1.07447016 0.66618300
[87,] 0.98624038 -1.07447016
[88,] 3.40331914 0.98624038
[89,] 1.68072423 3.40331914
[90,] 1.40221519 1.68072423
[91,] 0.77233088 1.40221519
[92,] 1.77360922 0.77233088
[93,] -1.86580667 1.77360922
[94,] -0.27794882 -1.86580667
[95,] 1.54972725 -0.27794882
[96,] -1.98496198 1.54972725
[97,] 0.41218766 -1.98496198
[98,] -2.58446012 0.41218766
[99,] -0.54827367 -2.58446012
[100,] 1.54972725 -0.54827367
[101,] 1.06637404 1.54972725
[102,] -4.54297295 1.06637404
[103,] 3.69027329 -4.54297295
[104,] 2.01014489 3.69027329
[105,] -0.20063518 2.01014489
[106,] 4.03042459 -0.20063518
[107,] -1.03717977 4.03042459
[108,] 7.77665205 -1.03717977
[109,] 1.57016716 7.77665205
[110,] -0.47460003 1.57016716
[111,] -2.78127154 -0.47460003
[112,] 1.52947376 -2.78127154
[113,] 1.71101200 1.52947376
[114,] -1.12034130 1.71101200
[115,] 0.67990426 -1.12034130
[116,] -0.27757683 0.67990426
[117,] -4.43098757 -0.27757683
[118,] 2.13514416 -4.43098757
[119,] 0.02164408 2.13514416
[120,] 0.85092286 0.02164408
[121,] -1.45215943 0.85092286
[122,] -4.13816094 -1.45215943
[123,] -1.28859144 -4.13816094
[124,] -2.93021192 -1.28859144
[125,] -2.61813671 -2.93021192
[126,] -0.17928813 -2.61813671
[127,] 1.66517745 -0.17928813
[128,] 0.31088212 1.66517745
[129,] -2.88769301 0.31088212
[130,] 2.14489066 -2.88769301
[131,] -2.00911408 2.14489066
[132,] 1.97520119 -2.00911408
[133,] -0.37484580 1.97520119
[134,] 2.31650721 -0.37484580
[135,] 7.05920727 2.31650721
[136,] 0.84821620 7.05920727
[137,] -0.11181133 0.84821620
[138,] -1.69060800 -0.11181133
[139,] -2.52490431 -1.69060800
[140,] -2.34479502 -2.52490431
[141,] 2.21954843 -2.34479502
[142,] -1.08517459 2.21954843
[143,] -0.37092260 -1.08517459
[144,] -0.93803388 -0.37092260
[145,] 0.67451474 -0.93803388
[146,] -2.62150312 0.67451474
[147,] -3.65690682 -2.62150312
[148,] 1.79755033 -3.65690682
[149,] -0.03499267 1.79755033
[150,] 3.41319320 -0.03499267
[151,] -2.49352362 3.41319320
[152,] -2.54127105 -2.49352362
[153,] 2.04046926 -2.54127105
[154,] 3.44775157 2.04046926
[155,] 1.40221519 3.44775157
[156,] 0.52351328 1.40221519
[157,] 1.66517745 0.52351328
[158,] -4.80116506 1.66517745
[159,] 2.85929262 -4.80116506
[160,] 1.83784717 2.85929262
[161,] 7.23853382 1.83784717
[162,] 0.37904326 7.23853382
[163,] 8.80234506 0.37904326
[164,] 1.75347950 8.80234506
[165,] 6.52218337 1.75347950
[166,] -1.43722163 6.52218337
[167,] -1.49479172 -1.43722163
[168,] -1.25390930 -1.49479172
[169,] 0.80497572 -1.25390930
[170,] 4.31012396 0.80497572
[171,] 0.59300433 4.31012396
[172,] -5.07014898 0.59300433
[173,] 2.16827421 -5.07014898
[174,] 1.13304569 2.16827421
[175,] -5.00901568 1.13304569
[176,] -1.23724439 -5.00901568
[177,] 2.78617575 -1.23724439
[178,] -1.84733437 2.78617575
[179,] -1.65629785 -1.84733437
[180,] -1.94989367 -1.65629785
[181,] -5.34737806 -1.94989367
[182,] -1.03526688 -5.34737806
[183,] -2.97723779 -1.03526688
[184,] -1.93558879 -2.97723779
[185,] 5.10783663 -1.93558879
[186,] 1.17142900 5.10783663
[187,] -0.51606199 1.17142900
[188,] -0.64203020 -0.51606199
[189,] 4.97173637 -0.64203020
[190,] -2.67323634 4.97173637
[191,] -2.87081632 -2.67323634
[192,] 2.18332539 -2.87081632
[193,] 0.68951513 2.18332539
[194,] 1.30315794 0.68951513
[195,] -2.57308554 1.30315794
[196,] 5.97251911 -2.57308554
[197,] 1.92105948 5.97251911
[198,] 1.05717076 1.92105948
[199,] -1.14131636 1.05717076
[200,] -0.05703670 -1.14131636
[201,] -0.91567069 -0.05703670
[202,] -0.30261087 -0.91567069
[203,] -0.27453478 -0.30261087
[204,] -1.42061853 -0.27453478
[205,] 0.61892014 -1.42061853
[206,] -0.99390270 0.61892014
[207,] 3.55197554 -0.99390270
[208,] -0.30932951 3.55197554
[209,] 0.39558456 -0.30932951
[210,] -0.36480113 0.39558456
[211,] -0.67820167 -0.36480113
[212,] 2.44063573 -0.67820167
[213,] -3.40616531 2.44063573
[214,] 1.69249537 -3.40616531
[215,] 0.26185556 1.69249537
[216,] 0.35896432 0.26185556
[217,] -1.05604155 0.35896432
[218,] 4.06340483 -1.05604155
[219,] 1.69948760 4.06340483
[220,] -3.65955167 1.69948760
[221,] 0.44284741 -3.65955167
[222,] 0.72139143 0.44284741
[223,] -3.85770341 0.72139143
[224,] 3.74907094 -3.85770341
[225,] -2.52232064 3.74907094
[226,] 1.46775768 -2.52232064
[227,] -2.85554313 1.46775768
[228,] 4.74466239 -2.85554313
[229,] -2.82339326 4.74466239
[230,] -1.38101806 -2.82339326
[231,] -1.65145550 -1.38101806
[232,] -3.34479502 -1.65145550
[233,] 3.73166206 -3.34479502
[234,] -2.83961018 3.73166206
[235,] -1.85073738 -2.83961018
[236,] 1.13706870 -1.85073738
[237,] -1.06370393 1.13706870
[238,] -5.32885167 -1.06370393
[239,] -3.92507078 -5.32885167
[240,] -5.34436122 -3.92507078
[241,] 0.90254349 -5.34436122
[242,] 0.46743331 0.90254349
[243,] 1.11264238 0.46743331
[244,] 1.75392748 1.11264238
[245,] 3.96401218 1.75392748
[246,] 0.87264189 3.96401218
[247,] 9.34601224 0.87264189
[248,] 2.78749069 9.34601224
[249,] 0.41840675 2.78749069
[250,] 1.02097392 0.41840675
[251,] 2.44626145 1.02097392
[252,] -3.19247720 2.44626145
[253,] -0.84368398 -3.19247720
[254,] 2.07933778 -0.84368398
[255,] 0.18846590 2.07933778
[256,] 4.14512702 0.18846590
[257,] 0.74581712 4.14512702
[258,] 2.51277226 0.74581712
[259,] -9.49235723 2.51277226
[260,] -1.44196558 -9.49235723
[261,] -0.85742982 -1.44196558
[262,] 3.22311144 -0.85742982
[263,] -1.47825043 3.22311144
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 1.27239978 -1.09530663
2 -1.16507190 1.27239978
3 -2.82074841 -1.16507190
4 9.27128164 -2.82074841
5 1.75176720 9.27128164
6 9.54014096 1.75176720
7 -2.15327392 9.54014096
8 -2.41289435 -2.15327392
9 0.74349663 -2.41289435
10 -0.54082307 0.74349663
11 -1.08594314 -0.54082307
12 -0.95214195 -1.08594314
13 2.71907094 -0.95214195
14 0.12817813 2.71907094
15 0.76615862 0.12817813
16 0.93772439 0.76615862
17 0.92211580 0.93772439
18 -2.58863231 0.92211580
19 1.43037928 -2.58863231
20 -0.52672273 1.43037928
21 -1.47161979 -0.52672273
22 -0.47028988 -1.47161979
23 -0.45623323 -0.47028988
24 0.61854815 -0.45623323
25 -7.47396648 0.61854815
26 -0.40401543 -7.47396648
27 1.80271705 -0.40401543
28 1.69921402 1.80271705
29 -2.58372816 1.69921402
30 -2.72899194 -2.58372816
31 0.42783283 -2.72899194
32 -0.82002684 0.42783283
33 -1.26422755 -0.82002684
34 -0.26267563 -1.26422755
35 -4.28116542 -0.26267563
36 2.18889969 -4.28116542
37 -0.40991411 2.18889969
38 -0.92349328 -0.40991411
39 -3.76013627 -0.92349328
40 -3.12922022 -3.76013627
41 2.27724213 -3.12922022
42 -2.84113753 2.27724213
43 -0.76901519 -2.84113753
44 -1.31742568 -0.76901519
45 -2.81417895 -1.31742568
46 -3.33381700 -2.81417895
47 -1.42061853 -3.33381700
48 4.36370826 -1.42061853
49 -2.86777428 4.36370826
50 -1.57856144 -2.86777428
51 0.65228655 -1.57856144
52 2.09454916 0.65228655
53 -0.58229984 2.09454916
54 -4.48679395 -0.58229984
55 2.12962456 -4.48679395
56 1.72503142 2.12962456
57 -3.47235175 1.72503142
58 -4.57010530 -3.47235175
59 0.46617955 -4.57010530
60 1.70037977 0.46617955
61 -1.63406966 1.70037977
62 -3.35002354 -1.63406966
63 0.60231704 -3.35002354
64 0.74471317 0.60231704
65 -4.96433649 0.74471317
66 1.97169915 -4.96433649
67 -2.49929931 1.97169915
68 0.47052693 -2.49929931
69 1.77829136 0.47052693
70 -0.57491042 1.77829136
71 3.14223479 -0.57491042
72 0.96947707 3.14223479
73 -1.86342753 0.96947707
74 -2.79371446 -1.86342753
75 4.76055811 -2.79371446
76 2.40771730 4.76055811
77 3.20032506 2.40771730
78 0.13457241 3.20032506
79 -4.66615773 0.13457241
80 -1.30525634 -4.66615773
81 -3.22170864 -1.30525634
82 0.52314129 -3.22170864
83 -0.46313745 0.52314129
84 -0.06999980 -0.46313745
85 0.66618300 -0.06999980
86 -1.07447016 0.66618300
87 0.98624038 -1.07447016
88 3.40331914 0.98624038
89 1.68072423 3.40331914
90 1.40221519 1.68072423
91 0.77233088 1.40221519
92 1.77360922 0.77233088
93 -1.86580667 1.77360922
94 -0.27794882 -1.86580667
95 1.54972725 -0.27794882
96 -1.98496198 1.54972725
97 0.41218766 -1.98496198
98 -2.58446012 0.41218766
99 -0.54827367 -2.58446012
100 1.54972725 -0.54827367
101 1.06637404 1.54972725
102 -4.54297295 1.06637404
103 3.69027329 -4.54297295
104 2.01014489 3.69027329
105 -0.20063518 2.01014489
106 4.03042459 -0.20063518
107 -1.03717977 4.03042459
108 7.77665205 -1.03717977
109 1.57016716 7.77665205
110 -0.47460003 1.57016716
111 -2.78127154 -0.47460003
112 1.52947376 -2.78127154
113 1.71101200 1.52947376
114 -1.12034130 1.71101200
115 0.67990426 -1.12034130
116 -0.27757683 0.67990426
117 -4.43098757 -0.27757683
118 2.13514416 -4.43098757
119 0.02164408 2.13514416
120 0.85092286 0.02164408
121 -1.45215943 0.85092286
122 -4.13816094 -1.45215943
123 -1.28859144 -4.13816094
124 -2.93021192 -1.28859144
125 -2.61813671 -2.93021192
126 -0.17928813 -2.61813671
127 1.66517745 -0.17928813
128 0.31088212 1.66517745
129 -2.88769301 0.31088212
130 2.14489066 -2.88769301
131 -2.00911408 2.14489066
132 1.97520119 -2.00911408
133 -0.37484580 1.97520119
134 2.31650721 -0.37484580
135 7.05920727 2.31650721
136 0.84821620 7.05920727
137 -0.11181133 0.84821620
138 -1.69060800 -0.11181133
139 -2.52490431 -1.69060800
140 -2.34479502 -2.52490431
141 2.21954843 -2.34479502
142 -1.08517459 2.21954843
143 -0.37092260 -1.08517459
144 -0.93803388 -0.37092260
145 0.67451474 -0.93803388
146 -2.62150312 0.67451474
147 -3.65690682 -2.62150312
148 1.79755033 -3.65690682
149 -0.03499267 1.79755033
150 3.41319320 -0.03499267
151 -2.49352362 3.41319320
152 -2.54127105 -2.49352362
153 2.04046926 -2.54127105
154 3.44775157 2.04046926
155 1.40221519 3.44775157
156 0.52351328 1.40221519
157 1.66517745 0.52351328
158 -4.80116506 1.66517745
159 2.85929262 -4.80116506
160 1.83784717 2.85929262
161 7.23853382 1.83784717
162 0.37904326 7.23853382
163 8.80234506 0.37904326
164 1.75347950 8.80234506
165 6.52218337 1.75347950
166 -1.43722163 6.52218337
167 -1.49479172 -1.43722163
168 -1.25390930 -1.49479172
169 0.80497572 -1.25390930
170 4.31012396 0.80497572
171 0.59300433 4.31012396
172 -5.07014898 0.59300433
173 2.16827421 -5.07014898
174 1.13304569 2.16827421
175 -5.00901568 1.13304569
176 -1.23724439 -5.00901568
177 2.78617575 -1.23724439
178 -1.84733437 2.78617575
179 -1.65629785 -1.84733437
180 -1.94989367 -1.65629785
181 -5.34737806 -1.94989367
182 -1.03526688 -5.34737806
183 -2.97723779 -1.03526688
184 -1.93558879 -2.97723779
185 5.10783663 -1.93558879
186 1.17142900 5.10783663
187 -0.51606199 1.17142900
188 -0.64203020 -0.51606199
189 4.97173637 -0.64203020
190 -2.67323634 4.97173637
191 -2.87081632 -2.67323634
192 2.18332539 -2.87081632
193 0.68951513 2.18332539
194 1.30315794 0.68951513
195 -2.57308554 1.30315794
196 5.97251911 -2.57308554
197 1.92105948 5.97251911
198 1.05717076 1.92105948
199 -1.14131636 1.05717076
200 -0.05703670 -1.14131636
201 -0.91567069 -0.05703670
202 -0.30261087 -0.91567069
203 -0.27453478 -0.30261087
204 -1.42061853 -0.27453478
205 0.61892014 -1.42061853
206 -0.99390270 0.61892014
207 3.55197554 -0.99390270
208 -0.30932951 3.55197554
209 0.39558456 -0.30932951
210 -0.36480113 0.39558456
211 -0.67820167 -0.36480113
212 2.44063573 -0.67820167
213 -3.40616531 2.44063573
214 1.69249537 -3.40616531
215 0.26185556 1.69249537
216 0.35896432 0.26185556
217 -1.05604155 0.35896432
218 4.06340483 -1.05604155
219 1.69948760 4.06340483
220 -3.65955167 1.69948760
221 0.44284741 -3.65955167
222 0.72139143 0.44284741
223 -3.85770341 0.72139143
224 3.74907094 -3.85770341
225 -2.52232064 3.74907094
226 1.46775768 -2.52232064
227 -2.85554313 1.46775768
228 4.74466239 -2.85554313
229 -2.82339326 4.74466239
230 -1.38101806 -2.82339326
231 -1.65145550 -1.38101806
232 -3.34479502 -1.65145550
233 3.73166206 -3.34479502
234 -2.83961018 3.73166206
235 -1.85073738 -2.83961018
236 1.13706870 -1.85073738
237 -1.06370393 1.13706870
238 -5.32885167 -1.06370393
239 -3.92507078 -5.32885167
240 -5.34436122 -3.92507078
241 0.90254349 -5.34436122
242 0.46743331 0.90254349
243 1.11264238 0.46743331
244 1.75392748 1.11264238
245 3.96401218 1.75392748
246 0.87264189 3.96401218
247 9.34601224 0.87264189
248 2.78749069 9.34601224
249 0.41840675 2.78749069
250 1.02097392 0.41840675
251 2.44626145 1.02097392
252 -3.19247720 2.44626145
253 -0.84368398 -3.19247720
254 2.07933778 -0.84368398
255 0.18846590 2.07933778
256 4.14512702 0.18846590
257 0.74581712 4.14512702
258 2.51277226 0.74581712
259 -9.49235723 2.51277226
260 -1.44196558 -9.49235723
261 -0.85742982 -1.44196558
262 3.22311144 -0.85742982
263 -1.47825043 3.22311144
> 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/791dx1384991261.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/82l321384991261.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/9kccy1384991261.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/10zrak1384991261.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, signif(mysum$coefficients[i,1],6), 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/11ky7e1384991261.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,signif(mysum$coefficients[i,1],6))
+ a<-table.element(a, signif(mysum$coefficients[i,2],6))
+ a<-table.element(a, signif(mysum$coefficients[i,3],4))
+ a<-table.element(a, signif(mysum$coefficients[i,4],6))
+ a<-table.element(a, signif(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/12jir11384991261.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, signif(sqrt(mysum$r.squared),6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, signif(mysum$r.squared,6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, signif(mysum$adj.r.squared,6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, signif(mysum$fstatistic[1],6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, signif(mysum$fstatistic[2],6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, signif(mysum$fstatistic[3],6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6))
> 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, signif(mysum$sigma,6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, signif(sum(myerror*myerror),6))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/13lpix1384991261.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,signif(x[i],6))
+ a<-table.element(a,signif(x[i]-mysum$resid[i],6))
+ a<-table.element(a,signif(mysum$resid[i],6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/14q59b1384991261.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,signif(gqarr[mypoint-kp3+1,1],6))
+ a<-table.element(a,signif(gqarr[mypoint-kp3+1,2],6))
+ a<-table.element(a,signif(gqarr[mypoint-kp3+1,3],6))
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/159d791384991261.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,signif(numsignificant1,6))
+ a<-table.element(a,signif(numsignificant1/numgqtests,6))
+ 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,signif(numsignificant5,6))
+ a<-table.element(a,signif(numsignificant5/numgqtests,6))
+ 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,signif(numsignificant10,6))
+ a<-table.element(a,signif(numsignificant10/numgqtests,6))
+ 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/16g7b11384991261.tab")
+ }
>
> try(system("convert tmp/1mivm1384991261.ps tmp/1mivm1384991261.png",intern=TRUE))
character(0)
> try(system("convert tmp/2gkyu1384991261.ps tmp/2gkyu1384991261.png",intern=TRUE))
character(0)
> try(system("convert tmp/3ouvo1384991261.ps tmp/3ouvo1384991261.png",intern=TRUE))
character(0)
> try(system("convert tmp/4di5k1384991261.ps tmp/4di5k1384991261.png",intern=TRUE))
character(0)
> try(system("convert tmp/5toae1384991261.ps tmp/5toae1384991261.png",intern=TRUE))
character(0)
> try(system("convert tmp/6xqzd1384991261.ps tmp/6xqzd1384991261.png",intern=TRUE))
character(0)
> try(system("convert tmp/791dx1384991261.ps tmp/791dx1384991261.png",intern=TRUE))
character(0)
> try(system("convert tmp/82l321384991261.ps tmp/82l321384991261.png",intern=TRUE))
character(0)
> try(system("convert tmp/9kccy1384991261.ps tmp/9kccy1384991261.png",intern=TRUE))
character(0)
> try(system("convert tmp/10zrak1384991261.ps tmp/10zrak1384991261.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
10.174 1.631 11.798