R version 2.12.0 (2010-10-15)
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(95556
+ ,114468
+ ,54565
+ ,88594
+ ,63016
+ ,74151
+ ,79774
+ ,77921
+ ,31258
+ ,53212
+ ,52491
+ ,34956
+ ,91256
+ ,149703
+ ,22807
+ ,6853
+ ,77411
+ ,58907
+ ,48821
+ ,67067
+ ,52295
+ ,110563
+ ,63262
+ ,58126
+ ,50466
+ ,57113
+ ,62932
+ ,77993
+ ,38439
+ ,68091
+ ,70817
+ ,124676
+ ,105965
+ ,109522
+ ,73795
+ ,75865
+ ,82043
+ ,79746
+ ,74349
+ ,77844
+ ,82204
+ ,98681
+ ,55709
+ ,105531
+ ,37137
+ ,51428
+ ,70780
+ ,65703
+ ,55027
+ ,72562
+ ,56699
+ ,81728
+ ,65911
+ ,95580
+ ,56316
+ ,98278
+ ,26982
+ ,46629
+ ,54628
+ ,115189
+ ,96750
+ ,124865
+ ,53009
+ ,59392
+ ,64664
+ ,127818
+ ,36990
+ ,17821
+ ,85224
+ ,154076
+ ,37048
+ ,64881
+ ,59635
+ ,136506
+ ,42051
+ ,66524
+ ,26998
+ ,45988
+ ,63717
+ ,107445
+ ,55071
+ ,102772
+ ,40001
+ ,46657
+ ,54506
+ ,97563
+ ,35838
+ ,36663
+ ,50838
+ ,55369
+ ,86997
+ ,77921
+ ,33032
+ ,56968
+ ,61704
+ ,77519
+ ,117986
+ ,129805
+ ,56733
+ ,72761
+ ,55064
+ ,81278
+ ,5950
+ ,15049
+ ,84607
+ ,113935
+ ,32551
+ ,25109
+ ,31701
+ ,45824
+ ,71170
+ ,89644
+ ,101773
+ ,109011
+ ,101653
+ ,134245
+ ,81493
+ ,136692
+ ,55901
+ ,50741
+ ,109104
+ ,149510
+ ,114425
+ ,147888
+ ,36311
+ ,54987
+ ,70027
+ ,74467
+ ,73713
+ ,100033
+ ,40671
+ ,85505
+ ,89041
+ ,62426
+ ,57231
+ ,82932
+ ,68608
+ ,72002
+ ,59155
+ ,65469
+ ,55827
+ ,63572
+ ,22618
+ ,23824
+ ,58425
+ ,73831
+ ,65724
+ ,63551
+ ,56979
+ ,56756
+ ,72369
+ ,81399
+ ,79194
+ ,117881
+ ,202316
+ ,70711
+ ,44970
+ ,50495
+ ,49319
+ ,53845
+ ,36252
+ ,51390
+ ,75741
+ ,104953
+ ,38417
+ ,65983
+ ,64102
+ ,76839
+ ,56622
+ ,55792
+ ,15430
+ ,25155
+ ,72571
+ ,55291
+ ,67271
+ ,84279
+ ,43460
+ ,99692
+ ,99501
+ ,59633
+ ,28340
+ ,63249
+ ,76013
+ ,82928
+ ,37361
+ ,50000
+ ,48204
+ ,69455
+ ,76168
+ ,84068
+ ,85168
+ ,76195
+ ,125410
+ ,114634
+ ,123328
+ ,139357
+ ,83038
+ ,110044
+ ,120087
+ ,155118
+ ,91939
+ ,83061
+ ,103646
+ ,127122
+ ,29467
+ ,45653
+ ,43750
+ ,19630
+ ,34497
+ ,67229
+ ,66477
+ ,86060
+ ,71181
+ ,88003
+ ,74482
+ ,95815
+ ,174949
+ ,85499
+ ,46765
+ ,27220
+ ,90257
+ ,109882
+ ,51370
+ ,72579
+ ,1168
+ ,5841
+ ,51360
+ ,68369
+ ,25162
+ ,24610
+ ,21067
+ ,30995
+ ,58233
+ ,150662
+ ,855
+ ,6622
+ ,85903
+ ,93694
+ ,14116
+ ,13155
+ ,57637
+ ,111908
+ ,94137
+ ,57550
+ ,62147
+ ,16356
+ ,62832
+ ,40174
+ ,8773
+ ,13983
+ ,63785
+ ,52316
+ ,65196
+ ,99585
+ ,73087
+ ,86271
+ ,72631
+ ,131012
+ ,86281
+ ,130274
+ ,162365
+ ,159051
+ ,56530
+ ,76506
+ ,35606
+ ,49145
+ ,70111
+ ,66398
+ ,92046
+ ,127546
+ ,63989
+ ,6802
+ ,104911
+ ,99509
+ ,43448
+ ,43106
+ ,60029
+ ,108303
+ ,38650
+ ,64167
+ ,47261
+ ,8579
+ ,73586
+ ,97811
+ ,83042
+ ,84365
+ ,37238
+ ,10901
+ ,63958
+ ,91346
+ ,78956
+ ,33660
+ ,99518
+ ,93634
+ ,111436
+ ,109348
+ ,0
+ ,0
+ ,6023
+ ,7953
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,42564
+ ,63538
+ ,38885
+ ,108281
+ ,0
+ ,0
+ ,0
+ ,0
+ ,1644
+ ,4245
+ ,6179
+ ,21509
+ ,3926
+ ,7670
+ ,23238
+ ,10641
+ ,0
+ ,0
+ ,49288
+ ,41243)
+ ,dim=c(2
+ ,164)
+ ,dimnames=list(c('NumberCharacter'
+ ,'Numberseconds')
+ ,1:164))
> y <- array(NA,dim=c(2,164),dimnames=list(c('NumberCharacter','Numberseconds'),1:164))
> 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
NumberCharacter Numberseconds
1 95556 114468
2 54565 88594
3 63016 74151
4 79774 77921
5 31258 53212
6 52491 34956
7 91256 149703
8 22807 6853
9 77411 58907
10 48821 67067
11 52295 110563
12 63262 58126
13 50466 57113
14 62932 77993
15 38439 68091
16 70817 124676
17 105965 109522
18 73795 75865
19 82043 79746
20 74349 77844
21 82204 98681
22 55709 105531
23 37137 51428
24 70780 65703
25 55027 72562
26 56699 81728
27 65911 95580
28 56316 98278
29 26982 46629
30 54628 115189
31 96750 124865
32 53009 59392
33 64664 127818
34 36990 17821
35 85224 154076
36 37048 64881
37 59635 136506
38 42051 66524
39 26998 45988
40 63717 107445
41 55071 102772
42 40001 46657
43 54506 97563
44 35838 36663
45 50838 55369
46 86997 77921
47 33032 56968
48 61704 77519
49 117986 129805
50 56733 72761
51 55064 81278
52 5950 15049
53 84607 113935
54 32551 25109
55 31701 45824
56 71170 89644
57 101773 109011
58 101653 134245
59 81493 136692
60 55901 50741
61 109104 149510
62 114425 147888
63 36311 54987
64 70027 74467
65 73713 100033
66 40671 85505
67 89041 62426
68 57231 82932
69 68608 72002
70 59155 65469
71 55827 63572
72 22618 23824
73 58425 73831
74 65724 63551
75 56979 56756
76 72369 81399
77 79194 117881
78 202316 70711
79 44970 50495
80 49319 53845
81 36252 51390
82 75741 104953
83 38417 65983
84 64102 76839
85 56622 55792
86 15430 25155
87 72571 55291
88 67271 84279
89 43460 99692
90 99501 59633
91 28340 63249
92 76013 82928
93 37361 50000
94 48204 69455
95 76168 84068
96 85168 76195
97 125410 114634
98 123328 139357
99 83038 110044
100 120087 155118
101 91939 83061
102 103646 127122
103 29467 45653
104 43750 19630
105 34497 67229
106 66477 86060
107 71181 88003
108 74482 95815
109 174949 85499
110 46765 27220
111 90257 109882
112 51370 72579
113 1168 5841
114 51360 68369
115 25162 24610
116 21067 30995
117 58233 150662
118 855 6622
119 85903 93694
120 14116 13155
121 57637 111908
122 94137 57550
123 62147 16356
124 62832 40174
125 8773 13983
126 63785 52316
127 65196 99585
128 73087 86271
129 72631 131012
130 86281 130274
131 162365 159051
132 56530 76506
133 35606 49145
134 70111 66398
135 92046 127546
136 63989 6802
137 104911 99509
138 43448 43106
139 60029 108303
140 38650 64167
141 47261 8579
142 73586 97811
143 83042 84365
144 37238 10901
145 63958 91346
146 78956 33660
147 99518 93634
148 111436 109348
149 0 0
150 6023 7953
151 0 0
152 0 0
153 0 0
154 0 0
155 42564 63538
156 38885 108281
157 0 0
158 0 0
159 1644 4245
160 6179 21509
161 3926 7670
162 23238 10641
163 0 0
164 49288 41243
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Numberseconds
1.585e+04 6.093e-01
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-49412 -15854 -1834 10041 143381
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.585e+04 3.706e+03 4.278 3.21e-05 ***
Numberseconds 6.092e-01 4.547e-02 13.400 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 23150 on 162 degrees of freedom
Multiple R-squared: 0.5257, Adjusted R-squared: 0.5228
F-statistic: 179.6 on 1 and 162 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,] 2.639984e-01 5.279968e-01 0.7360015821
[2,] 2.680800e-01 5.361600e-01 0.7319199750
[3,] 1.840000e-01 3.679999e-01 0.8160000337
[4,] 1.069639e-01 2.139277e-01 0.8930361408
[5,] 1.353308e-01 2.706615e-01 0.8646692434
[6,] 9.398276e-02 1.879655e-01 0.9060172356
[7,] 1.336704e-01 2.673408e-01 0.8663295762
[8,] 9.425398e-02 1.885080e-01 0.9057460237
[9,] 5.846330e-02 1.169266e-01 0.9415366994
[10,] 3.450430e-02 6.900860e-02 0.9654956999
[11,] 3.483121e-02 6.966241e-02 0.9651687934
[12,] 2.375339e-02 4.750677e-02 0.9762466131
[13,] 5.098044e-02 1.019609e-01 0.9490195642
[14,] 3.854846e-02 7.709692e-02 0.9614515413
[15,] 3.549078e-02 7.098157e-02 0.9645092161
[16,] 2.548548e-02 5.097096e-02 0.9745145216
[17,] 1.719281e-02 3.438562e-02 0.9828071912
[18,] 1.883161e-02 3.766323e-02 0.9811683856
[19,] 1.519560e-02 3.039121e-02 0.9848043967
[20,] 1.168505e-02 2.337010e-02 0.9883149480
[21,] 7.547671e-03 1.509534e-02 0.9924523290
[22,] 5.024362e-03 1.004872e-02 0.9949756375
[23,] 3.110884e-03 6.221767e-03 0.9968891163
[24,] 2.631212e-03 5.262425e-03 0.9973687876
[25,] 2.918241e-03 5.836482e-03 0.9970817591
[26,] 3.860993e-03 7.721986e-03 0.9961390071
[27,] 3.099488e-03 6.198977e-03 0.9969005117
[28,] 1.877681e-03 3.755363e-03 0.9981223186
[29,] 1.922563e-03 3.845126e-03 0.9980774372
[30,] 1.174872e-03 2.349743e-03 0.9988251284
[31,] 8.244590e-04 1.648918e-03 0.9991755410
[32,] 7.901084e-04 1.580217e-03 0.9992098916
[33,] 1.243050e-03 2.486099e-03 0.9987569503
[34,] 9.640316e-04 1.928063e-03 0.9990359684
[35,] 9.641461e-04 1.928292e-03 0.9990358539
[36,] 6.636353e-04 1.327271e-03 0.9993363647
[37,] 5.577814e-04 1.115563e-03 0.9994422186
[38,] 3.503455e-04 7.006911e-04 0.9996496545
[39,] 2.715016e-04 5.430031e-04 0.9997284984
[40,] 1.667068e-04 3.334137e-04 0.9998332932
[41,] 9.729453e-05 1.945891e-04 0.9999027055
[42,] 1.836994e-04 3.673988e-04 0.9998163006
[43,] 1.653632e-04 3.307264e-04 0.9998346368
[44,] 9.961357e-05 1.992271e-04 0.9999003864
[45,] 3.284253e-04 6.568506e-04 0.9996715747
[46,] 2.018194e-04 4.036388e-04 0.9997981806
[47,] 1.298040e-04 2.596080e-04 0.9998701960
[48,] 1.578371e-04 3.156743e-04 0.9998421629
[49,] 1.054937e-04 2.109874e-04 0.9998945063
[50,] 6.290603e-05 1.258121e-04 0.9999370940
[51,] 4.452969e-05 8.905938e-05 0.9999554703
[52,] 2.779402e-05 5.558804e-05 0.9999722060
[53,] 4.261779e-05 8.523557e-05 0.9999573822
[54,] 3.184683e-05 6.369366e-05 0.9999681532
[55,] 2.266474e-05 4.532949e-05 0.9999773353
[56,] 1.518842e-05 3.037684e-05 0.9999848116
[57,] 1.106029e-05 2.212058e-05 0.9999889397
[58,] 9.589863e-06 1.917973e-05 0.9999904101
[59,] 6.677276e-06 1.335455e-05 0.9999933227
[60,] 4.603041e-06 9.206082e-06 0.9999953970
[61,] 2.657895e-06 5.315791e-06 0.9999973421
[62,] 3.625337e-06 7.250673e-06 0.9999963747
[63,] 1.327344e-05 2.654689e-05 0.9999867266
[64,] 8.365740e-06 1.673148e-05 0.9999916343
[65,] 5.684217e-06 1.136843e-05 0.9999943158
[66,] 3.379853e-06 6.759706e-06 0.9999966201
[67,] 1.941810e-06 3.883621e-06 0.9999980582
[68,] 1.219859e-06 2.439719e-06 0.9999987801
[69,] 6.853964e-07 1.370793e-06 0.9999993146
[70,] 4.733949e-07 9.467898e-07 0.9999995266
[71,] 2.794653e-07 5.589306e-07 0.9999997205
[72,] 1.722046e-07 3.444092e-07 0.9999998278
[73,] 9.998433e-08 1.999687e-07 0.9999999000
[74,] 3.396089e-01 6.792178e-01 0.6603911106
[75,] 3.000270e-01 6.000540e-01 0.6999730185
[76,] 2.621214e-01 5.242428e-01 0.7378786022
[77,] 2.361830e-01 4.723659e-01 0.7638170385
[78,] 2.049941e-01 4.099882e-01 0.7950059021
[79,] 1.937198e-01 3.874396e-01 0.8062802026
[80,] 1.646434e-01 3.292869e-01 0.8353565612
[81,] 1.398690e-01 2.797380e-01 0.8601309939
[82,] 1.294014e-01 2.588029e-01 0.8705985581
[83,] 1.275268e-01 2.550536e-01 0.8724732097
[84,] 1.058082e-01 2.116164e-01 0.8941918142
[85,] 1.311974e-01 2.623947e-01 0.8688026281
[86,] 2.174684e-01 4.349369e-01 0.7825315561
[87,] 2.303885e-01 4.607771e-01 0.7696114549
[88,] 2.025011e-01 4.050022e-01 0.7974988837
[89,] 1.778205e-01 3.556411e-01 0.8221794713
[90,] 1.561581e-01 3.123161e-01 0.8438419397
[91,] 1.339649e-01 2.679297e-01 0.8660351487
[92,] 1.313879e-01 2.627758e-01 0.8686121128
[93,] 1.812659e-01 3.625319e-01 0.8187340632
[94,] 1.790776e-01 3.581552e-01 0.8209224150
[95,] 1.513409e-01 3.026818e-01 0.8486591112
[96,] 1.307726e-01 2.615452e-01 0.8692273823
[97,] 1.331916e-01 2.663833e-01 0.8668083587
[98,] 1.139485e-01 2.278970e-01 0.8860515113
[99,] 1.010644e-01 2.021288e-01 0.8989355922
[100,] 9.010293e-02 1.802059e-01 0.9098970737
[101,] 8.919939e-02 1.783988e-01 0.9108006138
[102,] 7.218668e-02 1.443734e-01 0.9278133212
[103,] 5.757744e-02 1.151549e-01 0.9424225568
[104,] 4.540983e-02 9.081967e-02 0.9545901662
[105,] 7.343563e-01 5.312874e-01 0.2656436791
[106,] 7.115250e-01 5.769500e-01 0.2884750018
[107,] 6.736774e-01 6.526453e-01 0.3263226251
[108,] 6.345459e-01 7.309081e-01 0.3654540541
[109,] 6.151181e-01 7.697638e-01 0.3848819091
[110,] 5.704051e-01 8.591899e-01 0.4295949265
[111,] 5.241066e-01 9.517868e-01 0.4758934159
[112,] 4.903858e-01 9.807716e-01 0.5096142098
[113,] 6.816902e-01 6.366197e-01 0.3183098441
[114,] 6.640129e-01 6.719741e-01 0.3359870726
[115,] 6.276855e-01 7.446291e-01 0.3723145351
[116,] 5.859755e-01 8.280489e-01 0.4140244580
[117,] 6.179620e-01 7.640760e-01 0.3820379847
[118,] 7.307378e-01 5.385245e-01 0.2692622293
[119,] 8.055561e-01 3.888879e-01 0.1944439454
[120,] 8.101916e-01 3.796168e-01 0.1898083787
[121,] 7.849969e-01 4.300062e-01 0.2150031245
[122,] 7.669961e-01 4.660078e-01 0.2330038755
[123,] 7.390208e-01 5.219584e-01 0.2609791922
[124,] 6.928153e-01 6.143695e-01 0.3071847399
[125,] 7.234985e-01 5.530030e-01 0.2765014991
[126,] 7.043951e-01 5.912097e-01 0.2956048525
[127,] 8.111233e-01 3.777534e-01 0.1888766757
[128,] 7.725333e-01 4.549335e-01 0.2274667251
[129,] 7.338576e-01 5.322849e-01 0.2661424393
[130,] 7.015080e-01 5.969841e-01 0.2984920304
[131,] 6.504380e-01 6.991240e-01 0.3495619798
[132,] 8.364775e-01 3.270450e-01 0.1635224892
[133,] 8.565696e-01 2.868608e-01 0.1434303882
[134,] 8.192356e-01 3.615289e-01 0.1807644353
[135,] 8.283873e-01 3.432253e-01 0.1716126574
[136,] 8.082108e-01 3.835783e-01 0.1917891518
[137,] 8.684324e-01 2.631352e-01 0.1315676031
[138,] 8.312181e-01 3.375638e-01 0.1687818877
[139,] 8.014357e-01 3.971287e-01 0.1985643464
[140,] 8.128497e-01 3.743005e-01 0.1871502592
[141,] 7.722753e-01 4.554494e-01 0.2277246854
[142,] 9.565792e-01 8.684153e-02 0.0434207657
[143,] 9.764389e-01 4.712218e-02 0.0235610906
[144,] 9.995426e-01 9.148727e-04 0.0004574363
[145,] 9.989684e-01 2.063205e-03 0.0010316027
[146,] 9.976535e-01 4.692960e-03 0.0023464799
[147,] 9.950173e-01 9.965355e-03 0.0049826777
[148,] 9.897924e-01 2.041514e-02 0.0102075715
[149,] 9.799059e-01 4.018827e-02 0.0200941344
[150,] 9.621648e-01 7.567030e-02 0.0378351518
[151,] 9.419738e-01 1.160525e-01 0.0580262362
[152,] 9.901899e-01 1.962011e-02 0.0098100558
[153,] 9.728232e-01 5.435354e-02 0.0271767684
[154,] 9.302938e-01 1.394124e-01 0.0697062206
[155,] 8.365745e-01 3.268510e-01 0.1634254859
> postscript(file="/var/www/rcomp/tmp/1h5r71321897242.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/28mh31321897242.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/3yre31321897242.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/4w2jq1321897242.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/58zlb1321897242.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 = 164
Frequency = 1
1 2 3 4 5 6
9962.08755 -15265.11974 1985.31049 16446.42951 -17015.55666 15339.95241
7 8 9 10 11 12
-15804.91545 2777.76837 25667.75178 -7893.74657 -30919.78241 11994.57779
13 14 15 16 17 18
-184.24968 -439.43665 -18899.62088 -20996.15941 23384.44918 11720.05214
19 20 21 22 23 24
17603.54416 11068.34194 6228.35282 -24440.02509 -10049.65064 14896.27350
25 26 27 28 29 30
-5035.58768 -8947.99380 -8175.35596 -19414.11853 -17280.84910 -31405.18332
31 32 33 34 35 36
4821.69192 970.26444 -29063.42998 10278.48970 -24501.17554 -18334.92115
37 38 39 40 41 42
-39385.61352 -14332.92260 -16874.31841 -17598.13390 -23397.09814 -4278.90816
43 44 45 46 47 48
-20788.50317 -2353.04118 1250.28624 23669.42951 -17529.90810 -1378.65108
49 50 51 52 53 54
23047.98580 -3450.82888 -10308.83029 -19072.66306 -662.18100 1399.25931
55 56 57 58 59 60
-12071.40104 700.16539 19503.77708 4009.90582 -17640.93444 9132.90565
61 62 63 64 65 66
2160.67023 8469.87738 -13043.97940 8803.78678 -3086.35623 -27277.13955
67 68 69 70 71 72
35153.79312 -9149.53351 8886.59358 3413.83852 1241.59004 -7750.85155
73 74 75 76 77 78
-2410.72879 11151.38434 6546.25337 6922.45019 -8479.29037 143381.13823
79 80 81 82 83 84
-1648.21829 659.78667 -10911.49906 -4055.87729 -17637.31713 1433.64045
85 86 87 88 89 90
6776.57254 -15749.76629 23030.80792 69.80371 -33131.60121 47315.43465
91 92 93 94 95 96
-26048.62148 9634.90350 -8955.63843 -9965.64094 9095.35594 22891.99890
97 98 99 100 101 102
39714.95168 22570.40832 139.41951 9726.98362 25479.87295 10342.60959
103 104 105 106 107 108
-14201.21890 15936.35238 -22316.44544 -1809.27454 1710.94833 252.46976
109 110 111 112 113 114
107004.51597 14327.12781 7457.11837 -8702.94497 -18244.66835 -6147.99300
115 116 117 118 119 120
-5685.72382 -13670.79943 -49412.18836 -19033.49436 12965.69378 -9752.73930
121 122 123 124 125 126
-26397.22669 43220.50709 36328.04425 22501.87417 -15600.20016 16057.33336
127 128 129 130 131 132
-11330.41122 4672.17323 -23042.38166 -8942.75350 49608.79452 -5935.47855
133 134 135 136 137 138
-10189.72776 13803.84318 -1515.71336 43990.84024 28430.89195 1331.54658
139 140 141 142 143 144
-21808.87233 -16297.91505 26180.19899 -1859.59773 15788.40802 14742.51527
145 146 147 148 149 150
-7548.78194 42594.54332 26617.24892 28961.45907 -15854.02596 -14676.40910
151 152 153 154 155 156
-15854.02596 -15854.02596 -15854.02596 -15854.02596 -12000.69538 -42939.46878
157 158 159 160 161 162
-15854.02596 -15854.02596 -16796.30176 -22779.43259 -16600.99071 900.92085
163 164
-15854.02596 8306.58352
> postscript(file="/var/www/rcomp/tmp/6hkd51321897242.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 = 164
Frequency = 1
lag(myerror, k = 1) myerror
0 9962.08755 NA
1 -15265.11974 9962.08755
2 1985.31049 -15265.11974
3 16446.42951 1985.31049
4 -17015.55666 16446.42951
5 15339.95241 -17015.55666
6 -15804.91545 15339.95241
7 2777.76837 -15804.91545
8 25667.75178 2777.76837
9 -7893.74657 25667.75178
10 -30919.78241 -7893.74657
11 11994.57779 -30919.78241
12 -184.24968 11994.57779
13 -439.43665 -184.24968
14 -18899.62088 -439.43665
15 -20996.15941 -18899.62088
16 23384.44918 -20996.15941
17 11720.05214 23384.44918
18 17603.54416 11720.05214
19 11068.34194 17603.54416
20 6228.35282 11068.34194
21 -24440.02509 6228.35282
22 -10049.65064 -24440.02509
23 14896.27350 -10049.65064
24 -5035.58768 14896.27350
25 -8947.99380 -5035.58768
26 -8175.35596 -8947.99380
27 -19414.11853 -8175.35596
28 -17280.84910 -19414.11853
29 -31405.18332 -17280.84910
30 4821.69192 -31405.18332
31 970.26444 4821.69192
32 -29063.42998 970.26444
33 10278.48970 -29063.42998
34 -24501.17554 10278.48970
35 -18334.92115 -24501.17554
36 -39385.61352 -18334.92115
37 -14332.92260 -39385.61352
38 -16874.31841 -14332.92260
39 -17598.13390 -16874.31841
40 -23397.09814 -17598.13390
41 -4278.90816 -23397.09814
42 -20788.50317 -4278.90816
43 -2353.04118 -20788.50317
44 1250.28624 -2353.04118
45 23669.42951 1250.28624
46 -17529.90810 23669.42951
47 -1378.65108 -17529.90810
48 23047.98580 -1378.65108
49 -3450.82888 23047.98580
50 -10308.83029 -3450.82888
51 -19072.66306 -10308.83029
52 -662.18100 -19072.66306
53 1399.25931 -662.18100
54 -12071.40104 1399.25931
55 700.16539 -12071.40104
56 19503.77708 700.16539
57 4009.90582 19503.77708
58 -17640.93444 4009.90582
59 9132.90565 -17640.93444
60 2160.67023 9132.90565
61 8469.87738 2160.67023
62 -13043.97940 8469.87738
63 8803.78678 -13043.97940
64 -3086.35623 8803.78678
65 -27277.13955 -3086.35623
66 35153.79312 -27277.13955
67 -9149.53351 35153.79312
68 8886.59358 -9149.53351
69 3413.83852 8886.59358
70 1241.59004 3413.83852
71 -7750.85155 1241.59004
72 -2410.72879 -7750.85155
73 11151.38434 -2410.72879
74 6546.25337 11151.38434
75 6922.45019 6546.25337
76 -8479.29037 6922.45019
77 143381.13823 -8479.29037
78 -1648.21829 143381.13823
79 659.78667 -1648.21829
80 -10911.49906 659.78667
81 -4055.87729 -10911.49906
82 -17637.31713 -4055.87729
83 1433.64045 -17637.31713
84 6776.57254 1433.64045
85 -15749.76629 6776.57254
86 23030.80792 -15749.76629
87 69.80371 23030.80792
88 -33131.60121 69.80371
89 47315.43465 -33131.60121
90 -26048.62148 47315.43465
91 9634.90350 -26048.62148
92 -8955.63843 9634.90350
93 -9965.64094 -8955.63843
94 9095.35594 -9965.64094
95 22891.99890 9095.35594
96 39714.95168 22891.99890
97 22570.40832 39714.95168
98 139.41951 22570.40832
99 9726.98362 139.41951
100 25479.87295 9726.98362
101 10342.60959 25479.87295
102 -14201.21890 10342.60959
103 15936.35238 -14201.21890
104 -22316.44544 15936.35238
105 -1809.27454 -22316.44544
106 1710.94833 -1809.27454
107 252.46976 1710.94833
108 107004.51597 252.46976
109 14327.12781 107004.51597
110 7457.11837 14327.12781
111 -8702.94497 7457.11837
112 -18244.66835 -8702.94497
113 -6147.99300 -18244.66835
114 -5685.72382 -6147.99300
115 -13670.79943 -5685.72382
116 -49412.18836 -13670.79943
117 -19033.49436 -49412.18836
118 12965.69378 -19033.49436
119 -9752.73930 12965.69378
120 -26397.22669 -9752.73930
121 43220.50709 -26397.22669
122 36328.04425 43220.50709
123 22501.87417 36328.04425
124 -15600.20016 22501.87417
125 16057.33336 -15600.20016
126 -11330.41122 16057.33336
127 4672.17323 -11330.41122
128 -23042.38166 4672.17323
129 -8942.75350 -23042.38166
130 49608.79452 -8942.75350
131 -5935.47855 49608.79452
132 -10189.72776 -5935.47855
133 13803.84318 -10189.72776
134 -1515.71336 13803.84318
135 43990.84024 -1515.71336
136 28430.89195 43990.84024
137 1331.54658 28430.89195
138 -21808.87233 1331.54658
139 -16297.91505 -21808.87233
140 26180.19899 -16297.91505
141 -1859.59773 26180.19899
142 15788.40802 -1859.59773
143 14742.51527 15788.40802
144 -7548.78194 14742.51527
145 42594.54332 -7548.78194
146 26617.24892 42594.54332
147 28961.45907 26617.24892
148 -15854.02596 28961.45907
149 -14676.40910 -15854.02596
150 -15854.02596 -14676.40910
151 -15854.02596 -15854.02596
152 -15854.02596 -15854.02596
153 -15854.02596 -15854.02596
154 -12000.69538 -15854.02596
155 -42939.46878 -12000.69538
156 -15854.02596 -42939.46878
157 -15854.02596 -15854.02596
158 -16796.30176 -15854.02596
159 -22779.43259 -16796.30176
160 -16600.99071 -22779.43259
161 900.92085 -16600.99071
162 -15854.02596 900.92085
163 8306.58352 -15854.02596
164 NA 8306.58352
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -15265.11974 9962.08755
[2,] 1985.31049 -15265.11974
[3,] 16446.42951 1985.31049
[4,] -17015.55666 16446.42951
[5,] 15339.95241 -17015.55666
[6,] -15804.91545 15339.95241
[7,] 2777.76837 -15804.91545
[8,] 25667.75178 2777.76837
[9,] -7893.74657 25667.75178
[10,] -30919.78241 -7893.74657
[11,] 11994.57779 -30919.78241
[12,] -184.24968 11994.57779
[13,] -439.43665 -184.24968
[14,] -18899.62088 -439.43665
[15,] -20996.15941 -18899.62088
[16,] 23384.44918 -20996.15941
[17,] 11720.05214 23384.44918
[18,] 17603.54416 11720.05214
[19,] 11068.34194 17603.54416
[20,] 6228.35282 11068.34194
[21,] -24440.02509 6228.35282
[22,] -10049.65064 -24440.02509
[23,] 14896.27350 -10049.65064
[24,] -5035.58768 14896.27350
[25,] -8947.99380 -5035.58768
[26,] -8175.35596 -8947.99380
[27,] -19414.11853 -8175.35596
[28,] -17280.84910 -19414.11853
[29,] -31405.18332 -17280.84910
[30,] 4821.69192 -31405.18332
[31,] 970.26444 4821.69192
[32,] -29063.42998 970.26444
[33,] 10278.48970 -29063.42998
[34,] -24501.17554 10278.48970
[35,] -18334.92115 -24501.17554
[36,] -39385.61352 -18334.92115
[37,] -14332.92260 -39385.61352
[38,] -16874.31841 -14332.92260
[39,] -17598.13390 -16874.31841
[40,] -23397.09814 -17598.13390
[41,] -4278.90816 -23397.09814
[42,] -20788.50317 -4278.90816
[43,] -2353.04118 -20788.50317
[44,] 1250.28624 -2353.04118
[45,] 23669.42951 1250.28624
[46,] -17529.90810 23669.42951
[47,] -1378.65108 -17529.90810
[48,] 23047.98580 -1378.65108
[49,] -3450.82888 23047.98580
[50,] -10308.83029 -3450.82888
[51,] -19072.66306 -10308.83029
[52,] -662.18100 -19072.66306
[53,] 1399.25931 -662.18100
[54,] -12071.40104 1399.25931
[55,] 700.16539 -12071.40104
[56,] 19503.77708 700.16539
[57,] 4009.90582 19503.77708
[58,] -17640.93444 4009.90582
[59,] 9132.90565 -17640.93444
[60,] 2160.67023 9132.90565
[61,] 8469.87738 2160.67023
[62,] -13043.97940 8469.87738
[63,] 8803.78678 -13043.97940
[64,] -3086.35623 8803.78678
[65,] -27277.13955 -3086.35623
[66,] 35153.79312 -27277.13955
[67,] -9149.53351 35153.79312
[68,] 8886.59358 -9149.53351
[69,] 3413.83852 8886.59358
[70,] 1241.59004 3413.83852
[71,] -7750.85155 1241.59004
[72,] -2410.72879 -7750.85155
[73,] 11151.38434 -2410.72879
[74,] 6546.25337 11151.38434
[75,] 6922.45019 6546.25337
[76,] -8479.29037 6922.45019
[77,] 143381.13823 -8479.29037
[78,] -1648.21829 143381.13823
[79,] 659.78667 -1648.21829
[80,] -10911.49906 659.78667
[81,] -4055.87729 -10911.49906
[82,] -17637.31713 -4055.87729
[83,] 1433.64045 -17637.31713
[84,] 6776.57254 1433.64045
[85,] -15749.76629 6776.57254
[86,] 23030.80792 -15749.76629
[87,] 69.80371 23030.80792
[88,] -33131.60121 69.80371
[89,] 47315.43465 -33131.60121
[90,] -26048.62148 47315.43465
[91,] 9634.90350 -26048.62148
[92,] -8955.63843 9634.90350
[93,] -9965.64094 -8955.63843
[94,] 9095.35594 -9965.64094
[95,] 22891.99890 9095.35594
[96,] 39714.95168 22891.99890
[97,] 22570.40832 39714.95168
[98,] 139.41951 22570.40832
[99,] 9726.98362 139.41951
[100,] 25479.87295 9726.98362
[101,] 10342.60959 25479.87295
[102,] -14201.21890 10342.60959
[103,] 15936.35238 -14201.21890
[104,] -22316.44544 15936.35238
[105,] -1809.27454 -22316.44544
[106,] 1710.94833 -1809.27454
[107,] 252.46976 1710.94833
[108,] 107004.51597 252.46976
[109,] 14327.12781 107004.51597
[110,] 7457.11837 14327.12781
[111,] -8702.94497 7457.11837
[112,] -18244.66835 -8702.94497
[113,] -6147.99300 -18244.66835
[114,] -5685.72382 -6147.99300
[115,] -13670.79943 -5685.72382
[116,] -49412.18836 -13670.79943
[117,] -19033.49436 -49412.18836
[118,] 12965.69378 -19033.49436
[119,] -9752.73930 12965.69378
[120,] -26397.22669 -9752.73930
[121,] 43220.50709 -26397.22669
[122,] 36328.04425 43220.50709
[123,] 22501.87417 36328.04425
[124,] -15600.20016 22501.87417
[125,] 16057.33336 -15600.20016
[126,] -11330.41122 16057.33336
[127,] 4672.17323 -11330.41122
[128,] -23042.38166 4672.17323
[129,] -8942.75350 -23042.38166
[130,] 49608.79452 -8942.75350
[131,] -5935.47855 49608.79452
[132,] -10189.72776 -5935.47855
[133,] 13803.84318 -10189.72776
[134,] -1515.71336 13803.84318
[135,] 43990.84024 -1515.71336
[136,] 28430.89195 43990.84024
[137,] 1331.54658 28430.89195
[138,] -21808.87233 1331.54658
[139,] -16297.91505 -21808.87233
[140,] 26180.19899 -16297.91505
[141,] -1859.59773 26180.19899
[142,] 15788.40802 -1859.59773
[143,] 14742.51527 15788.40802
[144,] -7548.78194 14742.51527
[145,] 42594.54332 -7548.78194
[146,] 26617.24892 42594.54332
[147,] 28961.45907 26617.24892
[148,] -15854.02596 28961.45907
[149,] -14676.40910 -15854.02596
[150,] -15854.02596 -14676.40910
[151,] -15854.02596 -15854.02596
[152,] -15854.02596 -15854.02596
[153,] -15854.02596 -15854.02596
[154,] -12000.69538 -15854.02596
[155,] -42939.46878 -12000.69538
[156,] -15854.02596 -42939.46878
[157,] -15854.02596 -15854.02596
[158,] -16796.30176 -15854.02596
[159,] -22779.43259 -16796.30176
[160,] -16600.99071 -22779.43259
[161,] 900.92085 -16600.99071
[162,] -15854.02596 900.92085
[163,] 8306.58352 -15854.02596
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -15265.11974 9962.08755
2 1985.31049 -15265.11974
3 16446.42951 1985.31049
4 -17015.55666 16446.42951
5 15339.95241 -17015.55666
6 -15804.91545 15339.95241
7 2777.76837 -15804.91545
8 25667.75178 2777.76837
9 -7893.74657 25667.75178
10 -30919.78241 -7893.74657
11 11994.57779 -30919.78241
12 -184.24968 11994.57779
13 -439.43665 -184.24968
14 -18899.62088 -439.43665
15 -20996.15941 -18899.62088
16 23384.44918 -20996.15941
17 11720.05214 23384.44918
18 17603.54416 11720.05214
19 11068.34194 17603.54416
20 6228.35282 11068.34194
21 -24440.02509 6228.35282
22 -10049.65064 -24440.02509
23 14896.27350 -10049.65064
24 -5035.58768 14896.27350
25 -8947.99380 -5035.58768
26 -8175.35596 -8947.99380
27 -19414.11853 -8175.35596
28 -17280.84910 -19414.11853
29 -31405.18332 -17280.84910
30 4821.69192 -31405.18332
31 970.26444 4821.69192
32 -29063.42998 970.26444
33 10278.48970 -29063.42998
34 -24501.17554 10278.48970
35 -18334.92115 -24501.17554
36 -39385.61352 -18334.92115
37 -14332.92260 -39385.61352
38 -16874.31841 -14332.92260
39 -17598.13390 -16874.31841
40 -23397.09814 -17598.13390
41 -4278.90816 -23397.09814
42 -20788.50317 -4278.90816
43 -2353.04118 -20788.50317
44 1250.28624 -2353.04118
45 23669.42951 1250.28624
46 -17529.90810 23669.42951
47 -1378.65108 -17529.90810
48 23047.98580 -1378.65108
49 -3450.82888 23047.98580
50 -10308.83029 -3450.82888
51 -19072.66306 -10308.83029
52 -662.18100 -19072.66306
53 1399.25931 -662.18100
54 -12071.40104 1399.25931
55 700.16539 -12071.40104
56 19503.77708 700.16539
57 4009.90582 19503.77708
58 -17640.93444 4009.90582
59 9132.90565 -17640.93444
60 2160.67023 9132.90565
61 8469.87738 2160.67023
62 -13043.97940 8469.87738
63 8803.78678 -13043.97940
64 -3086.35623 8803.78678
65 -27277.13955 -3086.35623
66 35153.79312 -27277.13955
67 -9149.53351 35153.79312
68 8886.59358 -9149.53351
69 3413.83852 8886.59358
70 1241.59004 3413.83852
71 -7750.85155 1241.59004
72 -2410.72879 -7750.85155
73 11151.38434 -2410.72879
74 6546.25337 11151.38434
75 6922.45019 6546.25337
76 -8479.29037 6922.45019
77 143381.13823 -8479.29037
78 -1648.21829 143381.13823
79 659.78667 -1648.21829
80 -10911.49906 659.78667
81 -4055.87729 -10911.49906
82 -17637.31713 -4055.87729
83 1433.64045 -17637.31713
84 6776.57254 1433.64045
85 -15749.76629 6776.57254
86 23030.80792 -15749.76629
87 69.80371 23030.80792
88 -33131.60121 69.80371
89 47315.43465 -33131.60121
90 -26048.62148 47315.43465
91 9634.90350 -26048.62148
92 -8955.63843 9634.90350
93 -9965.64094 -8955.63843
94 9095.35594 -9965.64094
95 22891.99890 9095.35594
96 39714.95168 22891.99890
97 22570.40832 39714.95168
98 139.41951 22570.40832
99 9726.98362 139.41951
100 25479.87295 9726.98362
101 10342.60959 25479.87295
102 -14201.21890 10342.60959
103 15936.35238 -14201.21890
104 -22316.44544 15936.35238
105 -1809.27454 -22316.44544
106 1710.94833 -1809.27454
107 252.46976 1710.94833
108 107004.51597 252.46976
109 14327.12781 107004.51597
110 7457.11837 14327.12781
111 -8702.94497 7457.11837
112 -18244.66835 -8702.94497
113 -6147.99300 -18244.66835
114 -5685.72382 -6147.99300
115 -13670.79943 -5685.72382
116 -49412.18836 -13670.79943
117 -19033.49436 -49412.18836
118 12965.69378 -19033.49436
119 -9752.73930 12965.69378
120 -26397.22669 -9752.73930
121 43220.50709 -26397.22669
122 36328.04425 43220.50709
123 22501.87417 36328.04425
124 -15600.20016 22501.87417
125 16057.33336 -15600.20016
126 -11330.41122 16057.33336
127 4672.17323 -11330.41122
128 -23042.38166 4672.17323
129 -8942.75350 -23042.38166
130 49608.79452 -8942.75350
131 -5935.47855 49608.79452
132 -10189.72776 -5935.47855
133 13803.84318 -10189.72776
134 -1515.71336 13803.84318
135 43990.84024 -1515.71336
136 28430.89195 43990.84024
137 1331.54658 28430.89195
138 -21808.87233 1331.54658
139 -16297.91505 -21808.87233
140 26180.19899 -16297.91505
141 -1859.59773 26180.19899
142 15788.40802 -1859.59773
143 14742.51527 15788.40802
144 -7548.78194 14742.51527
145 42594.54332 -7548.78194
146 26617.24892 42594.54332
147 28961.45907 26617.24892
148 -15854.02596 28961.45907
149 -14676.40910 -15854.02596
150 -15854.02596 -14676.40910
151 -15854.02596 -15854.02596
152 -15854.02596 -15854.02596
153 -15854.02596 -15854.02596
154 -12000.69538 -15854.02596
155 -42939.46878 -12000.69538
156 -15854.02596 -42939.46878
157 -15854.02596 -15854.02596
158 -16796.30176 -15854.02596
159 -22779.43259 -16796.30176
160 -16600.99071 -22779.43259
161 900.92085 -16600.99071
162 -15854.02596 900.92085
163 8306.58352 -15854.02596
> 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/71ou81321897242.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/8wcld1321897242.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/9hckq1321897242.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/10y2tx1321897242.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/11t70p1321897242.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/12akfi1321897242.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/13k1u21321897242.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/14l77m1321897242.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/15v1vr1321897242.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/16dh4v1321897242.tab")
+ }
>
> try(system("convert tmp/1h5r71321897242.ps tmp/1h5r71321897242.png",intern=TRUE))
character(0)
> try(system("convert tmp/28mh31321897242.ps tmp/28mh31321897242.png",intern=TRUE))
character(0)
> try(system("convert tmp/3yre31321897242.ps tmp/3yre31321897242.png",intern=TRUE))
character(0)
> try(system("convert tmp/4w2jq1321897242.ps tmp/4w2jq1321897242.png",intern=TRUE))
character(0)
> try(system("convert tmp/58zlb1321897242.ps tmp/58zlb1321897242.png",intern=TRUE))
character(0)
> try(system("convert tmp/6hkd51321897242.ps tmp/6hkd51321897242.png",intern=TRUE))
character(0)
> try(system("convert tmp/71ou81321897242.ps tmp/71ou81321897242.png",intern=TRUE))
character(0)
> try(system("convert tmp/8wcld1321897242.ps tmp/8wcld1321897242.png",intern=TRUE))
character(0)
> try(system("convert tmp/9hckq1321897242.ps tmp/9hckq1321897242.png",intern=TRUE))
character(0)
> try(system("convert tmp/10y2tx1321897242.ps tmp/10y2tx1321897242.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.110 0.290 5.351