R version 2.9.0 (2009-04-17)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
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(142773
+ ,0
+ ,142773
+ ,149657
+ ,133639
+ ,0
+ ,133639
+ ,142773
+ ,128332
+ ,0
+ ,128332
+ ,133639
+ ,120297
+ ,0
+ ,120297
+ ,128332
+ ,118632
+ ,0
+ ,118632
+ ,120297
+ ,155276
+ ,0
+ ,155276
+ ,118632
+ ,169316
+ ,0
+ ,169316
+ ,155276
+ ,167395
+ ,0
+ ,167395
+ ,169316
+ ,157939
+ ,0
+ ,157939
+ ,167395
+ ,149601
+ ,0
+ ,149601
+ ,157939
+ ,146310
+ ,0
+ ,146310
+ ,149601
+ ,141579
+ ,0
+ ,141579
+ ,146310
+ ,136473
+ ,0
+ ,136473
+ ,141579
+ ,129818
+ ,0
+ ,129818
+ ,136473
+ ,124226
+ ,0
+ ,124226
+ ,129818
+ ,116428
+ ,0
+ ,116428
+ ,124226
+ ,116440
+ ,0
+ ,116440
+ ,116428
+ ,147747
+ ,0
+ ,147747
+ ,116440
+ ,160069
+ ,0
+ ,160069
+ ,147747
+ ,163129
+ ,0
+ ,163129
+ ,160069
+ ,151108
+ ,0
+ ,151108
+ ,163129
+ ,141481
+ ,0
+ ,141481
+ ,151108
+ ,139174
+ ,0
+ ,139174
+ ,141481
+ ,134066
+ ,0
+ ,134066
+ ,139174
+ ,130104
+ ,0
+ ,130104
+ ,134066
+ ,123090
+ ,0
+ ,123090
+ ,130104
+ ,116598
+ ,0
+ ,116598
+ ,123090
+ ,109627
+ ,0
+ ,109627
+ ,116598
+ ,105428
+ ,0
+ ,105428
+ ,109627
+ ,137272
+ ,0
+ ,137272
+ ,105428
+ ,159836
+ ,0
+ ,159836
+ ,137272
+ ,155283
+ ,0
+ ,155283
+ ,159836
+ ,141514
+ ,0
+ ,141514
+ ,155283
+ ,131852
+ ,0
+ ,131852
+ ,141514
+ ,130691
+ ,0
+ ,130691
+ ,131852
+ ,128461
+ ,0
+ ,128461
+ ,130691
+ ,123066
+ ,0
+ ,123066
+ ,128461
+ ,117599
+ ,0
+ ,117599
+ ,123066
+ ,111599
+ ,0
+ ,111599
+ ,117599
+ ,105395
+ ,0
+ ,105395
+ ,111599
+ ,102334
+ ,0
+ ,102334
+ ,105395
+ ,131305
+ ,0
+ ,131305
+ ,102334
+ ,149033
+ ,0
+ ,149033
+ ,131305
+ ,144954
+ ,0
+ ,144954
+ ,149033
+ ,132404
+ ,0
+ ,132404
+ ,144954
+ ,122104
+ ,0
+ ,122104
+ ,132404
+ ,118755
+ ,0
+ ,118755
+ ,122104
+ ,116222
+ ,1
+ ,116222
+ ,118755
+ ,110924
+ ,1
+ ,110924
+ ,116222
+ ,103753
+ ,1
+ ,103753
+ ,110924
+ ,99983
+ ,1
+ ,99983
+ ,103753
+ ,93302
+ ,1
+ ,93302
+ ,99983
+ ,91496
+ ,1
+ ,91496
+ ,93302
+ ,119321
+ ,1
+ ,119321
+ ,91496
+ ,139261
+ ,1
+ ,139261
+ ,119321
+ ,133739
+ ,1
+ ,133739
+ ,139261
+ ,123913
+ ,1
+ ,123913
+ ,133739
+ ,113438
+ ,1
+ ,113438
+ ,123913
+ ,109416
+ ,1
+ ,109416
+ ,113438
+ ,109406
+ ,1
+ ,109406
+ ,109416
+ ,105645
+ ,1
+ ,105645
+ ,109406
+ ,101328
+ ,1
+ ,101328
+ ,105645
+ ,97686
+ ,1
+ ,97686
+ ,101328
+ ,93093
+ ,1
+ ,93093
+ ,97686
+ ,91382
+ ,1
+ ,91382
+ ,93093
+ ,122257
+ ,1
+ ,122257
+ ,91382
+ ,139183
+ ,1
+ ,139183
+ ,122257
+ ,139887
+ ,1
+ ,139887
+ ,139183
+ ,131822
+ ,1
+ ,131822
+ ,139887
+ ,116805
+ ,1
+ ,116805
+ ,131822
+ ,113706
+ ,1
+ ,113706
+ ,116805
+ ,113012
+ ,1
+ ,113012
+ ,113706
+ ,110452
+ ,1
+ ,110452
+ ,113012
+ ,107005
+ ,1
+ ,107005
+ ,110452
+ ,102841
+ ,1
+ ,102841
+ ,107005
+ ,98173
+ ,1
+ ,98173
+ ,102841
+ ,98181
+ ,1
+ ,98181
+ ,98173
+ ,137277
+ ,1
+ ,137277
+ ,98181
+ ,147579
+ ,1
+ ,147579
+ ,137277
+ ,146571
+ ,1
+ ,146571
+ ,147579
+ ,138920
+ ,1
+ ,138920
+ ,146571
+ ,130340
+ ,1
+ ,130340
+ ,138920
+ ,128140
+ ,1
+ ,128140
+ ,130340
+ ,127059
+ ,1
+ ,127059
+ ,128140
+ ,122860
+ ,1
+ ,122860
+ ,127059
+ ,117702
+ ,1
+ ,117702
+ ,122860
+ ,113537
+ ,1
+ ,113537
+ ,117702
+ ,108366
+ ,1
+ ,108366
+ ,113537
+ ,111078
+ ,1
+ ,111078
+ ,108366
+ ,150739
+ ,1
+ ,150739
+ ,111078
+ ,159129
+ ,1
+ ,159129
+ ,150739
+ ,157928
+ ,1
+ ,157928
+ ,159129
+ ,147768
+ ,1
+ ,147768
+ ,157928
+ ,137507
+ ,1
+ ,137507
+ ,147768
+ ,136919
+ ,1
+ ,136919
+ ,137507)
+ ,dim=c(4
+ ,95)
+ ,dimnames=list(c('Y'
+ ,'X'
+ ,'Y1'
+ ,'Y2')
+ ,1:95))
> y <- array(NA,dim=c(4,95),dimnames=list(c('Y','X','Y1','Y2'),1:95))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'Linear Trend'
> par2 = 'Include Monthly 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
Attaching package: 'zoo'
The following object(s) are masked from package:base :
as.Date.numeric
> 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 X Y1 Y2 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 142773 0 142773 149657 1 0 0 0 0 0 0 0 0 0 0 1
2 133639 0 133639 142773 0 1 0 0 0 0 0 0 0 0 0 2
3 128332 0 128332 133639 0 0 1 0 0 0 0 0 0 0 0 3
4 120297 0 120297 128332 0 0 0 1 0 0 0 0 0 0 0 4
5 118632 0 118632 120297 0 0 0 0 1 0 0 0 0 0 0 5
6 155276 0 155276 118632 0 0 0 0 0 1 0 0 0 0 0 6
7 169316 0 169316 155276 0 0 0 0 0 0 1 0 0 0 0 7
8 167395 0 167395 169316 0 0 0 0 0 0 0 1 0 0 0 8
9 157939 0 157939 167395 0 0 0 0 0 0 0 0 1 0 0 9
10 149601 0 149601 157939 0 0 0 0 0 0 0 0 0 1 0 10
11 146310 0 146310 149601 0 0 0 0 0 0 0 0 0 0 1 11
12 141579 0 141579 146310 0 0 0 0 0 0 0 0 0 0 0 12
13 136473 0 136473 141579 1 0 0 0 0 0 0 0 0 0 0 13
14 129818 0 129818 136473 0 1 0 0 0 0 0 0 0 0 0 14
15 124226 0 124226 129818 0 0 1 0 0 0 0 0 0 0 0 15
16 116428 0 116428 124226 0 0 0 1 0 0 0 0 0 0 0 16
17 116440 0 116440 116428 0 0 0 0 1 0 0 0 0 0 0 17
18 147747 0 147747 116440 0 0 0 0 0 1 0 0 0 0 0 18
19 160069 0 160069 147747 0 0 0 0 0 0 1 0 0 0 0 19
20 163129 0 163129 160069 0 0 0 0 0 0 0 1 0 0 0 20
21 151108 0 151108 163129 0 0 0 0 0 0 0 0 1 0 0 21
22 141481 0 141481 151108 0 0 0 0 0 0 0 0 0 1 0 22
23 139174 0 139174 141481 0 0 0 0 0 0 0 0 0 0 1 23
24 134066 0 134066 139174 0 0 0 0 0 0 0 0 0 0 0 24
25 130104 0 130104 134066 1 0 0 0 0 0 0 0 0 0 0 25
26 123090 0 123090 130104 0 1 0 0 0 0 0 0 0 0 0 26
27 116598 0 116598 123090 0 0 1 0 0 0 0 0 0 0 0 27
28 109627 0 109627 116598 0 0 0 1 0 0 0 0 0 0 0 28
29 105428 0 105428 109627 0 0 0 0 1 0 0 0 0 0 0 29
30 137272 0 137272 105428 0 0 0 0 0 1 0 0 0 0 0 30
31 159836 0 159836 137272 0 0 0 0 0 0 1 0 0 0 0 31
32 155283 0 155283 159836 0 0 0 0 0 0 0 1 0 0 0 32
33 141514 0 141514 155283 0 0 0 0 0 0 0 0 1 0 0 33
34 131852 0 131852 141514 0 0 0 0 0 0 0 0 0 1 0 34
35 130691 0 130691 131852 0 0 0 0 0 0 0 0 0 0 1 35
36 128461 0 128461 130691 0 0 0 0 0 0 0 0 0 0 0 36
37 123066 0 123066 128461 1 0 0 0 0 0 0 0 0 0 0 37
38 117599 0 117599 123066 0 1 0 0 0 0 0 0 0 0 0 38
39 111599 0 111599 117599 0 0 1 0 0 0 0 0 0 0 0 39
40 105395 0 105395 111599 0 0 0 1 0 0 0 0 0 0 0 40
41 102334 0 102334 105395 0 0 0 0 1 0 0 0 0 0 0 41
42 131305 0 131305 102334 0 0 0 0 0 1 0 0 0 0 0 42
43 149033 0 149033 131305 0 0 0 0 0 0 1 0 0 0 0 43
44 144954 0 144954 149033 0 0 0 0 0 0 0 1 0 0 0 44
45 132404 0 132404 144954 0 0 0 0 0 0 0 0 1 0 0 45
46 122104 0 122104 132404 0 0 0 0 0 0 0 0 0 1 0 46
47 118755 0 118755 122104 0 0 0 0 0 0 0 0 0 0 1 47
48 116222 1 116222 118755 0 0 0 0 0 0 0 0 0 0 0 48
49 110924 1 110924 116222 1 0 0 0 0 0 0 0 0 0 0 49
50 103753 1 103753 110924 0 1 0 0 0 0 0 0 0 0 0 50
51 99983 1 99983 103753 0 0 1 0 0 0 0 0 0 0 0 51
52 93302 1 93302 99983 0 0 0 1 0 0 0 0 0 0 0 52
53 91496 1 91496 93302 0 0 0 0 1 0 0 0 0 0 0 53
54 119321 1 119321 91496 0 0 0 0 0 1 0 0 0 0 0 54
55 139261 1 139261 119321 0 0 0 0 0 0 1 0 0 0 0 55
56 133739 1 133739 139261 0 0 0 0 0 0 0 1 0 0 0 56
57 123913 1 123913 133739 0 0 0 0 0 0 0 0 1 0 0 57
58 113438 1 113438 123913 0 0 0 0 0 0 0 0 0 1 0 58
59 109416 1 109416 113438 0 0 0 0 0 0 0 0 0 0 1 59
60 109406 1 109406 109416 0 0 0 0 0 0 0 0 0 0 0 60
61 105645 1 105645 109406 1 0 0 0 0 0 0 0 0 0 0 61
62 101328 1 101328 105645 0 1 0 0 0 0 0 0 0 0 0 62
63 97686 1 97686 101328 0 0 1 0 0 0 0 0 0 0 0 63
64 93093 1 93093 97686 0 0 0 1 0 0 0 0 0 0 0 64
65 91382 1 91382 93093 0 0 0 0 1 0 0 0 0 0 0 65
66 122257 1 122257 91382 0 0 0 0 0 1 0 0 0 0 0 66
67 139183 1 139183 122257 0 0 0 0 0 0 1 0 0 0 0 67
68 139887 1 139887 139183 0 0 0 0 0 0 0 1 0 0 0 68
69 131822 1 131822 139887 0 0 0 0 0 0 0 0 1 0 0 69
70 116805 1 116805 131822 0 0 0 0 0 0 0 0 0 1 0 70
71 113706 1 113706 116805 0 0 0 0 0 0 0 0 0 0 1 71
72 113012 1 113012 113706 0 0 0 0 0 0 0 0 0 0 0 72
73 110452 1 110452 113012 1 0 0 0 0 0 0 0 0 0 0 73
74 107005 1 107005 110452 0 1 0 0 0 0 0 0 0 0 0 74
75 102841 1 102841 107005 0 0 1 0 0 0 0 0 0 0 0 75
76 98173 1 98173 102841 0 0 0 1 0 0 0 0 0 0 0 76
77 98181 1 98181 98173 0 0 0 0 1 0 0 0 0 0 0 77
78 137277 1 137277 98181 0 0 0 0 0 1 0 0 0 0 0 78
79 147579 1 147579 137277 0 0 0 0 0 0 1 0 0 0 0 79
80 146571 1 146571 147579 0 0 0 0 0 0 0 1 0 0 0 80
81 138920 1 138920 146571 0 0 0 0 0 0 0 0 1 0 0 81
82 130340 1 130340 138920 0 0 0 0 0 0 0 0 0 1 0 82
83 128140 1 128140 130340 0 0 0 0 0 0 0 0 0 0 1 83
84 127059 1 127059 128140 0 0 0 0 0 0 0 0 0 0 0 84
85 122860 1 122860 127059 1 0 0 0 0 0 0 0 0 0 0 85
86 117702 1 117702 122860 0 1 0 0 0 0 0 0 0 0 0 86
87 113537 1 113537 117702 0 0 1 0 0 0 0 0 0 0 0 87
88 108366 1 108366 113537 0 0 0 1 0 0 0 0 0 0 0 88
89 111078 1 111078 108366 0 0 0 0 1 0 0 0 0 0 0 89
90 150739 1 150739 111078 0 0 0 0 0 1 0 0 0 0 0 90
91 159129 1 159129 150739 0 0 0 0 0 0 1 0 0 0 0 91
92 157928 1 157928 159129 0 0 0 0 0 0 0 1 0 0 0 92
93 147768 1 147768 157928 0 0 0 0 0 0 0 0 1 0 0 93
94 137507 1 137507 147768 0 0 0 0 0 0 0 0 0 1 0 94
95 136919 1 136919 137507 0 0 0 0 0 0 0 0 0 0 1 95
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) X Y1 Y2 M1 M2
4.928e-11 -2.986e-12 1.000e+00 8.761e-18 -3.600e-13 1.910e-13
M3 M4 M5 M6 M7 M8
9.581e-12 1.626e-12 2.274e-12 -4.420e-14 -1.805e-12 -1.533e-12
M9 M10 M11 t
-7.360e-13 1.809e-13 1.873e-13 -5.195e-14
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1.073e-11 -9.406e-13 2.211e-13 1.044e-12 5.442e-11
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.928e-11 1.183e-11 4.166e+00 7.87e-05 ***
X -2.986e-12 3.103e-12 -9.620e-01 0.3388
Y1 1.000e+00 2.977e-16 3.359e+15 < 2e-16 ***
Y2 8.761e-18 3.044e-16 2.900e-02 0.9771
M1 -3.600e-13 3.571e-12 -1.010e-01 0.9200
M2 1.910e-13 3.701e-12 5.200e-02 0.9590
M3 9.581e-12 3.715e-12 2.579e+00 0.0118 *
M4 1.626e-12 3.953e-12 4.110e-01 0.6820
M5 2.274e-12 3.983e-12 5.710e-01 0.5697
M6 -4.420e-14 1.123e-11 -4.000e-03 0.9969
M7 -1.805e-12 6.415e-12 -2.810e-01 0.7792
M8 -1.533e-12 4.129e-12 -3.710e-01 0.7115
M9 -7.360e-13 4.652e-12 -1.580e-01 0.8747
M10 1.809e-13 4.360e-12 4.100e-02 0.9670
M11 1.873e-13 3.544e-12 5.300e-02 0.9580
t -5.195e-14 5.235e-14 -9.920e-01 0.3241
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 6.776e-12 on 79 degrees of freedom
Multiple R-squared: 1, Adjusted R-squared: 1
F-statistic: 5.041e+31 on 15 and 79 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.000000e+00 0.000000e+00 1.000000e+00
[2,] 9.999805e-01 3.896189e-05 1.948094e-05
[3,] 5.746774e-11 1.149355e-10 1.000000e+00
[4,] 2.414253e-04 4.828506e-04 9.997586e-01
[5,] 6.349603e-01 7.300794e-01 3.650397e-01
[6,] 9.999997e-01 5.840708e-07 2.920354e-07
[7,] 1.840840e-01 3.681680e-01 8.159160e-01
[8,] 1.000000e+00 1.886755e-18 9.433773e-19
[9,] 3.980916e-01 7.961833e-01 6.019084e-01
[10,] 2.033823e-02 4.067646e-02 9.796618e-01
[11,] 5.931477e-02 1.186295e-01 9.406852e-01
[12,] 3.838635e-03 7.677269e-03 9.961614e-01
[13,] 1.664840e-01 3.329680e-01 8.335160e-01
[14,] 1.000000e+00 1.424648e-33 7.123242e-34
[15,] 9.086852e-04 1.817370e-03 9.990913e-01
[16,] 9.980287e-01 3.942636e-03 1.971318e-03
[17,] 1.418215e-01 2.836430e-01 8.581785e-01
[18,] 9.998451e-01 3.098964e-04 1.549482e-04
[19,] 9.170982e-13 1.834196e-12 1.000000e+00
[20,] 9.379760e-01 1.240479e-01 6.202397e-02
[21,] 2.095625e-11 4.191250e-11 1.000000e+00
[22,] 8.029441e-03 1.605888e-02 9.919706e-01
[23,] 2.179955e-03 4.359910e-03 9.978200e-01
[24,] 1.000000e+00 9.037487e-09 4.518743e-09
[25,] 8.244533e-01 3.510934e-01 1.755467e-01
[26,] 9.621504e-01 7.569919e-02 3.784959e-02
[27,] 2.280859e-15 4.561718e-15 1.000000e+00
[28,] 9.992858e-01 1.428342e-03 7.141711e-04
[29,] 1.037877e-01 2.075755e-01 8.962123e-01
[30,] 9.999998e-01 4.829024e-07 2.414512e-07
[31,] 1.573604e-08 3.147208e-08 1.000000e+00
[32,] 2.938091e-07 5.876181e-07 9.999997e-01
[33,] 9.970312e-01 5.937602e-03 2.968801e-03
[34,] 9.999997e-01 6.148928e-07 3.074464e-07
[35,] 1.000000e+00 5.627748e-10 2.813874e-10
[36,] 3.131959e-01 6.263919e-01 6.868041e-01
[37,] 1.991428e-01 3.982856e-01 8.008572e-01
[38,] 1.000000e+00 5.229425e-11 2.614713e-11
[39,] 9.841354e-01 3.172929e-02 1.586465e-02
[40,] 1.000000e+00 2.145182e-14 1.072591e-14
[41,] 7.568237e-04 1.513647e-03 9.992432e-01
[42,] 1.000000e+00 4.508933e-22 2.254467e-22
[43,] 8.521772e-01 2.956456e-01 1.478228e-01
[44,] 1.000000e+00 2.693181e-14 1.346591e-14
[45,] 2.394010e-01 4.788021e-01 7.605990e-01
[46,] 9.999978e-01 4.302135e-06 2.151068e-06
[47,] 9.659380e-01 6.812402e-02 3.406201e-02
[48,] 7.921269e-01 4.157461e-01 2.078731e-01
[49,] 4.555207e-08 9.110413e-08 1.000000e+00
[50,] 3.183252e-01 6.366505e-01 6.816748e-01
[51,] 2.979205e-01 5.958411e-01 7.020795e-01
[52,] 8.885234e-01 2.229533e-01 1.114766e-01
[53,] 9.990117e-06 1.998023e-05 9.999900e-01
[54,] 9.893809e-01 2.123827e-02 1.061914e-02
[55,] 6.939402e-11 1.387880e-10 1.000000e+00
[56,] 9.636668e-01 7.266639e-02 3.633320e-02
[57,] 1.642973e-07 3.285947e-07 9.999998e-01
[58,] 9.476808e-01 1.046384e-01 5.231922e-02
> postscript(file="/var/www/html/rcomp/tmp/1p0k91258645334.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/2qhxc1258645334.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/3ji0c1258645334.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/4ucep1258645334.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/516b71258645334.ps",horizontal=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 = 95
Frequency = 1
1 2 3 4 5
-6.970760e-12 -4.625257e-12 5.441831e-11 -3.400531e-12 -3.183944e-12
6 7 8 9 10
-2.576766e-12 -6.573865e-14 -3.190903e-12 -3.343013e-12 -2.228580e-12
11 12 13 14 15
-2.462519e-12 -1.905206e-12 -5.408049e-13 -3.033226e-13 -1.072901e-11
16 17 18 19 20
-1.017147e-12 -1.549925e-12 -3.982031e-13 -2.531827e-12 -5.855712e-13
21 22 23 24 25
-1.457316e-12 -1.565009e-12 -4.071462e-13 8.216688e-14 7.127185e-13
26 27 28 29 30
-2.640893e-13 -8.466594e-12 -9.343540e-13 4.020905e-13 4.419167e-13
31 32 33 34 35
-1.712887e-12 -1.019012e-13 7.814730e-13 7.046905e-13 4.426948e-13
36 37 38 39 40
7.763677e-13 8.833980e-13 1.048774e-12 -5.567535e-12 1.618611e-12
41 42 43 44 45
2.441230e-12 1.477590e-12 1.386895e-13 1.580823e-12 1.916845e-12
46 47 48 49 50
1.204188e-12 1.013284e-12 -3.665830e-13 6.093722e-13 -2.857702e-13
51 52 53 54 55
-7.880863e-12 -5.016976e-13 -2.341411e-13 2.113893e-13 6.253208e-13
56 57 58 59 60
-9.468865e-13 4.616693e-13 2.578772e-13 1.277897e-12 -2.621163e-13
61 62 63 64 65
1.825821e-12 1.464428e-12 -6.212706e-12 2.349018e-13 4.418327e-13
66 67 68 69 70
4.369118e-13 1.257700e-12 5.755019e-13 -2.194504e-13 2.210532e-13
71 72 73 74 75
8.695660e-13 1.445253e-12 2.094509e-12 1.334913e-12 -7.936224e-12
76 77 78 79 80
2.187357e-12 1.628940e-12 1.128822e-12 1.646084e-12 1.784804e-12
81 82 83 84 85
8.203668e-13 2.078343e-13 -5.101454e-13 2.301176e-13 1.385747e-12
86 87 88 89 90
1.630324e-12 -7.625378e-12 1.812860e-12 5.391682e-14 -7.216607e-13
91 92 93 94 95
6.426593e-13 8.841329e-13 1.039425e-12 1.197946e-12 -2.236319e-13
> postscript(file="/var/www/html/rcomp/tmp/6pucb1258645334.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 95
Frequency = 1
lag(myerror, k = 1) myerror
0 -6.970760e-12 NA
1 -4.625257e-12 -6.970760e-12
2 5.441831e-11 -4.625257e-12
3 -3.400531e-12 5.441831e-11
4 -3.183944e-12 -3.400531e-12
5 -2.576766e-12 -3.183944e-12
6 -6.573865e-14 -2.576766e-12
7 -3.190903e-12 -6.573865e-14
8 -3.343013e-12 -3.190903e-12
9 -2.228580e-12 -3.343013e-12
10 -2.462519e-12 -2.228580e-12
11 -1.905206e-12 -2.462519e-12
12 -5.408049e-13 -1.905206e-12
13 -3.033226e-13 -5.408049e-13
14 -1.072901e-11 -3.033226e-13
15 -1.017147e-12 -1.072901e-11
16 -1.549925e-12 -1.017147e-12
17 -3.982031e-13 -1.549925e-12
18 -2.531827e-12 -3.982031e-13
19 -5.855712e-13 -2.531827e-12
20 -1.457316e-12 -5.855712e-13
21 -1.565009e-12 -1.457316e-12
22 -4.071462e-13 -1.565009e-12
23 8.216688e-14 -4.071462e-13
24 7.127185e-13 8.216688e-14
25 -2.640893e-13 7.127185e-13
26 -8.466594e-12 -2.640893e-13
27 -9.343540e-13 -8.466594e-12
28 4.020905e-13 -9.343540e-13
29 4.419167e-13 4.020905e-13
30 -1.712887e-12 4.419167e-13
31 -1.019012e-13 -1.712887e-12
32 7.814730e-13 -1.019012e-13
33 7.046905e-13 7.814730e-13
34 4.426948e-13 7.046905e-13
35 7.763677e-13 4.426948e-13
36 8.833980e-13 7.763677e-13
37 1.048774e-12 8.833980e-13
38 -5.567535e-12 1.048774e-12
39 1.618611e-12 -5.567535e-12
40 2.441230e-12 1.618611e-12
41 1.477590e-12 2.441230e-12
42 1.386895e-13 1.477590e-12
43 1.580823e-12 1.386895e-13
44 1.916845e-12 1.580823e-12
45 1.204188e-12 1.916845e-12
46 1.013284e-12 1.204188e-12
47 -3.665830e-13 1.013284e-12
48 6.093722e-13 -3.665830e-13
49 -2.857702e-13 6.093722e-13
50 -7.880863e-12 -2.857702e-13
51 -5.016976e-13 -7.880863e-12
52 -2.341411e-13 -5.016976e-13
53 2.113893e-13 -2.341411e-13
54 6.253208e-13 2.113893e-13
55 -9.468865e-13 6.253208e-13
56 4.616693e-13 -9.468865e-13
57 2.578772e-13 4.616693e-13
58 1.277897e-12 2.578772e-13
59 -2.621163e-13 1.277897e-12
60 1.825821e-12 -2.621163e-13
61 1.464428e-12 1.825821e-12
62 -6.212706e-12 1.464428e-12
63 2.349018e-13 -6.212706e-12
64 4.418327e-13 2.349018e-13
65 4.369118e-13 4.418327e-13
66 1.257700e-12 4.369118e-13
67 5.755019e-13 1.257700e-12
68 -2.194504e-13 5.755019e-13
69 2.210532e-13 -2.194504e-13
70 8.695660e-13 2.210532e-13
71 1.445253e-12 8.695660e-13
72 2.094509e-12 1.445253e-12
73 1.334913e-12 2.094509e-12
74 -7.936224e-12 1.334913e-12
75 2.187357e-12 -7.936224e-12
76 1.628940e-12 2.187357e-12
77 1.128822e-12 1.628940e-12
78 1.646084e-12 1.128822e-12
79 1.784804e-12 1.646084e-12
80 8.203668e-13 1.784804e-12
81 2.078343e-13 8.203668e-13
82 -5.101454e-13 2.078343e-13
83 2.301176e-13 -5.101454e-13
84 1.385747e-12 2.301176e-13
85 1.630324e-12 1.385747e-12
86 -7.625378e-12 1.630324e-12
87 1.812860e-12 -7.625378e-12
88 5.391682e-14 1.812860e-12
89 -7.216607e-13 5.391682e-14
90 6.426593e-13 -7.216607e-13
91 8.841329e-13 6.426593e-13
92 1.039425e-12 8.841329e-13
93 1.197946e-12 1.039425e-12
94 -2.236319e-13 1.197946e-12
95 NA -2.236319e-13
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -4.625257e-12 -6.970760e-12
[2,] 5.441831e-11 -4.625257e-12
[3,] -3.400531e-12 5.441831e-11
[4,] -3.183944e-12 -3.400531e-12
[5,] -2.576766e-12 -3.183944e-12
[6,] -6.573865e-14 -2.576766e-12
[7,] -3.190903e-12 -6.573865e-14
[8,] -3.343013e-12 -3.190903e-12
[9,] -2.228580e-12 -3.343013e-12
[10,] -2.462519e-12 -2.228580e-12
[11,] -1.905206e-12 -2.462519e-12
[12,] -5.408049e-13 -1.905206e-12
[13,] -3.033226e-13 -5.408049e-13
[14,] -1.072901e-11 -3.033226e-13
[15,] -1.017147e-12 -1.072901e-11
[16,] -1.549925e-12 -1.017147e-12
[17,] -3.982031e-13 -1.549925e-12
[18,] -2.531827e-12 -3.982031e-13
[19,] -5.855712e-13 -2.531827e-12
[20,] -1.457316e-12 -5.855712e-13
[21,] -1.565009e-12 -1.457316e-12
[22,] -4.071462e-13 -1.565009e-12
[23,] 8.216688e-14 -4.071462e-13
[24,] 7.127185e-13 8.216688e-14
[25,] -2.640893e-13 7.127185e-13
[26,] -8.466594e-12 -2.640893e-13
[27,] -9.343540e-13 -8.466594e-12
[28,] 4.020905e-13 -9.343540e-13
[29,] 4.419167e-13 4.020905e-13
[30,] -1.712887e-12 4.419167e-13
[31,] -1.019012e-13 -1.712887e-12
[32,] 7.814730e-13 -1.019012e-13
[33,] 7.046905e-13 7.814730e-13
[34,] 4.426948e-13 7.046905e-13
[35,] 7.763677e-13 4.426948e-13
[36,] 8.833980e-13 7.763677e-13
[37,] 1.048774e-12 8.833980e-13
[38,] -5.567535e-12 1.048774e-12
[39,] 1.618611e-12 -5.567535e-12
[40,] 2.441230e-12 1.618611e-12
[41,] 1.477590e-12 2.441230e-12
[42,] 1.386895e-13 1.477590e-12
[43,] 1.580823e-12 1.386895e-13
[44,] 1.916845e-12 1.580823e-12
[45,] 1.204188e-12 1.916845e-12
[46,] 1.013284e-12 1.204188e-12
[47,] -3.665830e-13 1.013284e-12
[48,] 6.093722e-13 -3.665830e-13
[49,] -2.857702e-13 6.093722e-13
[50,] -7.880863e-12 -2.857702e-13
[51,] -5.016976e-13 -7.880863e-12
[52,] -2.341411e-13 -5.016976e-13
[53,] 2.113893e-13 -2.341411e-13
[54,] 6.253208e-13 2.113893e-13
[55,] -9.468865e-13 6.253208e-13
[56,] 4.616693e-13 -9.468865e-13
[57,] 2.578772e-13 4.616693e-13
[58,] 1.277897e-12 2.578772e-13
[59,] -2.621163e-13 1.277897e-12
[60,] 1.825821e-12 -2.621163e-13
[61,] 1.464428e-12 1.825821e-12
[62,] -6.212706e-12 1.464428e-12
[63,] 2.349018e-13 -6.212706e-12
[64,] 4.418327e-13 2.349018e-13
[65,] 4.369118e-13 4.418327e-13
[66,] 1.257700e-12 4.369118e-13
[67,] 5.755019e-13 1.257700e-12
[68,] -2.194504e-13 5.755019e-13
[69,] 2.210532e-13 -2.194504e-13
[70,] 8.695660e-13 2.210532e-13
[71,] 1.445253e-12 8.695660e-13
[72,] 2.094509e-12 1.445253e-12
[73,] 1.334913e-12 2.094509e-12
[74,] -7.936224e-12 1.334913e-12
[75,] 2.187357e-12 -7.936224e-12
[76,] 1.628940e-12 2.187357e-12
[77,] 1.128822e-12 1.628940e-12
[78,] 1.646084e-12 1.128822e-12
[79,] 1.784804e-12 1.646084e-12
[80,] 8.203668e-13 1.784804e-12
[81,] 2.078343e-13 8.203668e-13
[82,] -5.101454e-13 2.078343e-13
[83,] 2.301176e-13 -5.101454e-13
[84,] 1.385747e-12 2.301176e-13
[85,] 1.630324e-12 1.385747e-12
[86,] -7.625378e-12 1.630324e-12
[87,] 1.812860e-12 -7.625378e-12
[88,] 5.391682e-14 1.812860e-12
[89,] -7.216607e-13 5.391682e-14
[90,] 6.426593e-13 -7.216607e-13
[91,] 8.841329e-13 6.426593e-13
[92,] 1.039425e-12 8.841329e-13
[93,] 1.197946e-12 1.039425e-12
[94,] -2.236319e-13 1.197946e-12
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -4.625257e-12 -6.970760e-12
2 5.441831e-11 -4.625257e-12
3 -3.400531e-12 5.441831e-11
4 -3.183944e-12 -3.400531e-12
5 -2.576766e-12 -3.183944e-12
6 -6.573865e-14 -2.576766e-12
7 -3.190903e-12 -6.573865e-14
8 -3.343013e-12 -3.190903e-12
9 -2.228580e-12 -3.343013e-12
10 -2.462519e-12 -2.228580e-12
11 -1.905206e-12 -2.462519e-12
12 -5.408049e-13 -1.905206e-12
13 -3.033226e-13 -5.408049e-13
14 -1.072901e-11 -3.033226e-13
15 -1.017147e-12 -1.072901e-11
16 -1.549925e-12 -1.017147e-12
17 -3.982031e-13 -1.549925e-12
18 -2.531827e-12 -3.982031e-13
19 -5.855712e-13 -2.531827e-12
20 -1.457316e-12 -5.855712e-13
21 -1.565009e-12 -1.457316e-12
22 -4.071462e-13 -1.565009e-12
23 8.216688e-14 -4.071462e-13
24 7.127185e-13 8.216688e-14
25 -2.640893e-13 7.127185e-13
26 -8.466594e-12 -2.640893e-13
27 -9.343540e-13 -8.466594e-12
28 4.020905e-13 -9.343540e-13
29 4.419167e-13 4.020905e-13
30 -1.712887e-12 4.419167e-13
31 -1.019012e-13 -1.712887e-12
32 7.814730e-13 -1.019012e-13
33 7.046905e-13 7.814730e-13
34 4.426948e-13 7.046905e-13
35 7.763677e-13 4.426948e-13
36 8.833980e-13 7.763677e-13
37 1.048774e-12 8.833980e-13
38 -5.567535e-12 1.048774e-12
39 1.618611e-12 -5.567535e-12
40 2.441230e-12 1.618611e-12
41 1.477590e-12 2.441230e-12
42 1.386895e-13 1.477590e-12
43 1.580823e-12 1.386895e-13
44 1.916845e-12 1.580823e-12
45 1.204188e-12 1.916845e-12
46 1.013284e-12 1.204188e-12
47 -3.665830e-13 1.013284e-12
48 6.093722e-13 -3.665830e-13
49 -2.857702e-13 6.093722e-13
50 -7.880863e-12 -2.857702e-13
51 -5.016976e-13 -7.880863e-12
52 -2.341411e-13 -5.016976e-13
53 2.113893e-13 -2.341411e-13
54 6.253208e-13 2.113893e-13
55 -9.468865e-13 6.253208e-13
56 4.616693e-13 -9.468865e-13
57 2.578772e-13 4.616693e-13
58 1.277897e-12 2.578772e-13
59 -2.621163e-13 1.277897e-12
60 1.825821e-12 -2.621163e-13
61 1.464428e-12 1.825821e-12
62 -6.212706e-12 1.464428e-12
63 2.349018e-13 -6.212706e-12
64 4.418327e-13 2.349018e-13
65 4.369118e-13 4.418327e-13
66 1.257700e-12 4.369118e-13
67 5.755019e-13 1.257700e-12
68 -2.194504e-13 5.755019e-13
69 2.210532e-13 -2.194504e-13
70 8.695660e-13 2.210532e-13
71 1.445253e-12 8.695660e-13
72 2.094509e-12 1.445253e-12
73 1.334913e-12 2.094509e-12
74 -7.936224e-12 1.334913e-12
75 2.187357e-12 -7.936224e-12
76 1.628940e-12 2.187357e-12
77 1.128822e-12 1.628940e-12
78 1.646084e-12 1.128822e-12
79 1.784804e-12 1.646084e-12
80 8.203668e-13 1.784804e-12
81 2.078343e-13 8.203668e-13
82 -5.101454e-13 2.078343e-13
83 2.301176e-13 -5.101454e-13
84 1.385747e-12 2.301176e-13
85 1.630324e-12 1.385747e-12
86 -7.625378e-12 1.630324e-12
87 1.812860e-12 -7.625378e-12
88 5.391682e-14 1.812860e-12
89 -7.216607e-13 5.391682e-14
90 6.426593e-13 -7.216607e-13
91 8.841329e-13 6.426593e-13
92 1.039425e-12 8.841329e-13
93 1.197946e-12 1.039425e-12
94 -2.236319e-13 1.197946e-12
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/7wcr61258645334.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/8isik1258645334.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/9sw251258645334.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/www/html/rcomp/tmp/105drq1258645334.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/html/rcomp/tmp/116vuf1258645334.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/html/rcomp/tmp/122ye11258645334.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/html/rcomp/tmp/13fc7q1258645334.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/html/rcomp/tmp/14rl8a1258645334.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/www/html/rcomp/tmp/15j9rj1258645334.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/www/html/rcomp/tmp/16v3bz1258645334.tab")
+ }
>
> system("convert tmp/1p0k91258645334.ps tmp/1p0k91258645334.png")
> system("convert tmp/2qhxc1258645334.ps tmp/2qhxc1258645334.png")
> system("convert tmp/3ji0c1258645334.ps tmp/3ji0c1258645334.png")
> system("convert tmp/4ucep1258645334.ps tmp/4ucep1258645334.png")
> system("convert tmp/516b71258645334.ps tmp/516b71258645334.png")
> system("convert tmp/6pucb1258645334.ps tmp/6pucb1258645334.png")
> system("convert tmp/7wcr61258645334.ps tmp/7wcr61258645334.png")
> system("convert tmp/8isik1258645334.ps tmp/8isik1258645334.png")
> system("convert tmp/9sw251258645334.ps tmp/9sw251258645334.png")
> system("convert tmp/105drq1258645334.ps tmp/105drq1258645334.png")
>
>
> proc.time()
user system elapsed
2.829 1.693 4.126