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(14
+ ,41
+ ,38
+ ,12
+ ,13
+ ,18
+ ,39
+ ,32
+ ,11
+ ,16
+ ,11
+ ,30
+ ,35
+ ,14
+ ,19
+ ,12
+ ,31
+ ,33
+ ,12
+ ,15
+ ,16
+ ,34
+ ,37
+ ,21
+ ,14
+ ,18
+ ,35
+ ,29
+ ,12
+ ,13
+ ,14
+ ,39
+ ,31
+ ,22
+ ,19
+ ,14
+ ,34
+ ,36
+ ,11
+ ,15
+ ,15
+ ,36
+ ,35
+ ,10
+ ,14
+ ,15
+ ,37
+ ,38
+ ,13
+ ,15
+ ,17
+ ,38
+ ,31
+ ,10
+ ,16
+ ,19
+ ,36
+ ,34
+ ,8
+ ,16
+ ,10
+ ,38
+ ,35
+ ,15
+ ,16
+ ,16
+ ,39
+ ,38
+ ,14
+ ,16
+ ,18
+ ,33
+ ,37
+ ,10
+ ,17
+ ,14
+ ,32
+ ,33
+ ,14
+ ,15
+ ,14
+ ,36
+ ,32
+ ,14
+ ,15
+ ,17
+ ,38
+ ,38
+ ,11
+ ,20
+ ,14
+ ,39
+ ,38
+ ,10
+ ,18
+ ,16
+ ,32
+ ,32
+ ,13
+ ,16
+ ,18
+ ,32
+ ,33
+ ,9.5
+ ,16
+ ,11
+ ,31
+ ,31
+ ,14
+ ,16
+ ,14
+ ,39
+ ,38
+ ,12
+ ,19
+ ,12
+ ,37
+ ,39
+ ,14
+ ,16
+ ,17
+ ,39
+ ,32
+ ,11
+ ,17
+ ,9
+ ,41
+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c(5
+ ,264)
+ ,dimnames=list(c('Happiness'
+ ,'Connected'
+ ,'Separate'
+ ,'Depression'
+ ,'Learning')
+ ,1:264))
> y <- array(NA,dim=c(5,264),dimnames=list(c('Happiness','Connected','Separate','Depression','Learning'),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 = '1'
> par3 <- 'No Linear Trend'
> par2 <- 'Do not include Seasonal Dummies'
> par1 <- '1'
> #'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
Happiness Connected Separate Depression Learning
1 14 41 38 12.0 13
2 18 39 32 11.0 16
3 11 30 35 14.0 19
4 12 31 33 12.0 15
5 16 34 37 21.0 14
6 18 35 29 12.0 13
7 14 39 31 22.0 19
8 14 34 36 11.0 15
9 15 36 35 10.0 14
10 15 37 38 13.0 15
11 17 38 31 10.0 16
12 19 36 34 8.0 16
13 10 38 35 15.0 16
14 16 39 38 14.0 16
15 18 33 37 10.0 17
16 14 32 33 14.0 15
17 14 36 32 14.0 15
18 17 38 38 11.0 20
19 14 39 38 10.0 18
20 16 32 32 13.0 16
21 18 32 33 9.5 16
22 11 31 31 14.0 16
23 14 39 38 12.0 19
24 12 37 39 14.0 16
25 17 39 32 11.0 17
26 9 41 32 9.0 17
27 16 36 35 11.0 16
28 14 33 37 15.0 15
29 15 33 33 14.0 16
30 11 34 33 13.0 14
31 16 31 31 9.0 15
32 13 27 32 15.0 12
33 17 37 31 10.0 14
34 15 34 37 11.0 16
35 14 34 30 13.0 14
36 16 32 33 8.0 10
37 9 29 31 20.0 10
38 15 36 33 12.0 14
39 17 29 31 10.0 16
40 13 35 33 10.0 16
41 15 37 32 9.0 16
42 16 34 33 14.0 14
43 16 38 32 8.0 20
44 12 35 33 14.0 14
45 15 38 28 11.0 14
46 11 37 35 13.0 11
47 15 38 39 9.0 14
48 15 33 34 11.0 15
49 17 36 38 15.0 16
50 13 38 32 11.0 14
51 16 32 38 10.0 16
52 14 32 30 14.0 14
53 11 32 33 18.0 12
54 12 34 38 14.0 16
55 12 32 32 11.0 9
56 15 37 35 14.5 14
57 16 39 34 13.0 16
58 15 29 34 9.0 16
59 12 37 36 10.0 15
60 12 35 34 15.0 16
61 8 30 28 20.0 12
62 13 38 34 12.0 16
63 11 34 35 12.0 16
64 14 31 35 14.0 14
65 15 34 31 13.0 16
66 10 35 37 11.0 17
67 11 36 35 17.0 18
68 12 30 27 12.0 18
69 15 39 40 13.0 12
70 15 35 37 14.0 16
71 14 38 36 13.0 10
72 16 31 38 15.0 14
73 15 34 39 13.0 18
74 15 38 41 10.0 18
75 13 34 27 11.0 16
76 12 39 30 19.0 17
77 17 37 37 13.0 16
78 13 34 31 17.0 16
79 15 28 31 13.0 13
80 13 37 27 9.0 16
81 15 33 36 11.0 16
82 15 35 37 9.0 16
83 16 37 33 12.0 15
84 15 32 34 12.0 15
85 14 33 31 13.0 16
86 15 38 39 13.0 14
87 14 33 34 12.0 16
88 13 29 32 15.0 16
89 7 33 33 22.0 15
90 17 31 36 13.0 12
91 13 36 32 15.0 17
92 15 35 41 13.0 16
93 14 32 28 15.0 15
94 13 29 30 12.5 13
95 16 39 36 11.0 16
96 12 37 35 16.0 16
97 14 35 31 11.0 16
98 17 37 34 11.0 16
99 15 32 36 10.0 14
100 17 38 36 10.0 16
101 12 37 35 16.0 16
102 16 36 37 12.0 20
103 11 32 28 11.0 15
104 15 33 39 16.0 16
105 9 40 32 19.0 13
106 16 38 35 11.0 17
107 15 41 39 16.0 16
108 10 36 35 15.0 16
109 10 43 42 24.0 12
110 15 30 34 14.0 16
111 11 31 33 15.0 16
112 13 32 41 11.0 17
113 14 32 33 15.0 13
114 18 37 34 12.0 12
115 16 37 32 10.0 18
116 14 33 40 14.0 14
117 14 34 40 13.0 14
118 14 33 35 9.0 13
119 14 38 36 15.0 16
120 12 33 37 15.0 13
121 14 31 27 14.0 16
122 15 38 39 11.0 13
123 15 37 38 8.0 16
124 15 36 31 11.0 15
125 13 31 33 11.0 16
126 17 39 32 8.0 15
127 17 44 39 10.0 17
128 19 33 36 11.0 15
129 15 35 33 13.0 12
130 13 32 33 11.0 16
131 9 28 32 20.0 10
132 15 40 37 10.0 16
133 15 27 30 15.0 12
134 15 37 38 12.0 14
135 16 32 29 14.0 15
136 11 28 22 23.0 13
137 14 34 35 14.0 15
138 11 30 35 16.0 11
139 15 35 34 11.0 12
140 13 31 35 12.0 11
141 15 32 34 10.0 16
142 16 30 37 14.0 15
143 14 30 35 12.0 17
144 15 31 23 12.0 16
145 16 40 31 11.0 10
146 16 32 27 12.0 18
147 11 36 36 13.0 13
148 12 32 31 11.0 16
149 9 35 32 19.0 13
150 16 38 39 12.0 10
151 13 42 37 17.0 15
152 16 34 38 9.0 16
153 12 35 39 12.0 16
154 9 38 34 19.0 14
155 13 33 31 18.0 10
156 13 36 32 15.0 17
157 14 32 37 14.0 13
158 19 33 36 11.0 15
159 13 34 32 9.0 16
160 12 32 38 18.0 12
161 13 34 36 16.0 13
162 10 27 26 24.0 13
163 14 31 26 14.0 12
164 16 38 33 20.0 17
165 10 34 39 18.0 15
166 11 24 30 23.0 10
167 14 30 33 12.0 14
168 12 26 25 14.0 11
169 9 34 38 16.0 13
170 9 27 37 18.0 16
171 11 37 31 20.0 12
172 16 36 37 12.0 16
173 9 41 35 12.0 12
174 13 29 25 17.0 9
175 16 36 28 13.0 12
176 13 32 35 9.0 15
177 9 37 33 16.0 12
178 12 30 30 18.0 12
179 16 31 31 10.0 14
180 11 38 37 14.0 12
181 14 36 36 11.0 16
182 13 35 30 9.0 11
183 15 31 36 11.0 19
184 14 38 32 10.0 15
185 16 22 28 11.0 8
186 13 32 36 19.0 16
187 14 36 34 14.0 17
188 15 39 31 12.0 12
189 13 28 28 14.0 11
190 11 32 36 21.0 11
191 11 32 36 13.0 14
192 14 38 40 10.0 16
193 15 32 33 15.0 12
194 11 35 37 16.0 16
195 15 32 32 14.0 13
196 12 37 38 12.0 15
197 14 34 31 19.0 16
198 14 33 37 15.0 16
199 8 33 33 19.0 14
200 13 26 32 13.0 16
201 9 30 30 17.0 16
202 15 24 30 12.0 14
203 17 34 31 11.0 11
204 13 34 32 14.0 12
205 15 33 34 11.0 15
206 15 34 36 13.0 15
207 14 35 37 12.0 16
208 16 35 36 15.0 16
209 13 36 33 14.0 11
210 16 34 33 12.0 15
211 9 34 33 17.0 12
212 16 41 44 11.0 12
213 11 32 39 18.0 15
214 10 30 32 13.0 15
215 11 35 35 17.0 16
216 15 28 25 13.0 14
217 17 33 35 11.0 17
218 14 39 34 12.0 14
219 8 36 35 22.0 13
220 15 36 39 14.0 15
221 11 35 33 12.0 13
222 16 38 36 12.0 14
223 10 33 32 17.0 15
224 15 31 32 9.0 12
225 9 34 36 21.0 13
226 16 32 36 10.0 8
227 19 31 32 11.0 14
228 12 33 34 12.0 14
229 8 34 33 23.0 11
230 11 34 35 13.0 12
231 14 34 30 12.0 13
232 9 33 38 16.0 10
233 15 32 34 9.0 16
234 13 41 33 17.0 18
235 16 34 32 9.0 13
236 11 36 31 14.0 11
237 12 37 30 17.0 4
238 13 36 27 13.0 13
239 10 29 31 11.0 16
240 11 37 30 12.0 10
241 12 27 32 10.0 12
242 8 35 35 19.0 12
243 12 28 28 16.0 10
244 12 35 33 16.0 13
245 15 37 31 14.0 15
246 11 29 35 20.0 12
247 13 32 35 15.0 14
248 14 36 32 23.0 10
249 10 19 21 20.0 12
250 12 21 20 16.0 12
251 15 31 34 14.0 11
252 13 33 32 17.0 10
253 13 36 34 11.0 12
254 13 33 32 13.0 16
255 12 37 33 17.0 12
256 12 34 33 15.0 14
257 9 35 37 21.0 16
258 9 31 32 18.0 14
259 15 37 34 15.0 13
260 10 35 30 8.0 4
261 14 27 30 12.0 15
262 15 34 38 12.0 11
263 7 40 36 22.0 11
264 14 29 32 12.0 14
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Connected Separate Depression Learning
16.28213 0.01787 0.01203 -0.39727 0.11373
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-6.7580 -1.4319 0.2301 1.4021 5.4153
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 16.28213 1.59164 10.230 <2e-16 ***
Connected 0.01787 0.03725 0.480 0.6317
Separate 0.01203 0.03825 0.315 0.7533
Depression -0.39727 0.03711 -10.706 <2e-16 ***
Learning 0.11373 0.05357 2.123 0.0347 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.022 on 259 degrees of freedom
Multiple R-squared: 0.3549, Adjusted R-squared: 0.345
F-statistic: 35.63 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.7542024 0.491595108 0.245797554
[2,] 0.6131950 0.773609945 0.386804973
[3,] 0.5251399 0.949720201 0.474860101
[4,] 0.4272371 0.854474105 0.572762948
[5,] 0.7237748 0.552450461 0.276225231
[6,] 0.9298787 0.140242664 0.070121332
[7,] 0.9241473 0.151705312 0.075852656
[8,] 0.9689235 0.062152934 0.031076467
[9,] 0.9525151 0.094969743 0.047484871
[10,] 0.9378523 0.124295474 0.062147737
[11,] 0.9265917 0.146816680 0.073408340
[12,] 0.9195469 0.160906221 0.080453110
[13,] 0.9013325 0.197335006 0.098667503
[14,] 0.9042775 0.191445098 0.095722549
[15,] 0.9397418 0.120516330 0.060258165
[16,] 0.9235489 0.152902124 0.076451062
[17,] 0.9196626 0.160674718 0.080337359
[18,] 0.8978049 0.204390129 0.102195064
[19,] 0.9970257 0.005948644 0.002974322
[20,] 0.9957541 0.008491776 0.004245888
[21,] 0.9936849 0.012630168 0.006315084
[22,] 0.9910871 0.017825720 0.008912860
[23,] 0.9953128 0.009374431 0.004687215
[24,] 0.9932103 0.013579445 0.006789723
[25,] 0.9908928 0.018214459 0.009107229
[26,] 0.9889948 0.022010379 0.011005189
[27,] 0.9845901 0.030819798 0.015409899
[28,] 0.9795641 0.040871888 0.020435944
[29,] 0.9724586 0.055082722 0.027541361
[30,] 0.9786567 0.042686674 0.021343337
[31,] 0.9716636 0.056672702 0.028336351
[32,] 0.9688939 0.062212142 0.031106071
[33,] 0.9707898 0.058420402 0.029210201
[34,] 0.9629690 0.074061910 0.037030955
[35,] 0.9627047 0.074590589 0.037295294
[36,] 0.9520838 0.095832399 0.047916199
[37,] 0.9498027 0.100394648 0.050197324
[38,] 0.9366727 0.126654648 0.063327324
[39,] 0.9464505 0.107099094 0.053549547
[40,] 0.9327231 0.134553835 0.067276918
[41,] 0.9165526 0.166894714 0.083447357
[42,] 0.9403897 0.119220687 0.059610343
[43,] 0.9352791 0.129441769 0.064720885
[44,] 0.9215839 0.156832267 0.078416133
[45,] 0.9045897 0.190820631 0.095410315
[46,] 0.8914604 0.217079286 0.108539643
[47,] 0.8891808 0.221638305 0.110819153
[48,] 0.8831864 0.233627254 0.116813627
[49,] 0.8733301 0.253339861 0.126669930
[50,] 0.8650587 0.269882513 0.134941256
[51,] 0.8416462 0.316707517 0.158353759
[52,] 0.8688328 0.262334444 0.131167222
[53,] 0.8609061 0.278187720 0.139093860
[54,] 0.8894483 0.221103445 0.110551722
[55,] 0.8807196 0.238560797 0.119280398
[56,] 0.9132141 0.173571874 0.086785937
[57,] 0.8973290 0.205342071 0.102671036
[58,] 0.8814845 0.237030977 0.118515489
[59,] 0.9496420 0.100715959 0.050357980
[60,] 0.9485908 0.102818465 0.051409233
[61,] 0.9527937 0.094412639 0.047206320
[62,] 0.9457157 0.108568542 0.054284271
[63,] 0.9384670 0.123066063 0.061533032
[64,] 0.9260610 0.147877947 0.073938974
[65,] 0.9378571 0.124285875 0.062142937
[66,] 0.9261058 0.147788497 0.073894249
[67,] 0.9126031 0.174793728 0.087396864
[68,] 0.9044747 0.191050681 0.095525341
[69,] 0.8870750 0.225849934 0.112924967
[70,] 0.9010961 0.197807785 0.098903892
[71,] 0.8843255 0.231349081 0.115674541
[72,] 0.8755392 0.248921653 0.124460826
[73,] 0.8775451 0.244909823 0.122454911
[74,] 0.8571603 0.285679300 0.142839650
[75,] 0.8361495 0.327700905 0.163850452
[76,] 0.8285321 0.342935850 0.171467925
[77,] 0.8067157 0.386568587 0.193284293
[78,] 0.7796572 0.440685522 0.220342761
[79,] 0.7560930 0.487814027 0.243907013
[80,] 0.7263854 0.547229202 0.273614601
[81,] 0.6943353 0.611329340 0.305664670
[82,] 0.7637866 0.472426844 0.236213422
[83,] 0.8066200 0.386760037 0.193380019
[84,] 0.7804440 0.439111984 0.219555992
[85,] 0.7561311 0.487737828 0.243868914
[86,] 0.7357229 0.528554202 0.264277101
[87,] 0.7080140 0.583971949 0.291985975
[88,] 0.6843251 0.631349727 0.315674863
[89,] 0.6592575 0.681485091 0.340742545
[90,] 0.6281782 0.743643536 0.371821768
[91,] 0.6335508 0.732898337 0.366449168
[92,] 0.5988213 0.802357476 0.401178738
[93,] 0.5879491 0.824101791 0.412050896
[94,] 0.5608381 0.878323814 0.439161907
[95,] 0.5360076 0.927984871 0.463992436
[96,] 0.5961797 0.807640561 0.403820281
[97,] 0.5941030 0.811794089 0.405897045
[98,] 0.6113681 0.777263708 0.388631854
[99,] 0.5853763 0.829247403 0.414623702
[100,] 0.5788527 0.842294593 0.421147297
[101,] 0.6371674 0.725665109 0.362832555
[102,] 0.6104456 0.779108876 0.389554438
[103,] 0.5941057 0.811788514 0.405894257
[104,] 0.5969479 0.806104182 0.403052091
[105,] 0.6037842 0.792431654 0.396215827
[106,] 0.5806752 0.838649562 0.419324781
[107,] 0.6734437 0.653112693 0.326556347
[108,] 0.6450487 0.709902640 0.354951320
[109,] 0.6163484 0.767303202 0.383651601
[110,] 0.5855665 0.828867098 0.414433549
[111,] 0.5650282 0.869943537 0.434971769
[112,] 0.5343026 0.931394737 0.465697368
[113,] 0.5086820 0.982635923 0.491317962
[114,] 0.4791820 0.958364035 0.520817982
[115,] 0.4473069 0.894613742 0.552693129
[116,] 0.4225842 0.845168318 0.577415841
[117,] 0.3893607 0.778721359 0.610639320
[118,] 0.3769653 0.753930686 0.623034657
[119,] 0.3535318 0.707063590 0.646468205
[120,] 0.3391704 0.678340796 0.660829602
[121,] 0.4671744 0.934348748 0.532825626
[122,] 0.4499935 0.899987012 0.550006494
[123,] 0.4371570 0.874313973 0.562843013
[124,] 0.4208013 0.841602526 0.579198737
[125,] 0.3888608 0.777721529 0.611139236
[126,] 0.4060666 0.812133202 0.593933399
[127,] 0.3792707 0.758541359 0.620729320
[128,] 0.4068946 0.813789260 0.593105370
[129,] 0.3923607 0.784721470 0.607639265
[130,] 0.3620254 0.724050766 0.637974617
[131,] 0.3431687 0.686337329 0.656831335
[132,] 0.3152565 0.630512981 0.684743509
[133,] 0.2898644 0.579728897 0.710135552
[134,] 0.2602653 0.520530530 0.739734735
[135,] 0.2831162 0.566232319 0.716883840
[136,] 0.2544831 0.508966186 0.745516907
[137,] 0.2329765 0.465953092 0.767023454
[138,] 0.2271985 0.454396975 0.772801512
[139,] 0.2192747 0.438549434 0.780725283
[140,] 0.2394704 0.478940887 0.760529557
[141,] 0.2563536 0.512707222 0.743646389
[142,] 0.2647850 0.529569934 0.735215033
[143,] 0.2751493 0.550298665 0.724850668
[144,] 0.2511166 0.502233140 0.748883430
[145,] 0.2272780 0.454555935 0.772722033
[146,] 0.2340099 0.468019859 0.765990071
[147,] 0.2459215 0.491843042 0.754078479
[148,] 0.2373252 0.474650346 0.762674827
[149,] 0.2106743 0.421348553 0.789325723
[150,] 0.1914735 0.382946985 0.808526508
[151,] 0.3072449 0.614489802 0.692755099
[152,] 0.3195988 0.639197652 0.680401174
[153,] 0.2941949 0.588389869 0.705805065
[154,] 0.2689852 0.537970487 0.731014757
[155,] 0.2434910 0.486981972 0.756509014
[156,] 0.2207458 0.441491557 0.779254221
[157,] 0.3601810 0.720362012 0.639818994
[158,] 0.3515479 0.703095777 0.648452111
[159,] 0.3467914 0.693582733 0.653208633
[160,] 0.3138207 0.627641325 0.686179337
[161,] 0.2881677 0.576335343 0.711832329
[162,] 0.3406502 0.681300469 0.659349766
[163,] 0.3663127 0.732625433 0.633687284
[164,] 0.3349297 0.669859450 0.665070275
[165,] 0.3301548 0.660309575 0.669845212
[166,] 0.5000865 0.999826939 0.499913469
[167,] 0.4838025 0.967605068 0.516197466
[168,] 0.5092702 0.981459694 0.490729847
[169,] 0.5200224 0.959955183 0.479977592
[170,] 0.5753071 0.849385742 0.424692871
[171,] 0.5429370 0.914126068 0.457063034
[172,] 0.5191538 0.961692384 0.480846192
[173,] 0.5197862 0.960427532 0.480213766
[174,] 0.4852983 0.970596560 0.514701720
[175,] 0.4806882 0.961376334 0.519311833
[176,] 0.4423399 0.884679868 0.557660066
[177,] 0.4133113 0.826622549 0.586688725
[178,] 0.4331381 0.866276238 0.566861881
[179,] 0.4239386 0.847877132 0.576061434
[180,] 0.3875323 0.775064616 0.612467692
[181,] 0.3599106 0.719821141 0.640089429
[182,] 0.3251951 0.650390243 0.674804878
[183,] 0.3050841 0.610168103 0.694915949
[184,] 0.3227634 0.645526774 0.677236613
[185,] 0.3003893 0.600778698 0.699610651
[186,] 0.3216025 0.643204919 0.678397540
[187,] 0.3082063 0.616412588 0.691793706
[188,] 0.3081424 0.616284796 0.691857602
[189,] 0.3180535 0.636106913 0.681946543
[190,] 0.3513034 0.702606794 0.648696603
[191,] 0.3235870 0.647173983 0.676413009
[192,] 0.3635851 0.727170265 0.636414867
[193,] 0.3282253 0.656450515 0.671774743
[194,] 0.3712953 0.742590606 0.628704697
[195,] 0.3488408 0.697681554 0.651159223
[196,] 0.3960346 0.792069289 0.603965356
[197,] 0.3564183 0.712836611 0.643581695
[198,] 0.3192378 0.638475535 0.680762233
[199,] 0.2961555 0.592311078 0.703844461
[200,] 0.2604705 0.520940945 0.739529528
[201,] 0.3024380 0.604876044 0.697561978
[202,] 0.2665691 0.533138281 0.733430860
[203,] 0.2654811 0.530962226 0.734518887
[204,] 0.2848272 0.569654371 0.715172815
[205,] 0.2781146 0.556229142 0.721885429
[206,] 0.2432041 0.486408218 0.756795891
[207,] 0.3112768 0.622553578 0.688723211
[208,] 0.2831326 0.566265216 0.716867392
[209,] 0.2697280 0.539455982 0.730272009
[210,] 0.2856176 0.571235294 0.714382353
[211,] 0.2473416 0.494683205 0.752658397
[212,] 0.2375271 0.475054242 0.762472879
[213,] 0.2336490 0.467297905 0.766351048
[214,] 0.2551402 0.510280449 0.744859775
[215,] 0.2640723 0.528144596 0.735927702
[216,] 0.2561176 0.512235153 0.743882423
[217,] 0.2207746 0.441549206 0.779225397
[218,] 0.1954217 0.390843307 0.804578347
[219,] 0.2256810 0.451361920 0.774319040
[220,] 0.5076239 0.984752292 0.492376146
[221,] 0.4739449 0.947889756 0.526055122
[222,] 0.4531202 0.906240459 0.546879770
[223,] 0.4348880 0.869775926 0.565112037
[224,] 0.3868762 0.773752468 0.613123766
[225,] 0.4139499 0.827899715 0.586050142
[226,] 0.3679395 0.735878951 0.632060525
[227,] 0.3177382 0.635476390 0.682261805
[228,] 0.3288276 0.657655268 0.671172366
[229,] 0.2979490 0.595897931 0.702051035
[230,] 0.2588342 0.517668301 0.741165850
[231,] 0.2130470 0.426094032 0.786952984
[232,] 0.3305415 0.661082973 0.669458513
[233,] 0.3166747 0.633349338 0.683325331
[234,] 0.3011995 0.602398999 0.698800500
[235,] 0.3848771 0.769754226 0.615122887
[236,] 0.3192839 0.638567795 0.680716103
[237,] 0.2581843 0.516368587 0.741815706
[238,] 0.2588026 0.517605223 0.741197389
[239,] 0.2087723 0.417544569 0.791227716
[240,] 0.1561030 0.312205934 0.843897033
[241,] 0.5220480 0.955903963 0.477951982
[242,] 0.4320480 0.864095998 0.567952001
[243,] 0.3772618 0.754523646 0.622738177
[244,] 0.3985193 0.797038536 0.601480732
[245,] 0.6875333 0.624933490 0.312466745
[246,] 0.6968807 0.606238662 0.303119331
[247,] 0.8771428 0.245714396 0.122857198
[248,] 0.8359293 0.328141436 0.164070718
[249,] 0.8400237 0.319952677 0.159976338
> postscript(file="/var/fisher/rcomp/tmp/1r79e1384798894.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/2ywt81384798894.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/35h3t1384798894.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/4puy71384798894.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/5e3sz1384798894.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
-0.18353111 3.18597080 -2.83864129 -2.17207158 5.41532587 4.03202830
7 8 9 10 11 12
3.22679127 -0.65906907 0.03367585 1.05777871 1.81860980 3.02371331
13 14 15 16 17 18
-3.24317917 2.30557180 2.72204294 0.60459444 0.54513244 1.67672126
19 20 21 22 23 24
-1.51096589 2.10563062 2.70315029 -2.46719014 -0.83015424 -1.67071465
25 26 27 28 29 30
2.07224220 -6.75804649 1.20348878 0.93585076 1.47299162 -2.71469554
31 32 33 34 35 36
0.66018784 0.44445637 2.06394121 0.21516744 0.32140915 0.78961667
37 38 39 40 41 42
-1.36544937 0.85228589 1.97947781 -2.15183732 -0.57282100 2.68257459
43 44 45 46 47 48
-0.44287973 -1.33529964 0.47944180 -2.45120221 -0.44748231 0.38287495
49 50 51 52 53 54
3.75646459 -1.56869778 0.84161087 0.75442773 -0.46513928 -1.60505708
55 56 57 58 59 60
-1.89280946 1.80351719 1.95644126 -0.45389700 -3.10996186 -1.17752160
61 62 63 64 65 66
-2.57467610 -1.42295464 -3.36349264 0.71212747 1.08191707 -4.91643538
67 68 69 70 71 72
-1.64034766 -2.42317377 1.33914626 1.38910359 0.63261726 3.07329290
73 74 75 76 77 78
0.75818070 -0.52919636 -1.66448360 0.27447299 2.95608502 0.67099756
79 80 81 82 83 84
1.53034820 -2.51264652 0.24507656 -0.59724703 1.72068307 0.79801930
85 86 87 88 89 90
0.09979129 1.14159819 -0.33358352 -0.04620646 -3.23511879 3.53027964
91 92 93 94 95 96
-0.28505463 0.94369388 1.06203905 -0.67412619 1.13783122 -0.82803482
97 98 99 100 101 102
-0.73049741 2.19764946 0.09313785 1.75843532 -0.82803482 1.12177473
103 104 105 106 107 108
-3.52704145 2.19532249 -2.31255664 1.05401174 2.05232870 -3.20743072
109 110 111 112 113 114
0.61355094 1.51457940 -2.09398981 -1.91095229 1.22932176 4.04983396
115 116 117 118 119 120
0.59699193 0.61620454 0.20106019 -1.19624300 0.74478594 -0.83669205
121 122 123 124 125 126
0.58094945 0.46078654 -1.04230050 0.36535696 -1.68307030 1.10788902
127 128 129 130 131 132
1.50135669 4.35880516 1.49488743 -1.70094453 -1.35961004 -0.28934803
133 134 135 136 137 138
2.46852616 0.77423719 2.65273403 1.61136350 0.54477620 -1.13427227
139 140 141 142 143 144
0.68831229 -0.74122699 -0.11024955 2.59220330 -0.40572434 0.83454878
145 146 147 148 149 150
1.86250305 1.54107778 -2.67282008 -2.67687473 -2.22318552 2.19924245
151 152 153 154 155 156
0.56952299 0.40859230 -2.42950645 -2.41460658 1.76851348 -0.28505463
157 158 159 160 161 162
0.78391205 4.35880516 -2.51919833 0.47468624 0.55473874 0.97836827
163 164 165 166 167 168
1.04789873 4.65351265 -1.91428289 1.92776702 -0.04046876 -0.73696666
169 170 171 172 173 174
-3.46933105 -2.87882212 0.26409964 1.57668912 -5.03369783 1.62867823
175 176 177 178 179 180
2.53718769 -2.40582597 -3.34905064 0.60671386 1.17118656 -2.20960470
181 182 183 184 185 186
-0.80854611 -1.94435978 -0.06036078 -1.07969650 2.44780096 1.44111178
187 188 189 190 191 192
0.29360546 1.05019020 0.19118020 0.80429500 -2.71505178 -1.28970427
193 194 195 196 197 198
2.34305035 -1.81635616 1.84408653 -2.33949141 2.46553781 0.82212216
199 200 201 202 203 204
-3.31320057 -0.78712404 -3.24547065 1.10288127 2.85601980 -0.07793332
205 206 207 208 209 210
0.38287495 1.13547118 -0.40543666 2.79840861 -0.01198807 1.77430574
211 212 213 214 215 216
-2.89815785 1.46071798 -0.87853444 -3.74489234 -1.39501625 1.48882898
217 218 219 220 221 222
2.14338286 -0.21337168 -2.08535406 1.46088817 -3.01611129 1.78043276
223 224 225 226 227 228
-2.20943452 -0.01066127 -1.45891064 1.77550943 4.55642178 -2.10612633
229 230 231 232 233 234
-1.40080851 -2.51130814 0.03786762 -3.11027104 -0.50751967 0.29435101
235 236 237 238 239 240
0.82198746 -1.98791828 0.99415293 -0.56450601 -4.62325206 -2.67456926
241 242 243 244 245 246
-2.54189425 -3.14556162 0.09944904 -0.42703079 1.53929311 0.35895385
247 248 249 250 251 252
0.09152337 4.68920654 -0.29381536 0.09339059 2.06534815 1.35920846
253 254 255 256 257 258
-1.32956194 -0.91224361 0.04821948 -0.92015529 -1.83000554 -2.66268735
259 260 261 262 263 264
2.12791574 -4.54552973 -0.06447000 1.16904565 -2.94142867 -0.01055964
> postscript(file="/var/fisher/rcomp/tmp/6vz801384798894.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 -0.18353111 NA
1 3.18597080 -0.18353111
2 -2.83864129 3.18597080
3 -2.17207158 -2.83864129
4 5.41532587 -2.17207158
5 4.03202830 5.41532587
6 3.22679127 4.03202830
7 -0.65906907 3.22679127
8 0.03367585 -0.65906907
9 1.05777871 0.03367585
10 1.81860980 1.05777871
11 3.02371331 1.81860980
12 -3.24317917 3.02371331
13 2.30557180 -3.24317917
14 2.72204294 2.30557180
15 0.60459444 2.72204294
16 0.54513244 0.60459444
17 1.67672126 0.54513244
18 -1.51096589 1.67672126
19 2.10563062 -1.51096589
20 2.70315029 2.10563062
21 -2.46719014 2.70315029
22 -0.83015424 -2.46719014
23 -1.67071465 -0.83015424
24 2.07224220 -1.67071465
25 -6.75804649 2.07224220
26 1.20348878 -6.75804649
27 0.93585076 1.20348878
28 1.47299162 0.93585076
29 -2.71469554 1.47299162
30 0.66018784 -2.71469554
31 0.44445637 0.66018784
32 2.06394121 0.44445637
33 0.21516744 2.06394121
34 0.32140915 0.21516744
35 0.78961667 0.32140915
36 -1.36544937 0.78961667
37 0.85228589 -1.36544937
38 1.97947781 0.85228589
39 -2.15183732 1.97947781
40 -0.57282100 -2.15183732
41 2.68257459 -0.57282100
42 -0.44287973 2.68257459
43 -1.33529964 -0.44287973
44 0.47944180 -1.33529964
45 -2.45120221 0.47944180
46 -0.44748231 -2.45120221
47 0.38287495 -0.44748231
48 3.75646459 0.38287495
49 -1.56869778 3.75646459
50 0.84161087 -1.56869778
51 0.75442773 0.84161087
52 -0.46513928 0.75442773
53 -1.60505708 -0.46513928
54 -1.89280946 -1.60505708
55 1.80351719 -1.89280946
56 1.95644126 1.80351719
57 -0.45389700 1.95644126
58 -3.10996186 -0.45389700
59 -1.17752160 -3.10996186
60 -2.57467610 -1.17752160
61 -1.42295464 -2.57467610
62 -3.36349264 -1.42295464
63 0.71212747 -3.36349264
64 1.08191707 0.71212747
65 -4.91643538 1.08191707
66 -1.64034766 -4.91643538
67 -2.42317377 -1.64034766
68 1.33914626 -2.42317377
69 1.38910359 1.33914626
70 0.63261726 1.38910359
71 3.07329290 0.63261726
72 0.75818070 3.07329290
73 -0.52919636 0.75818070
74 -1.66448360 -0.52919636
75 0.27447299 -1.66448360
76 2.95608502 0.27447299
77 0.67099756 2.95608502
78 1.53034820 0.67099756
79 -2.51264652 1.53034820
80 0.24507656 -2.51264652
81 -0.59724703 0.24507656
82 1.72068307 -0.59724703
83 0.79801930 1.72068307
84 0.09979129 0.79801930
85 1.14159819 0.09979129
86 -0.33358352 1.14159819
87 -0.04620646 -0.33358352
88 -3.23511879 -0.04620646
89 3.53027964 -3.23511879
90 -0.28505463 3.53027964
91 0.94369388 -0.28505463
92 1.06203905 0.94369388
93 -0.67412619 1.06203905
94 1.13783122 -0.67412619
95 -0.82803482 1.13783122
96 -0.73049741 -0.82803482
97 2.19764946 -0.73049741
98 0.09313785 2.19764946
99 1.75843532 0.09313785
100 -0.82803482 1.75843532
101 1.12177473 -0.82803482
102 -3.52704145 1.12177473
103 2.19532249 -3.52704145
104 -2.31255664 2.19532249
105 1.05401174 -2.31255664
106 2.05232870 1.05401174
107 -3.20743072 2.05232870
108 0.61355094 -3.20743072
109 1.51457940 0.61355094
110 -2.09398981 1.51457940
111 -1.91095229 -2.09398981
112 1.22932176 -1.91095229
113 4.04983396 1.22932176
114 0.59699193 4.04983396
115 0.61620454 0.59699193
116 0.20106019 0.61620454
117 -1.19624300 0.20106019
118 0.74478594 -1.19624300
119 -0.83669205 0.74478594
120 0.58094945 -0.83669205
121 0.46078654 0.58094945
122 -1.04230050 0.46078654
123 0.36535696 -1.04230050
124 -1.68307030 0.36535696
125 1.10788902 -1.68307030
126 1.50135669 1.10788902
127 4.35880516 1.50135669
128 1.49488743 4.35880516
129 -1.70094453 1.49488743
130 -1.35961004 -1.70094453
131 -0.28934803 -1.35961004
132 2.46852616 -0.28934803
133 0.77423719 2.46852616
134 2.65273403 0.77423719
135 1.61136350 2.65273403
136 0.54477620 1.61136350
137 -1.13427227 0.54477620
138 0.68831229 -1.13427227
139 -0.74122699 0.68831229
140 -0.11024955 -0.74122699
141 2.59220330 -0.11024955
142 -0.40572434 2.59220330
143 0.83454878 -0.40572434
144 1.86250305 0.83454878
145 1.54107778 1.86250305
146 -2.67282008 1.54107778
147 -2.67687473 -2.67282008
148 -2.22318552 -2.67687473
149 2.19924245 -2.22318552
150 0.56952299 2.19924245
151 0.40859230 0.56952299
152 -2.42950645 0.40859230
153 -2.41460658 -2.42950645
154 1.76851348 -2.41460658
155 -0.28505463 1.76851348
156 0.78391205 -0.28505463
157 4.35880516 0.78391205
158 -2.51919833 4.35880516
159 0.47468624 -2.51919833
160 0.55473874 0.47468624
161 0.97836827 0.55473874
162 1.04789873 0.97836827
163 4.65351265 1.04789873
164 -1.91428289 4.65351265
165 1.92776702 -1.91428289
166 -0.04046876 1.92776702
167 -0.73696666 -0.04046876
168 -3.46933105 -0.73696666
169 -2.87882212 -3.46933105
170 0.26409964 -2.87882212
171 1.57668912 0.26409964
172 -5.03369783 1.57668912
173 1.62867823 -5.03369783
174 2.53718769 1.62867823
175 -2.40582597 2.53718769
176 -3.34905064 -2.40582597
177 0.60671386 -3.34905064
178 1.17118656 0.60671386
179 -2.20960470 1.17118656
180 -0.80854611 -2.20960470
181 -1.94435978 -0.80854611
182 -0.06036078 -1.94435978
183 -1.07969650 -0.06036078
184 2.44780096 -1.07969650
185 1.44111178 2.44780096
186 0.29360546 1.44111178
187 1.05019020 0.29360546
188 0.19118020 1.05019020
189 0.80429500 0.19118020
190 -2.71505178 0.80429500
191 -1.28970427 -2.71505178
192 2.34305035 -1.28970427
193 -1.81635616 2.34305035
194 1.84408653 -1.81635616
195 -2.33949141 1.84408653
196 2.46553781 -2.33949141
197 0.82212216 2.46553781
198 -3.31320057 0.82212216
199 -0.78712404 -3.31320057
200 -3.24547065 -0.78712404
201 1.10288127 -3.24547065
202 2.85601980 1.10288127
203 -0.07793332 2.85601980
204 0.38287495 -0.07793332
205 1.13547118 0.38287495
206 -0.40543666 1.13547118
207 2.79840861 -0.40543666
208 -0.01198807 2.79840861
209 1.77430574 -0.01198807
210 -2.89815785 1.77430574
211 1.46071798 -2.89815785
212 -0.87853444 1.46071798
213 -3.74489234 -0.87853444
214 -1.39501625 -3.74489234
215 1.48882898 -1.39501625
216 2.14338286 1.48882898
217 -0.21337168 2.14338286
218 -2.08535406 -0.21337168
219 1.46088817 -2.08535406
220 -3.01611129 1.46088817
221 1.78043276 -3.01611129
222 -2.20943452 1.78043276
223 -0.01066127 -2.20943452
224 -1.45891064 -0.01066127
225 1.77550943 -1.45891064
226 4.55642178 1.77550943
227 -2.10612633 4.55642178
228 -1.40080851 -2.10612633
229 -2.51130814 -1.40080851
230 0.03786762 -2.51130814
231 -3.11027104 0.03786762
232 -0.50751967 -3.11027104
233 0.29435101 -0.50751967
234 0.82198746 0.29435101
235 -1.98791828 0.82198746
236 0.99415293 -1.98791828
237 -0.56450601 0.99415293
238 -4.62325206 -0.56450601
239 -2.67456926 -4.62325206
240 -2.54189425 -2.67456926
241 -3.14556162 -2.54189425
242 0.09944904 -3.14556162
243 -0.42703079 0.09944904
244 1.53929311 -0.42703079
245 0.35895385 1.53929311
246 0.09152337 0.35895385
247 4.68920654 0.09152337
248 -0.29381536 4.68920654
249 0.09339059 -0.29381536
250 2.06534815 0.09339059
251 1.35920846 2.06534815
252 -1.32956194 1.35920846
253 -0.91224361 -1.32956194
254 0.04821948 -0.91224361
255 -0.92015529 0.04821948
256 -1.83000554 -0.92015529
257 -2.66268735 -1.83000554
258 2.12791574 -2.66268735
259 -4.54552973 2.12791574
260 -0.06447000 -4.54552973
261 1.16904565 -0.06447000
262 -2.94142867 1.16904565
263 -0.01055964 -2.94142867
264 NA -0.01055964
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 3.18597080 -0.18353111
[2,] -2.83864129 3.18597080
[3,] -2.17207158 -2.83864129
[4,] 5.41532587 -2.17207158
[5,] 4.03202830 5.41532587
[6,] 3.22679127 4.03202830
[7,] -0.65906907 3.22679127
[8,] 0.03367585 -0.65906907
[9,] 1.05777871 0.03367585
[10,] 1.81860980 1.05777871
[11,] 3.02371331 1.81860980
[12,] -3.24317917 3.02371331
[13,] 2.30557180 -3.24317917
[14,] 2.72204294 2.30557180
[15,] 0.60459444 2.72204294
[16,] 0.54513244 0.60459444
[17,] 1.67672126 0.54513244
[18,] -1.51096589 1.67672126
[19,] 2.10563062 -1.51096589
[20,] 2.70315029 2.10563062
[21,] -2.46719014 2.70315029
[22,] -0.83015424 -2.46719014
[23,] -1.67071465 -0.83015424
[24,] 2.07224220 -1.67071465
[25,] -6.75804649 2.07224220
[26,] 1.20348878 -6.75804649
[27,] 0.93585076 1.20348878
[28,] 1.47299162 0.93585076
[29,] -2.71469554 1.47299162
[30,] 0.66018784 -2.71469554
[31,] 0.44445637 0.66018784
[32,] 2.06394121 0.44445637
[33,] 0.21516744 2.06394121
[34,] 0.32140915 0.21516744
[35,] 0.78961667 0.32140915
[36,] -1.36544937 0.78961667
[37,] 0.85228589 -1.36544937
[38,] 1.97947781 0.85228589
[39,] -2.15183732 1.97947781
[40,] -0.57282100 -2.15183732
[41,] 2.68257459 -0.57282100
[42,] -0.44287973 2.68257459
[43,] -1.33529964 -0.44287973
[44,] 0.47944180 -1.33529964
[45,] -2.45120221 0.47944180
[46,] -0.44748231 -2.45120221
[47,] 0.38287495 -0.44748231
[48,] 3.75646459 0.38287495
[49,] -1.56869778 3.75646459
[50,] 0.84161087 -1.56869778
[51,] 0.75442773 0.84161087
[52,] -0.46513928 0.75442773
[53,] -1.60505708 -0.46513928
[54,] -1.89280946 -1.60505708
[55,] 1.80351719 -1.89280946
[56,] 1.95644126 1.80351719
[57,] -0.45389700 1.95644126
[58,] -3.10996186 -0.45389700
[59,] -1.17752160 -3.10996186
[60,] -2.57467610 -1.17752160
[61,] -1.42295464 -2.57467610
[62,] -3.36349264 -1.42295464
[63,] 0.71212747 -3.36349264
[64,] 1.08191707 0.71212747
[65,] -4.91643538 1.08191707
[66,] -1.64034766 -4.91643538
[67,] -2.42317377 -1.64034766
[68,] 1.33914626 -2.42317377
[69,] 1.38910359 1.33914626
[70,] 0.63261726 1.38910359
[71,] 3.07329290 0.63261726
[72,] 0.75818070 3.07329290
[73,] -0.52919636 0.75818070
[74,] -1.66448360 -0.52919636
[75,] 0.27447299 -1.66448360
[76,] 2.95608502 0.27447299
[77,] 0.67099756 2.95608502
[78,] 1.53034820 0.67099756
[79,] -2.51264652 1.53034820
[80,] 0.24507656 -2.51264652
[81,] -0.59724703 0.24507656
[82,] 1.72068307 -0.59724703
[83,] 0.79801930 1.72068307
[84,] 0.09979129 0.79801930
[85,] 1.14159819 0.09979129
[86,] -0.33358352 1.14159819
[87,] -0.04620646 -0.33358352
[88,] -3.23511879 -0.04620646
[89,] 3.53027964 -3.23511879
[90,] -0.28505463 3.53027964
[91,] 0.94369388 -0.28505463
[92,] 1.06203905 0.94369388
[93,] -0.67412619 1.06203905
[94,] 1.13783122 -0.67412619
[95,] -0.82803482 1.13783122
[96,] -0.73049741 -0.82803482
[97,] 2.19764946 -0.73049741
[98,] 0.09313785 2.19764946
[99,] 1.75843532 0.09313785
[100,] -0.82803482 1.75843532
[101,] 1.12177473 -0.82803482
[102,] -3.52704145 1.12177473
[103,] 2.19532249 -3.52704145
[104,] -2.31255664 2.19532249
[105,] 1.05401174 -2.31255664
[106,] 2.05232870 1.05401174
[107,] -3.20743072 2.05232870
[108,] 0.61355094 -3.20743072
[109,] 1.51457940 0.61355094
[110,] -2.09398981 1.51457940
[111,] -1.91095229 -2.09398981
[112,] 1.22932176 -1.91095229
[113,] 4.04983396 1.22932176
[114,] 0.59699193 4.04983396
[115,] 0.61620454 0.59699193
[116,] 0.20106019 0.61620454
[117,] -1.19624300 0.20106019
[118,] 0.74478594 -1.19624300
[119,] -0.83669205 0.74478594
[120,] 0.58094945 -0.83669205
[121,] 0.46078654 0.58094945
[122,] -1.04230050 0.46078654
[123,] 0.36535696 -1.04230050
[124,] -1.68307030 0.36535696
[125,] 1.10788902 -1.68307030
[126,] 1.50135669 1.10788902
[127,] 4.35880516 1.50135669
[128,] 1.49488743 4.35880516
[129,] -1.70094453 1.49488743
[130,] -1.35961004 -1.70094453
[131,] -0.28934803 -1.35961004
[132,] 2.46852616 -0.28934803
[133,] 0.77423719 2.46852616
[134,] 2.65273403 0.77423719
[135,] 1.61136350 2.65273403
[136,] 0.54477620 1.61136350
[137,] -1.13427227 0.54477620
[138,] 0.68831229 -1.13427227
[139,] -0.74122699 0.68831229
[140,] -0.11024955 -0.74122699
[141,] 2.59220330 -0.11024955
[142,] -0.40572434 2.59220330
[143,] 0.83454878 -0.40572434
[144,] 1.86250305 0.83454878
[145,] 1.54107778 1.86250305
[146,] -2.67282008 1.54107778
[147,] -2.67687473 -2.67282008
[148,] -2.22318552 -2.67687473
[149,] 2.19924245 -2.22318552
[150,] 0.56952299 2.19924245
[151,] 0.40859230 0.56952299
[152,] -2.42950645 0.40859230
[153,] -2.41460658 -2.42950645
[154,] 1.76851348 -2.41460658
[155,] -0.28505463 1.76851348
[156,] 0.78391205 -0.28505463
[157,] 4.35880516 0.78391205
[158,] -2.51919833 4.35880516
[159,] 0.47468624 -2.51919833
[160,] 0.55473874 0.47468624
[161,] 0.97836827 0.55473874
[162,] 1.04789873 0.97836827
[163,] 4.65351265 1.04789873
[164,] -1.91428289 4.65351265
[165,] 1.92776702 -1.91428289
[166,] -0.04046876 1.92776702
[167,] -0.73696666 -0.04046876
[168,] -3.46933105 -0.73696666
[169,] -2.87882212 -3.46933105
[170,] 0.26409964 -2.87882212
[171,] 1.57668912 0.26409964
[172,] -5.03369783 1.57668912
[173,] 1.62867823 -5.03369783
[174,] 2.53718769 1.62867823
[175,] -2.40582597 2.53718769
[176,] -3.34905064 -2.40582597
[177,] 0.60671386 -3.34905064
[178,] 1.17118656 0.60671386
[179,] -2.20960470 1.17118656
[180,] -0.80854611 -2.20960470
[181,] -1.94435978 -0.80854611
[182,] -0.06036078 -1.94435978
[183,] -1.07969650 -0.06036078
[184,] 2.44780096 -1.07969650
[185,] 1.44111178 2.44780096
[186,] 0.29360546 1.44111178
[187,] 1.05019020 0.29360546
[188,] 0.19118020 1.05019020
[189,] 0.80429500 0.19118020
[190,] -2.71505178 0.80429500
[191,] -1.28970427 -2.71505178
[192,] 2.34305035 -1.28970427
[193,] -1.81635616 2.34305035
[194,] 1.84408653 -1.81635616
[195,] -2.33949141 1.84408653
[196,] 2.46553781 -2.33949141
[197,] 0.82212216 2.46553781
[198,] -3.31320057 0.82212216
[199,] -0.78712404 -3.31320057
[200,] -3.24547065 -0.78712404
[201,] 1.10288127 -3.24547065
[202,] 2.85601980 1.10288127
[203,] -0.07793332 2.85601980
[204,] 0.38287495 -0.07793332
[205,] 1.13547118 0.38287495
[206,] -0.40543666 1.13547118
[207,] 2.79840861 -0.40543666
[208,] -0.01198807 2.79840861
[209,] 1.77430574 -0.01198807
[210,] -2.89815785 1.77430574
[211,] 1.46071798 -2.89815785
[212,] -0.87853444 1.46071798
[213,] -3.74489234 -0.87853444
[214,] -1.39501625 -3.74489234
[215,] 1.48882898 -1.39501625
[216,] 2.14338286 1.48882898
[217,] -0.21337168 2.14338286
[218,] -2.08535406 -0.21337168
[219,] 1.46088817 -2.08535406
[220,] -3.01611129 1.46088817
[221,] 1.78043276 -3.01611129
[222,] -2.20943452 1.78043276
[223,] -0.01066127 -2.20943452
[224,] -1.45891064 -0.01066127
[225,] 1.77550943 -1.45891064
[226,] 4.55642178 1.77550943
[227,] -2.10612633 4.55642178
[228,] -1.40080851 -2.10612633
[229,] -2.51130814 -1.40080851
[230,] 0.03786762 -2.51130814
[231,] -3.11027104 0.03786762
[232,] -0.50751967 -3.11027104
[233,] 0.29435101 -0.50751967
[234,] 0.82198746 0.29435101
[235,] -1.98791828 0.82198746
[236,] 0.99415293 -1.98791828
[237,] -0.56450601 0.99415293
[238,] -4.62325206 -0.56450601
[239,] -2.67456926 -4.62325206
[240,] -2.54189425 -2.67456926
[241,] -3.14556162 -2.54189425
[242,] 0.09944904 -3.14556162
[243,] -0.42703079 0.09944904
[244,] 1.53929311 -0.42703079
[245,] 0.35895385 1.53929311
[246,] 0.09152337 0.35895385
[247,] 4.68920654 0.09152337
[248,] -0.29381536 4.68920654
[249,] 0.09339059 -0.29381536
[250,] 2.06534815 0.09339059
[251,] 1.35920846 2.06534815
[252,] -1.32956194 1.35920846
[253,] -0.91224361 -1.32956194
[254,] 0.04821948 -0.91224361
[255,] -0.92015529 0.04821948
[256,] -1.83000554 -0.92015529
[257,] -2.66268735 -1.83000554
[258,] 2.12791574 -2.66268735
[259,] -4.54552973 2.12791574
[260,] -0.06447000 -4.54552973
[261,] 1.16904565 -0.06447000
[262,] -2.94142867 1.16904565
[263,] -0.01055964 -2.94142867
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 3.18597080 -0.18353111
2 -2.83864129 3.18597080
3 -2.17207158 -2.83864129
4 5.41532587 -2.17207158
5 4.03202830 5.41532587
6 3.22679127 4.03202830
7 -0.65906907 3.22679127
8 0.03367585 -0.65906907
9 1.05777871 0.03367585
10 1.81860980 1.05777871
11 3.02371331 1.81860980
12 -3.24317917 3.02371331
13 2.30557180 -3.24317917
14 2.72204294 2.30557180
15 0.60459444 2.72204294
16 0.54513244 0.60459444
17 1.67672126 0.54513244
18 -1.51096589 1.67672126
19 2.10563062 -1.51096589
20 2.70315029 2.10563062
21 -2.46719014 2.70315029
22 -0.83015424 -2.46719014
23 -1.67071465 -0.83015424
24 2.07224220 -1.67071465
25 -6.75804649 2.07224220
26 1.20348878 -6.75804649
27 0.93585076 1.20348878
28 1.47299162 0.93585076
29 -2.71469554 1.47299162
30 0.66018784 -2.71469554
31 0.44445637 0.66018784
32 2.06394121 0.44445637
33 0.21516744 2.06394121
34 0.32140915 0.21516744
35 0.78961667 0.32140915
36 -1.36544937 0.78961667
37 0.85228589 -1.36544937
38 1.97947781 0.85228589
39 -2.15183732 1.97947781
40 -0.57282100 -2.15183732
41 2.68257459 -0.57282100
42 -0.44287973 2.68257459
43 -1.33529964 -0.44287973
44 0.47944180 -1.33529964
45 -2.45120221 0.47944180
46 -0.44748231 -2.45120221
47 0.38287495 -0.44748231
48 3.75646459 0.38287495
49 -1.56869778 3.75646459
50 0.84161087 -1.56869778
51 0.75442773 0.84161087
52 -0.46513928 0.75442773
53 -1.60505708 -0.46513928
54 -1.89280946 -1.60505708
55 1.80351719 -1.89280946
56 1.95644126 1.80351719
57 -0.45389700 1.95644126
58 -3.10996186 -0.45389700
59 -1.17752160 -3.10996186
60 -2.57467610 -1.17752160
61 -1.42295464 -2.57467610
62 -3.36349264 -1.42295464
63 0.71212747 -3.36349264
64 1.08191707 0.71212747
65 -4.91643538 1.08191707
66 -1.64034766 -4.91643538
67 -2.42317377 -1.64034766
68 1.33914626 -2.42317377
69 1.38910359 1.33914626
70 0.63261726 1.38910359
71 3.07329290 0.63261726
72 0.75818070 3.07329290
73 -0.52919636 0.75818070
74 -1.66448360 -0.52919636
75 0.27447299 -1.66448360
76 2.95608502 0.27447299
77 0.67099756 2.95608502
78 1.53034820 0.67099756
79 -2.51264652 1.53034820
80 0.24507656 -2.51264652
81 -0.59724703 0.24507656
82 1.72068307 -0.59724703
83 0.79801930 1.72068307
84 0.09979129 0.79801930
85 1.14159819 0.09979129
86 -0.33358352 1.14159819
87 -0.04620646 -0.33358352
88 -3.23511879 -0.04620646
89 3.53027964 -3.23511879
90 -0.28505463 3.53027964
91 0.94369388 -0.28505463
92 1.06203905 0.94369388
93 -0.67412619 1.06203905
94 1.13783122 -0.67412619
95 -0.82803482 1.13783122
96 -0.73049741 -0.82803482
97 2.19764946 -0.73049741
98 0.09313785 2.19764946
99 1.75843532 0.09313785
100 -0.82803482 1.75843532
101 1.12177473 -0.82803482
102 -3.52704145 1.12177473
103 2.19532249 -3.52704145
104 -2.31255664 2.19532249
105 1.05401174 -2.31255664
106 2.05232870 1.05401174
107 -3.20743072 2.05232870
108 0.61355094 -3.20743072
109 1.51457940 0.61355094
110 -2.09398981 1.51457940
111 -1.91095229 -2.09398981
112 1.22932176 -1.91095229
113 4.04983396 1.22932176
114 0.59699193 4.04983396
115 0.61620454 0.59699193
116 0.20106019 0.61620454
117 -1.19624300 0.20106019
118 0.74478594 -1.19624300
119 -0.83669205 0.74478594
120 0.58094945 -0.83669205
121 0.46078654 0.58094945
122 -1.04230050 0.46078654
123 0.36535696 -1.04230050
124 -1.68307030 0.36535696
125 1.10788902 -1.68307030
126 1.50135669 1.10788902
127 4.35880516 1.50135669
128 1.49488743 4.35880516
129 -1.70094453 1.49488743
130 -1.35961004 -1.70094453
131 -0.28934803 -1.35961004
132 2.46852616 -0.28934803
133 0.77423719 2.46852616
134 2.65273403 0.77423719
135 1.61136350 2.65273403
136 0.54477620 1.61136350
137 -1.13427227 0.54477620
138 0.68831229 -1.13427227
139 -0.74122699 0.68831229
140 -0.11024955 -0.74122699
141 2.59220330 -0.11024955
142 -0.40572434 2.59220330
143 0.83454878 -0.40572434
144 1.86250305 0.83454878
145 1.54107778 1.86250305
146 -2.67282008 1.54107778
147 -2.67687473 -2.67282008
148 -2.22318552 -2.67687473
149 2.19924245 -2.22318552
150 0.56952299 2.19924245
151 0.40859230 0.56952299
152 -2.42950645 0.40859230
153 -2.41460658 -2.42950645
154 1.76851348 -2.41460658
155 -0.28505463 1.76851348
156 0.78391205 -0.28505463
157 4.35880516 0.78391205
158 -2.51919833 4.35880516
159 0.47468624 -2.51919833
160 0.55473874 0.47468624
161 0.97836827 0.55473874
162 1.04789873 0.97836827
163 4.65351265 1.04789873
164 -1.91428289 4.65351265
165 1.92776702 -1.91428289
166 -0.04046876 1.92776702
167 -0.73696666 -0.04046876
168 -3.46933105 -0.73696666
169 -2.87882212 -3.46933105
170 0.26409964 -2.87882212
171 1.57668912 0.26409964
172 -5.03369783 1.57668912
173 1.62867823 -5.03369783
174 2.53718769 1.62867823
175 -2.40582597 2.53718769
176 -3.34905064 -2.40582597
177 0.60671386 -3.34905064
178 1.17118656 0.60671386
179 -2.20960470 1.17118656
180 -0.80854611 -2.20960470
181 -1.94435978 -0.80854611
182 -0.06036078 -1.94435978
183 -1.07969650 -0.06036078
184 2.44780096 -1.07969650
185 1.44111178 2.44780096
186 0.29360546 1.44111178
187 1.05019020 0.29360546
188 0.19118020 1.05019020
189 0.80429500 0.19118020
190 -2.71505178 0.80429500
191 -1.28970427 -2.71505178
192 2.34305035 -1.28970427
193 -1.81635616 2.34305035
194 1.84408653 -1.81635616
195 -2.33949141 1.84408653
196 2.46553781 -2.33949141
197 0.82212216 2.46553781
198 -3.31320057 0.82212216
199 -0.78712404 -3.31320057
200 -3.24547065 -0.78712404
201 1.10288127 -3.24547065
202 2.85601980 1.10288127
203 -0.07793332 2.85601980
204 0.38287495 -0.07793332
205 1.13547118 0.38287495
206 -0.40543666 1.13547118
207 2.79840861 -0.40543666
208 -0.01198807 2.79840861
209 1.77430574 -0.01198807
210 -2.89815785 1.77430574
211 1.46071798 -2.89815785
212 -0.87853444 1.46071798
213 -3.74489234 -0.87853444
214 -1.39501625 -3.74489234
215 1.48882898 -1.39501625
216 2.14338286 1.48882898
217 -0.21337168 2.14338286
218 -2.08535406 -0.21337168
219 1.46088817 -2.08535406
220 -3.01611129 1.46088817
221 1.78043276 -3.01611129
222 -2.20943452 1.78043276
223 -0.01066127 -2.20943452
224 -1.45891064 -0.01066127
225 1.77550943 -1.45891064
226 4.55642178 1.77550943
227 -2.10612633 4.55642178
228 -1.40080851 -2.10612633
229 -2.51130814 -1.40080851
230 0.03786762 -2.51130814
231 -3.11027104 0.03786762
232 -0.50751967 -3.11027104
233 0.29435101 -0.50751967
234 0.82198746 0.29435101
235 -1.98791828 0.82198746
236 0.99415293 -1.98791828
237 -0.56450601 0.99415293
238 -4.62325206 -0.56450601
239 -2.67456926 -4.62325206
240 -2.54189425 -2.67456926
241 -3.14556162 -2.54189425
242 0.09944904 -3.14556162
243 -0.42703079 0.09944904
244 1.53929311 -0.42703079
245 0.35895385 1.53929311
246 0.09152337 0.35895385
247 4.68920654 0.09152337
248 -0.29381536 4.68920654
249 0.09339059 -0.29381536
250 2.06534815 0.09339059
251 1.35920846 2.06534815
252 -1.32956194 1.35920846
253 -0.91224361 -1.32956194
254 0.04821948 -0.91224361
255 -0.92015529 0.04821948
256 -1.83000554 -0.92015529
257 -2.66268735 -1.83000554
258 2.12791574 -2.66268735
259 -4.54552973 2.12791574
260 -0.06447000 -4.54552973
261 1.16904565 -0.06447000
262 -2.94142867 1.16904565
263 -0.01055964 -2.94142867
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/77ghm1384798894.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/80da31384798894.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/9ohwf1384798894.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/fisher/rcomp/tmp/106f4k1384798894.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/fisher/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, 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/fisher/rcomp/tmp/11ostb1384798894.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/fisher/rcomp/tmp/12eetg1384798894.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/fisher/rcomp/tmp/1384w41384798894.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/fisher/rcomp/tmp/1442s01384798894.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/fisher/rcomp/tmp/15vooo1384798894.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/fisher/rcomp/tmp/163jxh1384798894.tab")
+ }
>
> try(system("convert tmp/1r79e1384798894.ps tmp/1r79e1384798894.png",intern=TRUE))
character(0)
> try(system("convert tmp/2ywt81384798894.ps tmp/2ywt81384798894.png",intern=TRUE))
character(0)
> try(system("convert tmp/35h3t1384798894.ps tmp/35h3t1384798894.png",intern=TRUE))
character(0)
> try(system("convert tmp/4puy71384798894.ps tmp/4puy71384798894.png",intern=TRUE))
character(0)
> try(system("convert tmp/5e3sz1384798894.ps tmp/5e3sz1384798894.png",intern=TRUE))
character(0)
> try(system("convert tmp/6vz801384798894.ps tmp/6vz801384798894.png",intern=TRUE))
character(0)
> try(system("convert tmp/77ghm1384798894.ps tmp/77ghm1384798894.png",intern=TRUE))
character(0)
> try(system("convert tmp/80da31384798894.ps tmp/80da31384798894.png",intern=TRUE))
character(0)
> try(system("convert tmp/9ohwf1384798894.ps tmp/9ohwf1384798894.png",intern=TRUE))
character(0)
> try(system("convert tmp/106f4k1384798894.ps tmp/106f4k1384798894.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
10.262 1.566 11.825