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(2.155,22.782,2.172,19.169,2.15,13.807,2.533,29.743,2.058,25.591,2.16,29.096,2.26,26.482,2.498,22.405,2.695,27.044,2.799,17.97,2.947,18.73,2.93,19.684,2.318,19.785,2.54,18.479,2.57,10.698,2.669,31.956,2.45,29.506,2.842,34.506,3.44,27.165,2.678,26.736,2.981,23.691,2.26,18.157,2.844,17.328,2.546,18.205,2.456,20.995,2.295,17.382,2.379,9.367,2.479,31.124,2.057,26.551,2.28,30.651,2.351,25.859,2.276,25.1,2.548,25.778,2.311,20.418,2.201,18.688,2.725,20.424,2.408,24.776,2.139,19.814,1.898,12.738,2.537,31.566,2.069,30.111,2.063,30.019,2.524,31.934,2.437,25.826,2.189,26.835,2.793,20.205,2.074,17.789,2.622,20.52,2.278,22.518,2.144,15.572,2.427,11.509,2.139,25.447,1.828,24.09,2.072,27.786,1.8,26.195,1.758,20.516,2.246,22.759,1.987,19.028,1.868,16.971,2.514,20.036,2.121,22.485),dim=c(2,61),dimnames=list(c('geb','auto'),1:61))
> y <- array(NA,dim=c(2,61),dimnames=list(c('geb','auto'),1:61))
> 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
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
geb auto
1 2.155 22.782
2 2.172 19.169
3 2.150 13.807
4 2.533 29.743
5 2.058 25.591
6 2.160 29.096
7 2.260 26.482
8 2.498 22.405
9 2.695 27.044
10 2.799 17.970
11 2.947 18.730
12 2.930 19.684
13 2.318 19.785
14 2.540 18.479
15 2.570 10.698
16 2.669 31.956
17 2.450 29.506
18 2.842 34.506
19 3.440 27.165
20 2.678 26.736
21 2.981 23.691
22 2.260 18.157
23 2.844 17.328
24 2.546 18.205
25 2.456 20.995
26 2.295 17.382
27 2.379 9.367
28 2.479 31.124
29 2.057 26.551
30 2.280 30.651
31 2.351 25.859
32 2.276 25.100
33 2.548 25.778
34 2.311 20.418
35 2.201 18.688
36 2.725 20.424
37 2.408 24.776
38 2.139 19.814
39 1.898 12.738
40 2.537 31.566
41 2.069 30.111
42 2.063 30.019
43 2.524 31.934
44 2.437 25.826
45 2.189 26.835
46 2.793 20.205
47 2.074 17.789
48 2.622 20.520
49 2.278 22.518
50 2.144 15.572
51 2.427 11.509
52 2.139 25.447
53 1.828 24.090
54 2.072 27.786
55 1.800 26.195
56 1.758 20.516
57 2.246 22.759
58 1.987 19.028
59 1.868 16.971
60 2.514 20.036
61 2.121 22.485
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) auto
2.255687 0.005181
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-0.60397 -0.21933 -0.04018 0.18858 1.04358
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.255687 0.174453 12.930 <2e-16 ***
auto 0.005181 0.007439 0.696 0.489
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.3291 on 59 degrees of freedom
Multiple R-squared: 0.008152, Adjusted R-squared: -0.008659
F-statistic: 0.4849 on 1 and 59 DF, p-value: 0.4889
> 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.15527206 0.31054411 0.84472794
[2,] 0.08824256 0.17648513 0.91175744
[3,] 0.03615269 0.07230538 0.96384731
[4,] 0.05140793 0.10281587 0.94859207
[5,] 0.10331303 0.20662606 0.89668697
[6,] 0.26960986 0.53921971 0.73039014
[7,] 0.47938532 0.95877065 0.52061468
[8,] 0.59624813 0.80750375 0.40375187
[9,] 0.51580476 0.96839049 0.48419524
[10,] 0.43016785 0.86033570 0.56983215
[11,] 0.35913309 0.71826617 0.64086691
[12,] 0.33984754 0.67969508 0.66015246
[13,] 0.26247073 0.52494145 0.73752927
[14,] 0.29865228 0.59730456 0.70134772
[15,] 0.86937796 0.26124408 0.13062204
[16,] 0.85189305 0.29621389 0.14810695
[17,] 0.92798231 0.14403537 0.07201769
[18,] 0.90863966 0.18272068 0.09136034
[19,] 0.94423940 0.11152120 0.05576060
[20,] 0.93307402 0.13385195 0.06692598
[21,] 0.91417012 0.17165976 0.08582988
[22,] 0.89041295 0.21917410 0.10958705
[23,] 0.86267253 0.27465493 0.13732747
[24,] 0.83251741 0.33496518 0.16748259
[25,] 0.85478997 0.29042007 0.14521003
[26,] 0.82521686 0.34956628 0.17478314
[27,] 0.78287025 0.43425951 0.21712975
[28,] 0.73892039 0.52215922 0.26107961
[29,] 0.71354635 0.57290729 0.28645365
[30,] 0.65973615 0.68052770 0.34026385
[31,] 0.61056210 0.77887580 0.38943790
[32,] 0.69326929 0.61346142 0.30673071
[33,] 0.64604212 0.70791576 0.35395788
[34,] 0.60440773 0.79118454 0.39559227
[35,] 0.63739059 0.72521883 0.36260941
[36,] 0.63139295 0.73721411 0.36860705
[37,] 0.60916191 0.78167619 0.39083809
[38,] 0.58121080 0.83757840 0.41878920
[39,] 0.59213779 0.81572443 0.40786221
[40,] 0.57729851 0.84540299 0.42270149
[41,] 0.51671203 0.96657595 0.48328797
[42,] 0.75741870 0.48516260 0.24258130
[43,] 0.70764744 0.58470511 0.29235256
[44,] 0.83640452 0.32719097 0.16359548
[45,] 0.81008784 0.37982432 0.18991216
[46,] 0.73768784 0.52462431 0.26231216
[47,] 0.70983607 0.58032786 0.29016393
[48,] 0.63200916 0.73598169 0.36799084
[49,] 0.60607359 0.78785282 0.39392641
[50,] 0.48902524 0.97805047 0.51097476
[51,] 0.54836067 0.90327866 0.45163933
[52,] 0.64013077 0.71973845 0.35986923
> postscript(file="/var/www/html/rcomp/tmp/1bnkc1258721188.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/231pw1258721188.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/32rsu1258721188.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/4hczm1258721188.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/5f2u91258721188.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 = 61
Frequency = 1
1 2 3 4 5 6
-0.21871008 -0.18299272 -0.17721455 0.12322804 -0.33026227 -0.24642014
7 8 9 10 11 12
-0.13287815 0.12624299 0.29921037 0.45021878 0.59428155 0.57233930
13 14 15 16 17 18
-0.04018394 0.18858187 0.25889181 0.24776346 0.04145584 0.40755303
19 20 21 22 23 24
1.04358353 0.28380599 0.60258079 -0.08974999 0.49854470 0.19600134
25 26 27 28 29 30
0.09154758 -0.05073505 0.07478713 0.06207369 -0.33623561 -0.13447591
31 32 33 34 35 36
-0.03865066 -0.10971862 0.15876896 -0.05046323 -0.15150087 0.36350568
37 38 39 40 41 42
0.02395988 -0.21933418 -0.42367653 0.11778388 -0.34267840 -0.34820179
43 44 45 46 47 48
0.10287744 0.04752030 -0.20570689 0.43264022 -0.27384354 0.26000835
49 50 51 52 53 54
-0.09434241 -0.19235824 0.11169038 -0.24851627 -0.55248625 -0.32763360
55 56 57 58 59 60
-0.59139133 -0.60397093 -0.12759093 -0.36726226 -0.47560584 0.15451574
61
-0.25117145
> postscript(file="/var/www/html/rcomp/tmp/6tw6y1258721188.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 = 61
Frequency = 1
lag(myerror, k = 1) myerror
0 -0.21871008 NA
1 -0.18299272 -0.21871008
2 -0.17721455 -0.18299272
3 0.12322804 -0.17721455
4 -0.33026227 0.12322804
5 -0.24642014 -0.33026227
6 -0.13287815 -0.24642014
7 0.12624299 -0.13287815
8 0.29921037 0.12624299
9 0.45021878 0.29921037
10 0.59428155 0.45021878
11 0.57233930 0.59428155
12 -0.04018394 0.57233930
13 0.18858187 -0.04018394
14 0.25889181 0.18858187
15 0.24776346 0.25889181
16 0.04145584 0.24776346
17 0.40755303 0.04145584
18 1.04358353 0.40755303
19 0.28380599 1.04358353
20 0.60258079 0.28380599
21 -0.08974999 0.60258079
22 0.49854470 -0.08974999
23 0.19600134 0.49854470
24 0.09154758 0.19600134
25 -0.05073505 0.09154758
26 0.07478713 -0.05073505
27 0.06207369 0.07478713
28 -0.33623561 0.06207369
29 -0.13447591 -0.33623561
30 -0.03865066 -0.13447591
31 -0.10971862 -0.03865066
32 0.15876896 -0.10971862
33 -0.05046323 0.15876896
34 -0.15150087 -0.05046323
35 0.36350568 -0.15150087
36 0.02395988 0.36350568
37 -0.21933418 0.02395988
38 -0.42367653 -0.21933418
39 0.11778388 -0.42367653
40 -0.34267840 0.11778388
41 -0.34820179 -0.34267840
42 0.10287744 -0.34820179
43 0.04752030 0.10287744
44 -0.20570689 0.04752030
45 0.43264022 -0.20570689
46 -0.27384354 0.43264022
47 0.26000835 -0.27384354
48 -0.09434241 0.26000835
49 -0.19235824 -0.09434241
50 0.11169038 -0.19235824
51 -0.24851627 0.11169038
52 -0.55248625 -0.24851627
53 -0.32763360 -0.55248625
54 -0.59139133 -0.32763360
55 -0.60397093 -0.59139133
56 -0.12759093 -0.60397093
57 -0.36726226 -0.12759093
58 -0.47560584 -0.36726226
59 0.15451574 -0.47560584
60 -0.25117145 0.15451574
61 NA -0.25117145
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.18299272 -0.21871008
[2,] -0.17721455 -0.18299272
[3,] 0.12322804 -0.17721455
[4,] -0.33026227 0.12322804
[5,] -0.24642014 -0.33026227
[6,] -0.13287815 -0.24642014
[7,] 0.12624299 -0.13287815
[8,] 0.29921037 0.12624299
[9,] 0.45021878 0.29921037
[10,] 0.59428155 0.45021878
[11,] 0.57233930 0.59428155
[12,] -0.04018394 0.57233930
[13,] 0.18858187 -0.04018394
[14,] 0.25889181 0.18858187
[15,] 0.24776346 0.25889181
[16,] 0.04145584 0.24776346
[17,] 0.40755303 0.04145584
[18,] 1.04358353 0.40755303
[19,] 0.28380599 1.04358353
[20,] 0.60258079 0.28380599
[21,] -0.08974999 0.60258079
[22,] 0.49854470 -0.08974999
[23,] 0.19600134 0.49854470
[24,] 0.09154758 0.19600134
[25,] -0.05073505 0.09154758
[26,] 0.07478713 -0.05073505
[27,] 0.06207369 0.07478713
[28,] -0.33623561 0.06207369
[29,] -0.13447591 -0.33623561
[30,] -0.03865066 -0.13447591
[31,] -0.10971862 -0.03865066
[32,] 0.15876896 -0.10971862
[33,] -0.05046323 0.15876896
[34,] -0.15150087 -0.05046323
[35,] 0.36350568 -0.15150087
[36,] 0.02395988 0.36350568
[37,] -0.21933418 0.02395988
[38,] -0.42367653 -0.21933418
[39,] 0.11778388 -0.42367653
[40,] -0.34267840 0.11778388
[41,] -0.34820179 -0.34267840
[42,] 0.10287744 -0.34820179
[43,] 0.04752030 0.10287744
[44,] -0.20570689 0.04752030
[45,] 0.43264022 -0.20570689
[46,] -0.27384354 0.43264022
[47,] 0.26000835 -0.27384354
[48,] -0.09434241 0.26000835
[49,] -0.19235824 -0.09434241
[50,] 0.11169038 -0.19235824
[51,] -0.24851627 0.11169038
[52,] -0.55248625 -0.24851627
[53,] -0.32763360 -0.55248625
[54,] -0.59139133 -0.32763360
[55,] -0.60397093 -0.59139133
[56,] -0.12759093 -0.60397093
[57,] -0.36726226 -0.12759093
[58,] -0.47560584 -0.36726226
[59,] 0.15451574 -0.47560584
[60,] -0.25117145 0.15451574
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.18299272 -0.21871008
2 -0.17721455 -0.18299272
3 0.12322804 -0.17721455
4 -0.33026227 0.12322804
5 -0.24642014 -0.33026227
6 -0.13287815 -0.24642014
7 0.12624299 -0.13287815
8 0.29921037 0.12624299
9 0.45021878 0.29921037
10 0.59428155 0.45021878
11 0.57233930 0.59428155
12 -0.04018394 0.57233930
13 0.18858187 -0.04018394
14 0.25889181 0.18858187
15 0.24776346 0.25889181
16 0.04145584 0.24776346
17 0.40755303 0.04145584
18 1.04358353 0.40755303
19 0.28380599 1.04358353
20 0.60258079 0.28380599
21 -0.08974999 0.60258079
22 0.49854470 -0.08974999
23 0.19600134 0.49854470
24 0.09154758 0.19600134
25 -0.05073505 0.09154758
26 0.07478713 -0.05073505
27 0.06207369 0.07478713
28 -0.33623561 0.06207369
29 -0.13447591 -0.33623561
30 -0.03865066 -0.13447591
31 -0.10971862 -0.03865066
32 0.15876896 -0.10971862
33 -0.05046323 0.15876896
34 -0.15150087 -0.05046323
35 0.36350568 -0.15150087
36 0.02395988 0.36350568
37 -0.21933418 0.02395988
38 -0.42367653 -0.21933418
39 0.11778388 -0.42367653
40 -0.34267840 0.11778388
41 -0.34820179 -0.34267840
42 0.10287744 -0.34820179
43 0.04752030 0.10287744
44 -0.20570689 0.04752030
45 0.43264022 -0.20570689
46 -0.27384354 0.43264022
47 0.26000835 -0.27384354
48 -0.09434241 0.26000835
49 -0.19235824 -0.09434241
50 0.11169038 -0.19235824
51 -0.24851627 0.11169038
52 -0.55248625 -0.24851627
53 -0.32763360 -0.55248625
54 -0.59139133 -0.32763360
55 -0.60397093 -0.59139133
56 -0.12759093 -0.60397093
57 -0.36726226 -0.12759093
58 -0.47560584 -0.36726226
59 0.15451574 -0.47560584
60 -0.25117145 0.15451574
> 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/7uunn1258721188.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/8k1r01258721188.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/9gy901258721188.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/10fztu1258721188.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/11phdm1258721188.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/121l5y1258721188.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/13gpjx1258721188.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/14iqba1258721188.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/150etc1258721188.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/163yh21258721188.tab")
+ }
>
> system("convert tmp/1bnkc1258721188.ps tmp/1bnkc1258721188.png")
> system("convert tmp/231pw1258721188.ps tmp/231pw1258721188.png")
> system("convert tmp/32rsu1258721188.ps tmp/32rsu1258721188.png")
> system("convert tmp/4hczm1258721188.ps tmp/4hczm1258721188.png")
> system("convert tmp/5f2u91258721188.ps tmp/5f2u91258721188.png")
> system("convert tmp/6tw6y1258721188.ps tmp/6tw6y1258721188.png")
> system("convert tmp/7uunn1258721188.ps tmp/7uunn1258721188.png")
> system("convert tmp/8k1r01258721188.ps tmp/8k1r01258721188.png")
> system("convert tmp/9gy901258721188.ps tmp/9gy901258721188.png")
> system("convert tmp/10fztu1258721188.ps tmp/10fztu1258721188.png")
>
>
> proc.time()
user system elapsed
2.493 1.569 6.641