R version 2.13.0 (2011-04-13)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-pc-linux-gnu (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(1173
+ ,70
+ ,95556
+ ,669
+ ,44
+ ,54565
+ ,1154
+ ,39
+ ,63016
+ ,1948
+ ,119
+ ,79774
+ ,705
+ ,31
+ ,31258
+ ,332
+ ,23
+ ,52491
+ ,2726
+ ,46
+ ,91256
+ ,345
+ ,39
+ ,22807
+ ,1385
+ ,58
+ ,77411
+ ,1161
+ ,51
+ ,48821
+ ,1431
+ ,65
+ ,52295
+ ,1228
+ ,42
+ ,63262
+ ,1205
+ ,45
+ ,50466
+ ,1732
+ ,76
+ ,62932
+ ,1214
+ ,33
+ ,38439
+ ,3221
+ ,90
+ ,70817
+ ,1385
+ ,36
+ ,105965
+ ,1953
+ ,68
+ ,73795
+ ,883
+ ,28
+ ,82043
+ ,1631
+ ,38
+ ,74349
+ ,1459
+ ,75
+ ,82204
+ ,1929
+ ,76
+ ,55709
+ ,860
+ ,34
+ ,37137
+ ,1165
+ ,44
+ ,70780
+ ,2115
+ ,126
+ ,55027
+ ,1939
+ ,59
+ ,56699
+ ,1844
+ ,64
+ ,65911
+ ,1346
+ ,46
+ ,56316
+ ,1093
+ ,36
+ ,26982
+ ,1625
+ ,108
+ ,54628
+ ,1551
+ ,34
+ ,96750
+ ,1267
+ ,54
+ ,53009
+ ,1478
+ ,40
+ ,64664
+ ,670
+ ,29
+ ,36990
+ ,2040
+ ,46
+ ,85224
+ ,1561
+ ,49
+ ,37048
+ ,2078
+ ,56
+ ,59635
+ ,1113
+ ,38
+ ,42051
+ ,686
+ ,19
+ ,26998
+ ,2065
+ ,29
+ ,63717
+ ,2251
+ ,26
+ ,55071
+ ,1106
+ ,56
+ ,40001
+ ,1244
+ ,60
+ ,54506
+ ,1021
+ ,45
+ ,35838
+ ,1735
+ ,56
+ ,50838
+ ,3681
+ ,596
+ ,86997
+ ,918
+ ,57
+ ,33032
+ ,1582
+ ,55
+ ,61704
+ ,2900
+ ,99
+ ,117986
+ ,1496
+ ,51
+ ,56733
+ ,1116
+ ,21
+ ,55064
+ ,496
+ ,20
+ ,5950
+ ,1777
+ ,58
+ ,84607
+ ,744
+ ,21
+ ,32551
+ ,1101
+ ,66
+ ,31701
+ ,1612
+ ,47
+ ,71170
+ ,1849
+ ,58
+ ,101773
+ ,2460
+ ,158
+ ,101653
+ ,1701
+ ,49
+ ,81493
+ ,1334
+ ,53
+ ,55901
+ ,2549
+ ,46
+ ,109104
+ ,2218
+ ,117
+ ,114425
+ ,1633
+ ,56
+ ,36311
+ ,1724
+ ,30
+ ,70027
+ ,973
+ ,45
+ ,73713
+ ,1171
+ ,42
+ ,40671
+ ,1282
+ ,36
+ ,89041
+ ,1977
+ ,61
+ ,57231
+ ,1521
+ ,63
+ ,68608
+ ,1071
+ ,46
+ ,59155
+ ,1425
+ ,39
+ ,55827
+ ,852
+ ,36
+ ,22618
+ ,1363
+ ,40
+ ,58425
+ ,1150
+ ,73
+ ,65724
+ ,1100
+ ,49
+ ,56979
+ ,1393
+ ,58
+ ,72369
+ ,1521
+ ,29
+ ,79194
+ ,1015
+ ,27
+ ,202316
+ ,993
+ ,41
+ ,44970
+ ,1189
+ ,52
+ ,49319
+ ,1244
+ ,31
+ ,36252
+ ,2622
+ ,89
+ ,75741
+ ,1177
+ ,36
+ ,38417
+ ,1333
+ ,39
+ ,64102
+ ,870
+ ,31
+ ,56622
+ ,1473
+ ,142
+ ,15430
+ ,881
+ ,52
+ ,72571
+ ,2489
+ ,223
+ ,67271
+ ,1429
+ ,52
+ ,43460
+ ,1995
+ ,51
+ ,99501
+ ,1247
+ ,45
+ ,28340
+ ,1357
+ ,51
+ ,76013
+ ,1316
+ ,67
+ ,37361
+ ,1980
+ ,66
+ ,48204
+ ,1454
+ ,81
+ ,76168
+ ,1030
+ ,43
+ ,85168
+ ,1154
+ ,45
+ ,125410
+ ,1521
+ ,35
+ ,123328
+ ,2294
+ ,97
+ ,83038
+ ,2274
+ ,41
+ ,120087
+ ,1371
+ ,44
+ ,91939
+ ,1624
+ ,61
+ ,103646
+ ,999
+ ,35
+ ,29467
+ ,602
+ ,43
+ ,43750
+ ,1380
+ ,57
+ ,34497
+ ,1207
+ ,34
+ ,66477
+ ,1405
+ ,69
+ ,71181
+ ,1800
+ ,39
+ ,74482
+ ,682
+ ,25
+ ,174949
+ ,1151
+ ,56
+ ,46765
+ ,1270
+ ,42
+ ,90257
+ ,1381
+ ,48
+ ,51370
+ ,391
+ ,9
+ ,1168
+ ,1264
+ ,36
+ ,51360
+ ,530
+ ,25
+ ,25162
+ ,1123
+ ,92
+ ,21067
+ ,1980
+ ,42
+ ,58233
+ ,387
+ ,2
+ ,855
+ ,1485
+ ,46
+ ,85903
+ ,449
+ ,22
+ ,14116
+ ,2209
+ ,137
+ ,57637
+ ,1135
+ ,51
+ ,94137
+ ,813
+ ,67
+ ,62147
+ ,1015
+ ,38
+ ,62832
+ ,568
+ ,52
+ ,8773
+ ,936
+ ,64
+ ,63785
+ ,1585
+ ,75
+ ,65196
+ ,871
+ ,37
+ ,73087
+ ,2275
+ ,107
+ ,72631
+ ,1637
+ ,84
+ ,86281
+ ,2238
+ ,68
+ ,162365
+ ,829
+ ,30
+ ,56530
+ ,809
+ ,31
+ ,35606
+ ,1904
+ ,117
+ ,70111
+ ,3053
+ ,120
+ ,92046
+ ,655
+ ,36
+ ,63989
+ ,2617
+ ,106
+ ,104911
+ ,1311
+ ,50
+ ,43448
+ ,1154
+ ,54
+ ,60029
+ ,1496
+ ,134
+ ,38650
+ ,742
+ ,48
+ ,47261
+ ,2831
+ ,81
+ ,73586
+ ,1281
+ ,40
+ ,83042
+ ,2035
+ ,37
+ ,37238
+ ,1894
+ ,41
+ ,63958
+ ,1268
+ ,100
+ ,78956
+ ,1713
+ ,37
+ ,99518
+ ,1568
+ ,38
+ ,111436
+ ,0
+ ,0
+ ,0
+ ,207
+ ,0
+ ,6023
+ ,5
+ ,0
+ ,0
+ ,8
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,1301
+ ,36
+ ,42564
+ ,1761
+ ,68
+ ,38885
+ ,0
+ ,0
+ ,0
+ ,4
+ ,0
+ ,0
+ ,151
+ ,0
+ ,1644
+ ,474
+ ,7
+ ,6179
+ ,141
+ ,3
+ ,3926
+ ,705
+ ,53
+ ,23238
+ ,29
+ ,0
+ ,0
+ ,1021
+ ,25
+ ,49288)
+ ,dim=c(3
+ ,164)
+ ,dimnames=list(c('Pageviews'
+ ,'Compendiumviews'
+ ,'CW:characters')
+ ,1:164))
> y <- array(NA,dim=c(3,164),dimnames=list(c('Pageviews','Compendiumviews','CW:characters'),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
Pageviews Compendiumviews CW:characters
1 1173 70 95556
2 669 44 54565
3 1154 39 63016
4 1948 119 79774
5 705 31 31258
6 332 23 52491
7 2726 46 91256
8 345 39 22807
9 1385 58 77411
10 1161 51 48821
11 1431 65 52295
12 1228 42 63262
13 1205 45 50466
14 1732 76 62932
15 1214 33 38439
16 3221 90 70817
17 1385 36 105965
18 1953 68 73795
19 883 28 82043
20 1631 38 74349
21 1459 75 82204
22 1929 76 55709
23 860 34 37137
24 1165 44 70780
25 2115 126 55027
26 1939 59 56699
27 1844 64 65911
28 1346 46 56316
29 1093 36 26982
30 1625 108 54628
31 1551 34 96750
32 1267 54 53009
33 1478 40 64664
34 670 29 36990
35 2040 46 85224
36 1561 49 37048
37 2078 56 59635
38 1113 38 42051
39 686 19 26998
40 2065 29 63717
41 2251 26 55071
42 1106 56 40001
43 1244 60 54506
44 1021 45 35838
45 1735 56 50838
46 3681 596 86997
47 918 57 33032
48 1582 55 61704
49 2900 99 117986
50 1496 51 56733
51 1116 21 55064
52 496 20 5950
53 1777 58 84607
54 744 21 32551
55 1101 66 31701
56 1612 47 71170
57 1849 58 101773
58 2460 158 101653
59 1701 49 81493
60 1334 53 55901
61 2549 46 109104
62 2218 117 114425
63 1633 56 36311
64 1724 30 70027
65 973 45 73713
66 1171 42 40671
67 1282 36 89041
68 1977 61 57231
69 1521 63 68608
70 1071 46 59155
71 1425 39 55827
72 852 36 22618
73 1363 40 58425
74 1150 73 65724
75 1100 49 56979
76 1393 58 72369
77 1521 29 79194
78 1015 27 202316
79 993 41 44970
80 1189 52 49319
81 1244 31 36252
82 2622 89 75741
83 1177 36 38417
84 1333 39 64102
85 870 31 56622
86 1473 142 15430
87 881 52 72571
88 2489 223 67271
89 1429 52 43460
90 1995 51 99501
91 1247 45 28340
92 1357 51 76013
93 1316 67 37361
94 1980 66 48204
95 1454 81 76168
96 1030 43 85168
97 1154 45 125410
98 1521 35 123328
99 2294 97 83038
100 2274 41 120087
101 1371 44 91939
102 1624 61 103646
103 999 35 29467
104 602 43 43750
105 1380 57 34497
106 1207 34 66477
107 1405 69 71181
108 1800 39 74482
109 682 25 174949
110 1151 56 46765
111 1270 42 90257
112 1381 48 51370
113 391 9 1168
114 1264 36 51360
115 530 25 25162
116 1123 92 21067
117 1980 42 58233
118 387 2 855
119 1485 46 85903
120 449 22 14116
121 2209 137 57637
122 1135 51 94137
123 813 67 62147
124 1015 38 62832
125 568 52 8773
126 936 64 63785
127 1585 75 65196
128 871 37 73087
129 2275 107 72631
130 1637 84 86281
131 2238 68 162365
132 829 30 56530
133 809 31 35606
134 1904 117 70111
135 3053 120 92046
136 655 36 63989
137 2617 106 104911
138 1311 50 43448
139 1154 54 60029
140 1496 134 38650
141 742 48 47261
142 2831 81 73586
143 1281 40 83042
144 2035 37 37238
145 1894 41 63958
146 1268 100 78956
147 1713 37 99518
148 1568 38 111436
149 0 0 0
150 207 0 6023
151 5 0 0
152 8 0 0
153 0 0 0
154 0 0 0
155 1301 36 42564
156 1761 68 38885
157 0 0 0
158 4 0 0
159 151 0 1644
160 474 7 6179
161 141 3 3926
162 705 53 23238
163 29 0 0
164 1021 25 49288
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Compendiumviews `CW:characters`
4.601e+02 6.260e+00 9.059e-03
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1519.4 -262.9 -44.4 216.0 1556.0
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.601e+02 7.570e+01 6.078 8.51e-09 ***
Compendiumviews 6.260e+00 6.901e-01 9.071 3.94e-16 ***
`CW:characters` 9.059e-03 1.103e-03 8.213 6.64e-14 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 456.9 on 161 degrees of freedom
Multiple R-squared: 0.5531, Adjusted R-squared: 0.5475
F-statistic: 99.62 on 2 and 161 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.2175337 4.350675e-01 7.824663e-01
[2,] 0.9517515 9.649706e-02 4.824853e-02
[3,] 0.9161990 1.676019e-01 8.380095e-02
[4,] 0.8640486 2.719028e-01 1.359514e-01
[5,] 0.8166137 3.667726e-01 1.833863e-01
[6,] 0.7805077 4.389846e-01 2.194923e-01
[7,] 0.7016752 5.966497e-01 2.983248e-01
[8,] 0.6360889 7.278222e-01 3.639111e-01
[9,] 0.5894534 8.210931e-01 4.105466e-01
[10,] 0.5869953 8.260093e-01 4.130047e-01
[11,] 0.9531690 9.366202e-02 4.683101e-02
[12,] 0.9394993 1.210014e-01 6.050069e-02
[13,] 0.9218570 1.562859e-01 7.814297e-02
[14,] 0.9066507 1.866987e-01 9.334934e-02
[15,] 0.8923413 2.153173e-01 1.076587e-01
[16,] 0.8836380 2.327240e-01 1.163620e-01
[17,] 0.8656431 2.687137e-01 1.343569e-01
[18,] 0.8273486 3.453027e-01 1.726514e-01
[19,] 0.7870252 4.259495e-01 2.129748e-01
[20,] 0.7537508 4.924984e-01 2.462492e-01
[21,] 0.7746939 4.506122e-01 2.253061e-01
[22,] 0.7459621 5.080758e-01 2.540379e-01
[23,] 0.6979018 6.041963e-01 3.020982e-01
[24,] 0.6628661 6.742677e-01 3.371339e-01
[25,] 0.6476054 7.047891e-01 3.523946e-01
[26,] 0.5918822 8.162356e-01 4.081178e-01
[27,] 0.5341595 9.316811e-01 4.658405e-01
[28,] 0.4901717 9.803434e-01 5.098283e-01
[29,] 0.4425314 8.850628e-01 5.574686e-01
[30,] 0.4529692 9.059385e-01 5.470308e-01
[31,] 0.4598218 9.196436e-01 5.401782e-01
[32,] 0.5245002 9.509995e-01 4.754998e-01
[33,] 0.4711615 9.423231e-01 5.288385e-01
[34,] 0.4185835 8.371671e-01 5.814165e-01
[35,] 0.5689361 8.621278e-01 4.310639e-01
[36,] 0.8062335 3.875330e-01 1.937665e-01
[37,] 0.7722686 4.554628e-01 2.277314e-01
[38,] 0.7384781 5.230437e-01 2.615219e-01
[39,] 0.6960428 6.079144e-01 3.039572e-01
[40,] 0.6852528 6.294945e-01 3.147472e-01
[41,] 0.9469171 1.061658e-01 5.308290e-02
[42,] 0.9360276 1.279448e-01 6.397242e-02
[43,] 0.9217014 1.565971e-01 7.829856e-02
[44,] 0.9325627 1.348747e-01 6.743734e-02
[45,] 0.9177674 1.644652e-01 8.223260e-02
[46,] 0.9008588 1.982825e-01 9.914124e-02
[47,] 0.8786656 2.426688e-01 1.213344e-01
[48,] 0.8561850 2.876299e-01 1.438150e-01
[49,] 0.8309853 3.380295e-01 1.690147e-01
[50,] 0.8003686 3.992628e-01 1.996314e-01
[51,] 0.7720285 4.559430e-01 2.279715e-01
[52,] 0.7435976 5.128048e-01 2.564024e-01
[53,] 0.7103937 5.792126e-01 2.896063e-01
[54,] 0.6766790 6.466420e-01 3.233210e-01
[55,] 0.6342697 7.314605e-01 3.657303e-01
[56,] 0.7090082 5.819836e-01 2.909918e-01
[57,] 0.6803281 6.393438e-01 3.196719e-01
[58,] 0.6950420 6.099161e-01 3.049580e-01
[59,] 0.6990885 6.018229e-01 3.009115e-01
[60,] 0.7217565 5.564869e-01 2.782435e-01
[61,] 0.6840966 6.318067e-01 3.159034e-01
[62,] 0.6747578 6.504845e-01 3.252422e-01
[63,] 0.7102152 5.795695e-01 2.897848e-01
[64,] 0.6714766 6.570468e-01 3.285234e-01
[65,] 0.6459246 7.081508e-01 3.540754e-01
[66,] 0.6166632 7.666735e-01 3.833368e-01
[67,] 0.5727297 8.545406e-01 4.272703e-01
[68,] 0.5351911 9.296178e-01 4.648089e-01
[69,] 0.5354055 9.291890e-01 4.645945e-01
[70,] 0.5025532 9.948936e-01 4.974468e-01
[71,] 0.4644638 9.289277e-01 5.355362e-01
[72,] 0.4387783 8.775565e-01 5.612217e-01
[73,] 0.8405224 3.189551e-01 1.594776e-01
[74,] 0.8163893 3.672214e-01 1.836107e-01
[75,] 0.7863739 4.272523e-01 2.136261e-01
[76,] 0.7687384 4.625232e-01 2.312616e-01
[77,] 0.8594385 2.811229e-01 1.405615e-01
[78,] 0.8386153 3.227695e-01 1.613847e-01
[79,] 0.8128864 3.742272e-01 1.871136e-01
[80,] 0.7960922 4.078157e-01 2.039078e-01
[81,] 0.7796066 4.407867e-01 2.203934e-01
[82,] 0.7993177 4.013646e-01 2.006823e-01
[83,] 0.8434431 3.131139e-01 1.565569e-01
[84,] 0.8232849 3.534303e-01 1.767151e-01
[85,] 0.8190044 3.619913e-01 1.809956e-01
[86,] 0.7978742 4.042517e-01 2.021258e-01
[87,] 0.7666550 4.666900e-01 2.333450e-01
[88,] 0.7302066 5.395868e-01 2.697934e-01
[89,] 0.7691385 4.617230e-01 2.308615e-01
[90,] 0.7477263 5.045473e-01 2.522737e-01
[91,] 0.7441877 5.116245e-01 2.558123e-01
[92,] 0.7769306 4.461388e-01 2.230694e-01
[93,] 0.7449398 5.101205e-01 2.550602e-01
[94,] 0.7368106 5.263789e-01 2.631894e-01
[95,] 0.7821162 4.357676e-01 2.178838e-01
[96,] 0.7498140 5.003721e-01 2.501860e-01
[97,] 0.7129781 5.740438e-01 2.870219e-01
[98,] 0.6775056 6.449887e-01 3.224944e-01
[99,] 0.6942695 6.114611e-01 3.057305e-01
[100,] 0.6623091 6.753819e-01 3.376909e-01
[101,] 0.6226541 7.546918e-01 3.773459e-01
[102,] 0.5822801 8.354398e-01 4.177199e-01
[103,] 0.6109181 7.781639e-01 3.890819e-01
[104,] 0.8849815 2.300371e-01 1.150185e-01
[105,] 0.8611189 2.777621e-01 1.388811e-01
[106,] 0.8404090 3.191821e-01 1.595910e-01
[107,] 0.8153281 3.693437e-01 1.846719e-01
[108,] 0.7943879 4.112243e-01 2.056121e-01
[109,] 0.7662296 4.675408e-01 2.337704e-01
[110,] 0.7428909 5.142183e-01 2.571091e-01
[111,] 0.7119549 5.760902e-01 2.880451e-01
[112,] 0.8101397 3.797206e-01 1.898603e-01
[113,] 0.7910622 4.178756e-01 2.089378e-01
[114,] 0.7521570 4.956861e-01 2.478430e-01
[115,] 0.7220257 5.559487e-01 2.779743e-01
[116,] 0.6850205 6.299589e-01 3.149795e-01
[117,] 0.6922713 6.154574e-01 3.077287e-01
[118,] 0.7554383 4.891233e-01 2.445617e-01
[119,] 0.7202511 5.594977e-01 2.797489e-01
[120,] 0.6940749 6.118503e-01 3.059251e-01
[121,] 0.7236486 5.527028e-01 2.763514e-01
[122,] 0.6761154 6.477692e-01 3.238846e-01
[123,] 0.6768913 6.462174e-01 3.231087e-01
[124,] 0.6476036 7.047928e-01 3.523964e-01
[125,] 0.6205573 7.588854e-01 3.794427e-01
[126,] 0.6205035 7.589929e-01 3.794965e-01
[127,] 0.5921320 8.157359e-01 4.078680e-01
[128,] 0.5382034 9.235933e-01 4.617966e-01
[129,] 0.5025717 9.948567e-01 4.974283e-01
[130,] 0.5868248 8.263503e-01 4.131752e-01
[131,] 0.6519854 6.960293e-01 3.480146e-01
[132,] 0.6143414 7.713171e-01 3.856586e-01
[133,] 0.5592863 8.814273e-01 4.407137e-01
[134,] 0.5142178 9.715644e-01 4.857822e-01
[135,] 0.5247968 9.504064e-01 4.752032e-01
[136,] 0.5537216 8.925568e-01 4.462784e-01
[137,] 0.7854650 4.290701e-01 2.145350e-01
[138,] 0.7484194 5.031612e-01 2.515806e-01
[139,] 0.9735444 5.291114e-02 2.645557e-02
[140,] 0.9928223 1.435533e-02 7.177663e-03
[141,] 0.9999467 1.065861e-04 5.329303e-05
[142,] 0.9998720 2.560296e-04 1.280148e-04
[143,] 0.9999517 9.652582e-05 4.826291e-05
[144,] 0.9998662 2.676485e-04 1.338243e-04
[145,] 0.9996426 7.147132e-04 3.573566e-04
[146,] 0.9990404 1.919273e-03 9.596367e-04
[147,] 0.9974981 5.003831e-03 2.501916e-03
[148,] 0.9937779 1.244427e-02 6.222134e-03
[149,] 0.9852067 2.958654e-02 1.479327e-02
[150,] 0.9697843 6.043139e-02 3.021570e-02
[151,] 0.9954922 9.015513e-03 4.507756e-03
[152,] 0.9863469 2.730613e-02 1.365307e-02
[153,] 0.9623249 7.535016e-02 3.767508e-02
> postscript(file="/var/wessaorg/rcomp/tmp/1vltr1321974143.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/2esq11321974143.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/39dgj1321974143.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/49d5v1321974143.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/531ad1321974143.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
-590.886372 -560.812855 -121.070107 20.359640 -232.307572 -747.574406
7 8 9 10 11 12
1151.295409 -565.828993 -139.401637 -60.596609 90.299672 -68.077220
13 14 15 16 17 18
6.059183 226.087185 199.122815 1556.025557 -260.353376 398.759031
19 20 21 22 23 24
-495.574784 259.527247 -215.232450 488.518148 -149.342320 -211.699613
25 26 27 28 29 30
367.718289 595.962521 386.216023 87.806253 163.129624 -5.995251
31 32 33 34 35 36
1.641625 -11.313102 181.741604 -306.712903 519.937464 458.570537
37 38 39 40 41 42
727.144862 34.105016 -137.602833 846.175325 1129.275485 -66.996697
43 44 45 46 47 48
-85.431316 -45.430210 463.834212 -1297.880387 -198.126202 218.661978
49 50 51 52 53 54
751.399897 202.730987 25.636685 -143.194954 187.411986 -142.424888
55 56 57 58 59 60
-59.405097 212.988822 103.910408 90.041672 195.956786 35.748707
61 62 63 64 65 66
812.615799 -11.014126 493.429891 441.755394 -436.528327 79.567785
67 68 69 70 71 72
-210.044002 616.624179 45.044277 -212.911386 215.052859 -38.338226
73 74 75 76 77 78
123.258809 -362.426021 -182.978336 -85.727690 161.973884 -1446.831790
79 80 81 82 83 84
-131.115992 -43.367397 261.453299 918.680095 143.543433 48.092149
85 86 87 88 89 90
-297.072342 -15.737444 -562.000200 23.626508 249.707504 314.308670
91 92 93 94 95 96
248.491894 -110.920675 98.063125 670.099240 -203.111506 -470.776576
97 98 99 100 101 102
-723.835743 -275.379959 474.502327 469.421928 -197.372565 -156.835204
103 104 105 106 107 108
52.878322 -523.583498 250.602809 -68.124466 -131.821095 421.062883
109 110 111 112 113 114
-1519.403336 -83.269718 -270.616723 155.091448 -136.021133 113.296729
115 116 117 118 119 120
-314.528414 -103.823424 729.478963 -93.368857 -41.213391 -276.687382
121 122 123 124 125 126
369.219956 -497.100484 -629.465718 -252.143749 -297.073502 -502.525189
127 128 129 130 131 132
64.837855 -482.781121 487.180600 -130.500774 -118.569688 -330.979384
133 134 135 136 137 138
-167.694783 76.412936 1007.931762 -610.105545 543.025445 144.335324
139 140 141 142 143 144
-187.905149 -153.003906 -446.686369 1197.278047 -181.739114 1005.964078
145 146 147 148 149 150
597.877485 -533.298749 119.788481 -139.432618 -460.104556 -307.665083
151 152 153 154 155 156
-455.104556 -452.104556 -460.104556 -460.104556 229.977020 522.998114
157 158 159 160 161 162
-460.104556 -456.104556 -323.997053 -85.895144 -373.447671 -297.367100
163 164
-431.104556 -42.078517
> postscript(file="/var/wessaorg/rcomp/tmp/6vuhq1321974143.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 -590.886372 NA
1 -560.812855 -590.886372
2 -121.070107 -560.812855
3 20.359640 -121.070107
4 -232.307572 20.359640
5 -747.574406 -232.307572
6 1151.295409 -747.574406
7 -565.828993 1151.295409
8 -139.401637 -565.828993
9 -60.596609 -139.401637
10 90.299672 -60.596609
11 -68.077220 90.299672
12 6.059183 -68.077220
13 226.087185 6.059183
14 199.122815 226.087185
15 1556.025557 199.122815
16 -260.353376 1556.025557
17 398.759031 -260.353376
18 -495.574784 398.759031
19 259.527247 -495.574784
20 -215.232450 259.527247
21 488.518148 -215.232450
22 -149.342320 488.518148
23 -211.699613 -149.342320
24 367.718289 -211.699613
25 595.962521 367.718289
26 386.216023 595.962521
27 87.806253 386.216023
28 163.129624 87.806253
29 -5.995251 163.129624
30 1.641625 -5.995251
31 -11.313102 1.641625
32 181.741604 -11.313102
33 -306.712903 181.741604
34 519.937464 -306.712903
35 458.570537 519.937464
36 727.144862 458.570537
37 34.105016 727.144862
38 -137.602833 34.105016
39 846.175325 -137.602833
40 1129.275485 846.175325
41 -66.996697 1129.275485
42 -85.431316 -66.996697
43 -45.430210 -85.431316
44 463.834212 -45.430210
45 -1297.880387 463.834212
46 -198.126202 -1297.880387
47 218.661978 -198.126202
48 751.399897 218.661978
49 202.730987 751.399897
50 25.636685 202.730987
51 -143.194954 25.636685
52 187.411986 -143.194954
53 -142.424888 187.411986
54 -59.405097 -142.424888
55 212.988822 -59.405097
56 103.910408 212.988822
57 90.041672 103.910408
58 195.956786 90.041672
59 35.748707 195.956786
60 812.615799 35.748707
61 -11.014126 812.615799
62 493.429891 -11.014126
63 441.755394 493.429891
64 -436.528327 441.755394
65 79.567785 -436.528327
66 -210.044002 79.567785
67 616.624179 -210.044002
68 45.044277 616.624179
69 -212.911386 45.044277
70 215.052859 -212.911386
71 -38.338226 215.052859
72 123.258809 -38.338226
73 -362.426021 123.258809
74 -182.978336 -362.426021
75 -85.727690 -182.978336
76 161.973884 -85.727690
77 -1446.831790 161.973884
78 -131.115992 -1446.831790
79 -43.367397 -131.115992
80 261.453299 -43.367397
81 918.680095 261.453299
82 143.543433 918.680095
83 48.092149 143.543433
84 -297.072342 48.092149
85 -15.737444 -297.072342
86 -562.000200 -15.737444
87 23.626508 -562.000200
88 249.707504 23.626508
89 314.308670 249.707504
90 248.491894 314.308670
91 -110.920675 248.491894
92 98.063125 -110.920675
93 670.099240 98.063125
94 -203.111506 670.099240
95 -470.776576 -203.111506
96 -723.835743 -470.776576
97 -275.379959 -723.835743
98 474.502327 -275.379959
99 469.421928 474.502327
100 -197.372565 469.421928
101 -156.835204 -197.372565
102 52.878322 -156.835204
103 -523.583498 52.878322
104 250.602809 -523.583498
105 -68.124466 250.602809
106 -131.821095 -68.124466
107 421.062883 -131.821095
108 -1519.403336 421.062883
109 -83.269718 -1519.403336
110 -270.616723 -83.269718
111 155.091448 -270.616723
112 -136.021133 155.091448
113 113.296729 -136.021133
114 -314.528414 113.296729
115 -103.823424 -314.528414
116 729.478963 -103.823424
117 -93.368857 729.478963
118 -41.213391 -93.368857
119 -276.687382 -41.213391
120 369.219956 -276.687382
121 -497.100484 369.219956
122 -629.465718 -497.100484
123 -252.143749 -629.465718
124 -297.073502 -252.143749
125 -502.525189 -297.073502
126 64.837855 -502.525189
127 -482.781121 64.837855
128 487.180600 -482.781121
129 -130.500774 487.180600
130 -118.569688 -130.500774
131 -330.979384 -118.569688
132 -167.694783 -330.979384
133 76.412936 -167.694783
134 1007.931762 76.412936
135 -610.105545 1007.931762
136 543.025445 -610.105545
137 144.335324 543.025445
138 -187.905149 144.335324
139 -153.003906 -187.905149
140 -446.686369 -153.003906
141 1197.278047 -446.686369
142 -181.739114 1197.278047
143 1005.964078 -181.739114
144 597.877485 1005.964078
145 -533.298749 597.877485
146 119.788481 -533.298749
147 -139.432618 119.788481
148 -460.104556 -139.432618
149 -307.665083 -460.104556
150 -455.104556 -307.665083
151 -452.104556 -455.104556
152 -460.104556 -452.104556
153 -460.104556 -460.104556
154 229.977020 -460.104556
155 522.998114 229.977020
156 -460.104556 522.998114
157 -456.104556 -460.104556
158 -323.997053 -456.104556
159 -85.895144 -323.997053
160 -373.447671 -85.895144
161 -297.367100 -373.447671
162 -431.104556 -297.367100
163 -42.078517 -431.104556
164 NA -42.078517
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -560.812855 -590.886372
[2,] -121.070107 -560.812855
[3,] 20.359640 -121.070107
[4,] -232.307572 20.359640
[5,] -747.574406 -232.307572
[6,] 1151.295409 -747.574406
[7,] -565.828993 1151.295409
[8,] -139.401637 -565.828993
[9,] -60.596609 -139.401637
[10,] 90.299672 -60.596609
[11,] -68.077220 90.299672
[12,] 6.059183 -68.077220
[13,] 226.087185 6.059183
[14,] 199.122815 226.087185
[15,] 1556.025557 199.122815
[16,] -260.353376 1556.025557
[17,] 398.759031 -260.353376
[18,] -495.574784 398.759031
[19,] 259.527247 -495.574784
[20,] -215.232450 259.527247
[21,] 488.518148 -215.232450
[22,] -149.342320 488.518148
[23,] -211.699613 -149.342320
[24,] 367.718289 -211.699613
[25,] 595.962521 367.718289
[26,] 386.216023 595.962521
[27,] 87.806253 386.216023
[28,] 163.129624 87.806253
[29,] -5.995251 163.129624
[30,] 1.641625 -5.995251
[31,] -11.313102 1.641625
[32,] 181.741604 -11.313102
[33,] -306.712903 181.741604
[34,] 519.937464 -306.712903
[35,] 458.570537 519.937464
[36,] 727.144862 458.570537
[37,] 34.105016 727.144862
[38,] -137.602833 34.105016
[39,] 846.175325 -137.602833
[40,] 1129.275485 846.175325
[41,] -66.996697 1129.275485
[42,] -85.431316 -66.996697
[43,] -45.430210 -85.431316
[44,] 463.834212 -45.430210
[45,] -1297.880387 463.834212
[46,] -198.126202 -1297.880387
[47,] 218.661978 -198.126202
[48,] 751.399897 218.661978
[49,] 202.730987 751.399897
[50,] 25.636685 202.730987
[51,] -143.194954 25.636685
[52,] 187.411986 -143.194954
[53,] -142.424888 187.411986
[54,] -59.405097 -142.424888
[55,] 212.988822 -59.405097
[56,] 103.910408 212.988822
[57,] 90.041672 103.910408
[58,] 195.956786 90.041672
[59,] 35.748707 195.956786
[60,] 812.615799 35.748707
[61,] -11.014126 812.615799
[62,] 493.429891 -11.014126
[63,] 441.755394 493.429891
[64,] -436.528327 441.755394
[65,] 79.567785 -436.528327
[66,] -210.044002 79.567785
[67,] 616.624179 -210.044002
[68,] 45.044277 616.624179
[69,] -212.911386 45.044277
[70,] 215.052859 -212.911386
[71,] -38.338226 215.052859
[72,] 123.258809 -38.338226
[73,] -362.426021 123.258809
[74,] -182.978336 -362.426021
[75,] -85.727690 -182.978336
[76,] 161.973884 -85.727690
[77,] -1446.831790 161.973884
[78,] -131.115992 -1446.831790
[79,] -43.367397 -131.115992
[80,] 261.453299 -43.367397
[81,] 918.680095 261.453299
[82,] 143.543433 918.680095
[83,] 48.092149 143.543433
[84,] -297.072342 48.092149
[85,] -15.737444 -297.072342
[86,] -562.000200 -15.737444
[87,] 23.626508 -562.000200
[88,] 249.707504 23.626508
[89,] 314.308670 249.707504
[90,] 248.491894 314.308670
[91,] -110.920675 248.491894
[92,] 98.063125 -110.920675
[93,] 670.099240 98.063125
[94,] -203.111506 670.099240
[95,] -470.776576 -203.111506
[96,] -723.835743 -470.776576
[97,] -275.379959 -723.835743
[98,] 474.502327 -275.379959
[99,] 469.421928 474.502327
[100,] -197.372565 469.421928
[101,] -156.835204 -197.372565
[102,] 52.878322 -156.835204
[103,] -523.583498 52.878322
[104,] 250.602809 -523.583498
[105,] -68.124466 250.602809
[106,] -131.821095 -68.124466
[107,] 421.062883 -131.821095
[108,] -1519.403336 421.062883
[109,] -83.269718 -1519.403336
[110,] -270.616723 -83.269718
[111,] 155.091448 -270.616723
[112,] -136.021133 155.091448
[113,] 113.296729 -136.021133
[114,] -314.528414 113.296729
[115,] -103.823424 -314.528414
[116,] 729.478963 -103.823424
[117,] -93.368857 729.478963
[118,] -41.213391 -93.368857
[119,] -276.687382 -41.213391
[120,] 369.219956 -276.687382
[121,] -497.100484 369.219956
[122,] -629.465718 -497.100484
[123,] -252.143749 -629.465718
[124,] -297.073502 -252.143749
[125,] -502.525189 -297.073502
[126,] 64.837855 -502.525189
[127,] -482.781121 64.837855
[128,] 487.180600 -482.781121
[129,] -130.500774 487.180600
[130,] -118.569688 -130.500774
[131,] -330.979384 -118.569688
[132,] -167.694783 -330.979384
[133,] 76.412936 -167.694783
[134,] 1007.931762 76.412936
[135,] -610.105545 1007.931762
[136,] 543.025445 -610.105545
[137,] 144.335324 543.025445
[138,] -187.905149 144.335324
[139,] -153.003906 -187.905149
[140,] -446.686369 -153.003906
[141,] 1197.278047 -446.686369
[142,] -181.739114 1197.278047
[143,] 1005.964078 -181.739114
[144,] 597.877485 1005.964078
[145,] -533.298749 597.877485
[146,] 119.788481 -533.298749
[147,] -139.432618 119.788481
[148,] -460.104556 -139.432618
[149,] -307.665083 -460.104556
[150,] -455.104556 -307.665083
[151,] -452.104556 -455.104556
[152,] -460.104556 -452.104556
[153,] -460.104556 -460.104556
[154,] 229.977020 -460.104556
[155,] 522.998114 229.977020
[156,] -460.104556 522.998114
[157,] -456.104556 -460.104556
[158,] -323.997053 -456.104556
[159,] -85.895144 -323.997053
[160,] -373.447671 -85.895144
[161,] -297.367100 -373.447671
[162,] -431.104556 -297.367100
[163,] -42.078517 -431.104556
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -560.812855 -590.886372
2 -121.070107 -560.812855
3 20.359640 -121.070107
4 -232.307572 20.359640
5 -747.574406 -232.307572
6 1151.295409 -747.574406
7 -565.828993 1151.295409
8 -139.401637 -565.828993
9 -60.596609 -139.401637
10 90.299672 -60.596609
11 -68.077220 90.299672
12 6.059183 -68.077220
13 226.087185 6.059183
14 199.122815 226.087185
15 1556.025557 199.122815
16 -260.353376 1556.025557
17 398.759031 -260.353376
18 -495.574784 398.759031
19 259.527247 -495.574784
20 -215.232450 259.527247
21 488.518148 -215.232450
22 -149.342320 488.518148
23 -211.699613 -149.342320
24 367.718289 -211.699613
25 595.962521 367.718289
26 386.216023 595.962521
27 87.806253 386.216023
28 163.129624 87.806253
29 -5.995251 163.129624
30 1.641625 -5.995251
31 -11.313102 1.641625
32 181.741604 -11.313102
33 -306.712903 181.741604
34 519.937464 -306.712903
35 458.570537 519.937464
36 727.144862 458.570537
37 34.105016 727.144862
38 -137.602833 34.105016
39 846.175325 -137.602833
40 1129.275485 846.175325
41 -66.996697 1129.275485
42 -85.431316 -66.996697
43 -45.430210 -85.431316
44 463.834212 -45.430210
45 -1297.880387 463.834212
46 -198.126202 -1297.880387
47 218.661978 -198.126202
48 751.399897 218.661978
49 202.730987 751.399897
50 25.636685 202.730987
51 -143.194954 25.636685
52 187.411986 -143.194954
53 -142.424888 187.411986
54 -59.405097 -142.424888
55 212.988822 -59.405097
56 103.910408 212.988822
57 90.041672 103.910408
58 195.956786 90.041672
59 35.748707 195.956786
60 812.615799 35.748707
61 -11.014126 812.615799
62 493.429891 -11.014126
63 441.755394 493.429891
64 -436.528327 441.755394
65 79.567785 -436.528327
66 -210.044002 79.567785
67 616.624179 -210.044002
68 45.044277 616.624179
69 -212.911386 45.044277
70 215.052859 -212.911386
71 -38.338226 215.052859
72 123.258809 -38.338226
73 -362.426021 123.258809
74 -182.978336 -362.426021
75 -85.727690 -182.978336
76 161.973884 -85.727690
77 -1446.831790 161.973884
78 -131.115992 -1446.831790
79 -43.367397 -131.115992
80 261.453299 -43.367397
81 918.680095 261.453299
82 143.543433 918.680095
83 48.092149 143.543433
84 -297.072342 48.092149
85 -15.737444 -297.072342
86 -562.000200 -15.737444
87 23.626508 -562.000200
88 249.707504 23.626508
89 314.308670 249.707504
90 248.491894 314.308670
91 -110.920675 248.491894
92 98.063125 -110.920675
93 670.099240 98.063125
94 -203.111506 670.099240
95 -470.776576 -203.111506
96 -723.835743 -470.776576
97 -275.379959 -723.835743
98 474.502327 -275.379959
99 469.421928 474.502327
100 -197.372565 469.421928
101 -156.835204 -197.372565
102 52.878322 -156.835204
103 -523.583498 52.878322
104 250.602809 -523.583498
105 -68.124466 250.602809
106 -131.821095 -68.124466
107 421.062883 -131.821095
108 -1519.403336 421.062883
109 -83.269718 -1519.403336
110 -270.616723 -83.269718
111 155.091448 -270.616723
112 -136.021133 155.091448
113 113.296729 -136.021133
114 -314.528414 113.296729
115 -103.823424 -314.528414
116 729.478963 -103.823424
117 -93.368857 729.478963
118 -41.213391 -93.368857
119 -276.687382 -41.213391
120 369.219956 -276.687382
121 -497.100484 369.219956
122 -629.465718 -497.100484
123 -252.143749 -629.465718
124 -297.073502 -252.143749
125 -502.525189 -297.073502
126 64.837855 -502.525189
127 -482.781121 64.837855
128 487.180600 -482.781121
129 -130.500774 487.180600
130 -118.569688 -130.500774
131 -330.979384 -118.569688
132 -167.694783 -330.979384
133 76.412936 -167.694783
134 1007.931762 76.412936
135 -610.105545 1007.931762
136 543.025445 -610.105545
137 144.335324 543.025445
138 -187.905149 144.335324
139 -153.003906 -187.905149
140 -446.686369 -153.003906
141 1197.278047 -446.686369
142 -181.739114 1197.278047
143 1005.964078 -181.739114
144 597.877485 1005.964078
145 -533.298749 597.877485
146 119.788481 -533.298749
147 -139.432618 119.788481
148 -460.104556 -139.432618
149 -307.665083 -460.104556
150 -455.104556 -307.665083
151 -452.104556 -455.104556
152 -460.104556 -452.104556
153 -460.104556 -460.104556
154 229.977020 -460.104556
155 522.998114 229.977020
156 -460.104556 522.998114
157 -456.104556 -460.104556
158 -323.997053 -456.104556
159 -85.895144 -323.997053
160 -373.447671 -85.895144
161 -297.367100 -373.447671
162 -431.104556 -297.367100
163 -42.078517 -431.104556
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/7d0n51321974143.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/806zv1321974143.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/9rtn61321974143.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/wessaorg/rcomp/tmp/10ld8u1321974143.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/wessaorg/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/11rpe01321974143.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/122kw51321974143.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/13l6jh1321974143.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/14108e1321974143.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/151vj11321974143.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/162jxu1321974143.tab")
+ }
>
> try(system("convert tmp/1vltr1321974143.ps tmp/1vltr1321974143.png",intern=TRUE))
character(0)
> try(system("convert tmp/2esq11321974143.ps tmp/2esq11321974143.png",intern=TRUE))
character(0)
> try(system("convert tmp/39dgj1321974143.ps tmp/39dgj1321974143.png",intern=TRUE))
character(0)
> try(system("convert tmp/49d5v1321974143.ps tmp/49d5v1321974143.png",intern=TRUE))
character(0)
> try(system("convert tmp/531ad1321974143.ps tmp/531ad1321974143.png",intern=TRUE))
character(0)
> try(system("convert tmp/6vuhq1321974143.ps tmp/6vuhq1321974143.png",intern=TRUE))
character(0)
> try(system("convert tmp/7d0n51321974143.ps tmp/7d0n51321974143.png",intern=TRUE))
character(0)
> try(system("convert tmp/806zv1321974143.ps tmp/806zv1321974143.png",intern=TRUE))
character(0)
> try(system("convert tmp/9rtn61321974143.ps tmp/9rtn61321974143.png",intern=TRUE))
character(0)
> try(system("convert tmp/10ld8u1321974143.ps tmp/10ld8u1321974143.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.528 0.481 5.059