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(1627
+ ,134451
+ ,83
+ ,1323
+ ,154801
+ ,50
+ ,192
+ ,7215
+ ,18
+ ,2172
+ ,122139
+ ,91
+ ,3335
+ ,221399
+ ,129
+ ,6271
+ ,437140
+ ,234
+ ,1478
+ ,134379
+ ,52
+ ,1324
+ ,140428
+ ,53
+ ,1488
+ ,103255
+ ,40
+ ,2756
+ ,271630
+ ,91
+ ,1931
+ ,121593
+ ,71
+ ,1966
+ ,172071
+ ,63
+ ,1575
+ ,83707
+ ,94
+ ,2811
+ ,192072
+ ,97
+ ,1263
+ ,134398
+ ,48
+ ,1424
+ ,128478
+ ,72
+ ,1636
+ ,134153
+ ,52
+ ,1076
+ ,64149
+ ,52
+ ,2376
+ ,122294
+ ,82
+ ,677
+ ,24889
+ ,21
+ ,902
+ ,52197
+ ,52
+ ,2308
+ ,188915
+ ,89
+ ,1590
+ ,163147
+ ,66
+ ,1863
+ ,98575
+ ,48
+ ,1799
+ ,143546
+ ,80
+ ,1385
+ ,139780
+ ,25
+ ,1870
+ ,163784
+ ,146
+ ,1161
+ ,152479
+ ,75
+ ,2417
+ ,304108
+ ,109
+ ,1952
+ ,184024
+ ,40
+ ,1514
+ ,151621
+ ,41
+ ,1487
+ ,164516
+ ,41
+ ,2051
+ ,120179
+ ,94
+ ,2797
+ ,210714
+ ,114
+ ,2216
+ ,196865
+ ,48
+ ,1
+ ,0
+ ,1
+ ,1830
+ ,181527
+ ,57
+ ,1563
+ ,93107
+ ,49
+ ,2046
+ ,129352
+ ,45
+ ,1955
+ ,211533
+ ,57
+ ,1926
+ ,173255
+ ,65
+ ,1572
+ ,126602
+ ,53
+ ,896
+ ,88447
+ ,27
+ ,1877
+ ,152153
+ ,72
+ ,1036
+ ,95704
+ ,42
+ ,1096
+ ,139793
+ ,83
+ ,730
+ ,76348
+ ,30
+ ,1917
+ ,188980
+ ,85
+ ,1826
+ ,172100
+ ,79
+ ,2444
+ ,146552
+ ,54
+ ,658
+ ,48188
+ ,28
+ ,1425
+ ,109185
+ ,60
+ ,2185
+ ,253285
+ ,67
+ ,1899
+ ,215609
+ ,75
+ ,1630
+ ,174876
+ ,54
+ ,1496
+ ,115124
+ ,49
+ ,1681
+ ,179712
+ ,60
+ ,816
+ ,70369
+ ,20
+ ,902
+ ,109215
+ ,58
+ ,2602
+ ,166060
+ ,84
+ ,1557
+ ,130414
+ ,51
+ ,1780
+ ,102057
+ ,71
+ ,1265
+ ,115310
+ ,56
+ ,1008
+ ,91671
+ ,31
+ ,1069
+ ,135228
+ ,31
+ ,1229
+ ,94982
+ ,37
+ ,2155
+ ,166919
+ ,67
+ ,2500
+ ,118169
+ ,64
+ ,1003
+ ,102361
+ ,36
+ ,340
+ ,31970
+ ,15
+ ,2586
+ ,200413
+ ,107
+ ,1118
+ ,103381
+ ,57
+ ,1251
+ ,94940
+ ,61
+ ,1516
+ ,101560
+ ,65
+ ,2473
+ ,144176
+ ,60
+ ,1288
+ ,71921
+ ,37
+ ,1911
+ ,126905
+ ,54
+ ,2250
+ ,129711
+ ,86
+ ,816
+ ,60138
+ ,23
+ ,1234
+ ,84971
+ ,71
+ ,907
+ ,80420
+ ,64
+ ,1827
+ ,233569
+ ,57
+ ,841
+ ,56252
+ ,25
+ ,1309
+ ,97181
+ ,32
+ ,763
+ ,50800
+ ,40
+ ,1439
+ ,125941
+ ,45
+ ,2500
+ ,211032
+ ,210
+ ,972
+ ,71960
+ ,90
+ ,1152
+ ,90379
+ ,53
+ ,1261
+ ,125650
+ ,47
+ ,1508
+ ,115572
+ ,36
+ ,2005
+ ,136266
+ ,67
+ ,1191
+ ,146715
+ ,55
+ ,1265
+ ,124626
+ ,57
+ ,761
+ ,49176
+ ,33
+ ,2156
+ ,212926
+ ,102
+ ,1689
+ ,173884
+ ,55
+ ,223
+ ,19349
+ ,12
+ ,2056
+ ,179954
+ ,94
+ ,1795
+ ,140218
+ ,66
+ ,566
+ ,45448
+ ,26
+ ,802
+ ,58280
+ ,20
+ ,1131
+ ,115944
+ ,44
+ ,981
+ ,94341
+ ,52
+ ,591
+ ,59090
+ ,37
+ ,596
+ ,27676
+ ,22
+ ,1245
+ ,119242
+ ,40
+ ,853
+ ,86025
+ ,30
+ ,0
+ ,0
+ ,0
+ ,1030
+ ,85610
+ ,31
+ ,991
+ ,84193
+ ,58
+ ,1178
+ ,117769
+ ,39
+ ,1016
+ ,74718
+ ,55
+ ,849
+ ,71894
+ ,57
+ ,78
+ ,3616
+ ,5
+ ,0
+ ,0
+ ,0
+ ,924
+ ,154806
+ ,38
+ ,1480
+ ,136061
+ ,73
+ ,1870
+ ,141822
+ ,89
+ ,861
+ ,106515
+ ,37
+ ,778
+ ,43410
+ ,19
+ ,1533
+ ,146920
+ ,64
+ ,889
+ ,88874
+ ,38
+ ,1705
+ ,111924
+ ,49
+ ,700
+ ,60373
+ ,39
+ ,285
+ ,19764
+ ,12
+ ,1490
+ ,121665
+ ,46
+ ,981
+ ,108685
+ ,26
+ ,1368
+ ,124493
+ ,37
+ ,256
+ ,11796
+ ,9
+ ,98
+ ,10674
+ ,9
+ ,1317
+ ,131263
+ ,52
+ ,41
+ ,6836
+ ,3
+ ,1768
+ ,153278
+ ,55
+ ,42
+ ,5118
+ ,3
+ ,528
+ ,40248
+ ,16
+ ,0
+ ,0
+ ,0
+ ,938
+ ,100728
+ ,42
+ ,1235
+ ,84125
+ ,35
+ ,81
+ ,7131
+ ,4
+ ,257
+ ,8812
+ ,13
+ ,891
+ ,63952
+ ,22
+ ,1114
+ ,120111
+ ,47
+ ,1079
+ ,94127
+ ,18)
+ ,dim=c(3
+ ,144)
+ ,dimnames=list(c('PageviewsRFC'
+ ,'in'
+ ,'secondsLogins
')
+ ,1:144))
> y <- array(NA,dim=c(3,144),dimnames=list(c('PageviewsRFC','in','secondsLogins
'),1:144))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '1'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> library(lattice)
> library(lmtest)
Loading required package: zoo
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
PageviewsRFC in secondsLogins\r
1 1627 134451 83
2 1323 154801 50
3 192 7215 18
4 2172 122139 91
5 3335 221399 129
6 6271 437140 234
7 1478 134379 52
8 1324 140428 53
9 1488 103255 40
10 2756 271630 91
11 1931 121593 71
12 1966 172071 63
13 1575 83707 94
14 2811 192072 97
15 1263 134398 48
16 1424 128478 72
17 1636 134153 52
18 1076 64149 52
19 2376 122294 82
20 677 24889 21
21 902 52197 52
22 2308 188915 89
23 1590 163147 66
24 1863 98575 48
25 1799 143546 80
26 1385 139780 25
27 1870 163784 146
28 1161 152479 75
29 2417 304108 109
30 1952 184024 40
31 1514 151621 41
32 1487 164516 41
33 2051 120179 94
34 2797 210714 114
35 2216 196865 48
36 1 0 1
37 1830 181527 57
38 1563 93107 49
39 2046 129352 45
40 1955 211533 57
41 1926 173255 65
42 1572 126602 53
43 896 88447 27
44 1877 152153 72
45 1036 95704 42
46 1096 139793 83
47 730 76348 30
48 1917 188980 85
49 1826 172100 79
50 2444 146552 54
51 658 48188 28
52 1425 109185 60
53 2185 253285 67
54 1899 215609 75
55 1630 174876 54
56 1496 115124 49
57 1681 179712 60
58 816 70369 20
59 902 109215 58
60 2602 166060 84
61 1557 130414 51
62 1780 102057 71
63 1265 115310 56
64 1008 91671 31
65 1069 135228 31
66 1229 94982 37
67 2155 166919 67
68 2500 118169 64
69 1003 102361 36
70 340 31970 15
71 2586 200413 107
72 1118 103381 57
73 1251 94940 61
74 1516 101560 65
75 2473 144176 60
76 1288 71921 37
77 1911 126905 54
78 2250 129711 86
79 816 60138 23
80 1234 84971 71
81 907 80420 64
82 1827 233569 57
83 841 56252 25
84 1309 97181 32
85 763 50800 40
86 1439 125941 45
87 2500 211032 210
88 972 71960 90
89 1152 90379 53
90 1261 125650 47
91 1508 115572 36
92 2005 136266 67
93 1191 146715 55
94 1265 124626 57
95 761 49176 33
96 2156 212926 102
97 1689 173884 55
98 223 19349 12
99 2056 179954 94
100 1795 140218 66
101 566 45448 26
102 802 58280 20
103 1131 115944 44
104 981 94341 52
105 591 59090 37
106 596 27676 22
107 1245 119242 40
108 853 86025 30
109 0 0 0
110 1030 85610 31
111 991 84193 58
112 1178 117769 39
113 1016 74718 55
114 849 71894 57
115 78 3616 5
116 0 0 0
117 924 154806 38
118 1480 136061 73
119 1870 141822 89
120 861 106515 37
121 778 43410 19
122 1533 146920 64
123 889 88874 38
124 1705 111924 49
125 700 60373 39
126 285 19764 12
127 1490 121665 46
128 981 108685 26
129 1368 124493 37
130 256 11796 9
131 98 10674 9
132 1317 131263 52
133 41 6836 3
134 1768 153278 55
135 42 5118 3
136 528 40248 16
137 0 0 0
138 938 100728 42
139 1235 84125 35
140 81 7131 4
141 257 8812 13
142 891 63952 22
143 1114 120111 47
144 1079 94127 18
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `in` `secondsLogins\r`
71.157021 0.007274 8.767472
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-947.29 -165.59 -42.69 133.93 1008.21
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.116e+01 5.435e+01 1.309 0.193
`in` 7.274e-03 6.364e-04 11.429 < 2e-16 ***
`secondsLogins\r` 8.767e+00 1.234e+00 7.104 5.5e-11 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 317.6 on 141 degrees of freedom
Multiple R-squared: 0.8439, Adjusted R-squared: 0.8417
F-statistic: 381.1 on 2 and 141 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.2977621 5.955242e-01 7.022379e-01
[2,] 0.2137361 4.274722e-01 7.862639e-01
[3,] 0.1180977 2.361955e-01 8.819023e-01
[4,] 0.3576672 7.153343e-01 6.423328e-01
[5,] 0.2493676 4.987352e-01 7.506324e-01
[6,] 0.2129483 4.258966e-01 7.870517e-01
[7,] 0.1602219 3.204438e-01 8.397781e-01
[8,] 0.1969299 3.938597e-01 8.030701e-01
[9,] 0.2097017 4.194035e-01 7.902983e-01
[10,] 0.1633807 3.267615e-01 8.366193e-01
[11,] 0.1827001 3.654003e-01 8.172999e-01
[12,] 0.1533566 3.067132e-01 8.466434e-01
[13,] 0.1095864 2.191728e-01 8.904136e-01
[14,] 0.2396532 4.793064e-01 7.603468e-01
[15,] 0.2531877 5.063754e-01 7.468123e-01
[16,] 0.2092045 4.184091e-01 7.907955e-01
[17,] 0.1671304 3.342609e-01 8.328696e-01
[18,] 0.1646693 3.293386e-01 8.353307e-01
[19,] 0.4033669 8.067339e-01 5.966331e-01
[20,] 0.3699868 7.399736e-01 6.300132e-01
[21,] 0.3583171 7.166342e-01 6.416829e-01
[22,] 0.8799771 2.400458e-01 1.200229e-01
[23,] 0.9628906 7.421888e-02 3.710944e-02
[24,] 0.9953789 9.242247e-03 4.621124e-03
[25,] 0.9944877 1.102451e-02 5.512257e-03
[26,] 0.9918057 1.638859e-02 8.194293e-03
[27,] 0.9885106 2.297890e-02 1.148945e-02
[28,] 0.9865147 2.697054e-02 1.348527e-02
[29,] 0.9830272 3.394559e-02 1.697279e-02
[30,] 0.9827902 3.441953e-02 1.720977e-02
[31,] 0.9765517 4.689666e-02 2.344833e-02
[32,] 0.9681778 6.364432e-02 3.182216e-02
[33,] 0.9709315 5.813699e-02 2.906849e-02
[34,] 0.9881686 2.366272e-02 1.183136e-02
[35,] 0.9844889 3.102220e-02 1.551110e-02
[36,] 0.9787409 4.251825e-02 2.125913e-02
[37,] 0.9720957 5.580867e-02 2.790433e-02
[38,] 0.9630567 7.388653e-02 3.694326e-02
[39,] 0.9523670 9.526597e-02 4.763299e-02
[40,] 0.9401786 1.196428e-01 5.982138e-02
[41,] 0.9825303 3.493950e-02 1.746975e-02
[42,] 0.9779589 4.408212e-02 2.204106e-02
[43,] 0.9762593 4.748148e-02 2.374074e-02
[44,] 0.9713914 5.721717e-02 2.860859e-02
[45,] 0.9956747 8.650664e-03 4.325332e-03
[46,] 0.9938191 1.236190e-02 6.180948e-03
[47,] 0.9913962 1.720757e-02 8.603787e-03
[48,] 0.9908224 1.835528e-02 9.177639e-03
[49,] 0.9920204 1.595922e-02 7.979611e-03
[50,] 0.9899661 2.006784e-02 1.003392e-02
[51,] 0.9872311 2.553782e-02 1.276891e-02
[52,] 0.9848887 3.022258e-02 1.511129e-02
[53,] 0.9797609 4.047814e-02 2.023907e-02
[54,] 0.9859783 2.804339e-02 1.402169e-02
[55,] 0.9941000 1.179991e-02 5.899957e-03
[56,] 0.9919839 1.603228e-02 8.016142e-03
[57,] 0.9929848 1.403032e-02 7.015162e-03
[58,] 0.9907838 1.843245e-02 9.216223e-03
[59,] 0.9873102 2.537952e-02 1.268976e-02
[60,] 0.9862408 2.751840e-02 1.375920e-02
[61,] 0.9824982 3.500360e-02 1.750180e-02
[62,] 0.9821259 3.574818e-02 1.787409e-02
[63,] 0.9996642 6.716033e-04 3.358016e-04
[64,] 0.9995180 9.639688e-04 4.819844e-04
[65,] 0.9993019 1.396202e-03 6.981010e-04
[66,] 0.9992172 1.565682e-03 7.828410e-04
[67,] 0.9989900 2.019991e-03 1.009996e-03
[68,] 0.9985364 2.927250e-03 1.463625e-03
[69,] 0.9982208 3.558395e-03 1.779198e-03
[70,] 0.9999600 8.005902e-05 4.002951e-05
[71,] 0.9999765 4.701586e-05 2.350793e-05
[72,] 0.9999939 1.218972e-05 6.094860e-06
[73,] 0.9999997 5.275151e-07 2.637575e-07
[74,] 0.9999996 8.970371e-07 4.485186e-07
[75,] 0.9999993 1.360524e-06 6.802621e-07
[76,] 0.9999992 1.609313e-06 8.046566e-07
[77,] 0.9999997 5.966465e-07 2.983232e-07
[78,] 0.9999996 8.868409e-07 4.434204e-07
[79,] 0.9999996 8.158465e-07 4.079232e-07
[80,] 0.9999993 1.454184e-06 7.270920e-07
[81,] 0.9999988 2.485539e-06 1.242770e-06
[82,] 0.9999999 2.494421e-07 1.247211e-07
[83,] 0.9999999 2.031827e-07 1.015913e-07
[84,] 0.9999998 4.079749e-07 2.039874e-07
[85,] 0.9999996 7.700319e-07 3.850160e-07
[86,] 0.9999998 4.271057e-07 2.135528e-07
[87,] 1.0000000 6.623821e-08 3.311910e-08
[88,] 1.0000000 3.208603e-08 1.604302e-08
[89,] 1.0000000 5.681255e-08 2.840628e-08
[90,] 0.9999999 1.110852e-07 5.554259e-08
[91,] 0.9999999 1.278612e-07 6.393059e-08
[92,] 0.9999999 2.677607e-07 1.338804e-07
[93,] 0.9999997 5.371778e-07 2.685889e-07
[94,] 0.9999994 1.106967e-06 5.534834e-07
[95,] 0.9999994 1.244052e-06 6.220260e-07
[96,] 0.9999987 2.581427e-06 1.290713e-06
[97,] 0.9999981 3.737674e-06 1.868837e-06
[98,] 0.9999966 6.832897e-06 3.416449e-06
[99,] 0.9999949 1.029216e-05 5.146082e-06
[100,] 0.9999931 1.384034e-05 6.920168e-06
[101,] 0.9999898 2.044433e-05 1.022216e-05
[102,] 0.9999797 4.051809e-05 2.025904e-05
[103,] 0.9999615 7.707739e-05 3.853870e-05
[104,] 0.9999280 1.440689e-04 7.203446e-05
[105,] 0.9998817 2.366533e-04 1.183266e-04
[106,] 0.9998148 3.704076e-04 1.852038e-04
[107,] 0.9996583 6.834713e-04 3.417357e-04
[108,] 0.9993817 1.236502e-03 6.182509e-04
[109,] 0.9992711 1.457854e-03 7.289270e-04
[110,] 0.9987274 2.545177e-03 1.272588e-03
[111,] 0.9978400 4.320066e-03 2.160033e-03
[112,] 0.9998296 3.408794e-04 1.704397e-04
[113,] 0.9997484 5.031680e-04 2.515840e-04
[114,] 0.9995341 9.318923e-04 4.659462e-04
[115,] 0.9997287 5.425369e-04 2.712684e-04
[116,] 0.9997590 4.820376e-04 2.410188e-04
[117,] 0.9996318 7.363735e-04 3.681867e-04
[118,] 0.9994474 1.105248e-03 5.526241e-04
[119,] 0.9999424 1.152812e-04 5.764061e-05
[120,] 0.9998603 2.794073e-04 1.397037e-04
[121,] 0.9996568 6.863257e-04 3.431629e-04
[122,] 0.9994953 1.009486e-03 5.047431e-04
[123,] 0.9994389 1.122291e-03 5.611455e-04
[124,] 0.9986151 2.769793e-03 1.384897e-03
[125,] 0.9970969 5.806171e-03 2.903086e-03
[126,] 0.9937351 1.252983e-02 6.264914e-03
[127,] 0.9890687 2.186257e-02 1.093128e-02
[128,] 0.9789859 4.202814e-02 2.101407e-02
[129,] 0.9611925 7.761504e-02 3.880752e-02
[130,] 0.9311595 1.376811e-01 6.884054e-02
[131,] 0.8662851 2.674299e-01 1.337149e-01
[132,] 0.7927680 4.144640e-01 2.072320e-01
[133,] 0.7060859 5.878283e-01 2.939141e-01
> postscript(file="/var/wessaorg/rcomp/tmp/14bn51324150380.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/2cob31324150380.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/3f07v1324150380.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/4nro31324150380.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/5d5m91324150380.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
-149.800092 -312.491285 -89.450548 414.612702 522.471159 968.672702
7 8 9 10 11 12
-26.484756 -233.250239 315.108457 -88.725135 352.933531 90.916494
13 14 15 16 17 18
70.849306 492.343154 -206.553066 -212.912682 133.159078 82.340218
19 20 21 22 23 24
696.392543 240.693417 -4.725706 82.445689 -246.476310 654.009131
25 26 27 28 29 30
-17.651074 77.952275 -672.507366 -676.788788 -821.771636 191.627005
31 32 33 34 35 36
-19.453985 -140.247066 281.566543 193.701664 292.086921 -78.924493
37 38 39 40 41 42
-61.257841 385.013707 639.451939 -154.509503 24.769606 115.314564
43 44 45 46 47 48
-55.206927 67.884823 -99.503529 -719.655667 -159.506049 -273.957207
49 50 51 52 53 54
-189.573995 833.438759 -9.146510 33.626562 -315.871599 -397.971198
55 56 57 58 59 60
-186.578707 157.870841 -223.358672 57.657531 -472.056702 586.521192
61 62 63 64 65 66
90.122543 344.030594 -135.854354 -1.726904 -257.543128 142.585371
67 68 69 70 71 72
282.320196 1008.210645 -128.319056 -95.206116 118.999329 -204.855044
73 74 75 76 77 78
-45.528469 136.250406 827.116001 369.321876 443.343191 481.374359
79 80 81 82 83 84
105.771323 -77.692665 -310.218204 -442.790567 141.501591 250.428084
85 86 87 88 89 90
-28.354820 57.262191 -947.288667 -411.637818 -41.213799 -136.156135
91 92 93 94 95 96
280.589406 355.277877 -429.514310 -212.382690 42.829812 -358.177875
97 98 99 100 101 102
-129.130767 -94.103586 -148.212937 125.300079 -63.681900 131.588090
103 104 105 106 107 108
-169.256151 -232.264333 -234.350554 130.654420 -44.174597 -106.892682
109 110 111 112 113 114
-71.157021 64.358390 -201.056666 -91.693111 -80.836883 -244.831179
115 116 117 118 119 120
-63.295722 -71.157021 -606.317987 -220.835868 -13.018635 -309.301065
121 122 123 124 125 126
224.514004 -167.912648 -161.754948 390.146363 -152.217527 -35.122130
127 128 129 130 131 132
130.596636 -108.642585 66.934142 20.136336 -129.702684 -164.820217
133 134 135 136 137 138
-106.181771 99.749048 -92.685725 23.815545 -71.157021 -234.046099
139 140 141 142 143 144
245.089798 -77.094956 7.770872 161.797282 -242.867661 165.386271
> postscript(file="/var/wessaorg/rcomp/tmp/6qfhw1324150380.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 -149.800092 NA
1 -312.491285 -149.800092
2 -89.450548 -312.491285
3 414.612702 -89.450548
4 522.471159 414.612702
5 968.672702 522.471159
6 -26.484756 968.672702
7 -233.250239 -26.484756
8 315.108457 -233.250239
9 -88.725135 315.108457
10 352.933531 -88.725135
11 90.916494 352.933531
12 70.849306 90.916494
13 492.343154 70.849306
14 -206.553066 492.343154
15 -212.912682 -206.553066
16 133.159078 -212.912682
17 82.340218 133.159078
18 696.392543 82.340218
19 240.693417 696.392543
20 -4.725706 240.693417
21 82.445689 -4.725706
22 -246.476310 82.445689
23 654.009131 -246.476310
24 -17.651074 654.009131
25 77.952275 -17.651074
26 -672.507366 77.952275
27 -676.788788 -672.507366
28 -821.771636 -676.788788
29 191.627005 -821.771636
30 -19.453985 191.627005
31 -140.247066 -19.453985
32 281.566543 -140.247066
33 193.701664 281.566543
34 292.086921 193.701664
35 -78.924493 292.086921
36 -61.257841 -78.924493
37 385.013707 -61.257841
38 639.451939 385.013707
39 -154.509503 639.451939
40 24.769606 -154.509503
41 115.314564 24.769606
42 -55.206927 115.314564
43 67.884823 -55.206927
44 -99.503529 67.884823
45 -719.655667 -99.503529
46 -159.506049 -719.655667
47 -273.957207 -159.506049
48 -189.573995 -273.957207
49 833.438759 -189.573995
50 -9.146510 833.438759
51 33.626562 -9.146510
52 -315.871599 33.626562
53 -397.971198 -315.871599
54 -186.578707 -397.971198
55 157.870841 -186.578707
56 -223.358672 157.870841
57 57.657531 -223.358672
58 -472.056702 57.657531
59 586.521192 -472.056702
60 90.122543 586.521192
61 344.030594 90.122543
62 -135.854354 344.030594
63 -1.726904 -135.854354
64 -257.543128 -1.726904
65 142.585371 -257.543128
66 282.320196 142.585371
67 1008.210645 282.320196
68 -128.319056 1008.210645
69 -95.206116 -128.319056
70 118.999329 -95.206116
71 -204.855044 118.999329
72 -45.528469 -204.855044
73 136.250406 -45.528469
74 827.116001 136.250406
75 369.321876 827.116001
76 443.343191 369.321876
77 481.374359 443.343191
78 105.771323 481.374359
79 -77.692665 105.771323
80 -310.218204 -77.692665
81 -442.790567 -310.218204
82 141.501591 -442.790567
83 250.428084 141.501591
84 -28.354820 250.428084
85 57.262191 -28.354820
86 -947.288667 57.262191
87 -411.637818 -947.288667
88 -41.213799 -411.637818
89 -136.156135 -41.213799
90 280.589406 -136.156135
91 355.277877 280.589406
92 -429.514310 355.277877
93 -212.382690 -429.514310
94 42.829812 -212.382690
95 -358.177875 42.829812
96 -129.130767 -358.177875
97 -94.103586 -129.130767
98 -148.212937 -94.103586
99 125.300079 -148.212937
100 -63.681900 125.300079
101 131.588090 -63.681900
102 -169.256151 131.588090
103 -232.264333 -169.256151
104 -234.350554 -232.264333
105 130.654420 -234.350554
106 -44.174597 130.654420
107 -106.892682 -44.174597
108 -71.157021 -106.892682
109 64.358390 -71.157021
110 -201.056666 64.358390
111 -91.693111 -201.056666
112 -80.836883 -91.693111
113 -244.831179 -80.836883
114 -63.295722 -244.831179
115 -71.157021 -63.295722
116 -606.317987 -71.157021
117 -220.835868 -606.317987
118 -13.018635 -220.835868
119 -309.301065 -13.018635
120 224.514004 -309.301065
121 -167.912648 224.514004
122 -161.754948 -167.912648
123 390.146363 -161.754948
124 -152.217527 390.146363
125 -35.122130 -152.217527
126 130.596636 -35.122130
127 -108.642585 130.596636
128 66.934142 -108.642585
129 20.136336 66.934142
130 -129.702684 20.136336
131 -164.820217 -129.702684
132 -106.181771 -164.820217
133 99.749048 -106.181771
134 -92.685725 99.749048
135 23.815545 -92.685725
136 -71.157021 23.815545
137 -234.046099 -71.157021
138 245.089798 -234.046099
139 -77.094956 245.089798
140 7.770872 -77.094956
141 161.797282 7.770872
142 -242.867661 161.797282
143 165.386271 -242.867661
144 NA 165.386271
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -312.491285 -149.800092
[2,] -89.450548 -312.491285
[3,] 414.612702 -89.450548
[4,] 522.471159 414.612702
[5,] 968.672702 522.471159
[6,] -26.484756 968.672702
[7,] -233.250239 -26.484756
[8,] 315.108457 -233.250239
[9,] -88.725135 315.108457
[10,] 352.933531 -88.725135
[11,] 90.916494 352.933531
[12,] 70.849306 90.916494
[13,] 492.343154 70.849306
[14,] -206.553066 492.343154
[15,] -212.912682 -206.553066
[16,] 133.159078 -212.912682
[17,] 82.340218 133.159078
[18,] 696.392543 82.340218
[19,] 240.693417 696.392543
[20,] -4.725706 240.693417
[21,] 82.445689 -4.725706
[22,] -246.476310 82.445689
[23,] 654.009131 -246.476310
[24,] -17.651074 654.009131
[25,] 77.952275 -17.651074
[26,] -672.507366 77.952275
[27,] -676.788788 -672.507366
[28,] -821.771636 -676.788788
[29,] 191.627005 -821.771636
[30,] -19.453985 191.627005
[31,] -140.247066 -19.453985
[32,] 281.566543 -140.247066
[33,] 193.701664 281.566543
[34,] 292.086921 193.701664
[35,] -78.924493 292.086921
[36,] -61.257841 -78.924493
[37,] 385.013707 -61.257841
[38,] 639.451939 385.013707
[39,] -154.509503 639.451939
[40,] 24.769606 -154.509503
[41,] 115.314564 24.769606
[42,] -55.206927 115.314564
[43,] 67.884823 -55.206927
[44,] -99.503529 67.884823
[45,] -719.655667 -99.503529
[46,] -159.506049 -719.655667
[47,] -273.957207 -159.506049
[48,] -189.573995 -273.957207
[49,] 833.438759 -189.573995
[50,] -9.146510 833.438759
[51,] 33.626562 -9.146510
[52,] -315.871599 33.626562
[53,] -397.971198 -315.871599
[54,] -186.578707 -397.971198
[55,] 157.870841 -186.578707
[56,] -223.358672 157.870841
[57,] 57.657531 -223.358672
[58,] -472.056702 57.657531
[59,] 586.521192 -472.056702
[60,] 90.122543 586.521192
[61,] 344.030594 90.122543
[62,] -135.854354 344.030594
[63,] -1.726904 -135.854354
[64,] -257.543128 -1.726904
[65,] 142.585371 -257.543128
[66,] 282.320196 142.585371
[67,] 1008.210645 282.320196
[68,] -128.319056 1008.210645
[69,] -95.206116 -128.319056
[70,] 118.999329 -95.206116
[71,] -204.855044 118.999329
[72,] -45.528469 -204.855044
[73,] 136.250406 -45.528469
[74,] 827.116001 136.250406
[75,] 369.321876 827.116001
[76,] 443.343191 369.321876
[77,] 481.374359 443.343191
[78,] 105.771323 481.374359
[79,] -77.692665 105.771323
[80,] -310.218204 -77.692665
[81,] -442.790567 -310.218204
[82,] 141.501591 -442.790567
[83,] 250.428084 141.501591
[84,] -28.354820 250.428084
[85,] 57.262191 -28.354820
[86,] -947.288667 57.262191
[87,] -411.637818 -947.288667
[88,] -41.213799 -411.637818
[89,] -136.156135 -41.213799
[90,] 280.589406 -136.156135
[91,] 355.277877 280.589406
[92,] -429.514310 355.277877
[93,] -212.382690 -429.514310
[94,] 42.829812 -212.382690
[95,] -358.177875 42.829812
[96,] -129.130767 -358.177875
[97,] -94.103586 -129.130767
[98,] -148.212937 -94.103586
[99,] 125.300079 -148.212937
[100,] -63.681900 125.300079
[101,] 131.588090 -63.681900
[102,] -169.256151 131.588090
[103,] -232.264333 -169.256151
[104,] -234.350554 -232.264333
[105,] 130.654420 -234.350554
[106,] -44.174597 130.654420
[107,] -106.892682 -44.174597
[108,] -71.157021 -106.892682
[109,] 64.358390 -71.157021
[110,] -201.056666 64.358390
[111,] -91.693111 -201.056666
[112,] -80.836883 -91.693111
[113,] -244.831179 -80.836883
[114,] -63.295722 -244.831179
[115,] -71.157021 -63.295722
[116,] -606.317987 -71.157021
[117,] -220.835868 -606.317987
[118,] -13.018635 -220.835868
[119,] -309.301065 -13.018635
[120,] 224.514004 -309.301065
[121,] -167.912648 224.514004
[122,] -161.754948 -167.912648
[123,] 390.146363 -161.754948
[124,] -152.217527 390.146363
[125,] -35.122130 -152.217527
[126,] 130.596636 -35.122130
[127,] -108.642585 130.596636
[128,] 66.934142 -108.642585
[129,] 20.136336 66.934142
[130,] -129.702684 20.136336
[131,] -164.820217 -129.702684
[132,] -106.181771 -164.820217
[133,] 99.749048 -106.181771
[134,] -92.685725 99.749048
[135,] 23.815545 -92.685725
[136,] -71.157021 23.815545
[137,] -234.046099 -71.157021
[138,] 245.089798 -234.046099
[139,] -77.094956 245.089798
[140,] 7.770872 -77.094956
[141,] 161.797282 7.770872
[142,] -242.867661 161.797282
[143,] 165.386271 -242.867661
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -312.491285 -149.800092
2 -89.450548 -312.491285
3 414.612702 -89.450548
4 522.471159 414.612702
5 968.672702 522.471159
6 -26.484756 968.672702
7 -233.250239 -26.484756
8 315.108457 -233.250239
9 -88.725135 315.108457
10 352.933531 -88.725135
11 90.916494 352.933531
12 70.849306 90.916494
13 492.343154 70.849306
14 -206.553066 492.343154
15 -212.912682 -206.553066
16 133.159078 -212.912682
17 82.340218 133.159078
18 696.392543 82.340218
19 240.693417 696.392543
20 -4.725706 240.693417
21 82.445689 -4.725706
22 -246.476310 82.445689
23 654.009131 -246.476310
24 -17.651074 654.009131
25 77.952275 -17.651074
26 -672.507366 77.952275
27 -676.788788 -672.507366
28 -821.771636 -676.788788
29 191.627005 -821.771636
30 -19.453985 191.627005
31 -140.247066 -19.453985
32 281.566543 -140.247066
33 193.701664 281.566543
34 292.086921 193.701664
35 -78.924493 292.086921
36 -61.257841 -78.924493
37 385.013707 -61.257841
38 639.451939 385.013707
39 -154.509503 639.451939
40 24.769606 -154.509503
41 115.314564 24.769606
42 -55.206927 115.314564
43 67.884823 -55.206927
44 -99.503529 67.884823
45 -719.655667 -99.503529
46 -159.506049 -719.655667
47 -273.957207 -159.506049
48 -189.573995 -273.957207
49 833.438759 -189.573995
50 -9.146510 833.438759
51 33.626562 -9.146510
52 -315.871599 33.626562
53 -397.971198 -315.871599
54 -186.578707 -397.971198
55 157.870841 -186.578707
56 -223.358672 157.870841
57 57.657531 -223.358672
58 -472.056702 57.657531
59 586.521192 -472.056702
60 90.122543 586.521192
61 344.030594 90.122543
62 -135.854354 344.030594
63 -1.726904 -135.854354
64 -257.543128 -1.726904
65 142.585371 -257.543128
66 282.320196 142.585371
67 1008.210645 282.320196
68 -128.319056 1008.210645
69 -95.206116 -128.319056
70 118.999329 -95.206116
71 -204.855044 118.999329
72 -45.528469 -204.855044
73 136.250406 -45.528469
74 827.116001 136.250406
75 369.321876 827.116001
76 443.343191 369.321876
77 481.374359 443.343191
78 105.771323 481.374359
79 -77.692665 105.771323
80 -310.218204 -77.692665
81 -442.790567 -310.218204
82 141.501591 -442.790567
83 250.428084 141.501591
84 -28.354820 250.428084
85 57.262191 -28.354820
86 -947.288667 57.262191
87 -411.637818 -947.288667
88 -41.213799 -411.637818
89 -136.156135 -41.213799
90 280.589406 -136.156135
91 355.277877 280.589406
92 -429.514310 355.277877
93 -212.382690 -429.514310
94 42.829812 -212.382690
95 -358.177875 42.829812
96 -129.130767 -358.177875
97 -94.103586 -129.130767
98 -148.212937 -94.103586
99 125.300079 -148.212937
100 -63.681900 125.300079
101 131.588090 -63.681900
102 -169.256151 131.588090
103 -232.264333 -169.256151
104 -234.350554 -232.264333
105 130.654420 -234.350554
106 -44.174597 130.654420
107 -106.892682 -44.174597
108 -71.157021 -106.892682
109 64.358390 -71.157021
110 -201.056666 64.358390
111 -91.693111 -201.056666
112 -80.836883 -91.693111
113 -244.831179 -80.836883
114 -63.295722 -244.831179
115 -71.157021 -63.295722
116 -606.317987 -71.157021
117 -220.835868 -606.317987
118 -13.018635 -220.835868
119 -309.301065 -13.018635
120 224.514004 -309.301065
121 -167.912648 224.514004
122 -161.754948 -167.912648
123 390.146363 -161.754948
124 -152.217527 390.146363
125 -35.122130 -152.217527
126 130.596636 -35.122130
127 -108.642585 130.596636
128 66.934142 -108.642585
129 20.136336 66.934142
130 -129.702684 20.136336
131 -164.820217 -129.702684
132 -106.181771 -164.820217
133 99.749048 -106.181771
134 -92.685725 99.749048
135 23.815545 -92.685725
136 -71.157021 23.815545
137 -234.046099 -71.157021
138 245.089798 -234.046099
139 -77.094956 245.089798
140 7.770872 -77.094956
141 161.797282 7.770872
142 -242.867661 161.797282
143 165.386271 -242.867661
> 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/7f2te1324150380.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/8kepo1324150380.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/9qcu21324150380.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/10065g1324150380.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/116dbt1324150380.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/1240xi1324150380.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/136jrx1324150380.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/14z9ue1324150380.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/15cntw1324150380.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/162ils1324150380.tab")
+ }
>
> try(system("convert tmp/14bn51324150380.ps tmp/14bn51324150380.png",intern=TRUE))
character(0)
> try(system("convert tmp/2cob31324150380.ps tmp/2cob31324150380.png",intern=TRUE))
character(0)
> try(system("convert tmp/3f07v1324150380.ps tmp/3f07v1324150380.png",intern=TRUE))
character(0)
> try(system("convert tmp/4nro31324150380.ps tmp/4nro31324150380.png",intern=TRUE))
character(0)
> try(system("convert tmp/5d5m91324150380.ps tmp/5d5m91324150380.png",intern=TRUE))
character(0)
> try(system("convert tmp/6qfhw1324150380.ps tmp/6qfhw1324150380.png",intern=TRUE))
character(0)
> try(system("convert tmp/7f2te1324150380.ps tmp/7f2te1324150380.png",intern=TRUE))
character(0)
> try(system("convert tmp/8kepo1324150380.ps tmp/8kepo1324150380.png",intern=TRUE))
character(0)
> try(system("convert tmp/9qcu21324150380.ps tmp/9qcu21324150380.png",intern=TRUE))
character(0)
> try(system("convert tmp/10065g1324150380.ps tmp/10065g1324150380.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.229 0.583 4.838