R version 2.12.1 (2010-12-16)
Copyright (C) 2010 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
+ ,22622
+ ,130358
+ ,38
+ ,17
+ ,50
+ ,73570
+ ,7215
+ ,0
+ ,0
+ ,0
+ ,1929
+ ,112861
+ ,49
+ ,22
+ ,51
+ ,36294
+ ,210171
+ ,74
+ ,30
+ ,112
+ ,62378
+ ,393802
+ ,104
+ ,31
+ ,118
+ ,167760
+ ,117604
+ ,37
+ ,19
+ ,59
+ ,52443
+ ,126029
+ ,53
+ ,25
+ ,90
+ ,57283
+ ,99729
+ ,42
+ ,30
+ ,50
+ ,36614
+ ,256310
+ ,62
+ ,26
+ ,79
+ ,93268
+ ,113066
+ ,50
+ ,20
+ ,49
+ ,35439
+ ,156212
+ ,65
+ ,25
+ ,74
+ ,72405
+ ,69952
+ ,28
+ ,15
+ ,32
+ ,24044
+ ,152673
+ ,48
+ ,22
+ ,82
+ ,55909
+ ,125841
+ ,42
+ ,12
+ ,43
+ ,44689
+ ,125769
+ ,47
+ ,19
+ ,65
+ ,49319
+ ,123467
+ ,71
+ ,28
+ ,111
+ ,62075
+ ,56232
+ ,0
+ ,12
+ ,36
+ ,2341
+ ,108244
+ ,50
+ ,28
+ ,89
+ ,40551
+ ,22762
+ ,12
+ ,13
+ ,28
+ ,11621
+ ,48554
+ ,16
+ ,14
+ ,35
+ ,18741
+ ,178697
+ ,76
+ ,27
+ ,78
+ ,84202
+ ,139115
+ ,29
+ ,25
+ ,67
+ ,15334
+ ,93773
+ ,38
+ ,30
+ ,61
+ ,28024
+ ,133398
+ ,50
+ ,21
+ ,58
+ ,53306
+ ,113933
+ ,33
+ ,17
+ ,49
+ ,37918
+ ,144781
+ ,45
+ ,22
+ ,77
+ ,54819
+ ,140711
+ ,59
+ ,28
+ ,71
+ ,89058
+ ,283337
+ ,49
+ ,25
+ ,82
+ ,103354
+ ,158146
+ ,40
+ ,16
+ ,53
+ ,70239
+ ,123344
+ ,40
+ ,23
+ ,71
+ ,33045
+ ,157640
+ ,51
+ ,20
+ ,58
+ ,63852
+ ,91279
+ ,41
+ ,11
+ ,25
+ ,30905
+ ,189374
+ ,73
+ ,20
+ ,59
+ ,24242
+ ,167915
+ ,43
+ ,21
+ ,77
+ ,78907
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,175403
+ ,46
+ ,27
+ ,75
+ ,36005
+ ,92342
+ ,44
+ ,14
+ ,39
+ ,31972
+ ,100023
+ ,31
+ ,29
+ ,83
+ ,35853
+ ,178277
+ ,71
+ ,31
+ ,123
+ ,115301
+ ,145062
+ ,61
+ ,19
+ ,67
+ ,47689
+ ,110980
+ ,28
+ ,30
+ ,105
+ ,34223
+ ,86039
+ ,21
+ ,23
+ ,76
+ ,43431
+ ,120821
+ ,42
+ ,20
+ ,54
+ ,52220
+ ,95535
+ ,44
+ ,22
+ ,82
+ ,33863
+ ,109894
+ ,34
+ ,19
+ ,57
+ ,46879
+ ,61554
+ ,15
+ ,32
+ ,57
+ ,23228
+ ,156520
+ ,46
+ ,18
+ ,72
+ ,42827
+ ,159121
+ ,43
+ ,26
+ ,94
+ ,65765
+ ,129362
+ ,47
+ ,25
+ ,72
+ ,38167
+ ,48188
+ ,12
+ ,22
+ ,39
+ ,14812
+ ,91198
+ ,42
+ ,19
+ ,60
+ ,32615
+ ,229864
+ ,56
+ ,24
+ ,84
+ ,82188
+ ,180317
+ ,41
+ ,26
+ ,69
+ ,51763
+ ,150640
+ ,48
+ ,27
+ ,102
+ ,59325
+ ,104416
+ ,30
+ ,10
+ ,28
+ ,48976
+ ,165098
+ ,44
+ ,26
+ ,65
+ ,43384
+ ,63205
+ ,25
+ ,23
+ ,67
+ ,26692
+ ,100056
+ ,42
+ ,21
+ ,80
+ ,53279
+ ,137214
+ ,28
+ ,34
+ ,79
+ ,20652
+ ,99630
+ ,33
+ ,29
+ ,107
+ ,38338
+ ,84557
+ ,32
+ ,18
+ ,57
+ ,36735
+ ,91199
+ ,28
+ ,16
+ ,44
+ ,42764
+ ,83419
+ ,31
+ ,23
+ ,59
+ ,44331
+ ,101723
+ ,13
+ ,22
+ ,80
+ ,41354
+ ,94982
+ ,38
+ ,29
+ ,89
+ ,47879
+ ,129700
+ ,39
+ ,31
+ ,115
+ ,103793
+ ,110708
+ ,68
+ ,21
+ ,59
+ ,52235
+ ,81518
+ ,32
+ ,21
+ ,66
+ ,49825
+ ,31970
+ ,5
+ ,21
+ ,42
+ ,4105
+ ,192268
+ ,53
+ ,15
+ ,35
+ ,58687
+ ,87611
+ ,33
+ ,9
+ ,3
+ ,40745
+ ,77890
+ ,48
+ ,21
+ ,68
+ ,33187
+ ,83261
+ ,36
+ ,18
+ ,38
+ ,14063
+ ,116290
+ ,52
+ ,31
+ ,107
+ ,37407
+ ,56544
+ ,0
+ ,25
+ ,73
+ ,7190
+ ,116173
+ ,52
+ ,24
+ ,80
+ ,49562
+ ,111488
+ ,45
+ ,22
+ ,69
+ ,76324
+ ,60138
+ ,16
+ ,21
+ ,46
+ ,21928
+ ,73422
+ ,33
+ ,26
+ ,52
+ ,27860
+ ,67751
+ ,48
+ ,22
+ ,58
+ ,28078
+ ,213351
+ ,33
+ ,26
+ ,85
+ ,49577
+ ,51185
+ ,24
+ ,20
+ ,13
+ ,28145
+ ,97181
+ ,37
+ ,25
+ ,61
+ ,36241
+ ,45100
+ ,17
+ ,19
+ ,49
+ ,10824
+ ,115801
+ ,32
+ ,22
+ ,47
+ ,46892
+ ,185664
+ ,55
+ ,25
+ ,93
+ ,61264
+ ,71960
+ ,39
+ ,22
+ ,65
+ ,22933
+ ,76441
+ ,29
+ ,21
+ ,64
+ ,20787
+ ,103613
+ ,26
+ ,20
+ ,64
+ ,43978
+ ,98707
+ ,37
+ ,23
+ ,57
+ ,51305
+ ,126527
+ ,58
+ ,22
+ ,61
+ ,55593
+ ,136781
+ ,35
+ ,21
+ ,71
+ ,51648
+ ,105863
+ ,24
+ ,12
+ ,43
+ ,30552
+ ,38775
+ ,18
+ ,9
+ ,18
+ ,23470
+ ,179984
+ ,37
+ ,32
+ ,103
+ ,77530
+ ,164808
+ ,86
+ ,24
+ ,76
+ ,57299
+ ,19349
+ ,13
+ ,1
+ ,0
+ ,9604
+ ,146824
+ ,20
+ ,24
+ ,83
+ ,34684
+ ,108660
+ ,32
+ ,22
+ ,70
+ ,41094
+ ,43803
+ ,8
+ ,4
+ ,4
+ ,3439
+ ,47062
+ ,38
+ ,15
+ ,41
+ ,25171
+ ,110845
+ ,45
+ ,21
+ ,57
+ ,23437
+ ,92517
+ ,24
+ ,23
+ ,52
+ ,34086
+ ,58660
+ ,23
+ ,12
+ ,24
+ ,24649
+ ,27676
+ ,2
+ ,16
+ ,17
+ ,2342
+ ,98550
+ ,52
+ ,24
+ ,89
+ ,45571
+ ,43284
+ ,5
+ ,9
+ ,20
+ ,3255
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,66016
+ ,43
+ ,22
+ ,45
+ ,30002
+ ,57359
+ ,18
+ ,17
+ ,63
+ ,19360
+ ,96933
+ ,41
+ ,18
+ ,48
+ ,43320
+ ,70369
+ ,45
+ ,21
+ ,70
+ ,35513
+ ,65494
+ ,29
+ ,17
+ ,32
+ ,23536
+ ,3616
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,143931
+ ,32
+ ,20
+ ,72
+ ,54438
+ ,109894
+ ,58
+ ,26
+ ,56
+ ,56812
+ ,122973
+ ,17
+ ,26
+ ,64
+ ,33838
+ ,84336
+ ,24
+ ,20
+ ,77
+ ,32366
+ ,43410
+ ,7
+ ,1
+ ,3
+ ,13
+ ,136250
+ ,62
+ ,24
+ ,73
+ ,55082
+ ,79015
+ ,30
+ ,14
+ ,37
+ ,31334
+ ,92937
+ ,49
+ ,26
+ ,54
+ ,16612
+ ,57586
+ ,3
+ ,12
+ ,32
+ ,5084
+ ,19764
+ ,10
+ ,2
+ ,4
+ ,9927
+ ,105757
+ ,42
+ ,16
+ ,55
+ ,47413
+ ,96410
+ ,18
+ ,22
+ ,81
+ ,27389
+ ,113402
+ ,40
+ ,28
+ ,90
+ ,30425
+ ,11796
+ ,1
+ ,2
+ ,1
+ ,0
+ ,7627
+ ,0
+ ,0
+ ,0
+ ,0
+ ,121085
+ ,29
+ ,17
+ ,38
+ ,33510
+ ,6836
+ ,0
+ ,1
+ ,0
+ ,0
+ ,139563
+ ,46
+ ,17
+ ,36
+ ,40389
+ ,5118
+ ,5
+ ,0
+ ,0
+ ,0
+ ,40248
+ ,8
+ ,4
+ ,7
+ ,6012
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,95079
+ ,21
+ ,25
+ ,75
+ ,22205
+ ,80750
+ ,21
+ ,26
+ ,52
+ ,17231
+ ,7131
+ ,0
+ ,0
+ ,0
+ ,0
+ ,4194
+ ,0
+ ,0
+ ,0
+ ,0
+ ,60378
+ ,15
+ ,15
+ ,45
+ ,11017
+ ,96971
+ ,40
+ ,18
+ ,60
+ ,46741
+ ,83484
+ ,17
+ ,19
+ ,48
+ ,39869)
+ ,dim=c(5
+ ,144)
+ ,dimnames=list(c('Time'
+ ,'Blogged'
+ ,'Reviewed'
+ ,'Feedback'
+ ,'Writing
')
+ ,1:144))
> y <- array(NA,dim=c(5,144),dimnames=list(c('Time','Blogged','Reviewed','Feedback','Writing
'),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 Blogged Reviewed Feedback Writing\r\r
1 127476 20 17 59 22622
2 130358 38 17 50 73570
3 7215 0 0 0 1929
4 112861 49 22 51 36294
5 210171 74 30 112 62378
6 393802 104 31 118 167760
7 117604 37 19 59 52443
8 126029 53 25 90 57283
9 99729 42 30 50 36614
10 256310 62 26 79 93268
11 113066 50 20 49 35439
12 156212 65 25 74 72405
13 69952 28 15 32 24044
14 152673 48 22 82 55909
15 125841 42 12 43 44689
16 125769 47 19 65 49319
17 123467 71 28 111 62075
18 56232 0 12 36 2341
19 108244 50 28 89 40551
20 22762 12 13 28 11621
21 48554 16 14 35 18741
22 178697 76 27 78 84202
23 139115 29 25 67 15334
24 93773 38 30 61 28024
25 133398 50 21 58 53306
26 113933 33 17 49 37918
27 144781 45 22 77 54819
28 140711 59 28 71 89058
29 283337 49 25 82 103354
30 158146 40 16 53 70239
31 123344 40 23 71 33045
32 157640 51 20 58 63852
33 91279 41 11 25 30905
34 189374 73 20 59 24242
35 167915 43 21 77 78907
36 0 0 0 0 0
37 175403 46 27 75 36005
38 92342 44 14 39 31972
39 100023 31 29 83 35853
40 178277 71 31 123 115301
41 145062 61 19 67 47689
42 110980 28 30 105 34223
43 86039 21 23 76 43431
44 120821 42 20 54 52220
45 95535 44 22 82 33863
46 109894 34 19 57 46879
47 61554 15 32 57 23228
48 156520 46 18 72 42827
49 159121 43 26 94 65765
50 129362 47 25 72 38167
51 48188 12 22 39 14812
52 91198 42 19 60 32615
53 229864 56 24 84 82188
54 180317 41 26 69 51763
55 150640 48 27 102 59325
56 104416 30 10 28 48976
57 165098 44 26 65 43384
58 63205 25 23 67 26692
59 100056 42 21 80 53279
60 137214 28 34 79 20652
61 99630 33 29 107 38338
62 84557 32 18 57 36735
63 91199 28 16 44 42764
64 83419 31 23 59 44331
65 101723 13 22 80 41354
66 94982 38 29 89 47879
67 129700 39 31 115 103793
68 110708 68 21 59 52235
69 81518 32 21 66 49825
70 31970 5 21 42 4105
71 192268 53 15 35 58687
72 87611 33 9 3 40745
73 77890 48 21 68 33187
74 83261 36 18 38 14063
75 116290 52 31 107 37407
76 56544 0 25 73 7190
77 116173 52 24 80 49562
78 111488 45 22 69 76324
79 60138 16 21 46 21928
80 73422 33 26 52 27860
81 67751 48 22 58 28078
82 213351 33 26 85 49577
83 51185 24 20 13 28145
84 97181 37 25 61 36241
85 45100 17 19 49 10824
86 115801 32 22 47 46892
87 185664 55 25 93 61264
88 71960 39 22 65 22933
89 76441 29 21 64 20787
90 103613 26 20 64 43978
91 98707 37 23 57 51305
92 126527 58 22 61 55593
93 136781 35 21 71 51648
94 105863 24 12 43 30552
95 38775 18 9 18 23470
96 179984 37 32 103 77530
97 164808 86 24 76 57299
98 19349 13 1 0 9604
99 146824 20 24 83 34684
100 108660 32 22 70 41094
101 43803 8 4 4 3439
102 47062 38 15 41 25171
103 110845 45 21 57 23437
104 92517 24 23 52 34086
105 58660 23 12 24 24649
106 27676 2 16 17 2342
107 98550 52 24 89 45571
108 43284 5 9 20 3255
109 0 0 0 0 0
110 66016 43 22 45 30002
111 57359 18 17 63 19360
112 96933 41 18 48 43320
113 70369 45 21 70 35513
114 65494 29 17 32 23536
115 3616 0 0 0 0
116 0 0 0 0 0
117 143931 32 20 72 54438
118 109894 58 26 56 56812
119 122973 17 26 64 33838
120 84336 24 20 77 32366
121 43410 7 1 3 13
122 136250 62 24 73 55082
123 79015 30 14 37 31334
124 92937 49 26 54 16612
125 57586 3 12 32 5084
126 19764 10 2 4 9927
127 105757 42 16 55 47413
128 96410 18 22 81 27389
129 113402 40 28 90 30425
130 11796 1 2 1 0
131 7627 0 0 0 0
132 121085 29 17 38 33510
133 6836 0 1 0 0
134 139563 46 17 36 40389
135 5118 5 0 0 0
136 40248 8 4 7 6012
137 0 0 0 0 0
138 95079 21 25 75 22205
139 80750 21 26 52 17231
140 7131 0 0 0 0
141 4194 0 0 0 0
142 60378 15 15 45 11017
143 96971 40 18 60 46741
144 83484 17 19 48 39869
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Blogged Reviewed Feedback `Writing\r\r`
9857.237 707.928 477.218 235.511 1.221
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-76397 -16001 -4105 11173 87162
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 9857.237 5910.346 1.668 0.097608 .
Blogged 707.928 199.990 3.540 0.000545 ***
Reviewed 477.218 621.477 0.768 0.443862
Feedback 235.511 194.917 1.208 0.228997
`Writing\r\r` 1.221 0.158 7.728 1.98e-12 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 28020 on 139 degrees of freedom
Multiple R-squared: 0.7816, Adjusted R-squared: 0.7753
F-statistic: 124.4 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.9185468 1.629064e-01 8.145320e-02
[2,] 0.8574613 2.850775e-01 1.425387e-01
[3,] 0.8890161 2.219677e-01 1.109839e-01
[4,] 0.8240079 3.519842e-01 1.759921e-01
[5,] 0.8171543 3.656914e-01 1.828457e-01
[6,] 0.7403821 5.192359e-01 2.596179e-01
[7,] 0.6629702 6.740596e-01 3.370298e-01
[8,] 0.5870943 8.258114e-01 4.129057e-01
[9,] 0.5118646 9.762708e-01 4.881354e-01
[10,] 0.7703102 4.593795e-01 2.296898e-01
[11,] 0.7425237 5.149525e-01 2.574763e-01
[12,] 0.7029443 5.941113e-01 2.970557e-01
[13,] 0.6838869 6.322263e-01 3.161131e-01
[14,] 0.6265863 7.468274e-01 3.734137e-01
[15,] 0.5883711 8.232579e-01 4.116289e-01
[16,] 0.8103010 3.793980e-01 1.896990e-01
[17,] 0.7651914 4.696173e-01 2.348086e-01
[18,] 0.7093271 5.813457e-01 2.906729e-01
[19,] 0.6584468 6.831063e-01 3.415532e-01
[20,] 0.5992566 8.014869e-01 4.007434e-01
[21,] 0.7860214 4.279572e-01 2.139786e-01
[22,] 0.8958539 2.082922e-01 1.041461e-01
[23,] 0.8730495 2.539011e-01 1.269505e-01
[24,] 0.8472792 3.054415e-01 1.527208e-01
[25,] 0.8168067 3.663866e-01 1.831933e-01
[26,] 0.8018388 3.963223e-01 1.981612e-01
[27,] 0.9793201 4.135990e-02 2.067995e-02
[28,] 0.9733758 5.324831e-02 2.662416e-02
[29,] 0.9658902 6.821960e-02 3.410980e-02
[30,] 0.9854384 2.912322e-02 1.456161e-02
[31,] 0.9798901 4.021975e-02 2.010987e-02
[32,] 0.9746075 5.078503e-02 2.539251e-02
[33,] 0.9953945 9.210942e-03 4.605471e-03
[34,] 0.9936226 1.275474e-02 6.377371e-03
[35,] 0.9908097 1.838054e-02 9.190268e-03
[36,] 0.9889591 2.208175e-02 1.104087e-02
[37,] 0.9848910 3.021805e-02 1.510903e-02
[38,] 0.9816758 3.664836e-02 1.832418e-02
[39,] 0.9752351 4.952973e-02 2.476486e-02
[40,] 0.9694670 6.106593e-02 3.053296e-02
[41,] 0.9741271 5.174585e-02 2.587293e-02
[42,] 0.9659804 6.803923e-02 3.401961e-02
[43,] 0.9569906 8.601872e-02 4.300936e-02
[44,] 0.9458177 1.083646e-01 5.418228e-02
[45,] 0.9345240 1.309520e-01 6.547600e-02
[46,] 0.9660360 6.792806e-02 3.396403e-02
[47,] 0.9829226 3.415489e-02 1.707745e-02
[48,] 0.9775041 4.499171e-02 2.249585e-02
[49,] 0.9712300 5.753996e-02 2.876998e-02
[50,] 0.9818487 3.630261e-02 1.815130e-02
[51,] 0.9805521 3.889577e-02 1.944789e-02
[52,] 0.9817178 3.656436e-02 1.828218e-02
[53,] 0.9888233 2.235343e-02 1.117672e-02
[54,] 0.9864840 2.703208e-02 1.351604e-02
[55,] 0.9829272 3.414559e-02 1.707279e-02
[56,] 0.9775467 4.490659e-02 2.245330e-02
[57,] 0.9768325 4.633497e-02 2.316748e-02
[58,] 0.9698054 6.038919e-02 3.019460e-02
[59,] 0.9734007 5.319860e-02 2.659930e-02
[60,] 0.9962626 7.474872e-03 3.737436e-03
[61,] 0.9971080 5.784001e-03 2.892001e-03
[62,] 0.9980808 3.838378e-03 1.919189e-03
[63,] 0.9973104 5.379138e-03 2.689569e-03
[64,] 0.9996845 6.309906e-04 3.154953e-04
[65,] 0.9995871 8.258647e-04 4.129324e-04
[66,] 0.9996346 7.308122e-04 3.654061e-04
[67,] 0.9995719 8.561610e-04 4.280805e-04
[68,] 0.9994450 1.110028e-03 5.550142e-04
[69,] 0.9993287 1.342605e-03 6.713025e-04
[70,] 0.9991672 1.665568e-03 8.327838e-04
[71,] 0.9997549 4.901479e-04 2.450739e-04
[72,] 0.9996535 6.930392e-04 3.465196e-04
[73,] 0.9995571 8.858459e-04 4.429229e-04
[74,] 0.9996129 7.741504e-04 3.870752e-04
[75,] 0.9999982 3.513860e-06 1.756930e-06
[76,] 0.9999978 4.342408e-06 2.171204e-06
[77,] 0.9999963 7.446212e-06 3.723106e-06
[78,] 0.9999947 1.066789e-05 5.333944e-06
[79,] 0.9999904 1.914736e-05 9.573678e-06
[80,] 0.9999951 9.727425e-06 4.863713e-06
[81,] 0.9999936 1.289965e-05 6.449825e-06
[82,] 0.9999888 2.243747e-05 1.121873e-05
[83,] 0.9999802 3.950728e-05 1.975364e-05
[84,] 0.9999801 3.976398e-05 1.988199e-05
[85,] 0.9999672 6.553644e-05 3.276822e-05
[86,] 0.9999507 9.858709e-05 4.929354e-05
[87,] 0.9999635 7.294344e-05 3.647172e-05
[88,] 0.9999550 9.006474e-05 4.503237e-05
[89,] 0.9999228 1.543253e-04 7.716265e-05
[90,] 0.9999472 1.055955e-04 5.279776e-05
[91,] 0.9999083 1.833034e-04 9.165172e-05
[92,] 0.9999771 4.574252e-05 2.287126e-05
[93,] 0.9999572 8.560129e-05 4.280064e-05
[94,] 0.9999545 9.095712e-05 4.547856e-05
[95,] 0.9999663 6.734071e-05 3.367035e-05
[96,] 0.9999766 4.688633e-05 2.344317e-05
[97,] 0.9999587 8.263954e-05 4.131977e-05
[98,] 0.9999267 1.465030e-04 7.325148e-05
[99,] 0.9999205 1.589397e-04 7.946983e-05
[100,] 0.9999020 1.960862e-04 9.804310e-05
[101,] 0.9998404 3.191335e-04 1.595667e-04
[102,] 0.9997356 5.287046e-04 2.643523e-04
[103,] 0.9998369 3.262683e-04 1.631341e-04
[104,] 0.9997473 5.053622e-04 2.526811e-04
[105,] 0.9995650 8.699113e-04 4.349557e-04
[106,] 0.9998105 3.790510e-04 1.895255e-04
[107,] 0.9997121 5.757246e-04 2.878623e-04
[108,] 0.9994778 1.044402e-03 5.222011e-04
[109,] 0.9991625 1.675063e-03 8.375313e-04
[110,] 0.9992638 1.472376e-03 7.361879e-04
[111,] 0.9998534 2.932215e-04 1.466107e-04
[112,] 0.9998004 3.991584e-04 1.995792e-04
[113,] 0.9995905 8.190902e-04 4.095451e-04
[114,] 0.9998355 3.289541e-04 1.644770e-04
[115,] 0.9996783 6.434121e-04 3.217061e-04
[116,] 0.9993547 1.290529e-03 6.452643e-04
[117,] 0.9994749 1.050235e-03 5.251177e-04
[118,] 0.9995752 8.496074e-04 4.248037e-04
[119,] 0.9991657 1.668539e-03 8.342696e-04
[120,] 0.9985072 2.985502e-03 1.492751e-03
[121,] 0.9991140 1.771900e-03 8.859502e-04
[122,] 0.9977876 4.424788e-03 2.212394e-03
[123,] 0.9944699 1.106011e-02 5.530055e-03
[124,] 0.9869838 2.603241e-02 1.301621e-02
[125,] 0.9914448 1.711046e-02 8.555228e-03
[126,] 0.9778271 4.434578e-02 2.217289e-02
[127,] 0.9922407 1.551866e-02 7.759329e-03
[128,] 0.9767948 4.641045e-02 2.320522e-02
[129,] 0.9980287 3.942513e-03 1.971256e-03
> postscript(file="/var/www/rcomp/tmp/1qyzj1323874246.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/www/rcomp/tmp/23nlg1323874246.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/www/rcomp/tmp/3z0rg1323874246.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/www/rcomp/tmp/4oppz1323874246.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/www/rcomp/tmp/527c21323874246.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
53826.18675 -16133.03067 -4997.94684 1482.90439 31056.80627 62866.33449
7 8 9 10 11 12
-5452.67448 -24429.31666 -10666.61852 57648.55923 3449.56672 -17440.39191
13 14 15 16 17 18
-3784.57133 10748.00530 15822.62963 -1964.96863 -51963.43557 29310.91054
19 20 21 22 23 24
-20853.42360 -22580.17184 -10440.67937 -19045.67350 62292.16398 -5891.34680
25 26 27 28 29 30
-634.57104 14755.62853 7488.46073 -49755.72061 81332.21000 14077.64237
31 32 33 34 35 36
17117.53116 10497.85950 3518.10024 74793.97314 3099.07788 -9857.23666
37 38 39 40 41 42
58463.26979 -3574.51864 -8950.70377 -66411.23474 8936.58209 462.19576
43 44 45 46 47 48
-20597.85008 -4802.65129 -16635.53030 -3773.06679 -15983.47488 36250.68488
49 50 51 52 53 54
3964.41956 10735.05840 -7936.62832 -11419.71519 48757.99632 49563.39886
55 56 57 58 59 60
-2552.94691 2144.54864 43395.15843 -23702.16647 -33461.40800 47483.61573
61 62 63 64 65 66
-19446.52007 -14829.05822 -8701.93172 -27392.53807 2821.20085 -35046.51373
67 68 69 70 71 72
-76396.78047 -34994.87820 -37404.92185 -6352.97017 57820.37999 -367.48682
73 74 75 76 77 78
-32512.33851 13205.15973 -16054.65032 8783.53920 -21316.11594 -50182.53085
79 80 81 82 83 84
-8679.81465 -18473.95756 -34534.29773 87162.21437 -22639.41871 -9423.99346
85 86 87 88 89 90
-10617.54548 4457.36705 28221.66548 -19319.40281 -4425.67814 -2973.70909
91 92 93 94 95 96
-24397.79106 -17145.65083 12330.47728 25851.55694 -21020.85503 9724.57199
97 98 99 100 101 102
-5257.12271 -11917.00469 49451.19105 -1019.81617 21231.68666 -37249.75281
103 104 105 106 107 108
17063.84244 820.81123 -8960.01995 1903.66399 -36184.87158 16906.91116
109 110 111 112 113 114
-9857.23666 -32017.62053 -11833.41911 -14746.47114 -41221.10472 -9284.56239
115 116 117 118 119 120
-6241.23666 -9857.23666 18438.79950 -35998.62239 32277.38574 -9715.82504
121 122 123 124 125 126
27397.63883 -13410.89219 -5740.36968 2979.31479 26133.39500 -11191.93099
127 128 129 130 131 132
-12322.94254 10787.21777 3514.30104 40.88789 -2230.23666 32713.04481
133 134 135 136 137 138
-3498.45484 31226.59481 -8278.87837 13827.98632 -9857.23666 13644.58478
139 140 141 142 143 144
10329.40212 -2726.23666 -5663.23666 8691.53378 -21004.42418 -7468.02039
> postscript(file="/var/www/rcomp/tmp/6c4pj1323874246.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 53826.18675 NA
1 -16133.03067 53826.18675
2 -4997.94684 -16133.03067
3 1482.90439 -4997.94684
4 31056.80627 1482.90439
5 62866.33449 31056.80627
6 -5452.67448 62866.33449
7 -24429.31666 -5452.67448
8 -10666.61852 -24429.31666
9 57648.55923 -10666.61852
10 3449.56672 57648.55923
11 -17440.39191 3449.56672
12 -3784.57133 -17440.39191
13 10748.00530 -3784.57133
14 15822.62963 10748.00530
15 -1964.96863 15822.62963
16 -51963.43557 -1964.96863
17 29310.91054 -51963.43557
18 -20853.42360 29310.91054
19 -22580.17184 -20853.42360
20 -10440.67937 -22580.17184
21 -19045.67350 -10440.67937
22 62292.16398 -19045.67350
23 -5891.34680 62292.16398
24 -634.57104 -5891.34680
25 14755.62853 -634.57104
26 7488.46073 14755.62853
27 -49755.72061 7488.46073
28 81332.21000 -49755.72061
29 14077.64237 81332.21000
30 17117.53116 14077.64237
31 10497.85950 17117.53116
32 3518.10024 10497.85950
33 74793.97314 3518.10024
34 3099.07788 74793.97314
35 -9857.23666 3099.07788
36 58463.26979 -9857.23666
37 -3574.51864 58463.26979
38 -8950.70377 -3574.51864
39 -66411.23474 -8950.70377
40 8936.58209 -66411.23474
41 462.19576 8936.58209
42 -20597.85008 462.19576
43 -4802.65129 -20597.85008
44 -16635.53030 -4802.65129
45 -3773.06679 -16635.53030
46 -15983.47488 -3773.06679
47 36250.68488 -15983.47488
48 3964.41956 36250.68488
49 10735.05840 3964.41956
50 -7936.62832 10735.05840
51 -11419.71519 -7936.62832
52 48757.99632 -11419.71519
53 49563.39886 48757.99632
54 -2552.94691 49563.39886
55 2144.54864 -2552.94691
56 43395.15843 2144.54864
57 -23702.16647 43395.15843
58 -33461.40800 -23702.16647
59 47483.61573 -33461.40800
60 -19446.52007 47483.61573
61 -14829.05822 -19446.52007
62 -8701.93172 -14829.05822
63 -27392.53807 -8701.93172
64 2821.20085 -27392.53807
65 -35046.51373 2821.20085
66 -76396.78047 -35046.51373
67 -34994.87820 -76396.78047
68 -37404.92185 -34994.87820
69 -6352.97017 -37404.92185
70 57820.37999 -6352.97017
71 -367.48682 57820.37999
72 -32512.33851 -367.48682
73 13205.15973 -32512.33851
74 -16054.65032 13205.15973
75 8783.53920 -16054.65032
76 -21316.11594 8783.53920
77 -50182.53085 -21316.11594
78 -8679.81465 -50182.53085
79 -18473.95756 -8679.81465
80 -34534.29773 -18473.95756
81 87162.21437 -34534.29773
82 -22639.41871 87162.21437
83 -9423.99346 -22639.41871
84 -10617.54548 -9423.99346
85 4457.36705 -10617.54548
86 28221.66548 4457.36705
87 -19319.40281 28221.66548
88 -4425.67814 -19319.40281
89 -2973.70909 -4425.67814
90 -24397.79106 -2973.70909
91 -17145.65083 -24397.79106
92 12330.47728 -17145.65083
93 25851.55694 12330.47728
94 -21020.85503 25851.55694
95 9724.57199 -21020.85503
96 -5257.12271 9724.57199
97 -11917.00469 -5257.12271
98 49451.19105 -11917.00469
99 -1019.81617 49451.19105
100 21231.68666 -1019.81617
101 -37249.75281 21231.68666
102 17063.84244 -37249.75281
103 820.81123 17063.84244
104 -8960.01995 820.81123
105 1903.66399 -8960.01995
106 -36184.87158 1903.66399
107 16906.91116 -36184.87158
108 -9857.23666 16906.91116
109 -32017.62053 -9857.23666
110 -11833.41911 -32017.62053
111 -14746.47114 -11833.41911
112 -41221.10472 -14746.47114
113 -9284.56239 -41221.10472
114 -6241.23666 -9284.56239
115 -9857.23666 -6241.23666
116 18438.79950 -9857.23666
117 -35998.62239 18438.79950
118 32277.38574 -35998.62239
119 -9715.82504 32277.38574
120 27397.63883 -9715.82504
121 -13410.89219 27397.63883
122 -5740.36968 -13410.89219
123 2979.31479 -5740.36968
124 26133.39500 2979.31479
125 -11191.93099 26133.39500
126 -12322.94254 -11191.93099
127 10787.21777 -12322.94254
128 3514.30104 10787.21777
129 40.88789 3514.30104
130 -2230.23666 40.88789
131 32713.04481 -2230.23666
132 -3498.45484 32713.04481
133 31226.59481 -3498.45484
134 -8278.87837 31226.59481
135 13827.98632 -8278.87837
136 -9857.23666 13827.98632
137 13644.58478 -9857.23666
138 10329.40212 13644.58478
139 -2726.23666 10329.40212
140 -5663.23666 -2726.23666
141 8691.53378 -5663.23666
142 -21004.42418 8691.53378
143 -7468.02039 -21004.42418
144 NA -7468.02039
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -16133.03067 53826.18675
[2,] -4997.94684 -16133.03067
[3,] 1482.90439 -4997.94684
[4,] 31056.80627 1482.90439
[5,] 62866.33449 31056.80627
[6,] -5452.67448 62866.33449
[7,] -24429.31666 -5452.67448
[8,] -10666.61852 -24429.31666
[9,] 57648.55923 -10666.61852
[10,] 3449.56672 57648.55923
[11,] -17440.39191 3449.56672
[12,] -3784.57133 -17440.39191
[13,] 10748.00530 -3784.57133
[14,] 15822.62963 10748.00530
[15,] -1964.96863 15822.62963
[16,] -51963.43557 -1964.96863
[17,] 29310.91054 -51963.43557
[18,] -20853.42360 29310.91054
[19,] -22580.17184 -20853.42360
[20,] -10440.67937 -22580.17184
[21,] -19045.67350 -10440.67937
[22,] 62292.16398 -19045.67350
[23,] -5891.34680 62292.16398
[24,] -634.57104 -5891.34680
[25,] 14755.62853 -634.57104
[26,] 7488.46073 14755.62853
[27,] -49755.72061 7488.46073
[28,] 81332.21000 -49755.72061
[29,] 14077.64237 81332.21000
[30,] 17117.53116 14077.64237
[31,] 10497.85950 17117.53116
[32,] 3518.10024 10497.85950
[33,] 74793.97314 3518.10024
[34,] 3099.07788 74793.97314
[35,] -9857.23666 3099.07788
[36,] 58463.26979 -9857.23666
[37,] -3574.51864 58463.26979
[38,] -8950.70377 -3574.51864
[39,] -66411.23474 -8950.70377
[40,] 8936.58209 -66411.23474
[41,] 462.19576 8936.58209
[42,] -20597.85008 462.19576
[43,] -4802.65129 -20597.85008
[44,] -16635.53030 -4802.65129
[45,] -3773.06679 -16635.53030
[46,] -15983.47488 -3773.06679
[47,] 36250.68488 -15983.47488
[48,] 3964.41956 36250.68488
[49,] 10735.05840 3964.41956
[50,] -7936.62832 10735.05840
[51,] -11419.71519 -7936.62832
[52,] 48757.99632 -11419.71519
[53,] 49563.39886 48757.99632
[54,] -2552.94691 49563.39886
[55,] 2144.54864 -2552.94691
[56,] 43395.15843 2144.54864
[57,] -23702.16647 43395.15843
[58,] -33461.40800 -23702.16647
[59,] 47483.61573 -33461.40800
[60,] -19446.52007 47483.61573
[61,] -14829.05822 -19446.52007
[62,] -8701.93172 -14829.05822
[63,] -27392.53807 -8701.93172
[64,] 2821.20085 -27392.53807
[65,] -35046.51373 2821.20085
[66,] -76396.78047 -35046.51373
[67,] -34994.87820 -76396.78047
[68,] -37404.92185 -34994.87820
[69,] -6352.97017 -37404.92185
[70,] 57820.37999 -6352.97017
[71,] -367.48682 57820.37999
[72,] -32512.33851 -367.48682
[73,] 13205.15973 -32512.33851
[74,] -16054.65032 13205.15973
[75,] 8783.53920 -16054.65032
[76,] -21316.11594 8783.53920
[77,] -50182.53085 -21316.11594
[78,] -8679.81465 -50182.53085
[79,] -18473.95756 -8679.81465
[80,] -34534.29773 -18473.95756
[81,] 87162.21437 -34534.29773
[82,] -22639.41871 87162.21437
[83,] -9423.99346 -22639.41871
[84,] -10617.54548 -9423.99346
[85,] 4457.36705 -10617.54548
[86,] 28221.66548 4457.36705
[87,] -19319.40281 28221.66548
[88,] -4425.67814 -19319.40281
[89,] -2973.70909 -4425.67814
[90,] -24397.79106 -2973.70909
[91,] -17145.65083 -24397.79106
[92,] 12330.47728 -17145.65083
[93,] 25851.55694 12330.47728
[94,] -21020.85503 25851.55694
[95,] 9724.57199 -21020.85503
[96,] -5257.12271 9724.57199
[97,] -11917.00469 -5257.12271
[98,] 49451.19105 -11917.00469
[99,] -1019.81617 49451.19105
[100,] 21231.68666 -1019.81617
[101,] -37249.75281 21231.68666
[102,] 17063.84244 -37249.75281
[103,] 820.81123 17063.84244
[104,] -8960.01995 820.81123
[105,] 1903.66399 -8960.01995
[106,] -36184.87158 1903.66399
[107,] 16906.91116 -36184.87158
[108,] -9857.23666 16906.91116
[109,] -32017.62053 -9857.23666
[110,] -11833.41911 -32017.62053
[111,] -14746.47114 -11833.41911
[112,] -41221.10472 -14746.47114
[113,] -9284.56239 -41221.10472
[114,] -6241.23666 -9284.56239
[115,] -9857.23666 -6241.23666
[116,] 18438.79950 -9857.23666
[117,] -35998.62239 18438.79950
[118,] 32277.38574 -35998.62239
[119,] -9715.82504 32277.38574
[120,] 27397.63883 -9715.82504
[121,] -13410.89219 27397.63883
[122,] -5740.36968 -13410.89219
[123,] 2979.31479 -5740.36968
[124,] 26133.39500 2979.31479
[125,] -11191.93099 26133.39500
[126,] -12322.94254 -11191.93099
[127,] 10787.21777 -12322.94254
[128,] 3514.30104 10787.21777
[129,] 40.88789 3514.30104
[130,] -2230.23666 40.88789
[131,] 32713.04481 -2230.23666
[132,] -3498.45484 32713.04481
[133,] 31226.59481 -3498.45484
[134,] -8278.87837 31226.59481
[135,] 13827.98632 -8278.87837
[136,] -9857.23666 13827.98632
[137,] 13644.58478 -9857.23666
[138,] 10329.40212 13644.58478
[139,] -2726.23666 10329.40212
[140,] -5663.23666 -2726.23666
[141,] 8691.53378 -5663.23666
[142,] -21004.42418 8691.53378
[143,] -7468.02039 -21004.42418
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -16133.03067 53826.18675
2 -4997.94684 -16133.03067
3 1482.90439 -4997.94684
4 31056.80627 1482.90439
5 62866.33449 31056.80627
6 -5452.67448 62866.33449
7 -24429.31666 -5452.67448
8 -10666.61852 -24429.31666
9 57648.55923 -10666.61852
10 3449.56672 57648.55923
11 -17440.39191 3449.56672
12 -3784.57133 -17440.39191
13 10748.00530 -3784.57133
14 15822.62963 10748.00530
15 -1964.96863 15822.62963
16 -51963.43557 -1964.96863
17 29310.91054 -51963.43557
18 -20853.42360 29310.91054
19 -22580.17184 -20853.42360
20 -10440.67937 -22580.17184
21 -19045.67350 -10440.67937
22 62292.16398 -19045.67350
23 -5891.34680 62292.16398
24 -634.57104 -5891.34680
25 14755.62853 -634.57104
26 7488.46073 14755.62853
27 -49755.72061 7488.46073
28 81332.21000 -49755.72061
29 14077.64237 81332.21000
30 17117.53116 14077.64237
31 10497.85950 17117.53116
32 3518.10024 10497.85950
33 74793.97314 3518.10024
34 3099.07788 74793.97314
35 -9857.23666 3099.07788
36 58463.26979 -9857.23666
37 -3574.51864 58463.26979
38 -8950.70377 -3574.51864
39 -66411.23474 -8950.70377
40 8936.58209 -66411.23474
41 462.19576 8936.58209
42 -20597.85008 462.19576
43 -4802.65129 -20597.85008
44 -16635.53030 -4802.65129
45 -3773.06679 -16635.53030
46 -15983.47488 -3773.06679
47 36250.68488 -15983.47488
48 3964.41956 36250.68488
49 10735.05840 3964.41956
50 -7936.62832 10735.05840
51 -11419.71519 -7936.62832
52 48757.99632 -11419.71519
53 49563.39886 48757.99632
54 -2552.94691 49563.39886
55 2144.54864 -2552.94691
56 43395.15843 2144.54864
57 -23702.16647 43395.15843
58 -33461.40800 -23702.16647
59 47483.61573 -33461.40800
60 -19446.52007 47483.61573
61 -14829.05822 -19446.52007
62 -8701.93172 -14829.05822
63 -27392.53807 -8701.93172
64 2821.20085 -27392.53807
65 -35046.51373 2821.20085
66 -76396.78047 -35046.51373
67 -34994.87820 -76396.78047
68 -37404.92185 -34994.87820
69 -6352.97017 -37404.92185
70 57820.37999 -6352.97017
71 -367.48682 57820.37999
72 -32512.33851 -367.48682
73 13205.15973 -32512.33851
74 -16054.65032 13205.15973
75 8783.53920 -16054.65032
76 -21316.11594 8783.53920
77 -50182.53085 -21316.11594
78 -8679.81465 -50182.53085
79 -18473.95756 -8679.81465
80 -34534.29773 -18473.95756
81 87162.21437 -34534.29773
82 -22639.41871 87162.21437
83 -9423.99346 -22639.41871
84 -10617.54548 -9423.99346
85 4457.36705 -10617.54548
86 28221.66548 4457.36705
87 -19319.40281 28221.66548
88 -4425.67814 -19319.40281
89 -2973.70909 -4425.67814
90 -24397.79106 -2973.70909
91 -17145.65083 -24397.79106
92 12330.47728 -17145.65083
93 25851.55694 12330.47728
94 -21020.85503 25851.55694
95 9724.57199 -21020.85503
96 -5257.12271 9724.57199
97 -11917.00469 -5257.12271
98 49451.19105 -11917.00469
99 -1019.81617 49451.19105
100 21231.68666 -1019.81617
101 -37249.75281 21231.68666
102 17063.84244 -37249.75281
103 820.81123 17063.84244
104 -8960.01995 820.81123
105 1903.66399 -8960.01995
106 -36184.87158 1903.66399
107 16906.91116 -36184.87158
108 -9857.23666 16906.91116
109 -32017.62053 -9857.23666
110 -11833.41911 -32017.62053
111 -14746.47114 -11833.41911
112 -41221.10472 -14746.47114
113 -9284.56239 -41221.10472
114 -6241.23666 -9284.56239
115 -9857.23666 -6241.23666
116 18438.79950 -9857.23666
117 -35998.62239 18438.79950
118 32277.38574 -35998.62239
119 -9715.82504 32277.38574
120 27397.63883 -9715.82504
121 -13410.89219 27397.63883
122 -5740.36968 -13410.89219
123 2979.31479 -5740.36968
124 26133.39500 2979.31479
125 -11191.93099 26133.39500
126 -12322.94254 -11191.93099
127 10787.21777 -12322.94254
128 3514.30104 10787.21777
129 40.88789 3514.30104
130 -2230.23666 40.88789
131 32713.04481 -2230.23666
132 -3498.45484 32713.04481
133 31226.59481 -3498.45484
134 -8278.87837 31226.59481
135 13827.98632 -8278.87837
136 -9857.23666 13827.98632
137 13644.58478 -9857.23666
138 10329.40212 13644.58478
139 -2726.23666 10329.40212
140 -5663.23666 -2726.23666
141 8691.53378 -5663.23666
142 -21004.42418 8691.53378
143 -7468.02039 -21004.42418
> 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/www/rcomp/tmp/711qa1323874246.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/www/rcomp/tmp/8jrya1323874246.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/www/rcomp/tmp/9pxtt1323874246.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/www/rcomp/tmp/10lfak1323874246.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/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/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/www/rcomp/tmp/11g2141323874246.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/www/rcomp/tmp/12sq3u1323874246.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/www/rcomp/tmp/13ygxa1323874246.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/www/rcomp/tmp/14kmum1323874246.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/www/rcomp/tmp/15olw81323874246.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/www/rcomp/tmp/16cvi21323874246.tab")
+ }
>
> try(system("convert tmp/1qyzj1323874246.ps tmp/1qyzj1323874246.png",intern=TRUE))
character(0)
> try(system("convert tmp/23nlg1323874246.ps tmp/23nlg1323874246.png",intern=TRUE))
character(0)
> try(system("convert tmp/3z0rg1323874246.ps tmp/3z0rg1323874246.png",intern=TRUE))
character(0)
> try(system("convert tmp/4oppz1323874246.ps tmp/4oppz1323874246.png",intern=TRUE))
character(0)
> try(system("convert tmp/527c21323874246.ps tmp/527c21323874246.png",intern=TRUE))
character(0)
> try(system("convert tmp/6c4pj1323874246.ps tmp/6c4pj1323874246.png",intern=TRUE))
character(0)
> try(system("convert tmp/711qa1323874246.ps tmp/711qa1323874246.png",intern=TRUE))
character(0)
> try(system("convert tmp/8jrya1323874246.ps tmp/8jrya1323874246.png",intern=TRUE))
character(0)
> try(system("convert tmp/9pxtt1323874246.ps tmp/9pxtt1323874246.png",intern=TRUE))
character(0)
> try(system("convert tmp/10lfak1323874246.ps tmp/10lfak1323874246.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.360 0.708 6.858