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(893
+ ,13
+ ,6
+ ,10345
+ ,546
+ ,26
+ ,7
+ ,17607
+ ,186
+ ,0
+ ,0
+ ,1423
+ ,1405
+ ,37
+ ,12
+ ,20050
+ ,2156
+ ,47
+ ,15
+ ,21212
+ ,3726
+ ,84
+ ,16
+ ,93979
+ ,845
+ ,21
+ ,12
+ ,15524
+ ,663
+ ,36
+ ,15
+ ,16182
+ ,1181
+ ,35
+ ,15
+ ,19238
+ ,1836
+ ,40
+ ,13
+ ,28909
+ ,950
+ ,35
+ ,6
+ ,22357
+ ,1272
+ ,46
+ ,16
+ ,25560
+ ,993
+ ,20
+ ,7
+ ,9954
+ ,1685
+ ,24
+ ,12
+ ,18490
+ ,766
+ ,19
+ ,9
+ ,17777
+ ,868
+ ,15
+ ,10
+ ,25268
+ ,999
+ ,52
+ ,16
+ ,37525
+ ,332
+ ,0
+ ,5
+ ,6023
+ ,1603
+ ,38
+ ,20
+ ,25042
+ ,525
+ ,12
+ ,7
+ ,35713
+ ,629
+ ,10
+ ,13
+ ,7039
+ ,1299
+ ,53
+ ,13
+ ,40841
+ ,767
+ ,4
+ ,11
+ ,9214
+ ,1156
+ ,24
+ ,9
+ ,17446
+ ,1120
+ ,39
+ ,10
+ ,10295
+ ,635
+ ,19
+ ,7
+ ,13206
+ ,1203
+ ,23
+ ,13
+ ,26093
+ ,745
+ ,39
+ ,15
+ ,20744
+ ,1570
+ ,38
+ ,13
+ ,68013
+ ,1235
+ ,20
+ ,7
+ ,12840
+ ,758
+ ,20
+ ,14
+ ,12672
+ ,1088
+ ,41
+ ,11
+ ,10872
+ ,1170
+ ,29
+ ,3
+ ,21325
+ ,593
+ ,0
+ ,8
+ ,24542
+ ,1305
+ ,31
+ ,12
+ ,16401
+ ,0
+ ,0
+ ,0
+ ,0
+ ,706
+ ,8
+ ,12
+ ,12821
+ ,1188
+ ,35
+ ,8
+ ,14662
+ ,1111
+ ,3
+ ,20
+ ,22190
+ ,1118
+ ,47
+ ,18
+ ,37929
+ ,1087
+ ,42
+ ,9
+ ,18009
+ ,748
+ ,11
+ ,14
+ ,11076
+ ,404
+ ,10
+ ,7
+ ,24981
+ ,1130
+ ,26
+ ,13
+ ,30691
+ ,674
+ ,27
+ ,11
+ ,29164
+ ,552
+ ,1
+ ,11
+ ,13985
+ ,354
+ ,15
+ ,14
+ ,7588
+ ,1012
+ ,32
+ ,9
+ ,20023
+ ,891
+ ,13
+ ,12
+ ,25524
+ ,1198
+ ,25
+ ,12
+ ,14717
+ ,518
+ ,10
+ ,17
+ ,6832
+ ,785
+ ,24
+ ,10
+ ,9624
+ ,1128
+ ,26
+ ,11
+ ,24300
+ ,929
+ ,29
+ ,12
+ ,21790
+ ,1009
+ ,40
+ ,17
+ ,16493
+ ,951
+ ,22
+ ,6
+ ,9269
+ ,779
+ ,27
+ ,8
+ ,20105
+ ,439
+ ,8
+ ,12
+ ,11216
+ ,580
+ ,27
+ ,13
+ ,15569
+ ,669
+ ,0
+ ,14
+ ,21799
+ ,500
+ ,0
+ ,17
+ ,3772
+ ,824
+ ,17
+ ,8
+ ,6057
+ ,541
+ ,7
+ ,9
+ ,20828
+ ,476
+ ,18
+ ,9
+ ,9976
+ ,434
+ ,7
+ ,9
+ ,14055
+ ,819
+ ,24
+ ,15
+ ,17455
+ ,1228
+ ,19
+ ,16
+ ,39553
+ ,1720
+ ,39
+ ,13
+ ,14818
+ ,549
+ ,17
+ ,12
+ ,17065
+ ,157
+ ,0
+ ,10
+ ,1536
+ ,1594
+ ,39
+ ,9
+ ,11938
+ ,668
+ ,21
+ ,3
+ ,24589
+ ,656
+ ,29
+ ,12
+ ,21332
+ ,920
+ ,27
+ ,8
+ ,13229
+ ,885
+ ,23
+ ,17
+ ,11331
+ ,497
+ ,0
+ ,9
+ ,853
+ ,864
+ ,31
+ ,8
+ ,19821
+ ,995
+ ,19
+ ,9
+ ,34666
+ ,443
+ ,12
+ ,12
+ ,15051
+ ,615
+ ,23
+ ,5
+ ,27969
+ ,525
+ ,33
+ ,14
+ ,17897
+ ,900
+ ,21
+ ,14
+ ,6031
+ ,557
+ ,17
+ ,10
+ ,7153
+ ,896
+ ,27
+ ,12
+ ,13365
+ ,516
+ ,14
+ ,10
+ ,11197
+ ,895
+ ,12
+ ,12
+ ,25291
+ ,1407
+ ,22
+ ,17
+ ,28994
+ ,585
+ ,15
+ ,13
+ ,10461
+ ,472
+ ,14
+ ,10
+ ,16415
+ ,639
+ ,22
+ ,11
+ ,8495
+ ,795
+ ,25
+ ,7
+ ,18318
+ ,1365
+ ,45
+ ,10
+ ,25143
+ ,559
+ ,10
+ ,11
+ ,20471
+ ,584
+ ,16
+ ,5
+ ,14561
+ ,440
+ ,12
+ ,6
+ ,16902
+ ,1319
+ ,20
+ ,14
+ ,12994
+ ,766
+ ,38
+ ,13
+ ,29697
+ ,222
+ ,13
+ ,1
+ ,3895
+ ,965
+ ,12
+ ,13
+ ,9807
+ ,822
+ ,11
+ ,9
+ ,10711
+ ,317
+ ,8
+ ,1
+ ,2325
+ ,425
+ ,22
+ ,6
+ ,19000
+ ,711
+ ,14
+ ,12
+ ,22418
+ ,364
+ ,7
+ ,9
+ ,7872
+ ,427
+ ,14
+ ,9
+ ,5650
+ ,465
+ ,2
+ ,12
+ ,3979
+ ,628
+ ,35
+ ,12
+ ,14956
+ ,369
+ ,5
+ ,2
+ ,3738
+ ,0
+ ,0
+ ,0
+ ,0
+ ,597
+ ,34
+ ,8
+ ,10586
+ ,479
+ ,12
+ ,7
+ ,18122
+ ,713
+ ,34
+ ,11
+ ,17899
+ ,639
+ ,30
+ ,14
+ ,10913
+ ,478
+ ,21
+ ,4
+ ,18060
+ ,38
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,593
+ ,28
+ ,13
+ ,15452
+ ,742
+ ,18
+ ,17
+ ,33996
+ ,1075
+ ,13
+ ,13
+ ,8877
+ ,495
+ ,14
+ ,12
+ ,18708
+ ,778
+ ,7
+ ,1
+ ,2781
+ ,876
+ ,41
+ ,12
+ ,20854
+ ,491
+ ,21
+ ,6
+ ,8179
+ ,713
+ ,28
+ ,11
+ ,7139
+ ,485
+ ,1
+ ,8
+ ,13798
+ ,285
+ ,10
+ ,2
+ ,5619
+ ,981
+ ,31
+ ,12
+ ,13050
+ ,554
+ ,7
+ ,12
+ ,11297
+ ,753
+ ,26
+ ,14
+ ,16170
+ ,256
+ ,1
+ ,2
+ ,0
+ ,80
+ ,0
+ ,0
+ ,0
+ ,618
+ ,12
+ ,9
+ ,20539
+ ,41
+ ,0
+ ,1
+ ,0
+ ,550
+ ,18
+ ,3
+ ,10056
+ ,42
+ ,5
+ ,0
+ ,0
+ ,347
+ ,4
+ ,2
+ ,2418
+ ,0
+ ,0
+ ,0
+ ,0
+ ,442
+ ,6
+ ,12
+ ,11806
+ ,281
+ ,0
+ ,14
+ ,15924
+ ,81
+ ,0
+ ,0
+ ,0
+ ,61
+ ,0
+ ,0
+ ,0
+ ,314
+ ,15
+ ,4
+ ,7084
+ ,419
+ ,1
+ ,7
+ ,14831
+ ,554
+ ,12
+ ,10
+ ,6585)
+ ,dim=c(4
+ ,144)
+ ,dimnames=list(c('y'
+ ,'X1'
+ ,'X2'
+ ,'X3')
+ ,1:144))
> y <- array(NA,dim=c(4,144),dimnames=list(c('y','X1','X2','X3'),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
y X1 X2 X3
1 893 13 6 10345
2 546 26 7 17607
3 186 0 0 1423
4 1405 37 12 20050
5 2156 47 15 21212
6 3726 84 16 93979
7 845 21 12 15524
8 663 36 15 16182
9 1181 35 15 19238
10 1836 40 13 28909
11 950 35 6 22357
12 1272 46 16 25560
13 993 20 7 9954
14 1685 24 12 18490
15 766 19 9 17777
16 868 15 10 25268
17 999 52 16 37525
18 332 0 5 6023
19 1603 38 20 25042
20 525 12 7 35713
21 629 10 13 7039
22 1299 53 13 40841
23 767 4 11 9214
24 1156 24 9 17446
25 1120 39 10 10295
26 635 19 7 13206
27 1203 23 13 26093
28 745 39 15 20744
29 1570 38 13 68013
30 1235 20 7 12840
31 758 20 14 12672
32 1088 41 11 10872
33 1170 29 3 21325
34 593 0 8 24542
35 1305 31 12 16401
36 0 0 0 0
37 706 8 12 12821
38 1188 35 8 14662
39 1111 3 20 22190
40 1118 47 18 37929
41 1087 42 9 18009
42 748 11 14 11076
43 404 10 7 24981
44 1130 26 13 30691
45 674 27 11 29164
46 552 1 11 13985
47 354 15 14 7588
48 1012 32 9 20023
49 891 13 12 25524
50 1198 25 12 14717
51 518 10 17 6832
52 785 24 10 9624
53 1128 26 11 24300
54 929 29 12 21790
55 1009 40 17 16493
56 951 22 6 9269
57 779 27 8 20105
58 439 8 12 11216
59 580 27 13 15569
60 669 0 14 21799
61 500 0 17 3772
62 824 17 8 6057
63 541 7 9 20828
64 476 18 9 9976
65 434 7 9 14055
66 819 24 15 17455
67 1228 19 16 39553
68 1720 39 13 14818
69 549 17 12 17065
70 157 0 10 1536
71 1594 39 9 11938
72 668 21 3 24589
73 656 29 12 21332
74 920 27 8 13229
75 885 23 17 11331
76 497 0 9 853
77 864 31 8 19821
78 995 19 9 34666
79 443 12 12 15051
80 615 23 5 27969
81 525 33 14 17897
82 900 21 14 6031
83 557 17 10 7153
84 896 27 12 13365
85 516 14 10 11197
86 895 12 12 25291
87 1407 22 17 28994
88 585 15 13 10461
89 472 14 10 16415
90 639 22 11 8495
91 795 25 7 18318
92 1365 45 10 25143
93 559 10 11 20471
94 584 16 5 14561
95 440 12 6 16902
96 1319 20 14 12994
97 766 38 13 29697
98 222 13 1 3895
99 965 12 13 9807
100 822 11 9 10711
101 317 8 1 2325
102 425 22 6 19000
103 711 14 12 22418
104 364 7 9 7872
105 427 14 9 5650
106 465 2 12 3979
107 628 35 12 14956
108 369 5 2 3738
109 0 0 0 0
110 597 34 8 10586
111 479 12 7 18122
112 713 34 11 17899
113 639 30 14 10913
114 478 21 4 18060
115 38 0 0 0
116 0 0 0 0
117 593 28 13 15452
118 742 18 17 33996
119 1075 13 13 8877
120 495 14 12 18708
121 778 7 1 2781
122 876 41 12 20854
123 491 21 6 8179
124 713 28 11 7139
125 485 1 8 13798
126 285 10 2 5619
127 981 31 12 13050
128 554 7 12 11297
129 753 26 14 16170
130 256 1 2 0
131 80 0 0 0
132 618 12 9 20539
133 41 0 1 0
134 550 18 3 10056
135 42 5 0 0
136 347 4 2 2418
137 0 0 0 0
138 442 6 12 11806
139 281 0 14 15924
140 81 0 0 0
141 61 0 0 0
142 314 15 4 7084
143 419 1 7 14831
144 554 12 10 6585
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) X1 X2 X3
88.94700 16.07080 16.82676 0.01194
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-642.84 -137.50 -33.46 110.29 895.93
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 88.946998 52.452768 1.696 0.09216 .
X1 16.070803 2.077906 7.734 1.85e-12 ***
X2 16.826761 5.536700 3.039 0.00283 **
X3 0.011938 0.002496 4.783 4.33e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 271.7 on 140 degrees of freedom
Multiple R-squared: 0.6788, Adjusted R-squared: 0.6719
F-statistic: 98.61 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.9557703 8.845940e-02 4.422970e-02
[2,] 0.9955221 8.955775e-03 4.477888e-03
[3,] 0.9899161 2.016771e-02 1.008386e-02
[4,] 0.9911148 1.777048e-02 8.885240e-03
[5,] 0.9929802 1.403958e-02 7.019789e-03
[6,] 0.9928564 1.428711e-02 7.143554e-03
[7,] 0.9924275 1.514496e-02 7.572481e-03
[8,] 0.9990871 1.825840e-03 9.129201e-04
[9,] 0.9987595 2.480970e-03 1.240485e-03
[10,] 0.9983152 3.369514e-03 1.684757e-03
[11,] 0.9999733 5.342445e-05 2.671223e-05
[12,] 0.9999455 1.089633e-04 5.448166e-05
[13,] 0.9999244 1.511258e-04 7.556289e-05
[14,] 0.9999696 6.087898e-05 3.043949e-05
[15,] 0.9999424 1.151155e-04 5.755774e-05
[16,] 0.9999783 4.342591e-05 2.171295e-05
[17,] 0.9999740 5.191389e-05 2.595694e-05
[18,] 0.9999719 5.623412e-05 2.811706e-05
[19,] 0.9999512 9.764251e-05 4.882125e-05
[20,] 0.9999159 1.682891e-04 8.414457e-05
[21,] 0.9998784 2.432756e-04 1.216378e-04
[22,] 0.9999626 7.474653e-05 3.737326e-05
[23,] 0.9999675 6.506463e-05 3.253231e-05
[24,] 0.9999911 1.788133e-05 8.940663e-06
[25,] 0.9999841 3.180397e-05 1.590198e-05
[26,] 0.9999724 5.525216e-05 2.762608e-05
[27,] 0.9999748 5.041345e-05 2.520673e-05
[28,] 0.9999580 8.396182e-05 4.198091e-05
[29,] 0.9999622 7.550772e-05 3.775386e-05
[30,] 0.9999467 1.065254e-04 5.326268e-05
[31,] 0.9999152 1.696138e-04 8.480688e-05
[32,] 0.9999010 1.979432e-04 9.897160e-05
[33,] 0.9999239 1.522653e-04 7.613265e-05
[34,] 0.9999738 5.237595e-05 2.618798e-05
[35,] 0.9999584 8.316342e-05 4.158171e-05
[36,] 0.9999325 1.349668e-04 6.748341e-05
[37,] 0.9999368 1.263694e-04 6.318471e-05
[38,] 0.9999053 1.893616e-04 9.468082e-05
[39,] 0.9999390 1.220504e-04 6.102520e-05
[40,] 0.9999022 1.955131e-04 9.775654e-05
[41,] 0.9999243 1.513437e-04 7.567183e-05
[42,] 0.9998831 2.337910e-04 1.168955e-04
[43,] 0.9998289 3.421166e-04 1.710583e-04
[44,] 0.9998674 2.651547e-04 1.325774e-04
[45,] 0.9998118 3.764457e-04 1.882229e-04
[46,] 0.9997053 5.894997e-04 2.947498e-04
[47,] 0.9996440 7.120386e-04 3.560193e-04
[48,] 0.9994826 1.034705e-03 5.173523e-04
[49,] 0.9993602 1.279684e-03 6.398422e-04
[50,] 0.9994282 1.143612e-03 5.718062e-04
[51,] 0.9992153 1.569439e-03 7.847194e-04
[52,] 0.9989335 2.133083e-03 1.066542e-03
[53,] 0.9991705 1.659045e-03 8.295226e-04
[54,] 0.9988093 2.381404e-03 1.190702e-03
[55,] 0.9982650 3.469908e-03 1.734954e-03
[56,] 0.9981299 3.740160e-03 1.870080e-03
[57,] 0.9973596 5.280781e-03 2.640390e-03
[58,] 0.9967991 6.401747e-03 3.200874e-03
[59,] 0.9956196 8.760875e-03 4.380438e-03
[60,] 0.9941029 1.179416e-02 5.897082e-03
[61,] 0.9935047 1.299068e-02 6.495338e-03
[62,] 0.9991573 1.685378e-03 8.426891e-04
[63,] 0.9990043 1.991317e-03 9.956586e-04
[64,] 0.9988065 2.387003e-03 1.193502e-03
[65,] 0.9999382 1.235884e-04 6.179422e-05
[66,] 0.9999153 1.694734e-04 8.473668e-05
[67,] 0.9999265 1.469668e-04 7.348342e-05
[68,] 0.9999175 1.649857e-04 8.249287e-05
[69,] 0.9998654 2.692697e-04 1.346348e-04
[70,] 0.9998247 3.506873e-04 1.753437e-04
[71,] 0.9997585 4.829427e-04 2.414713e-04
[72,] 0.9997381 5.237820e-04 2.618910e-04
[73,] 0.9997113 5.774018e-04 2.887009e-04
[74,] 0.9996336 7.327982e-04 3.663991e-04
[75,] 0.9998923 2.153831e-04 1.076915e-04
[76,] 0.9998497 3.006489e-04 1.503245e-04
[77,] 0.9997631 4.738145e-04 2.369073e-04
[78,] 0.9996458 7.084356e-04 3.542178e-04
[79,] 0.9994733 1.053461e-03 5.267303e-04
[80,] 0.9993610 1.277909e-03 6.389545e-04
[81,] 0.9998266 3.467402e-04 1.733701e-04
[82,] 0.9997376 5.247398e-04 2.623699e-04
[83,] 0.9996480 7.039644e-04 3.519822e-04
[84,] 0.9994615 1.077000e-03 5.384999e-04
[85,] 0.9993083 1.383330e-03 6.916648e-04
[86,] 0.9998102 3.796634e-04 1.898317e-04
[87,] 0.9996936 6.128853e-04 3.064427e-04
[88,] 0.9995949 8.102885e-04 4.051442e-04
[89,] 0.9993732 1.253551e-03 6.267755e-04
[90,] 0.9999610 7.804008e-05 3.902004e-05
[91,] 0.9999611 7.787516e-05 3.893758e-05
[92,] 0.9999355 1.289839e-04 6.449197e-05
[93,] 0.9999739 5.227720e-05 2.613860e-05
[94,] 0.9999891 2.171357e-05 1.085679e-05
[95,] 0.9999807 3.850310e-05 1.925155e-05
[96,] 0.9999745 5.098779e-05 2.549389e-05
[97,] 0.9999577 8.457950e-05 4.228975e-05
[98,] 0.9999268 1.464893e-04 7.324465e-05
[99,] 0.9998765 2.469141e-04 1.234570e-04
[100,] 0.9997774 4.452581e-04 2.226291e-04
[101,] 0.9997812 4.375859e-04 2.187930e-04
[102,] 0.9996799 6.401127e-04 3.200563e-04
[103,] 0.9995327 9.346746e-04 4.673373e-04
[104,] 0.9993541 1.291801e-03 6.459004e-04
[105,] 0.9988968 2.206338e-03 1.103169e-03
[106,] 0.9984336 3.132753e-03 1.566376e-03
[107,] 0.9984552 3.089528e-03 1.544764e-03
[108,] 0.9974599 5.080132e-03 2.540066e-03
[109,] 0.9960627 7.874583e-03 3.937292e-03
[110,] 0.9946092 1.078161e-02 5.390807e-03
[111,] 0.9951361 9.727750e-03 4.863875e-03
[112,] 0.9926336 1.473282e-02 7.366409e-03
[113,] 0.9991563 1.687373e-03 8.436867e-04
[114,] 0.9987860 2.427913e-03 1.213956e-03
[115,] 0.9999976 4.813839e-06 2.406919e-06
[116,] 0.9999979 4.120099e-06 2.060050e-06
[117,] 0.9999954 9.267483e-06 4.633742e-06
[118,] 0.9999868 2.642636e-05 1.321318e-05
[119,] 0.9999834 3.326077e-05 1.663038e-05
[120,] 0.9999535 9.300341e-05 4.650171e-05
[121,] 0.9999199 1.601998e-04 8.009989e-05
[122,] 0.9998523 2.954778e-04 1.477389e-04
[123,] 0.9996408 7.183426e-04 3.591713e-04
[124,] 0.9995932 8.135875e-04 4.067938e-04
[125,] 0.9987970 2.405986e-03 1.202993e-03
[126,] 0.9965431 6.913780e-03 3.456890e-03
[127,] 0.9908302 1.833969e-02 9.169845e-03
[128,] 0.9777543 4.449134e-02 2.224567e-02
[129,] 0.9608783 7.824342e-02 3.912171e-02
[130,] 0.9542047 9.159057e-02 4.579529e-02
[131,] 0.8913514 2.172972e-01 1.086486e-01
> postscript(file="/var/wessaorg/rcomp/tmp/1qsr51322158996.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/2ksoe1322158996.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/32d2t1322158996.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/4h9dp1322158996.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/5jcl61322158996.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
370.670466 -288.772538 80.064826 280.149601 806.089006 895.929544
7 8 9 10 11 12
31.315112 -450.082603 47.504808 540.349188 -69.289843 -130.574605
13 14 15 16 17 18
346.015954 787.693758 8.040051 68.066827 -642.840971 87.014920
19 20 21 22 23 24
267.868803 -300.935841 76.563508 -348.018834 318.676082 321.637609
25 26 27 28 29 30
113.119463 -34.736538 214.171038 -470.757456 -160.343803 553.562071
31 32 33 34 35 36
-39.219626 25.262708 309.935565 76.449584 320.137211 -88.946998
37 38 39 40 41 42
133.504725 226.921718 372.394881 -481.963546 -43.358094 114.471097
43 44 45 46 47 48
-261.672588 38.066407 -382.121116 94.930945 -302.171385 18.306233
49 50 51 52 53 54
86.498710 329.666095 -99.272313 27.192092 146.017493 -88.056588
55 56 57 58 59 60
-205.732143 296.878833 -118.491932 -114.334331 -347.473689 84.235725
61 62 63 64 65 66
79.966859 254.925088 -60.534016 -172.758605 -86.676029 -116.430404
67 68 69 70 71 72
92.284684 608.642328 -218.798570 -118.551813 584.331627 -102.464567
73 74 75 76 77 78
-355.588855 104.595698 5.096918 246.428795 -94.384670 35.414399
79 80 81 82 83 84
-220.400856 -261.611090 -543.517588 165.991705 -58.812792 11.665047
85 86 87 88 89 90
-99.878798 109.351132 332.301838 -88.643309 -206.172756 -90.014742
91 92 93 94 95 96
-32.189854 84.435029 -120.137980 -20.046979 -144.538049 517.936247
97 98 99 100 101 102
-506.916573 -139.193806 347.376736 276.962377 54.903312 -345.292593
103 104 105 106 107 108
-72.491788 -82.861628 -105.830384 94.487835 -403.895182 121.420166
109 110 111 112 113 114
-88.946998 -299.347040 -136.929515 -321.131984 -297.928215 -231.346282
115 116 117 118 119 120
-50.946998 -88.946998 -349.147712 -328.130239 452.408536 -244.200760
121 122 123 124 125 126
526.530258 -322.731989 -134.037636 -96.251248 80.643688 -65.389758
127 128 129 130 131 132
36.142395 15.769471 -182.404555 117.328676 -8.946998 -60.437866
133 134 135 136 137 138
-64.773760 1.246900 -127.301012 131.249501 -88.946998 -86.236312
139 140 141 142 143 144
-233.626865 -7.946998 -27.946998 -167.886878 19.138203 25.322166
> postscript(file="/var/wessaorg/rcomp/tmp/6anrl1322158996.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 370.670466 NA
1 -288.772538 370.670466
2 80.064826 -288.772538
3 280.149601 80.064826
4 806.089006 280.149601
5 895.929544 806.089006
6 31.315112 895.929544
7 -450.082603 31.315112
8 47.504808 -450.082603
9 540.349188 47.504808
10 -69.289843 540.349188
11 -130.574605 -69.289843
12 346.015954 -130.574605
13 787.693758 346.015954
14 8.040051 787.693758
15 68.066827 8.040051
16 -642.840971 68.066827
17 87.014920 -642.840971
18 267.868803 87.014920
19 -300.935841 267.868803
20 76.563508 -300.935841
21 -348.018834 76.563508
22 318.676082 -348.018834
23 321.637609 318.676082
24 113.119463 321.637609
25 -34.736538 113.119463
26 214.171038 -34.736538
27 -470.757456 214.171038
28 -160.343803 -470.757456
29 553.562071 -160.343803
30 -39.219626 553.562071
31 25.262708 -39.219626
32 309.935565 25.262708
33 76.449584 309.935565
34 320.137211 76.449584
35 -88.946998 320.137211
36 133.504725 -88.946998
37 226.921718 133.504725
38 372.394881 226.921718
39 -481.963546 372.394881
40 -43.358094 -481.963546
41 114.471097 -43.358094
42 -261.672588 114.471097
43 38.066407 -261.672588
44 -382.121116 38.066407
45 94.930945 -382.121116
46 -302.171385 94.930945
47 18.306233 -302.171385
48 86.498710 18.306233
49 329.666095 86.498710
50 -99.272313 329.666095
51 27.192092 -99.272313
52 146.017493 27.192092
53 -88.056588 146.017493
54 -205.732143 -88.056588
55 296.878833 -205.732143
56 -118.491932 296.878833
57 -114.334331 -118.491932
58 -347.473689 -114.334331
59 84.235725 -347.473689
60 79.966859 84.235725
61 254.925088 79.966859
62 -60.534016 254.925088
63 -172.758605 -60.534016
64 -86.676029 -172.758605
65 -116.430404 -86.676029
66 92.284684 -116.430404
67 608.642328 92.284684
68 -218.798570 608.642328
69 -118.551813 -218.798570
70 584.331627 -118.551813
71 -102.464567 584.331627
72 -355.588855 -102.464567
73 104.595698 -355.588855
74 5.096918 104.595698
75 246.428795 5.096918
76 -94.384670 246.428795
77 35.414399 -94.384670
78 -220.400856 35.414399
79 -261.611090 -220.400856
80 -543.517588 -261.611090
81 165.991705 -543.517588
82 -58.812792 165.991705
83 11.665047 -58.812792
84 -99.878798 11.665047
85 109.351132 -99.878798
86 332.301838 109.351132
87 -88.643309 332.301838
88 -206.172756 -88.643309
89 -90.014742 -206.172756
90 -32.189854 -90.014742
91 84.435029 -32.189854
92 -120.137980 84.435029
93 -20.046979 -120.137980
94 -144.538049 -20.046979
95 517.936247 -144.538049
96 -506.916573 517.936247
97 -139.193806 -506.916573
98 347.376736 -139.193806
99 276.962377 347.376736
100 54.903312 276.962377
101 -345.292593 54.903312
102 -72.491788 -345.292593
103 -82.861628 -72.491788
104 -105.830384 -82.861628
105 94.487835 -105.830384
106 -403.895182 94.487835
107 121.420166 -403.895182
108 -88.946998 121.420166
109 -299.347040 -88.946998
110 -136.929515 -299.347040
111 -321.131984 -136.929515
112 -297.928215 -321.131984
113 -231.346282 -297.928215
114 -50.946998 -231.346282
115 -88.946998 -50.946998
116 -349.147712 -88.946998
117 -328.130239 -349.147712
118 452.408536 -328.130239
119 -244.200760 452.408536
120 526.530258 -244.200760
121 -322.731989 526.530258
122 -134.037636 -322.731989
123 -96.251248 -134.037636
124 80.643688 -96.251248
125 -65.389758 80.643688
126 36.142395 -65.389758
127 15.769471 36.142395
128 -182.404555 15.769471
129 117.328676 -182.404555
130 -8.946998 117.328676
131 -60.437866 -8.946998
132 -64.773760 -60.437866
133 1.246900 -64.773760
134 -127.301012 1.246900
135 131.249501 -127.301012
136 -88.946998 131.249501
137 -86.236312 -88.946998
138 -233.626865 -86.236312
139 -7.946998 -233.626865
140 -27.946998 -7.946998
141 -167.886878 -27.946998
142 19.138203 -167.886878
143 25.322166 19.138203
144 NA 25.322166
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -288.772538 370.670466
[2,] 80.064826 -288.772538
[3,] 280.149601 80.064826
[4,] 806.089006 280.149601
[5,] 895.929544 806.089006
[6,] 31.315112 895.929544
[7,] -450.082603 31.315112
[8,] 47.504808 -450.082603
[9,] 540.349188 47.504808
[10,] -69.289843 540.349188
[11,] -130.574605 -69.289843
[12,] 346.015954 -130.574605
[13,] 787.693758 346.015954
[14,] 8.040051 787.693758
[15,] 68.066827 8.040051
[16,] -642.840971 68.066827
[17,] 87.014920 -642.840971
[18,] 267.868803 87.014920
[19,] -300.935841 267.868803
[20,] 76.563508 -300.935841
[21,] -348.018834 76.563508
[22,] 318.676082 -348.018834
[23,] 321.637609 318.676082
[24,] 113.119463 321.637609
[25,] -34.736538 113.119463
[26,] 214.171038 -34.736538
[27,] -470.757456 214.171038
[28,] -160.343803 -470.757456
[29,] 553.562071 -160.343803
[30,] -39.219626 553.562071
[31,] 25.262708 -39.219626
[32,] 309.935565 25.262708
[33,] 76.449584 309.935565
[34,] 320.137211 76.449584
[35,] -88.946998 320.137211
[36,] 133.504725 -88.946998
[37,] 226.921718 133.504725
[38,] 372.394881 226.921718
[39,] -481.963546 372.394881
[40,] -43.358094 -481.963546
[41,] 114.471097 -43.358094
[42,] -261.672588 114.471097
[43,] 38.066407 -261.672588
[44,] -382.121116 38.066407
[45,] 94.930945 -382.121116
[46,] -302.171385 94.930945
[47,] 18.306233 -302.171385
[48,] 86.498710 18.306233
[49,] 329.666095 86.498710
[50,] -99.272313 329.666095
[51,] 27.192092 -99.272313
[52,] 146.017493 27.192092
[53,] -88.056588 146.017493
[54,] -205.732143 -88.056588
[55,] 296.878833 -205.732143
[56,] -118.491932 296.878833
[57,] -114.334331 -118.491932
[58,] -347.473689 -114.334331
[59,] 84.235725 -347.473689
[60,] 79.966859 84.235725
[61,] 254.925088 79.966859
[62,] -60.534016 254.925088
[63,] -172.758605 -60.534016
[64,] -86.676029 -172.758605
[65,] -116.430404 -86.676029
[66,] 92.284684 -116.430404
[67,] 608.642328 92.284684
[68,] -218.798570 608.642328
[69,] -118.551813 -218.798570
[70,] 584.331627 -118.551813
[71,] -102.464567 584.331627
[72,] -355.588855 -102.464567
[73,] 104.595698 -355.588855
[74,] 5.096918 104.595698
[75,] 246.428795 5.096918
[76,] -94.384670 246.428795
[77,] 35.414399 -94.384670
[78,] -220.400856 35.414399
[79,] -261.611090 -220.400856
[80,] -543.517588 -261.611090
[81,] 165.991705 -543.517588
[82,] -58.812792 165.991705
[83,] 11.665047 -58.812792
[84,] -99.878798 11.665047
[85,] 109.351132 -99.878798
[86,] 332.301838 109.351132
[87,] -88.643309 332.301838
[88,] -206.172756 -88.643309
[89,] -90.014742 -206.172756
[90,] -32.189854 -90.014742
[91,] 84.435029 -32.189854
[92,] -120.137980 84.435029
[93,] -20.046979 -120.137980
[94,] -144.538049 -20.046979
[95,] 517.936247 -144.538049
[96,] -506.916573 517.936247
[97,] -139.193806 -506.916573
[98,] 347.376736 -139.193806
[99,] 276.962377 347.376736
[100,] 54.903312 276.962377
[101,] -345.292593 54.903312
[102,] -72.491788 -345.292593
[103,] -82.861628 -72.491788
[104,] -105.830384 -82.861628
[105,] 94.487835 -105.830384
[106,] -403.895182 94.487835
[107,] 121.420166 -403.895182
[108,] -88.946998 121.420166
[109,] -299.347040 -88.946998
[110,] -136.929515 -299.347040
[111,] -321.131984 -136.929515
[112,] -297.928215 -321.131984
[113,] -231.346282 -297.928215
[114,] -50.946998 -231.346282
[115,] -88.946998 -50.946998
[116,] -349.147712 -88.946998
[117,] -328.130239 -349.147712
[118,] 452.408536 -328.130239
[119,] -244.200760 452.408536
[120,] 526.530258 -244.200760
[121,] -322.731989 526.530258
[122,] -134.037636 -322.731989
[123,] -96.251248 -134.037636
[124,] 80.643688 -96.251248
[125,] -65.389758 80.643688
[126,] 36.142395 -65.389758
[127,] 15.769471 36.142395
[128,] -182.404555 15.769471
[129,] 117.328676 -182.404555
[130,] -8.946998 117.328676
[131,] -60.437866 -8.946998
[132,] -64.773760 -60.437866
[133,] 1.246900 -64.773760
[134,] -127.301012 1.246900
[135,] 131.249501 -127.301012
[136,] -88.946998 131.249501
[137,] -86.236312 -88.946998
[138,] -233.626865 -86.236312
[139,] -7.946998 -233.626865
[140,] -27.946998 -7.946998
[141,] -167.886878 -27.946998
[142,] 19.138203 -167.886878
[143,] 25.322166 19.138203
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -288.772538 370.670466
2 80.064826 -288.772538
3 280.149601 80.064826
4 806.089006 280.149601
5 895.929544 806.089006
6 31.315112 895.929544
7 -450.082603 31.315112
8 47.504808 -450.082603
9 540.349188 47.504808
10 -69.289843 540.349188
11 -130.574605 -69.289843
12 346.015954 -130.574605
13 787.693758 346.015954
14 8.040051 787.693758
15 68.066827 8.040051
16 -642.840971 68.066827
17 87.014920 -642.840971
18 267.868803 87.014920
19 -300.935841 267.868803
20 76.563508 -300.935841
21 -348.018834 76.563508
22 318.676082 -348.018834
23 321.637609 318.676082
24 113.119463 321.637609
25 -34.736538 113.119463
26 214.171038 -34.736538
27 -470.757456 214.171038
28 -160.343803 -470.757456
29 553.562071 -160.343803
30 -39.219626 553.562071
31 25.262708 -39.219626
32 309.935565 25.262708
33 76.449584 309.935565
34 320.137211 76.449584
35 -88.946998 320.137211
36 133.504725 -88.946998
37 226.921718 133.504725
38 372.394881 226.921718
39 -481.963546 372.394881
40 -43.358094 -481.963546
41 114.471097 -43.358094
42 -261.672588 114.471097
43 38.066407 -261.672588
44 -382.121116 38.066407
45 94.930945 -382.121116
46 -302.171385 94.930945
47 18.306233 -302.171385
48 86.498710 18.306233
49 329.666095 86.498710
50 -99.272313 329.666095
51 27.192092 -99.272313
52 146.017493 27.192092
53 -88.056588 146.017493
54 -205.732143 -88.056588
55 296.878833 -205.732143
56 -118.491932 296.878833
57 -114.334331 -118.491932
58 -347.473689 -114.334331
59 84.235725 -347.473689
60 79.966859 84.235725
61 254.925088 79.966859
62 -60.534016 254.925088
63 -172.758605 -60.534016
64 -86.676029 -172.758605
65 -116.430404 -86.676029
66 92.284684 -116.430404
67 608.642328 92.284684
68 -218.798570 608.642328
69 -118.551813 -218.798570
70 584.331627 -118.551813
71 -102.464567 584.331627
72 -355.588855 -102.464567
73 104.595698 -355.588855
74 5.096918 104.595698
75 246.428795 5.096918
76 -94.384670 246.428795
77 35.414399 -94.384670
78 -220.400856 35.414399
79 -261.611090 -220.400856
80 -543.517588 -261.611090
81 165.991705 -543.517588
82 -58.812792 165.991705
83 11.665047 -58.812792
84 -99.878798 11.665047
85 109.351132 -99.878798
86 332.301838 109.351132
87 -88.643309 332.301838
88 -206.172756 -88.643309
89 -90.014742 -206.172756
90 -32.189854 -90.014742
91 84.435029 -32.189854
92 -120.137980 84.435029
93 -20.046979 -120.137980
94 -144.538049 -20.046979
95 517.936247 -144.538049
96 -506.916573 517.936247
97 -139.193806 -506.916573
98 347.376736 -139.193806
99 276.962377 347.376736
100 54.903312 276.962377
101 -345.292593 54.903312
102 -72.491788 -345.292593
103 -82.861628 -72.491788
104 -105.830384 -82.861628
105 94.487835 -105.830384
106 -403.895182 94.487835
107 121.420166 -403.895182
108 -88.946998 121.420166
109 -299.347040 -88.946998
110 -136.929515 -299.347040
111 -321.131984 -136.929515
112 -297.928215 -321.131984
113 -231.346282 -297.928215
114 -50.946998 -231.346282
115 -88.946998 -50.946998
116 -349.147712 -88.946998
117 -328.130239 -349.147712
118 452.408536 -328.130239
119 -244.200760 452.408536
120 526.530258 -244.200760
121 -322.731989 526.530258
122 -134.037636 -322.731989
123 -96.251248 -134.037636
124 80.643688 -96.251248
125 -65.389758 80.643688
126 36.142395 -65.389758
127 15.769471 36.142395
128 -182.404555 15.769471
129 117.328676 -182.404555
130 -8.946998 117.328676
131 -60.437866 -8.946998
132 -64.773760 -60.437866
133 1.246900 -64.773760
134 -127.301012 1.246900
135 131.249501 -127.301012
136 -88.946998 131.249501
137 -86.236312 -88.946998
138 -233.626865 -86.236312
139 -7.946998 -233.626865
140 -27.946998 -7.946998
141 -167.886878 -27.946998
142 19.138203 -167.886878
143 25.322166 19.138203
> 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/7apli1322158996.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/8qukg1322158996.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/9nbm81322158996.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/104an71322158996.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/11op061322158996.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/12zevi1322158996.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/13qhp11322158996.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/145gmf1322158996.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/1558yv1322158996.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/163icq1322158996.tab")
+ }
>
> try(system("convert tmp/1qsr51322158996.ps tmp/1qsr51322158996.png",intern=TRUE))
character(0)
> try(system("convert tmp/2ksoe1322158996.ps tmp/2ksoe1322158996.png",intern=TRUE))
character(0)
> try(system("convert tmp/32d2t1322158996.ps tmp/32d2t1322158996.png",intern=TRUE))
character(0)
> try(system("convert tmp/4h9dp1322158996.ps tmp/4h9dp1322158996.png",intern=TRUE))
character(0)
> try(system("convert tmp/5jcl61322158996.ps tmp/5jcl61322158996.png",intern=TRUE))
character(0)
> try(system("convert tmp/6anrl1322158996.ps tmp/6anrl1322158996.png",intern=TRUE))
character(0)
> try(system("convert tmp/7apli1322158996.ps tmp/7apli1322158996.png",intern=TRUE))
character(0)
> try(system("convert tmp/8qukg1322158996.ps tmp/8qukg1322158996.png",intern=TRUE))
character(0)
> try(system("convert tmp/9nbm81322158996.ps tmp/9nbm81322158996.png",intern=TRUE))
character(0)
> try(system("convert tmp/104an71322158996.ps tmp/104an71322158996.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.604 0.488 5.344