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(829
+ ,58198
+ ,49
+ ,233
+ ,538
+ ,65968
+ ,24
+ ,157
+ ,186
+ ,7176
+ ,17
+ ,70
+ ,1405
+ ,78306
+ ,66
+ ,360
+ ,1947
+ ,127587
+ ,83
+ ,683
+ ,3534
+ ,250877
+ ,127
+ ,906
+ ,811
+ ,65936
+ ,33
+ ,275
+ ,609
+ ,72513
+ ,30
+ ,142
+ ,1151
+ ,72507
+ ,32
+ ,297
+ ,1779
+ ,170683
+ ,63
+ ,604
+ ,834
+ ,66288
+ ,34
+ ,256
+ ,1211
+ ,94815
+ ,43
+ ,380
+ ,897
+ ,45496
+ ,67
+ ,330
+ ,1574
+ ,83049
+ ,59
+ ,525
+ ,688
+ ,66960
+ ,24
+ ,202
+ ,854
+ ,72377
+ ,38
+ ,313
+ ,848
+ ,61175
+ ,32
+ ,197
+ ,324
+ ,15580
+ ,20
+ ,85
+ ,1602
+ ,71693
+ ,54
+ ,494
+ ,412
+ ,13397
+ ,13
+ ,131
+ ,618
+ ,38921
+ ,35
+ ,233
+ ,1244
+ ,97709
+ ,49
+ ,351
+ ,616
+ ,47899
+ ,27
+ ,227
+ ,1107
+ ,61674
+ ,30
+ ,317
+ ,1079
+ ,77395
+ ,50
+ ,367
+ ,611
+ ,65152
+ ,11
+ ,223
+ ,1188
+ ,88286
+ ,94
+ ,390
+ ,618
+ ,75108
+ ,50
+ ,145
+ ,1392
+ ,182314
+ ,58
+ ,445
+ ,1189
+ ,91721
+ ,25
+ ,481
+ ,752
+ ,56374
+ ,27
+ ,223
+ ,1055
+ ,104756
+ ,23
+ ,361
+ ,1044
+ ,50485
+ ,56
+ ,325
+ ,580
+ ,29013
+ ,39
+ ,169
+ ,1116
+ ,90349
+ ,29
+ ,380
+ ,0
+ ,0
+ ,0
+ ,0
+ ,626
+ ,61484
+ ,33
+ ,280
+ ,1183
+ ,65245
+ ,34
+ ,363
+ ,1016
+ ,35361
+ ,20
+ ,211
+ ,1076
+ ,106880
+ ,34
+ ,381
+ ,1061
+ ,82577
+ ,33
+ ,340
+ ,680
+ ,53655
+ ,25
+ ,277
+ ,404
+ ,40064
+ ,12
+ ,140
+ ,1026
+ ,66118
+ ,44
+ ,397
+ ,643
+ ,55561
+ ,28
+ ,218
+ ,415
+ ,31331
+ ,30
+ ,140
+ ,328
+ ,31350
+ ,12
+ ,92
+ ,960
+ ,93341
+ ,53
+ ,333
+ ,769
+ ,57002
+ ,39
+ ,256
+ ,1066
+ ,60206
+ ,27
+ ,414
+ ,425
+ ,33820
+ ,20
+ ,129
+ ,696
+ ,49791
+ ,35
+ ,189
+ ,1020
+ ,113697
+ ,41
+ ,422
+ ,890
+ ,97673
+ ,43
+ ,310
+ ,916
+ ,89612
+ ,32
+ ,333
+ ,898
+ ,66268
+ ,29
+ ,285
+ ,696
+ ,64319
+ ,24
+ ,204
+ ,383
+ ,25090
+ ,11
+ ,118
+ ,566
+ ,62131
+ ,37
+ ,193
+ ,548
+ ,23630
+ ,22
+ ,194
+ ,457
+ ,31969
+ ,21
+ ,139
+ ,782
+ ,32592
+ ,34
+ ,291
+ ,535
+ ,35738
+ ,19
+ ,176
+ ,475
+ ,42406
+ ,18
+ ,145
+ ,374
+ ,47859
+ ,12
+ ,122
+ ,771
+ ,55240
+ ,22
+ ,256
+ ,1140
+ ,65341
+ ,42
+ ,296
+ ,1502
+ ,61854
+ ,44
+ ,425
+ ,500
+ ,35185
+ ,19
+ ,138
+ ,82
+ ,12207
+ ,10
+ ,25
+ ,1569
+ ,112537
+ ,72
+ ,490
+ ,568
+ ,43886
+ ,24
+ ,179
+ ,606
+ ,49028
+ ,33
+ ,224
+ ,918
+ ,40699
+ ,39
+ ,265
+ ,833
+ ,46357
+ ,20
+ ,293
+ ,460
+ ,17667
+ ,19
+ ,136
+ ,685
+ ,59058
+ ,27
+ ,209
+ ,888
+ ,54106
+ ,38
+ ,301
+ ,410
+ ,23795
+ ,13
+ ,118
+ ,615
+ ,34323
+ ,34
+ ,241
+ ,447
+ ,37071
+ ,29
+ ,106
+ ,650
+ ,78258
+ ,26
+ ,254
+ ,545
+ ,32392
+ ,15
+ ,172
+ ,830
+ ,55020
+ ,19
+ ,307
+ ,515
+ ,29613
+ ,25
+ ,176
+ ,853
+ ,56879
+ ,28
+ ,260
+ ,1312
+ ,109785
+ ,108
+ ,291
+ ,400
+ ,24612
+ ,25
+ ,107
+ ,404
+ ,38010
+ ,22
+ ,139
+ ,639
+ ,53398
+ ,22
+ ,194
+ ,773
+ ,54198
+ ,20
+ ,295
+ ,1075
+ ,66038
+ ,43
+ ,317
+ ,510
+ ,61352
+ ,28
+ ,166
+ ,573
+ ,48096
+ ,29
+ ,210
+ ,434
+ ,25194
+ ,22
+ ,182
+ ,1294
+ ,118291
+ ,57
+ ,442
+ ,718
+ ,71876
+ ,27
+ ,225
+ ,222
+ ,19349
+ ,11
+ ,67
+ ,880
+ ,67369
+ ,51
+ ,271
+ ,816
+ ,54015
+ ,35
+ ,332
+ ,305
+ ,19719
+ ,14
+ ,111
+ ,425
+ ,25497
+ ,11
+ ,141
+ ,578
+ ,55049
+ ,36
+ ,182
+ ,306
+ ,24912
+ ,21
+ ,83
+ ,367
+ ,28591
+ ,19
+ ,80
+ ,463
+ ,24716
+ ,13
+ ,152
+ ,520
+ ,52452
+ ,16
+ ,130
+ ,294
+ ,17850
+ ,16
+ ,71
+ ,0
+ ,0
+ ,0
+ ,0
+ ,566
+ ,35269
+ ,12
+ ,152
+ ,463
+ ,27554
+ ,31
+ ,149
+ ,630
+ ,55167
+ ,12
+ ,196
+ ,632
+ ,42982
+ ,33
+ ,179
+ ,462
+ ,42115
+ ,40
+ ,163
+ ,38
+ ,3058
+ ,4
+ ,1
+ ,0
+ ,0
+ ,0
+ ,0
+ ,592
+ ,96347
+ ,24
+ ,196
+ ,631
+ ,43490
+ ,26
+ ,238
+ ,925
+ ,62694
+ ,47
+ ,263
+ ,441
+ ,36901
+ ,20
+ ,170
+ ,778
+ ,43410
+ ,19
+ ,292
+ ,797
+ ,78320
+ ,31
+ ,224
+ ,469
+ ,37972
+ ,20
+ ,136
+ ,639
+ ,34563
+ ,21
+ ,173
+ ,484
+ ,39841
+ ,18
+ ,129
+ ,214
+ ,16145
+ ,9
+ ,56
+ ,696
+ ,45310
+ ,17
+ ,233
+ ,492
+ ,57938
+ ,14
+ ,172
+ ,638
+ ,48187
+ ,14
+ ,221
+ ,256
+ ,11796
+ ,9
+ ,79
+ ,80
+ ,7627
+ ,8
+ ,25
+ ,587
+ ,62522
+ ,28
+ ,207
+ ,41
+ ,6836
+ ,3
+ ,11
+ ,497
+ ,28834
+ ,14
+ ,209
+ ,42
+ ,5118
+ ,3
+ ,6
+ ,340
+ ,20825
+ ,13
+ ,112
+ ,0
+ ,0
+ ,0
+ ,0
+ ,395
+ ,34363
+ ,17
+ ,154
+ ,226
+ ,12137
+ ,10
+ ,65
+ ,81
+ ,7131
+ ,4
+ ,27
+ ,61
+ ,4194
+ ,11
+ ,14
+ ,313
+ ,21416
+ ,9
+ ,96
+ ,239
+ ,19205
+ ,10
+ ,76
+ ,462
+ ,38232
+ ,8
+ ,185)
+ ,dim=c(4
+ ,144)
+ ,dimnames=list(c('Pageviews'
+ ,'time'
+ ,'logins'
+ ,'compendiumviews')
+ ,1:144))
> y <- array(NA,dim=c(4,144),dimnames=list(c('Pageviews','time','logins','compendiumviews'),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 = '3'
> #'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
logins Pageviews time compendiumviews
1 49 829 58198 233
2 24 538 65968 157
3 17 186 7176 70
4 66 1405 78306 360
5 83 1947 127587 683
6 127 3534 250877 906
7 33 811 65936 275
8 30 609 72513 142
9 32 1151 72507 297
10 63 1779 170683 604
11 34 834 66288 256
12 43 1211 94815 380
13 67 897 45496 330
14 59 1574 83049 525
15 24 688 66960 202
16 38 854 72377 313
17 32 848 61175 197
18 20 324 15580 85
19 54 1602 71693 494
20 13 412 13397 131
21 35 618 38921 233
22 49 1244 97709 351
23 27 616 47899 227
24 30 1107 61674 317
25 50 1079 77395 367
26 11 611 65152 223
27 94 1188 88286 390
28 50 618 75108 145
29 58 1392 182314 445
30 25 1189 91721 481
31 27 752 56374 223
32 23 1055 104756 361
33 56 1044 50485 325
34 39 580 29013 169
35 29 1116 90349 380
36 0 0 0 0
37 33 626 61484 280
38 34 1183 65245 363
39 20 1016 35361 211
40 34 1076 106880 381
41 33 1061 82577 340
42 25 680 53655 277
43 12 404 40064 140
44 44 1026 66118 397
45 28 643 55561 218
46 30 415 31331 140
47 12 328 31350 92
48 53 960 93341 333
49 39 769 57002 256
50 27 1066 60206 414
51 20 425 33820 129
52 35 696 49791 189
53 41 1020 113697 422
54 43 890 97673 310
55 32 916 89612 333
56 29 898 66268 285
57 24 696 64319 204
58 11 383 25090 118
59 37 566 62131 193
60 22 548 23630 194
61 21 457 31969 139
62 34 782 32592 291
63 19 535 35738 176
64 18 475 42406 145
65 12 374 47859 122
66 22 771 55240 256
67 42 1140 65341 296
68 44 1502 61854 425
69 19 500 35185 138
70 10 82 12207 25
71 72 1569 112537 490
72 24 568 43886 179
73 33 606 49028 224
74 39 918 40699 265
75 20 833 46357 293
76 19 460 17667 136
77 27 685 59058 209
78 38 888 54106 301
79 13 410 23795 118
80 34 615 34323 241
81 29 447 37071 106
82 26 650 78258 254
83 15 545 32392 172
84 19 830 55020 307
85 25 515 29613 176
86 28 853 56879 260
87 108 1312 109785 291
88 25 400 24612 107
89 22 404 38010 139
90 22 639 53398 194
91 20 773 54198 295
92 43 1075 66038 317
93 28 510 61352 166
94 29 573 48096 210
95 22 434 25194 182
96 57 1294 118291 442
97 27 718 71876 225
98 11 222 19349 67
99 51 880 67369 271
100 35 816 54015 332
101 14 305 19719 111
102 11 425 25497 141
103 36 578 55049 182
104 21 306 24912 83
105 19 367 28591 80
106 13 463 24716 152
107 16 520 52452 130
108 16 294 17850 71
109 0 0 0 0
110 12 566 35269 152
111 31 463 27554 149
112 12 630 55167 196
113 33 632 42982 179
114 40 462 42115 163
115 4 38 3058 1
116 0 0 0 0
117 24 592 96347 196
118 26 631 43490 238
119 47 925 62694 263
120 20 441 36901 170
121 19 778 43410 292
122 31 797 78320 224
123 20 469 37972 136
124 21 639 34563 173
125 18 484 39841 129
126 9 214 16145 56
127 17 696 45310 233
128 14 492 57938 172
129 14 638 48187 221
130 9 256 11796 79
131 8 80 7627 25
132 28 587 62522 207
133 3 41 6836 11
134 14 497 28834 209
135 3 42 5118 6
136 13 340 20825 112
137 0 0 0 0
138 17 395 34363 154
139 10 226 12137 65
140 4 81 7131 27
141 11 61 4194 14
142 9 313 21416 96
143 10 239 19205 76
144 8 462 38232 185
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Pageviews time compendiumviews
3.276e+00 4.220e-02 9.273e-05 -3.933e-02
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-21.137 -5.804 -1.654 5.246 50.616
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.276e+00 1.661e+00 1.973 0.0505 .
Pageviews 4.220e-02 7.542e-03 5.596 1.12e-07 ***
time 9.273e-05 5.315e-05 1.745 0.0832 .
compendiumviews -3.933e-02 2.327e-02 -1.690 0.0932 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 10.49 on 140 degrees of freedom
Multiple R-squared: 0.7216, Adjusted R-squared: 0.7156
F-statistic: 121 on 3 and 140 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.2148958 4.297917e-01 7.851042e-01
[2,] 0.1266029 2.532059e-01 8.733971e-01
[3,] 0.5313887 9.372225e-01 4.686113e-01
[4,] 0.4199068 8.398136e-01 5.800932e-01
[5,] 0.3161819 6.323637e-01 6.838181e-01
[6,] 0.2631222 5.262443e-01 7.368778e-01
[7,] 0.5931152 8.137696e-01 4.068848e-01
[8,] 0.6567228 6.865545e-01 3.432772e-01
[9,] 0.6009300 7.981400e-01 3.990700e-01
[10,] 0.5152224 9.695551e-01 4.847776e-01
[11,] 0.4493314 8.986627e-01 5.506686e-01
[12,] 0.3721052 7.442105e-01 6.278948e-01
[13,] 0.4763103 9.526207e-01 5.236897e-01
[14,] 0.4796433 9.592866e-01 5.203567e-01
[15,] 0.4292123 8.584246e-01 5.707877e-01
[16,] 0.3600379 7.200758e-01 6.399621e-01
[17,] 0.3005414 6.010828e-01 6.994586e-01
[18,] 0.3978057 7.956113e-01 6.021943e-01
[19,] 0.3483860 6.967720e-01 6.516140e-01
[20,] 0.4588074 9.176148e-01 5.411926e-01
[21,] 0.9948583 1.028337e-02 5.141687e-03
[22,] 0.9984998 3.000311e-03 1.500155e-03
[23,] 0.9978172 4.365642e-03 2.182821e-03
[24,] 0.9995160 9.679455e-04 4.839728e-04
[25,] 0.9993216 1.356825e-03 6.784127e-04
[26,] 0.9998144 3.711914e-04 1.855957e-04
[27,] 0.9998793 2.414395e-04 1.207198e-04
[28,] 0.9999057 1.886671e-04 9.433353e-05
[29,] 0.9999490 1.020970e-04 5.104849e-05
[30,] 0.9999283 1.434257e-04 7.171284e-05
[31,] 0.9999087 1.825490e-04 9.127449e-05
[32,] 0.9999263 1.474823e-04 7.374116e-05
[33,] 0.9999907 1.859756e-05 9.298779e-06
[34,] 0.9999910 1.809845e-05 9.049227e-06
[35,] 0.9999914 1.727089e-05 8.635446e-06
[36,] 0.9999857 2.858867e-05 1.429433e-05
[37,] 0.9999805 3.902415e-05 1.951208e-05
[38,] 0.9999756 4.871243e-05 2.435621e-05
[39,] 0.9999584 8.322481e-05 4.161240e-05
[40,] 0.9999639 7.228208e-05 3.614104e-05
[41,] 0.9999464 1.072380e-04 5.361901e-05
[42,] 0.9999587 8.263577e-05 4.131788e-05
[43,] 0.9999472 1.055933e-04 5.279663e-05
[44,] 0.9999515 9.708660e-05 4.854330e-05
[45,] 0.9999198 1.604944e-04 8.024720e-05
[46,] 0.9998768 2.463893e-04 1.231946e-04
[47,] 0.9998045 3.909552e-04 1.954776e-04
[48,] 0.9997158 5.683116e-04 2.841558e-04
[49,] 0.9996088 7.824852e-04 3.912426e-04
[50,] 0.9995428 9.144873e-04 4.572437e-04
[51,] 0.9994799 1.040138e-03 5.200691e-04
[52,] 0.9993300 1.340029e-03 6.700146e-04
[53,] 0.9993720 1.256091e-03 6.280453e-04
[54,] 0.9991007 1.798577e-03 8.992883e-04
[55,] 0.9986526 2.694844e-03 1.347422e-03
[56,] 0.9985862 2.827700e-03 1.413850e-03
[57,] 0.9980042 3.991606e-03 1.995803e-03
[58,] 0.9972750 5.449951e-03 2.724976e-03
[59,] 0.9968161 6.367762e-03 3.183881e-03
[60,] 0.9965973 6.805350e-03 3.402675e-03
[61,] 0.9961797 7.640679e-03 3.820339e-03
[62,] 0.9980036 3.992874e-03 1.996437e-03
[63,] 0.9973356 5.328842e-03 2.664421e-03
[64,] 0.9964546 7.090786e-03 3.545393e-03
[65,] 0.9959674 8.065275e-03 4.032637e-03
[66,] 0.9942574 1.148520e-02 5.742599e-03
[67,] 0.9942843 1.143138e-02 5.715690e-03
[68,] 0.9920522 1.589564e-02 7.947820e-03
[69,] 0.9928285 1.434297e-02 7.171486e-03
[70,] 0.9899848 2.003044e-02 1.001522e-02
[71,] 0.9870402 2.591969e-02 1.295984e-02
[72,] 0.9828759 3.424826e-02 1.712413e-02
[73,] 0.9791708 4.165838e-02 2.082919e-02
[74,] 0.9854298 2.914043e-02 1.457021e-02
[75,] 0.9819053 3.618938e-02 1.809469e-02
[76,] 0.9759528 4.809431e-02 2.404716e-02
[77,] 0.9734392 5.312163e-02 2.656082e-02
[78,] 0.9754642 4.907167e-02 2.453583e-02
[79,] 0.9696720 6.065591e-02 3.032795e-02
[80,] 0.9693581 6.128382e-02 3.064191e-02
[81,] 0.9999846 3.074687e-05 1.537344e-05
[82,] 0.9999814 3.725370e-05 1.862685e-05
[83,] 0.9999711 5.773939e-05 2.886970e-05
[84,] 0.9999576 8.480046e-05 4.240023e-05
[85,] 0.9999582 8.365250e-05 4.182625e-05
[86,] 0.9999269 1.461104e-04 7.305521e-05
[87,] 0.9998912 2.175891e-04 1.087945e-04
[88,] 0.9998501 2.998676e-04 1.499338e-04
[89,] 0.9997987 4.026598e-04 2.013299e-04
[90,] 0.9997262 5.475151e-04 2.737576e-04
[91,] 0.9995756 8.488794e-04 4.244397e-04
[92,] 0.9993073 1.385394e-03 6.926970e-04
[93,] 0.9997758 4.484078e-04 2.242039e-04
[94,] 0.9997620 4.759009e-04 2.379505e-04
[95,] 0.9996077 7.845356e-04 3.922678e-04
[96,] 0.9994533 1.093498e-03 5.467490e-04
[97,] 0.9996853 6.294268e-04 3.147134e-04
[98,] 0.9996197 7.606643e-04 3.803322e-04
[99,] 0.9993687 1.262685e-03 6.313426e-04
[100,] 0.9990608 1.878489e-03 9.392446e-04
[101,] 0.9988855 2.228988e-03 1.114494e-03
[102,] 0.9982097 3.580646e-03 1.790323e-03
[103,] 0.9971831 5.633765e-03 2.816883e-03
[104,] 0.9980144 3.971217e-03 1.985608e-03
[105,] 0.9990000 2.000004e-03 1.000002e-03
[106,] 0.9995800 8.400410e-04 4.200205e-04
[107,] 0.9995052 9.895213e-04 4.947606e-04
[108,] 0.9999989 2.204919e-06 1.102460e-06
[109,] 0.9999972 5.510587e-06 2.755293e-06
[110,] 0.9999937 1.267268e-05 6.336341e-06
[111,] 0.9999859 2.827817e-05 1.413908e-05
[112,] 0.9999872 2.569395e-05 1.284698e-05
[113,] 0.9999998 4.502160e-07 2.251080e-07
[114,] 0.9999998 3.923784e-07 1.961892e-07
[115,] 0.9999994 1.140967e-06 5.704837e-07
[116,] 0.9999983 3.489635e-06 1.744817e-06
[117,] 0.9999960 8.025491e-06 4.012745e-06
[118,] 0.9999895 2.091118e-05 1.045559e-05
[119,] 0.9999702 5.961593e-05 2.980797e-05
[120,] 0.9999147 1.705052e-04 8.525260e-05
[121,] 0.9997907 4.185478e-04 2.092739e-04
[122,] 0.9997899 4.202722e-04 2.101361e-04
[123,] 0.9998516 2.967870e-04 1.483935e-04
[124,] 0.9995382 9.236665e-04 4.618333e-04
[125,] 0.9989082 2.183593e-03 1.091797e-03
[126,] 0.9985249 2.950234e-03 1.475117e-03
[127,] 0.9956133 8.773429e-03 4.386714e-03
[128,] 0.9885002 2.299969e-02 1.149984e-02
[129,] 0.9741587 5.168264e-02 2.584132e-02
[130,] 0.9449896 1.100208e-01 5.501040e-02
[131,] 0.8939351 2.121298e-01 1.060649e-01
> postscript(file="/var/www/rcomp/tmp/1truf1322066368.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/2ygr01322066368.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/3dfr01322066368.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/4ce0a1322066368.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/5cowl1322066368.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
14.50317577 -1.92459781 7.96171092 10.32322168 12.58086891 -13.06036937
7 8 9 10 11 12
0.19699733 -0.11790140 -14.89664731 -7.43174859 -0.55353069 -5.23347164
13 14 15 16 17 18
34.62570125 2.23959781 -6.57758845 4.27931815 -4.99048273 4.94810022
19 20 21 22 23 24
-4.10819385 -3.75448015 11.19582793 -2.03501562 2.21176613 -13.24861388
25 26 27 28 29 30
8.44160453 -15.33435994 47.73590995 19.37960550 -3.42995329 -18.04618529
31 32 33 34 35 36
-4.47120637 -20.31858964 16.76240664 15.20150886 -14.80992991 -3.27564805
37 38 39 40 41 42
8.61426315 -10.97830171 -21.13656531 -9.61532457 -9.34102774 -1.05677850
43 44 45 46 47 48
-6.53570645 6.90390507 1.00783121 11.80984370 -4.40776700 13.64820527
49 50 51 52 53 54
8.05083121 -10.56752341 0.72441672 5.16559969 0.72834078 5.29632249
55 56 57 58 59 60
-5.14901730 -7.11231336 -6.59167618 -6.12606104 11.66520138 1.03434731
61 62 63 64 65 66
0.93877332 6.14207470 -3.24761411 -3.55275953 -6.70025522 -8.87018987
67 68 69 70 71 72
-3.80723205 -11.68886775 -3.21355561 3.11479611 11.33984376 -0.27793391
73 74 75 76 77 78
8.41114254 3.62806260 -11.20810576 0.02038688 -2.44295504 4.06670489
79 80 81 82 83 84
-5.14549583 11.06341187 7.58997057 -1.97653667 -7.51669071 -12.33424123
85 86 87 88 89 90
4.16443578 -6.32562859 50.61575935 6.76820690 3.61543235 -5.56659439
91 92 93 94 95 96
-9.32427620 0.69725892 4.03909036 5.33975135 5.22871169 5.52485828
97 98 99 100 101 102
-4.39508402 -0.80440812 14.99471264 5.33295284 0.38864620 -7.03189618
103 104 105 106 107 108
10.38287049 5.76378508 0.73019276 -6.13065977 -8.97339186 1.45317911
109 110 111 112 113 114
-3.27564805 -12.45627515 11.48819977 -15.27214051 6.10481239 19.73074262
115 116 117 118 119 120
-1.12365273 -3.27564805 -5.48693530 1.42012241 9.21441649 1.37580055
121 122 123 124 125 126
-9.65291949 -4.36609834 -1.24230552 -5.64589044 -4.32396021 -2.60225270
127 128 129 130 131 132
-10.68855632 -8.64870183 -11.97938978 -3.06707091 1.62390157 2.29321127
133 134 135 136 137 138
-2.20733806 -4.70590430 -2.28686293 -2.15173923 -3.27564805 -0.07666291
139 140 141 142 143 144
-1.38311867 -2.29365821 5.31154001 -5.69623351 -2.15459906 -11.04402876
> postscript(file="/var/www/rcomp/tmp/6s4xc1322066368.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 14.50317577 NA
1 -1.92459781 14.50317577
2 7.96171092 -1.92459781
3 10.32322168 7.96171092
4 12.58086891 10.32322168
5 -13.06036937 12.58086891
6 0.19699733 -13.06036937
7 -0.11790140 0.19699733
8 -14.89664731 -0.11790140
9 -7.43174859 -14.89664731
10 -0.55353069 -7.43174859
11 -5.23347164 -0.55353069
12 34.62570125 -5.23347164
13 2.23959781 34.62570125
14 -6.57758845 2.23959781
15 4.27931815 -6.57758845
16 -4.99048273 4.27931815
17 4.94810022 -4.99048273
18 -4.10819385 4.94810022
19 -3.75448015 -4.10819385
20 11.19582793 -3.75448015
21 -2.03501562 11.19582793
22 2.21176613 -2.03501562
23 -13.24861388 2.21176613
24 8.44160453 -13.24861388
25 -15.33435994 8.44160453
26 47.73590995 -15.33435994
27 19.37960550 47.73590995
28 -3.42995329 19.37960550
29 -18.04618529 -3.42995329
30 -4.47120637 -18.04618529
31 -20.31858964 -4.47120637
32 16.76240664 -20.31858964
33 15.20150886 16.76240664
34 -14.80992991 15.20150886
35 -3.27564805 -14.80992991
36 8.61426315 -3.27564805
37 -10.97830171 8.61426315
38 -21.13656531 -10.97830171
39 -9.61532457 -21.13656531
40 -9.34102774 -9.61532457
41 -1.05677850 -9.34102774
42 -6.53570645 -1.05677850
43 6.90390507 -6.53570645
44 1.00783121 6.90390507
45 11.80984370 1.00783121
46 -4.40776700 11.80984370
47 13.64820527 -4.40776700
48 8.05083121 13.64820527
49 -10.56752341 8.05083121
50 0.72441672 -10.56752341
51 5.16559969 0.72441672
52 0.72834078 5.16559969
53 5.29632249 0.72834078
54 -5.14901730 5.29632249
55 -7.11231336 -5.14901730
56 -6.59167618 -7.11231336
57 -6.12606104 -6.59167618
58 11.66520138 -6.12606104
59 1.03434731 11.66520138
60 0.93877332 1.03434731
61 6.14207470 0.93877332
62 -3.24761411 6.14207470
63 -3.55275953 -3.24761411
64 -6.70025522 -3.55275953
65 -8.87018987 -6.70025522
66 -3.80723205 -8.87018987
67 -11.68886775 -3.80723205
68 -3.21355561 -11.68886775
69 3.11479611 -3.21355561
70 11.33984376 3.11479611
71 -0.27793391 11.33984376
72 8.41114254 -0.27793391
73 3.62806260 8.41114254
74 -11.20810576 3.62806260
75 0.02038688 -11.20810576
76 -2.44295504 0.02038688
77 4.06670489 -2.44295504
78 -5.14549583 4.06670489
79 11.06341187 -5.14549583
80 7.58997057 11.06341187
81 -1.97653667 7.58997057
82 -7.51669071 -1.97653667
83 -12.33424123 -7.51669071
84 4.16443578 -12.33424123
85 -6.32562859 4.16443578
86 50.61575935 -6.32562859
87 6.76820690 50.61575935
88 3.61543235 6.76820690
89 -5.56659439 3.61543235
90 -9.32427620 -5.56659439
91 0.69725892 -9.32427620
92 4.03909036 0.69725892
93 5.33975135 4.03909036
94 5.22871169 5.33975135
95 5.52485828 5.22871169
96 -4.39508402 5.52485828
97 -0.80440812 -4.39508402
98 14.99471264 -0.80440812
99 5.33295284 14.99471264
100 0.38864620 5.33295284
101 -7.03189618 0.38864620
102 10.38287049 -7.03189618
103 5.76378508 10.38287049
104 0.73019276 5.76378508
105 -6.13065977 0.73019276
106 -8.97339186 -6.13065977
107 1.45317911 -8.97339186
108 -3.27564805 1.45317911
109 -12.45627515 -3.27564805
110 11.48819977 -12.45627515
111 -15.27214051 11.48819977
112 6.10481239 -15.27214051
113 19.73074262 6.10481239
114 -1.12365273 19.73074262
115 -3.27564805 -1.12365273
116 -5.48693530 -3.27564805
117 1.42012241 -5.48693530
118 9.21441649 1.42012241
119 1.37580055 9.21441649
120 -9.65291949 1.37580055
121 -4.36609834 -9.65291949
122 -1.24230552 -4.36609834
123 -5.64589044 -1.24230552
124 -4.32396021 -5.64589044
125 -2.60225270 -4.32396021
126 -10.68855632 -2.60225270
127 -8.64870183 -10.68855632
128 -11.97938978 -8.64870183
129 -3.06707091 -11.97938978
130 1.62390157 -3.06707091
131 2.29321127 1.62390157
132 -2.20733806 2.29321127
133 -4.70590430 -2.20733806
134 -2.28686293 -4.70590430
135 -2.15173923 -2.28686293
136 -3.27564805 -2.15173923
137 -0.07666291 -3.27564805
138 -1.38311867 -0.07666291
139 -2.29365821 -1.38311867
140 5.31154001 -2.29365821
141 -5.69623351 5.31154001
142 -2.15459906 -5.69623351
143 -11.04402876 -2.15459906
144 NA -11.04402876
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -1.92459781 14.50317577
[2,] 7.96171092 -1.92459781
[3,] 10.32322168 7.96171092
[4,] 12.58086891 10.32322168
[5,] -13.06036937 12.58086891
[6,] 0.19699733 -13.06036937
[7,] -0.11790140 0.19699733
[8,] -14.89664731 -0.11790140
[9,] -7.43174859 -14.89664731
[10,] -0.55353069 -7.43174859
[11,] -5.23347164 -0.55353069
[12,] 34.62570125 -5.23347164
[13,] 2.23959781 34.62570125
[14,] -6.57758845 2.23959781
[15,] 4.27931815 -6.57758845
[16,] -4.99048273 4.27931815
[17,] 4.94810022 -4.99048273
[18,] -4.10819385 4.94810022
[19,] -3.75448015 -4.10819385
[20,] 11.19582793 -3.75448015
[21,] -2.03501562 11.19582793
[22,] 2.21176613 -2.03501562
[23,] -13.24861388 2.21176613
[24,] 8.44160453 -13.24861388
[25,] -15.33435994 8.44160453
[26,] 47.73590995 -15.33435994
[27,] 19.37960550 47.73590995
[28,] -3.42995329 19.37960550
[29,] -18.04618529 -3.42995329
[30,] -4.47120637 -18.04618529
[31,] -20.31858964 -4.47120637
[32,] 16.76240664 -20.31858964
[33,] 15.20150886 16.76240664
[34,] -14.80992991 15.20150886
[35,] -3.27564805 -14.80992991
[36,] 8.61426315 -3.27564805
[37,] -10.97830171 8.61426315
[38,] -21.13656531 -10.97830171
[39,] -9.61532457 -21.13656531
[40,] -9.34102774 -9.61532457
[41,] -1.05677850 -9.34102774
[42,] -6.53570645 -1.05677850
[43,] 6.90390507 -6.53570645
[44,] 1.00783121 6.90390507
[45,] 11.80984370 1.00783121
[46,] -4.40776700 11.80984370
[47,] 13.64820527 -4.40776700
[48,] 8.05083121 13.64820527
[49,] -10.56752341 8.05083121
[50,] 0.72441672 -10.56752341
[51,] 5.16559969 0.72441672
[52,] 0.72834078 5.16559969
[53,] 5.29632249 0.72834078
[54,] -5.14901730 5.29632249
[55,] -7.11231336 -5.14901730
[56,] -6.59167618 -7.11231336
[57,] -6.12606104 -6.59167618
[58,] 11.66520138 -6.12606104
[59,] 1.03434731 11.66520138
[60,] 0.93877332 1.03434731
[61,] 6.14207470 0.93877332
[62,] -3.24761411 6.14207470
[63,] -3.55275953 -3.24761411
[64,] -6.70025522 -3.55275953
[65,] -8.87018987 -6.70025522
[66,] -3.80723205 -8.87018987
[67,] -11.68886775 -3.80723205
[68,] -3.21355561 -11.68886775
[69,] 3.11479611 -3.21355561
[70,] 11.33984376 3.11479611
[71,] -0.27793391 11.33984376
[72,] 8.41114254 -0.27793391
[73,] 3.62806260 8.41114254
[74,] -11.20810576 3.62806260
[75,] 0.02038688 -11.20810576
[76,] -2.44295504 0.02038688
[77,] 4.06670489 -2.44295504
[78,] -5.14549583 4.06670489
[79,] 11.06341187 -5.14549583
[80,] 7.58997057 11.06341187
[81,] -1.97653667 7.58997057
[82,] -7.51669071 -1.97653667
[83,] -12.33424123 -7.51669071
[84,] 4.16443578 -12.33424123
[85,] -6.32562859 4.16443578
[86,] 50.61575935 -6.32562859
[87,] 6.76820690 50.61575935
[88,] 3.61543235 6.76820690
[89,] -5.56659439 3.61543235
[90,] -9.32427620 -5.56659439
[91,] 0.69725892 -9.32427620
[92,] 4.03909036 0.69725892
[93,] 5.33975135 4.03909036
[94,] 5.22871169 5.33975135
[95,] 5.52485828 5.22871169
[96,] -4.39508402 5.52485828
[97,] -0.80440812 -4.39508402
[98,] 14.99471264 -0.80440812
[99,] 5.33295284 14.99471264
[100,] 0.38864620 5.33295284
[101,] -7.03189618 0.38864620
[102,] 10.38287049 -7.03189618
[103,] 5.76378508 10.38287049
[104,] 0.73019276 5.76378508
[105,] -6.13065977 0.73019276
[106,] -8.97339186 -6.13065977
[107,] 1.45317911 -8.97339186
[108,] -3.27564805 1.45317911
[109,] -12.45627515 -3.27564805
[110,] 11.48819977 -12.45627515
[111,] -15.27214051 11.48819977
[112,] 6.10481239 -15.27214051
[113,] 19.73074262 6.10481239
[114,] -1.12365273 19.73074262
[115,] -3.27564805 -1.12365273
[116,] -5.48693530 -3.27564805
[117,] 1.42012241 -5.48693530
[118,] 9.21441649 1.42012241
[119,] 1.37580055 9.21441649
[120,] -9.65291949 1.37580055
[121,] -4.36609834 -9.65291949
[122,] -1.24230552 -4.36609834
[123,] -5.64589044 -1.24230552
[124,] -4.32396021 -5.64589044
[125,] -2.60225270 -4.32396021
[126,] -10.68855632 -2.60225270
[127,] -8.64870183 -10.68855632
[128,] -11.97938978 -8.64870183
[129,] -3.06707091 -11.97938978
[130,] 1.62390157 -3.06707091
[131,] 2.29321127 1.62390157
[132,] -2.20733806 2.29321127
[133,] -4.70590430 -2.20733806
[134,] -2.28686293 -4.70590430
[135,] -2.15173923 -2.28686293
[136,] -3.27564805 -2.15173923
[137,] -0.07666291 -3.27564805
[138,] -1.38311867 -0.07666291
[139,] -2.29365821 -1.38311867
[140,] 5.31154001 -2.29365821
[141,] -5.69623351 5.31154001
[142,] -2.15459906 -5.69623351
[143,] -11.04402876 -2.15459906
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -1.92459781 14.50317577
2 7.96171092 -1.92459781
3 10.32322168 7.96171092
4 12.58086891 10.32322168
5 -13.06036937 12.58086891
6 0.19699733 -13.06036937
7 -0.11790140 0.19699733
8 -14.89664731 -0.11790140
9 -7.43174859 -14.89664731
10 -0.55353069 -7.43174859
11 -5.23347164 -0.55353069
12 34.62570125 -5.23347164
13 2.23959781 34.62570125
14 -6.57758845 2.23959781
15 4.27931815 -6.57758845
16 -4.99048273 4.27931815
17 4.94810022 -4.99048273
18 -4.10819385 4.94810022
19 -3.75448015 -4.10819385
20 11.19582793 -3.75448015
21 -2.03501562 11.19582793
22 2.21176613 -2.03501562
23 -13.24861388 2.21176613
24 8.44160453 -13.24861388
25 -15.33435994 8.44160453
26 47.73590995 -15.33435994
27 19.37960550 47.73590995
28 -3.42995329 19.37960550
29 -18.04618529 -3.42995329
30 -4.47120637 -18.04618529
31 -20.31858964 -4.47120637
32 16.76240664 -20.31858964
33 15.20150886 16.76240664
34 -14.80992991 15.20150886
35 -3.27564805 -14.80992991
36 8.61426315 -3.27564805
37 -10.97830171 8.61426315
38 -21.13656531 -10.97830171
39 -9.61532457 -21.13656531
40 -9.34102774 -9.61532457
41 -1.05677850 -9.34102774
42 -6.53570645 -1.05677850
43 6.90390507 -6.53570645
44 1.00783121 6.90390507
45 11.80984370 1.00783121
46 -4.40776700 11.80984370
47 13.64820527 -4.40776700
48 8.05083121 13.64820527
49 -10.56752341 8.05083121
50 0.72441672 -10.56752341
51 5.16559969 0.72441672
52 0.72834078 5.16559969
53 5.29632249 0.72834078
54 -5.14901730 5.29632249
55 -7.11231336 -5.14901730
56 -6.59167618 -7.11231336
57 -6.12606104 -6.59167618
58 11.66520138 -6.12606104
59 1.03434731 11.66520138
60 0.93877332 1.03434731
61 6.14207470 0.93877332
62 -3.24761411 6.14207470
63 -3.55275953 -3.24761411
64 -6.70025522 -3.55275953
65 -8.87018987 -6.70025522
66 -3.80723205 -8.87018987
67 -11.68886775 -3.80723205
68 -3.21355561 -11.68886775
69 3.11479611 -3.21355561
70 11.33984376 3.11479611
71 -0.27793391 11.33984376
72 8.41114254 -0.27793391
73 3.62806260 8.41114254
74 -11.20810576 3.62806260
75 0.02038688 -11.20810576
76 -2.44295504 0.02038688
77 4.06670489 -2.44295504
78 -5.14549583 4.06670489
79 11.06341187 -5.14549583
80 7.58997057 11.06341187
81 -1.97653667 7.58997057
82 -7.51669071 -1.97653667
83 -12.33424123 -7.51669071
84 4.16443578 -12.33424123
85 -6.32562859 4.16443578
86 50.61575935 -6.32562859
87 6.76820690 50.61575935
88 3.61543235 6.76820690
89 -5.56659439 3.61543235
90 -9.32427620 -5.56659439
91 0.69725892 -9.32427620
92 4.03909036 0.69725892
93 5.33975135 4.03909036
94 5.22871169 5.33975135
95 5.52485828 5.22871169
96 -4.39508402 5.52485828
97 -0.80440812 -4.39508402
98 14.99471264 -0.80440812
99 5.33295284 14.99471264
100 0.38864620 5.33295284
101 -7.03189618 0.38864620
102 10.38287049 -7.03189618
103 5.76378508 10.38287049
104 0.73019276 5.76378508
105 -6.13065977 0.73019276
106 -8.97339186 -6.13065977
107 1.45317911 -8.97339186
108 -3.27564805 1.45317911
109 -12.45627515 -3.27564805
110 11.48819977 -12.45627515
111 -15.27214051 11.48819977
112 6.10481239 -15.27214051
113 19.73074262 6.10481239
114 -1.12365273 19.73074262
115 -3.27564805 -1.12365273
116 -5.48693530 -3.27564805
117 1.42012241 -5.48693530
118 9.21441649 1.42012241
119 1.37580055 9.21441649
120 -9.65291949 1.37580055
121 -4.36609834 -9.65291949
122 -1.24230552 -4.36609834
123 -5.64589044 -1.24230552
124 -4.32396021 -5.64589044
125 -2.60225270 -4.32396021
126 -10.68855632 -2.60225270
127 -8.64870183 -10.68855632
128 -11.97938978 -8.64870183
129 -3.06707091 -11.97938978
130 1.62390157 -3.06707091
131 2.29321127 1.62390157
132 -2.20733806 2.29321127
133 -4.70590430 -2.20733806
134 -2.28686293 -4.70590430
135 -2.15173923 -2.28686293
136 -3.27564805 -2.15173923
137 -0.07666291 -3.27564805
138 -1.38311867 -0.07666291
139 -2.29365821 -1.38311867
140 5.31154001 -2.29365821
141 -5.69623351 5.31154001
142 -2.15459906 -5.69623351
143 -11.04402876 -2.15459906
> 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/7gx2c1322066368.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/8pebi1322066368.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/956y31322066368.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/10mp4z1322066368.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/115vzh1322066368.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/12a0rn1322066368.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/13po9i1322066368.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/14s7u81322066368.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/154wlu1322066368.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/16bxdg1322066368.tab")
+ }
>
> try(system("convert tmp/1truf1322066368.ps tmp/1truf1322066368.png",intern=TRUE))
character(0)
> try(system("convert tmp/2ygr01322066368.ps tmp/2ygr01322066368.png",intern=TRUE))
character(0)
> try(system("convert tmp/3dfr01322066368.ps tmp/3dfr01322066368.png",intern=TRUE))
character(0)
> try(system("convert tmp/4ce0a1322066368.ps tmp/4ce0a1322066368.png",intern=TRUE))
character(0)
> try(system("convert tmp/5cowl1322066368.ps tmp/5cowl1322066368.png",intern=TRUE))
character(0)
> try(system("convert tmp/6s4xc1322066368.ps tmp/6s4xc1322066368.png",intern=TRUE))
character(0)
> try(system("convert tmp/7gx2c1322066368.ps tmp/7gx2c1322066368.png",intern=TRUE))
character(0)
> try(system("convert tmp/8pebi1322066368.ps tmp/8pebi1322066368.png",intern=TRUE))
character(0)
> try(system("convert tmp/956y31322066368.ps tmp/956y31322066368.png",intern=TRUE))
character(0)
> try(system("convert tmp/10mp4z1322066368.ps tmp/10mp4z1322066368.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.95 0.41 6.35