R version 2.13.0 (2011-04-13)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-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(127476
+ ,20
+ ,17
+ ,59
+ ,18158
+ ,130358
+ ,38
+ ,17
+ ,50
+ ,30461
+ ,7215
+ ,0
+ ,0
+ ,0
+ ,1423
+ ,112861
+ ,49
+ ,22
+ ,51
+ ,25629
+ ,210171
+ ,74
+ ,30
+ ,112
+ ,48758
+ ,393802
+ ,104
+ ,31
+ ,118
+ ,129230
+ ,117604
+ ,37
+ ,19
+ ,59
+ ,27376
+ ,126029
+ ,53
+ ,25
+ ,90
+ ,26706
+ ,99729
+ ,42
+ ,30
+ ,50
+ ,26505
+ ,256310
+ ,62
+ ,26
+ ,79
+ ,49801
+ ,113066
+ ,50
+ ,20
+ ,49
+ ,46580
+ ,156212
+ ,65
+ ,25
+ ,74
+ ,48352
+ ,69952
+ ,28
+ ,15
+ ,32
+ ,13899
+ ,152673
+ ,48
+ ,22
+ ,82
+ ,39342
+ ,125841
+ ,42
+ ,12
+ ,43
+ ,27465
+ ,125769
+ ,47
+ ,19
+ ,65
+ ,55211
+ ,123467
+ ,71
+ ,28
+ ,111
+ ,74098
+ ,56232
+ ,0
+ ,12
+ ,36
+ ,13497
+ ,108244
+ ,50
+ ,28
+ ,89
+ ,38338
+ ,22762
+ ,12
+ ,13
+ ,28
+ ,52505
+ ,48554
+ ,16
+ ,14
+ ,35
+ ,10663
+ ,178697
+ ,76
+ ,27
+ ,78
+ ,74484
+ ,140857
+ ,29
+ ,25
+ ,67
+ ,28895
+ ,93773
+ ,38
+ ,30
+ ,61
+ ,32827
+ ,133398
+ ,50
+ ,21
+ ,58
+ ,36188
+ ,113933
+ ,33
+ ,17
+ ,49
+ ,28173
+ ,144781
+ ,45
+ ,22
+ ,77
+ ,54926
+ ,140711
+ ,59
+ ,28
+ ,71
+ ,38900
+ ,283337
+ ,49
+ ,25
+ ,82
+ ,88530
+ ,158146
+ ,40
+ ,16
+ ,53
+ ,35482
+ ,123344
+ ,40
+ ,23
+ ,71
+ ,26730
+ ,157640
+ ,51
+ ,20
+ ,58
+ ,29806
+ ,91279
+ ,41
+ ,11
+ ,25
+ ,41799
+ ,189374
+ ,73
+ ,20
+ ,59
+ ,54289
+ ,167915
+ ,43
+ ,21
+ ,77
+ ,36805
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,175403
+ ,46
+ ,27
+ ,75
+ ,33146
+ ,92342
+ ,44
+ ,14
+ ,39
+ ,23333
+ ,100023
+ ,31
+ ,29
+ ,83
+ ,47686
+ ,178277
+ ,71
+ ,31
+ ,123
+ ,77783
+ ,145062
+ ,61
+ ,19
+ ,67
+ ,36042
+ ,110980
+ ,28
+ ,30
+ ,105
+ ,34541
+ ,86039
+ ,21
+ ,23
+ ,76
+ ,75620
+ ,120821
+ ,42
+ ,20
+ ,54
+ ,60610
+ ,95535
+ ,44
+ ,22
+ ,82
+ ,55041
+ ,109894
+ ,34
+ ,19
+ ,57
+ ,32087
+ ,61554
+ ,15
+ ,32
+ ,57
+ ,16356
+ ,156520
+ ,46
+ ,18
+ ,72
+ ,40161
+ ,159121
+ ,43
+ ,26
+ ,94
+ ,55459
+ ,129362
+ ,47
+ ,25
+ ,72
+ ,36679
+ ,48188
+ ,12
+ ,22
+ ,39
+ ,22346
+ ,95461
+ ,46
+ ,19
+ ,60
+ ,27377
+ ,229864
+ ,56
+ ,24
+ ,84
+ ,50273
+ ,180317
+ ,41
+ ,26
+ ,69
+ ,32104
+ ,150640
+ ,48
+ ,27
+ ,102
+ ,27016
+ ,104416
+ ,30
+ ,10
+ ,28
+ ,19715
+ ,165098
+ ,44
+ ,26
+ ,65
+ ,33629
+ ,63205
+ ,25
+ ,23
+ ,67
+ ,27084
+ ,100056
+ ,42
+ ,21
+ ,80
+ ,32352
+ ,137214
+ ,28
+ ,34
+ ,79
+ ,51845
+ ,99630
+ ,33
+ ,29
+ ,107
+ ,26591
+ ,84557
+ ,32
+ ,18
+ ,57
+ ,29677
+ ,91199
+ ,28
+ ,16
+ ,44
+ ,54237
+ ,83419
+ ,31
+ ,23
+ ,59
+ ,20284
+ ,101723
+ ,13
+ ,22
+ ,80
+ ,22741
+ ,94982
+ ,38
+ ,29
+ ,89
+ ,34178
+ ,129700
+ ,39
+ ,31
+ ,115
+ ,69551
+ ,110708
+ ,68
+ ,21
+ ,59
+ ,29653
+ ,81518
+ ,32
+ ,21
+ ,66
+ ,38071
+ ,31970
+ ,5
+ ,21
+ ,42
+ ,4157
+ ,192268
+ ,53
+ ,15
+ ,35
+ ,28321
+ ,87611
+ ,33
+ ,9
+ ,3
+ ,40195
+ ,77890
+ ,48
+ ,21
+ ,68
+ ,48158
+ ,83261
+ ,36
+ ,18
+ ,38
+ ,13310
+ ,116290
+ ,52
+ ,31
+ ,107
+ ,78474
+ ,56544
+ ,0
+ ,25
+ ,73
+ ,6386
+ ,116173
+ ,52
+ ,24
+ ,80
+ ,31588
+ ,111488
+ ,45
+ ,22
+ ,69
+ ,61254
+ ,60138
+ ,16
+ ,21
+ ,46
+ ,21152
+ ,73422
+ ,33
+ ,26
+ ,52
+ ,41272
+ ,67751
+ ,48
+ ,22
+ ,58
+ ,34165
+ ,213351
+ ,33
+ ,26
+ ,85
+ ,37054
+ ,51185
+ ,24
+ ,20
+ ,13
+ ,12368
+ ,97181
+ ,37
+ ,25
+ ,61
+ ,23168
+ ,45100
+ ,17
+ ,19
+ ,49
+ ,16380
+ ,115801
+ ,32
+ ,22
+ ,47
+ ,41242
+ ,185664
+ ,55
+ ,25
+ ,93
+ ,48450
+ ,71960
+ ,39
+ ,22
+ ,65
+ ,20790
+ ,76441
+ ,29
+ ,21
+ ,64
+ ,34585
+ ,103613
+ ,26
+ ,20
+ ,64
+ ,35672
+ ,98707
+ ,37
+ ,23
+ ,57
+ ,52168
+ ,126527
+ ,58
+ ,22
+ ,61
+ ,53933
+ ,136781
+ ,35
+ ,21
+ ,71
+ ,34474
+ ,105863
+ ,24
+ ,12
+ ,43
+ ,43753
+ ,38775
+ ,18
+ ,9
+ ,18
+ ,36456
+ ,179984
+ ,37
+ ,32
+ ,103
+ ,51183
+ ,164808
+ ,86
+ ,24
+ ,76
+ ,52742
+ ,19349
+ ,13
+ ,1
+ ,0
+ ,3895
+ ,146824
+ ,20
+ ,24
+ ,83
+ ,37076
+ ,108660
+ ,32
+ ,22
+ ,70
+ ,24079
+ ,43803
+ ,8
+ ,4
+ ,4
+ ,2325
+ ,47062
+ ,38
+ ,15
+ ,41
+ ,29354
+ ,110845
+ ,45
+ ,21
+ ,57
+ ,30341
+ ,92517
+ ,24
+ ,23
+ ,52
+ ,18992
+ ,58660
+ ,23
+ ,12
+ ,24
+ ,15292
+ ,27676
+ ,2
+ ,16
+ ,17
+ ,5842
+ ,98550
+ ,52
+ ,24
+ ,89
+ ,28918
+ ,43284
+ ,5
+ ,9
+ ,20
+ ,3738
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,66016
+ ,43
+ ,22
+ ,45
+ ,95352
+ ,57359
+ ,18
+ ,17
+ ,63
+ ,37478
+ ,96933
+ ,41
+ ,18
+ ,48
+ ,26839
+ ,70369
+ ,45
+ ,21
+ ,70
+ ,26783
+ ,65494
+ ,29
+ ,17
+ ,32
+ ,33392
+ ,3616
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,143931
+ ,32
+ ,20
+ ,72
+ ,25446
+ ,109894
+ ,58
+ ,26
+ ,56
+ ,59847
+ ,122973
+ ,17
+ ,26
+ ,64
+ ,28162
+ ,84336
+ ,24
+ ,20
+ ,77
+ ,33298
+ ,43410
+ ,7
+ ,1
+ ,3
+ ,2781
+ ,136250
+ ,62
+ ,24
+ ,73
+ ,37121
+ ,79015
+ ,30
+ ,14
+ ,37
+ ,22698
+ ,92937
+ ,49
+ ,26
+ ,54
+ ,27615
+ ,57586
+ ,3
+ ,12
+ ,32
+ ,32689
+ ,19764
+ ,10
+ ,2
+ ,4
+ ,5752
+ ,105757
+ ,42
+ ,16
+ ,55
+ ,23164
+ ,97213
+ ,18
+ ,22
+ ,81
+ ,20304
+ ,113402
+ ,40
+ ,28
+ ,90
+ ,34409
+ ,11796
+ ,1
+ ,2
+ ,1
+ ,0
+ ,7627
+ ,0
+ ,0
+ ,0
+ ,0
+ ,121085
+ ,29
+ ,17
+ ,38
+ ,92538
+ ,6836
+ ,0
+ ,1
+ ,0
+ ,0
+ ,139563
+ ,46
+ ,17
+ ,36
+ ,46037
+ ,5118
+ ,5
+ ,0
+ ,0
+ ,0
+ ,40248
+ ,8
+ ,4
+ ,7
+ ,5444
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,95079
+ ,21
+ ,25
+ ,75
+ ,23924
+ ,80750
+ ,21
+ ,26
+ ,52
+ ,52230
+ ,7131
+ ,0
+ ,0
+ ,0
+ ,0
+ ,4194
+ ,0
+ ,0
+ ,0
+ ,0
+ ,60378
+ ,15
+ ,15
+ ,45
+ ,8019
+ ,96971
+ ,40
+ ,18
+ ,60
+ ,34542
+ ,83484
+ ,17
+ ,19
+ ,48
+ ,21157)
+ ,dim=c(5
+ ,144)
+ ,dimnames=list(c('Time'
+ ,'Bloggings'
+ ,'Reviews'
+ ,'Feedbackm'
+ ,'Characters')
+ ,1:144))
> y <- array(NA,dim=c(5,144),dimnames=list(c('Time','Bloggings','Reviews','Feedbackm','Characters'),1:144))
> 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'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> library(lattice)
> library(lmtest)
Loading required package: zoo
> 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
Time Bloggings Reviews Feedbackm Characters
1 127476 20 17 59 18158
2 130358 38 17 50 30461
3 7215 0 0 0 1423
4 112861 49 22 51 25629
5 210171 74 30 112 48758
6 393802 104 31 118 129230
7 117604 37 19 59 27376
8 126029 53 25 90 26706
9 99729 42 30 50 26505
10 256310 62 26 79 49801
11 113066 50 20 49 46580
12 156212 65 25 74 48352
13 69952 28 15 32 13899
14 152673 48 22 82 39342
15 125841 42 12 43 27465
16 125769 47 19 65 55211
17 123467 71 28 111 74098
18 56232 0 12 36 13497
19 108244 50 28 89 38338
20 22762 12 13 28 52505
21 48554 16 14 35 10663
22 178697 76 27 78 74484
23 140857 29 25 67 28895
24 93773 38 30 61 32827
25 133398 50 21 58 36188
26 113933 33 17 49 28173
27 144781 45 22 77 54926
28 140711 59 28 71 38900
29 283337 49 25 82 88530
30 158146 40 16 53 35482
31 123344 40 23 71 26730
32 157640 51 20 58 29806
33 91279 41 11 25 41799
34 189374 73 20 59 54289
35 167915 43 21 77 36805
36 0 0 0 0 0
37 175403 46 27 75 33146
38 92342 44 14 39 23333
39 100023 31 29 83 47686
40 178277 71 31 123 77783
41 145062 61 19 67 36042
42 110980 28 30 105 34541
43 86039 21 23 76 75620
44 120821 42 20 54 60610
45 95535 44 22 82 55041
46 109894 34 19 57 32087
47 61554 15 32 57 16356
48 156520 46 18 72 40161
49 159121 43 26 94 55459
50 129362 47 25 72 36679
51 48188 12 22 39 22346
52 95461 46 19 60 27377
53 229864 56 24 84 50273
54 180317 41 26 69 32104
55 150640 48 27 102 27016
56 104416 30 10 28 19715
57 165098 44 26 65 33629
58 63205 25 23 67 27084
59 100056 42 21 80 32352
60 137214 28 34 79 51845
61 99630 33 29 107 26591
62 84557 32 18 57 29677
63 91199 28 16 44 54237
64 83419 31 23 59 20284
65 101723 13 22 80 22741
66 94982 38 29 89 34178
67 129700 39 31 115 69551
68 110708 68 21 59 29653
69 81518 32 21 66 38071
70 31970 5 21 42 4157
71 192268 53 15 35 28321
72 87611 33 9 3 40195
73 77890 48 21 68 48158
74 83261 36 18 38 13310
75 116290 52 31 107 78474
76 56544 0 25 73 6386
77 116173 52 24 80 31588
78 111488 45 22 69 61254
79 60138 16 21 46 21152
80 73422 33 26 52 41272
81 67751 48 22 58 34165
82 213351 33 26 85 37054
83 51185 24 20 13 12368
84 97181 37 25 61 23168
85 45100 17 19 49 16380
86 115801 32 22 47 41242
87 185664 55 25 93 48450
88 71960 39 22 65 20790
89 76441 29 21 64 34585
90 103613 26 20 64 35672
91 98707 37 23 57 52168
92 126527 58 22 61 53933
93 136781 35 21 71 34474
94 105863 24 12 43 43753
95 38775 18 9 18 36456
96 179984 37 32 103 51183
97 164808 86 24 76 52742
98 19349 13 1 0 3895
99 146824 20 24 83 37076
100 108660 32 22 70 24079
101 43803 8 4 4 2325
102 47062 38 15 41 29354
103 110845 45 21 57 30341
104 92517 24 23 52 18992
105 58660 23 12 24 15292
106 27676 2 16 17 5842
107 98550 52 24 89 28918
108 43284 5 9 20 3738
109 0 0 0 0 0
110 66016 43 22 45 95352
111 57359 18 17 63 37478
112 96933 41 18 48 26839
113 70369 45 21 70 26783
114 65494 29 17 32 33392
115 3616 0 0 0 0
116 0 0 0 0 0
117 143931 32 20 72 25446
118 109894 58 26 56 59847
119 122973 17 26 64 28162
120 84336 24 20 77 33298
121 43410 7 1 3 2781
122 136250 62 24 73 37121
123 79015 30 14 37 22698
124 92937 49 26 54 27615
125 57586 3 12 32 32689
126 19764 10 2 4 5752
127 105757 42 16 55 23164
128 97213 18 22 81 20304
129 113402 40 28 90 34409
130 11796 1 2 1 0
131 7627 0 0 0 0
132 121085 29 17 38 92538
133 6836 0 1 0 0
134 139563 46 17 36 46037
135 5118 5 0 0 0
136 40248 8 4 7 5444
137 0 0 0 0 0
138 95079 21 25 75 23924
139 80750 21 26 52 52230
140 7131 0 0 0 0
141 4194 0 0 0 0
142 60378 15 15 45 8019
143 96971 40 18 60 34542
144 83484 17 19 48 21157
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Bloggings Reviews Feedbackm Characters
9287.5 1386.8 -487.4 692.9 0.5
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-84592 -18015 -3608 15655 117202
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 9287.5173 6896.2334 1.347 0.18025
Bloggings 1386.7722 207.8556 6.672 5.53e-10 ***
Reviews -487.4394 716.8302 -0.680 0.49764
Feedbackm 692.8760 214.5626 3.229 0.00155 **
Characters 0.5000 0.1838 2.720 0.00736 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 32680 on 139 degrees of freedom
Multiple R-squared: 0.7031, Adjusted R-squared: 0.6946
F-statistic: 82.29 on 4 and 139 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.07606927 1.521385e-01 9.239307e-01
[2,] 0.09291155 1.858231e-01 9.070885e-01
[3,] 0.69886999 6.022600e-01 3.011300e-01
[4,] 0.74254450 5.149110e-01 2.574555e-01
[5,] 0.66694857 6.661029e-01 3.330514e-01
[6,] 0.56942559 8.611488e-01 4.305744e-01
[7,] 0.51583473 9.683305e-01 4.841653e-01
[8,] 0.47797760 9.559552e-01 5.220224e-01
[9,] 0.66479044 6.704191e-01 3.352096e-01
[10,] 0.99081451 1.837098e-02 9.185488e-03
[11,] 0.98625668 2.748664e-02 1.374332e-02
[12,] 0.98578041 2.843919e-02 1.421959e-02
[13,] 0.99250815 1.498369e-02 7.491847e-03
[14,] 0.98804295 2.391410e-02 1.195705e-02
[15,] 0.98713319 2.573361e-02 1.286681e-02
[16,] 0.99091950 1.816099e-02 9.080497e-03
[17,] 0.98646765 2.706470e-02 1.353235e-02
[18,] 0.97986351 4.027297e-02 2.013649e-02
[19,] 0.97279516 5.440969e-02 2.720484e-02
[20,] 0.96156683 7.686634e-02 3.843317e-02
[21,] 0.94770974 1.045805e-01 5.229026e-02
[22,] 0.99704147 5.917054e-03 2.958527e-03
[23,] 0.99767596 4.648081e-03 2.324040e-03
[24,] 0.99643291 7.134172e-03 3.567086e-03
[25,] 0.99622999 7.540012e-03 3.770006e-03
[26,] 0.99505430 9.891391e-03 4.945696e-03
[27,] 0.99383891 1.232219e-02 6.161093e-03
[28,] 0.99393238 1.213523e-02 6.067617e-03
[29,] 0.99141678 1.716644e-02 8.583218e-03
[30,] 0.99366771 1.266459e-02 6.332295e-03
[31,] 0.99097869 1.804261e-02 9.021305e-03
[32,] 0.99068355 1.863291e-02 9.316453e-03
[33,] 0.99420513 1.158974e-02 5.794870e-03
[34,] 0.99188323 1.623354e-02 8.116772e-03
[35,] 0.98891812 2.216376e-02 1.108188e-02
[36,] 0.99042866 1.914267e-02 9.571336e-03
[37,] 0.98752275 2.495450e-02 1.247725e-02
[38,] 0.99141869 1.716262e-02 8.581312e-03
[39,] 0.98814282 2.371437e-02 1.185718e-02
[40,] 0.98397017 3.205966e-02 1.602983e-02
[41,] 0.98186505 3.626990e-02 1.813495e-02
[42,] 0.97679026 4.641948e-02 2.320974e-02
[43,] 0.96913482 6.173036e-02 3.086518e-02
[44,] 0.96009728 7.980545e-02 3.990272e-02
[45,] 0.95461042 9.077916e-02 4.538958e-02
[46,] 0.98791698 2.416604e-02 1.208302e-02
[47,] 0.99558798 8.824037e-03 4.412019e-03
[48,] 0.99395538 1.208925e-02 6.044625e-03
[49,] 0.99390572 1.218855e-02 6.094277e-03
[50,] 0.99604697 7.906060e-03 3.953030e-03
[51,] 0.99582732 8.345362e-03 4.172681e-03
[52,] 0.99511451 9.770979e-03 4.885489e-03
[53,] 0.99416607 1.166787e-02 5.833933e-03
[54,] 0.99320642 1.358716e-02 6.793578e-03
[55,] 0.99098650 1.802700e-02 9.013502e-03
[56,] 0.98812697 2.374606e-02 1.187303e-02
[57,] 0.98412804 3.174392e-02 1.587196e-02
[58,] 0.98163452 3.673095e-02 1.836548e-02
[59,] 0.98095087 3.809825e-02 1.904913e-02
[60,] 0.97923667 4.152666e-02 2.076333e-02
[61,] 0.98141100 3.717800e-02 1.858900e-02
[62,] 0.97904006 4.191987e-02 2.095994e-02
[63,] 0.97405152 5.189696e-02 2.594848e-02
[64,] 0.99785492 4.290160e-03 2.145080e-03
[65,] 0.99802863 3.942738e-03 1.971369e-03
[66,] 0.99909621 1.807574e-03 9.037870e-04
[67,] 0.99868516 2.629673e-03 1.314837e-03
[68,] 0.99962278 7.544344e-04 3.772172e-04
[69,] 0.99960297 7.940604e-04 3.970302e-04
[70,] 0.99947454 1.050919e-03 5.254593e-04
[71,] 0.99936373 1.272536e-03 6.362682e-04
[72,] 0.99907272 1.854560e-03 9.272799e-04
[73,] 0.99897232 2.055363e-03 1.027681e-03
[74,] 0.99947097 1.058068e-03 5.290342e-04
[75,] 0.99999482 1.035776e-05 5.178881e-06
[76,] 0.99999093 1.814402e-05 9.072008e-06
[77,] 0.99998389 3.222531e-05 1.611265e-05
[78,] 0.99998339 3.321582e-05 1.660791e-05
[79,] 0.99998054 3.891298e-05 1.945649e-05
[80,] 0.99998737 2.526707e-05 1.263354e-05
[81,] 0.99999008 1.983383e-05 9.916916e-06
[82,] 0.99998904 2.192853e-05 1.096427e-05
[83,] 0.99998038 3.924969e-05 1.962485e-05
[84,] 0.99996807 6.385404e-05 3.192702e-05
[85,] 0.99995049 9.902933e-05 4.951466e-05
[86,] 0.99994856 1.028744e-04 5.143719e-05
[87,] 0.99995014 9.972310e-05 4.986155e-05
[88,] 0.99992486 1.502779e-04 7.513895e-05
[89,] 0.99995444 9.111961e-05 4.555980e-05
[90,] 0.99994987 1.002653e-04 5.013264e-05
[91,] 0.99991095 1.781075e-04 8.905374e-05
[92,] 0.99996569 6.861375e-05 3.430688e-05
[93,] 0.99994204 1.159192e-04 5.795958e-05
[94,] 0.99992547 1.490606e-04 7.453030e-05
[95,] 0.99995797 8.405244e-05 4.202622e-05
[96,] 0.99992674 1.465140e-04 7.325699e-05
[97,] 0.99987432 2.513592e-04 1.256796e-04
[98,] 0.99977289 4.542153e-04 2.271076e-04
[99,] 0.99966263 6.747342e-04 3.373671e-04
[100,] 0.99969727 6.054641e-04 3.027321e-04
[101,] 0.99949026 1.019478e-03 5.097389e-04
[102,] 0.99917316 1.653673e-03 8.268366e-04
[103,] 0.99989025 2.195094e-04 1.097547e-04
[104,] 0.99992803 1.439422e-04 7.197112e-05
[105,] 0.99986122 2.775580e-04 1.387790e-04
[106,] 0.99996832 6.336481e-05 3.168241e-05
[107,] 0.99994345 1.130931e-04 5.654655e-05
[108,] 0.99988761 2.247842e-04 1.123921e-04
[109,] 0.99980103 3.979426e-04 1.989713e-04
[110,] 0.99995913 8.174305e-05 4.087152e-05
[111,] 0.99997805 4.390622e-05 2.195311e-05
[112,] 0.99999751 4.984382e-06 2.492191e-06
[113,] 0.99999637 7.262986e-06 3.631493e-06
[114,] 0.99999737 5.263130e-06 2.631565e-06
[115,] 0.99999296 1.407780e-05 7.038899e-06
[116,] 0.99997958 4.083388e-05 2.041694e-05
[117,] 0.99998504 2.991638e-05 1.495819e-05
[118,] 0.99996862 6.275890e-05 3.137945e-05
[119,] 0.99992044 1.591141e-04 7.955706e-05
[120,] 0.99976962 4.607509e-04 2.303754e-04
[121,] 0.99983137 3.372594e-04 1.686297e-04
[122,] 0.99965303 6.939373e-04 3.469687e-04
[123,] 0.99893329 2.133410e-03 1.066705e-03
[124,] 0.99691012 6.179768e-03 3.089884e-03
[125,] 0.99970124 5.975243e-04 2.987621e-04
[126,] 0.99872142 2.557163e-03 1.278582e-03
[127,] 0.99747004 5.059919e-03 2.529960e-03
[128,] 0.99477988 1.044024e-02 5.220121e-03
[129,] 0.98721735 2.556529e-02 1.278265e-02
> postscript(file="/var/wessaorg/rcomp/tmp/198781323874703.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/20k8z1323874703.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/3mtmo1323874703.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/4tzqo1323874703.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/5h3en1323874703.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 = 144
Frequency = 1
1 2 3 4 5 6
48780.62685 26784.97448 -2784.03304 -1806.14530 10903.87602 109025.00362
7 8 9 10 11 12
11699.27611 -20283.58986 -1076.35804 94077.77976 -13052.77608 -6479.08055
13 14 15 16 17 18
24.76799 11056.82085 20631.85321 -12078.50948 -84592.09035 21101.57245
19 20 21 22 23 24
-37569.20754 -42483.67834 -5679.99690 -14111.48877 42668.56605 -12267.97451
25 26 27 28 29 30
6726.89467 19130.73681 2997.34499 -5392.39661 117201.82319 46722.80725
31 32 33 34 35 36
7237.21291 32285.75357 -7726.20534 20576.11816 37478.15031 -9287.51731
37 38 39 40 41 42
46945.76261 -9828.26288 -19470.94359 -38476.82420 -4001.36054 -12536.81311
43 44 45 46 47 48
-31629.03514 -4683.13318 -48383.76381 7179.79259 -609.14873 22246.85801
49 50 51 52 53 54
10015.25011 -1144.79968 -5212.52551 -23618.04982 71277.14923 62984.45149
55 56 57 58 59 60
3766.63526 29141.46590 45614.12178 -29505.70392 -28846.15610 25009.52806
61 62 63 64 65 66
-28718.77765 -14666.07577 -6724.74990 -8669.25445 18330.28392 -31622.45550
67 68 69 70 71 72
-33018.01460 -38350.30897 -26675.73382 -5194.48620 78381.67525 14770.38219
73 74 75 76 77 78
-58921.45272 -160.84065 -63374.64447 5669.45351 -24752.55154 -27916.71735
79 80 81 82 83 84
-3550.17228 -25621.58094 -54647.59910 93551.55931 3172.21402 -5080.79268
85 86 87 88 89 90
-20642.39846 19673.81363 23626.99748 -36120.13293 -24463.62673 5837.73848
91 92 93 94 95 96
-16258.48832 -21702.16766 22761.10953 17471.57309 -21787.63246 38025.68373
97 98 99 100 101 102
-31073.53701 -9426.65978 45452.47094 5178.35648 21437.03317 -50696.50860
103 104 105 106 107 108
-5275.80365 15632.29702 -949.19701 8714.01344 -47276.40558 15723.01616
109 110 111 112 113 114
-9287.51731 -71035.52703 -30994.54608 -7116.11081 -52980.15168 -14591.84084
115 116 117 118 119 120
-5671.51731 -9287.51731 37405.21061 -35878.09555 44358.40807 -18486.07820
121 122 123 124 125 126
21433.35800 -16459.70323 -2037.19290 -22852.03737 11470.54745 -8063.92802
127 128 129 130 131 132
-3666.35292 7412.07382 -17271.81787 1403.71338 -1660.51731 7268.24963
133 134 135 136 137 138
-1964.07788 26807.88786 -11103.37840 14243.87084 -9287.51731 4927.29115
139 140 141 142 143 144
-7131.43546 -2156.51731 -5093.51731 2411.48447 -17857.43515 16045.92468
> postscript(file="/var/wessaorg/rcomp/tmp/6v7qs1323874703.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 = 144
Frequency = 1
lag(myerror, k = 1) myerror
0 48780.62685 NA
1 26784.97448 48780.62685
2 -2784.03304 26784.97448
3 -1806.14530 -2784.03304
4 10903.87602 -1806.14530
5 109025.00362 10903.87602
6 11699.27611 109025.00362
7 -20283.58986 11699.27611
8 -1076.35804 -20283.58986
9 94077.77976 -1076.35804
10 -13052.77608 94077.77976
11 -6479.08055 -13052.77608
12 24.76799 -6479.08055
13 11056.82085 24.76799
14 20631.85321 11056.82085
15 -12078.50948 20631.85321
16 -84592.09035 -12078.50948
17 21101.57245 -84592.09035
18 -37569.20754 21101.57245
19 -42483.67834 -37569.20754
20 -5679.99690 -42483.67834
21 -14111.48877 -5679.99690
22 42668.56605 -14111.48877
23 -12267.97451 42668.56605
24 6726.89467 -12267.97451
25 19130.73681 6726.89467
26 2997.34499 19130.73681
27 -5392.39661 2997.34499
28 117201.82319 -5392.39661
29 46722.80725 117201.82319
30 7237.21291 46722.80725
31 32285.75357 7237.21291
32 -7726.20534 32285.75357
33 20576.11816 -7726.20534
34 37478.15031 20576.11816
35 -9287.51731 37478.15031
36 46945.76261 -9287.51731
37 -9828.26288 46945.76261
38 -19470.94359 -9828.26288
39 -38476.82420 -19470.94359
40 -4001.36054 -38476.82420
41 -12536.81311 -4001.36054
42 -31629.03514 -12536.81311
43 -4683.13318 -31629.03514
44 -48383.76381 -4683.13318
45 7179.79259 -48383.76381
46 -609.14873 7179.79259
47 22246.85801 -609.14873
48 10015.25011 22246.85801
49 -1144.79968 10015.25011
50 -5212.52551 -1144.79968
51 -23618.04982 -5212.52551
52 71277.14923 -23618.04982
53 62984.45149 71277.14923
54 3766.63526 62984.45149
55 29141.46590 3766.63526
56 45614.12178 29141.46590
57 -29505.70392 45614.12178
58 -28846.15610 -29505.70392
59 25009.52806 -28846.15610
60 -28718.77765 25009.52806
61 -14666.07577 -28718.77765
62 -6724.74990 -14666.07577
63 -8669.25445 -6724.74990
64 18330.28392 -8669.25445
65 -31622.45550 18330.28392
66 -33018.01460 -31622.45550
67 -38350.30897 -33018.01460
68 -26675.73382 -38350.30897
69 -5194.48620 -26675.73382
70 78381.67525 -5194.48620
71 14770.38219 78381.67525
72 -58921.45272 14770.38219
73 -160.84065 -58921.45272
74 -63374.64447 -160.84065
75 5669.45351 -63374.64447
76 -24752.55154 5669.45351
77 -27916.71735 -24752.55154
78 -3550.17228 -27916.71735
79 -25621.58094 -3550.17228
80 -54647.59910 -25621.58094
81 93551.55931 -54647.59910
82 3172.21402 93551.55931
83 -5080.79268 3172.21402
84 -20642.39846 -5080.79268
85 19673.81363 -20642.39846
86 23626.99748 19673.81363
87 -36120.13293 23626.99748
88 -24463.62673 -36120.13293
89 5837.73848 -24463.62673
90 -16258.48832 5837.73848
91 -21702.16766 -16258.48832
92 22761.10953 -21702.16766
93 17471.57309 22761.10953
94 -21787.63246 17471.57309
95 38025.68373 -21787.63246
96 -31073.53701 38025.68373
97 -9426.65978 -31073.53701
98 45452.47094 -9426.65978
99 5178.35648 45452.47094
100 21437.03317 5178.35648
101 -50696.50860 21437.03317
102 -5275.80365 -50696.50860
103 15632.29702 -5275.80365
104 -949.19701 15632.29702
105 8714.01344 -949.19701
106 -47276.40558 8714.01344
107 15723.01616 -47276.40558
108 -9287.51731 15723.01616
109 -71035.52703 -9287.51731
110 -30994.54608 -71035.52703
111 -7116.11081 -30994.54608
112 -52980.15168 -7116.11081
113 -14591.84084 -52980.15168
114 -5671.51731 -14591.84084
115 -9287.51731 -5671.51731
116 37405.21061 -9287.51731
117 -35878.09555 37405.21061
118 44358.40807 -35878.09555
119 -18486.07820 44358.40807
120 21433.35800 -18486.07820
121 -16459.70323 21433.35800
122 -2037.19290 -16459.70323
123 -22852.03737 -2037.19290
124 11470.54745 -22852.03737
125 -8063.92802 11470.54745
126 -3666.35292 -8063.92802
127 7412.07382 -3666.35292
128 -17271.81787 7412.07382
129 1403.71338 -17271.81787
130 -1660.51731 1403.71338
131 7268.24963 -1660.51731
132 -1964.07788 7268.24963
133 26807.88786 -1964.07788
134 -11103.37840 26807.88786
135 14243.87084 -11103.37840
136 -9287.51731 14243.87084
137 4927.29115 -9287.51731
138 -7131.43546 4927.29115
139 -2156.51731 -7131.43546
140 -5093.51731 -2156.51731
141 2411.48447 -5093.51731
142 -17857.43515 2411.48447
143 16045.92468 -17857.43515
144 NA 16045.92468
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 26784.97448 48780.62685
[2,] -2784.03304 26784.97448
[3,] -1806.14530 -2784.03304
[4,] 10903.87602 -1806.14530
[5,] 109025.00362 10903.87602
[6,] 11699.27611 109025.00362
[7,] -20283.58986 11699.27611
[8,] -1076.35804 -20283.58986
[9,] 94077.77976 -1076.35804
[10,] -13052.77608 94077.77976
[11,] -6479.08055 -13052.77608
[12,] 24.76799 -6479.08055
[13,] 11056.82085 24.76799
[14,] 20631.85321 11056.82085
[15,] -12078.50948 20631.85321
[16,] -84592.09035 -12078.50948
[17,] 21101.57245 -84592.09035
[18,] -37569.20754 21101.57245
[19,] -42483.67834 -37569.20754
[20,] -5679.99690 -42483.67834
[21,] -14111.48877 -5679.99690
[22,] 42668.56605 -14111.48877
[23,] -12267.97451 42668.56605
[24,] 6726.89467 -12267.97451
[25,] 19130.73681 6726.89467
[26,] 2997.34499 19130.73681
[27,] -5392.39661 2997.34499
[28,] 117201.82319 -5392.39661
[29,] 46722.80725 117201.82319
[30,] 7237.21291 46722.80725
[31,] 32285.75357 7237.21291
[32,] -7726.20534 32285.75357
[33,] 20576.11816 -7726.20534
[34,] 37478.15031 20576.11816
[35,] -9287.51731 37478.15031
[36,] 46945.76261 -9287.51731
[37,] -9828.26288 46945.76261
[38,] -19470.94359 -9828.26288
[39,] -38476.82420 -19470.94359
[40,] -4001.36054 -38476.82420
[41,] -12536.81311 -4001.36054
[42,] -31629.03514 -12536.81311
[43,] -4683.13318 -31629.03514
[44,] -48383.76381 -4683.13318
[45,] 7179.79259 -48383.76381
[46,] -609.14873 7179.79259
[47,] 22246.85801 -609.14873
[48,] 10015.25011 22246.85801
[49,] -1144.79968 10015.25011
[50,] -5212.52551 -1144.79968
[51,] -23618.04982 -5212.52551
[52,] 71277.14923 -23618.04982
[53,] 62984.45149 71277.14923
[54,] 3766.63526 62984.45149
[55,] 29141.46590 3766.63526
[56,] 45614.12178 29141.46590
[57,] -29505.70392 45614.12178
[58,] -28846.15610 -29505.70392
[59,] 25009.52806 -28846.15610
[60,] -28718.77765 25009.52806
[61,] -14666.07577 -28718.77765
[62,] -6724.74990 -14666.07577
[63,] -8669.25445 -6724.74990
[64,] 18330.28392 -8669.25445
[65,] -31622.45550 18330.28392
[66,] -33018.01460 -31622.45550
[67,] -38350.30897 -33018.01460
[68,] -26675.73382 -38350.30897
[69,] -5194.48620 -26675.73382
[70,] 78381.67525 -5194.48620
[71,] 14770.38219 78381.67525
[72,] -58921.45272 14770.38219
[73,] -160.84065 -58921.45272
[74,] -63374.64447 -160.84065
[75,] 5669.45351 -63374.64447
[76,] -24752.55154 5669.45351
[77,] -27916.71735 -24752.55154
[78,] -3550.17228 -27916.71735
[79,] -25621.58094 -3550.17228
[80,] -54647.59910 -25621.58094
[81,] 93551.55931 -54647.59910
[82,] 3172.21402 93551.55931
[83,] -5080.79268 3172.21402
[84,] -20642.39846 -5080.79268
[85,] 19673.81363 -20642.39846
[86,] 23626.99748 19673.81363
[87,] -36120.13293 23626.99748
[88,] -24463.62673 -36120.13293
[89,] 5837.73848 -24463.62673
[90,] -16258.48832 5837.73848
[91,] -21702.16766 -16258.48832
[92,] 22761.10953 -21702.16766
[93,] 17471.57309 22761.10953
[94,] -21787.63246 17471.57309
[95,] 38025.68373 -21787.63246
[96,] -31073.53701 38025.68373
[97,] -9426.65978 -31073.53701
[98,] 45452.47094 -9426.65978
[99,] 5178.35648 45452.47094
[100,] 21437.03317 5178.35648
[101,] -50696.50860 21437.03317
[102,] -5275.80365 -50696.50860
[103,] 15632.29702 -5275.80365
[104,] -949.19701 15632.29702
[105,] 8714.01344 -949.19701
[106,] -47276.40558 8714.01344
[107,] 15723.01616 -47276.40558
[108,] -9287.51731 15723.01616
[109,] -71035.52703 -9287.51731
[110,] -30994.54608 -71035.52703
[111,] -7116.11081 -30994.54608
[112,] -52980.15168 -7116.11081
[113,] -14591.84084 -52980.15168
[114,] -5671.51731 -14591.84084
[115,] -9287.51731 -5671.51731
[116,] 37405.21061 -9287.51731
[117,] -35878.09555 37405.21061
[118,] 44358.40807 -35878.09555
[119,] -18486.07820 44358.40807
[120,] 21433.35800 -18486.07820
[121,] -16459.70323 21433.35800
[122,] -2037.19290 -16459.70323
[123,] -22852.03737 -2037.19290
[124,] 11470.54745 -22852.03737
[125,] -8063.92802 11470.54745
[126,] -3666.35292 -8063.92802
[127,] 7412.07382 -3666.35292
[128,] -17271.81787 7412.07382
[129,] 1403.71338 -17271.81787
[130,] -1660.51731 1403.71338
[131,] 7268.24963 -1660.51731
[132,] -1964.07788 7268.24963
[133,] 26807.88786 -1964.07788
[134,] -11103.37840 26807.88786
[135,] 14243.87084 -11103.37840
[136,] -9287.51731 14243.87084
[137,] 4927.29115 -9287.51731
[138,] -7131.43546 4927.29115
[139,] -2156.51731 -7131.43546
[140,] -5093.51731 -2156.51731
[141,] 2411.48447 -5093.51731
[142,] -17857.43515 2411.48447
[143,] 16045.92468 -17857.43515
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 26784.97448 48780.62685
2 -2784.03304 26784.97448
3 -1806.14530 -2784.03304
4 10903.87602 -1806.14530
5 109025.00362 10903.87602
6 11699.27611 109025.00362
7 -20283.58986 11699.27611
8 -1076.35804 -20283.58986
9 94077.77976 -1076.35804
10 -13052.77608 94077.77976
11 -6479.08055 -13052.77608
12 24.76799 -6479.08055
13 11056.82085 24.76799
14 20631.85321 11056.82085
15 -12078.50948 20631.85321
16 -84592.09035 -12078.50948
17 21101.57245 -84592.09035
18 -37569.20754 21101.57245
19 -42483.67834 -37569.20754
20 -5679.99690 -42483.67834
21 -14111.48877 -5679.99690
22 42668.56605 -14111.48877
23 -12267.97451 42668.56605
24 6726.89467 -12267.97451
25 19130.73681 6726.89467
26 2997.34499 19130.73681
27 -5392.39661 2997.34499
28 117201.82319 -5392.39661
29 46722.80725 117201.82319
30 7237.21291 46722.80725
31 32285.75357 7237.21291
32 -7726.20534 32285.75357
33 20576.11816 -7726.20534
34 37478.15031 20576.11816
35 -9287.51731 37478.15031
36 46945.76261 -9287.51731
37 -9828.26288 46945.76261
38 -19470.94359 -9828.26288
39 -38476.82420 -19470.94359
40 -4001.36054 -38476.82420
41 -12536.81311 -4001.36054
42 -31629.03514 -12536.81311
43 -4683.13318 -31629.03514
44 -48383.76381 -4683.13318
45 7179.79259 -48383.76381
46 -609.14873 7179.79259
47 22246.85801 -609.14873
48 10015.25011 22246.85801
49 -1144.79968 10015.25011
50 -5212.52551 -1144.79968
51 -23618.04982 -5212.52551
52 71277.14923 -23618.04982
53 62984.45149 71277.14923
54 3766.63526 62984.45149
55 29141.46590 3766.63526
56 45614.12178 29141.46590
57 -29505.70392 45614.12178
58 -28846.15610 -29505.70392
59 25009.52806 -28846.15610
60 -28718.77765 25009.52806
61 -14666.07577 -28718.77765
62 -6724.74990 -14666.07577
63 -8669.25445 -6724.74990
64 18330.28392 -8669.25445
65 -31622.45550 18330.28392
66 -33018.01460 -31622.45550
67 -38350.30897 -33018.01460
68 -26675.73382 -38350.30897
69 -5194.48620 -26675.73382
70 78381.67525 -5194.48620
71 14770.38219 78381.67525
72 -58921.45272 14770.38219
73 -160.84065 -58921.45272
74 -63374.64447 -160.84065
75 5669.45351 -63374.64447
76 -24752.55154 5669.45351
77 -27916.71735 -24752.55154
78 -3550.17228 -27916.71735
79 -25621.58094 -3550.17228
80 -54647.59910 -25621.58094
81 93551.55931 -54647.59910
82 3172.21402 93551.55931
83 -5080.79268 3172.21402
84 -20642.39846 -5080.79268
85 19673.81363 -20642.39846
86 23626.99748 19673.81363
87 -36120.13293 23626.99748
88 -24463.62673 -36120.13293
89 5837.73848 -24463.62673
90 -16258.48832 5837.73848
91 -21702.16766 -16258.48832
92 22761.10953 -21702.16766
93 17471.57309 22761.10953
94 -21787.63246 17471.57309
95 38025.68373 -21787.63246
96 -31073.53701 38025.68373
97 -9426.65978 -31073.53701
98 45452.47094 -9426.65978
99 5178.35648 45452.47094
100 21437.03317 5178.35648
101 -50696.50860 21437.03317
102 -5275.80365 -50696.50860
103 15632.29702 -5275.80365
104 -949.19701 15632.29702
105 8714.01344 -949.19701
106 -47276.40558 8714.01344
107 15723.01616 -47276.40558
108 -9287.51731 15723.01616
109 -71035.52703 -9287.51731
110 -30994.54608 -71035.52703
111 -7116.11081 -30994.54608
112 -52980.15168 -7116.11081
113 -14591.84084 -52980.15168
114 -5671.51731 -14591.84084
115 -9287.51731 -5671.51731
116 37405.21061 -9287.51731
117 -35878.09555 37405.21061
118 44358.40807 -35878.09555
119 -18486.07820 44358.40807
120 21433.35800 -18486.07820
121 -16459.70323 21433.35800
122 -2037.19290 -16459.70323
123 -22852.03737 -2037.19290
124 11470.54745 -22852.03737
125 -8063.92802 11470.54745
126 -3666.35292 -8063.92802
127 7412.07382 -3666.35292
128 -17271.81787 7412.07382
129 1403.71338 -17271.81787
130 -1660.51731 1403.71338
131 7268.24963 -1660.51731
132 -1964.07788 7268.24963
133 26807.88786 -1964.07788
134 -11103.37840 26807.88786
135 14243.87084 -11103.37840
136 -9287.51731 14243.87084
137 4927.29115 -9287.51731
138 -7131.43546 4927.29115
139 -2156.51731 -7131.43546
140 -5093.51731 -2156.51731
141 2411.48447 -5093.51731
142 -17857.43515 2411.48447
143 16045.92468 -17857.43515
> 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/744wy1323874703.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/8nahx1323874703.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/9jo5k1323874703.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/109ejw1323874703.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/wessaorg/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/1176k11323874703.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/126bpn1323874703.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/13f4bb1323874703.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/14b13g1323874703.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/156zeu1323874703.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/16awru1323874703.tab")
+ }
>
> try(system("convert tmp/198781323874703.ps tmp/198781323874703.png",intern=TRUE))
character(0)
> try(system("convert tmp/20k8z1323874703.ps tmp/20k8z1323874703.png",intern=TRUE))
character(0)
> try(system("convert tmp/3mtmo1323874703.ps tmp/3mtmo1323874703.png",intern=TRUE))
character(0)
> try(system("convert tmp/4tzqo1323874703.ps tmp/4tzqo1323874703.png",intern=TRUE))
character(0)
> try(system("convert tmp/5h3en1323874703.ps tmp/5h3en1323874703.png",intern=TRUE))
character(0)
> try(system("convert tmp/6v7qs1323874703.ps tmp/6v7qs1323874703.png",intern=TRUE))
character(0)
> try(system("convert tmp/744wy1323874703.ps tmp/744wy1323874703.png",intern=TRUE))
character(0)
> try(system("convert tmp/8nahx1323874703.ps tmp/8nahx1323874703.png",intern=TRUE))
character(0)
> try(system("convert tmp/9jo5k1323874703.ps tmp/9jo5k1323874703.png",intern=TRUE))
character(0)
> try(system("convert tmp/109ejw1323874703.ps tmp/109ejw1323874703.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.521 0.585 5.144