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(493,797,514,840,522,988,490,819,484,831,506,904,501,814,462,798,465,828,454,789,464,930,427,744,460,832,473,826,465,907,422,776,415,835,413,715,420,729,363,733,376,736,380,712,384,711,346,667,389,799,407,661,393,692,346,649,348,729,353,622,364,671,305,635,307,648,312,745,312,624,286,477,324,710,336,515,327,461,302,590,299,415,311,554,315,585,264,513,278,591,278,561,287,684,279,668,324,795,354,776,354,1,043,360,964,363,762,385,1,030,412,939,370,779,389,918,395,839,417,874,404,840),dim=c(2,60),dimnames=list(c('WLH','Faill'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('WLH','Faill'),1:60))
> 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
WLH Faill
1 493 797
2 514 840
3 522 988
4 490 819
5 484 831
6 506 904
7 501 814
8 462 798
9 465 828
10 454 789
11 464 930
12 427 744
13 460 832
14 473 826
15 465 907
16 422 776
17 415 835
18 413 715
19 420 729
20 363 733
21 376 736
22 380 712
23 384 711
24 346 667
25 389 799
26 407 661
27 393 692
28 346 649
29 348 729
30 353 622
31 364 671
32 305 635
33 307 648
34 312 745
35 312 624
36 286 477
37 324 710
38 336 515
39 327 461
40 302 590
41 299 415
42 311 554
43 315 585
44 264 513
45 278 591
46 278 561
47 287 684
48 279 668
49 324 795
50 354 776
51 354 1
52 43 360
53 964 363
54 762 385
55 1 30
56 412 939
57 370 779
58 389 918
59 395 839
60 417 874
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Faill
238.2527 0.2167
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-273.27 -53.22 -19.85 33.01 647.08
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 238.25273 60.64364 3.929 0.00023 ***
Faill 0.21671 0.08524 2.542 0.01370 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 126.2 on 58 degrees of freedom
Multiple R-squared: 0.1003, Adjusted R-squared: 0.08476
F-statistic: 6.464 on 1 and 58 DF, p-value: 0.0137
> 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,] 1.127719e-03 2.255438e-03 0.998872281
[2,] 8.818142e-05 1.763628e-04 0.999911819
[3,] 7.816538e-06 1.563308e-05 0.999992183
[4,] 8.147253e-06 1.629451e-05 0.999991853
[5,] 3.469651e-06 6.939303e-06 0.999996530
[6,] 1.110934e-06 2.221868e-06 0.999998889
[7,] 1.428741e-06 2.857482e-06 0.999998571
[8,] 8.104010e-07 1.620802e-06 0.999999190
[9,] 1.862630e-07 3.725259e-07 0.999999814
[10,] 3.105440e-08 6.210879e-08 0.999999969
[11,] 1.141279e-08 2.282558e-08 0.999999989
[12,] 7.307796e-09 1.461559e-08 0.999999993
[13,] 1.318057e-08 2.636114e-08 0.999999987
[14,] 3.476766e-09 6.953531e-09 0.999999997
[15,] 7.632160e-10 1.526432e-09 0.999999999
[16,] 1.958162e-09 3.916324e-09 0.999999998
[17,] 1.207067e-09 2.414135e-09 0.999999999
[18,] 3.611393e-10 7.222786e-10 1.000000000
[19,] 8.882821e-11 1.776564e-10 1.000000000
[20,] 2.923885e-11 5.847770e-11 1.000000000
[21,] 2.189409e-11 4.378818e-11 1.000000000
[22,] 7.420328e-12 1.484066e-11 1.000000000
[23,] 1.475347e-12 2.950694e-12 1.000000000
[24,] 3.524450e-13 7.048900e-13 1.000000000
[25,] 2.934235e-13 5.868471e-13 1.000000000
[26,] 5.523539e-14 1.104708e-13 1.000000000
[27,] 1.048842e-14 2.097684e-14 1.000000000
[28,] 5.221851e-15 1.044370e-14 1.000000000
[29,] 2.541861e-15 5.083721e-15 1.000000000
[30,] 1.436455e-14 2.872910e-14 1.000000000
[31,] 3.286409e-15 6.572817e-15 1.000000000
[32,] 9.850391e-16 1.970078e-15 1.000000000
[33,] 6.516300e-16 1.303260e-15 1.000000000
[34,] 3.493147e-16 6.986294e-16 1.000000000
[35,] 2.425328e-16 4.850655e-16 1.000000000
[36,] 5.813582e-17 1.162716e-16 1.000000000
[37,] 2.382801e-17 4.765603e-17 1.000000000
[38,] 4.267374e-18 8.534749e-18 1.000000000
[39,] 7.876384e-19 1.575277e-18 1.000000000
[40,] 2.071431e-19 4.142862e-19 1.000000000
[41,] 9.177953e-20 1.835591e-19 1.000000000
[42,] 2.542652e-20 5.085304e-20 1.000000000
[43,] 4.366901e-20 8.733803e-20 1.000000000
[44,] 6.296703e-20 1.259341e-19 1.000000000
[45,] 1.441943e-19 2.883887e-19 1.000000000
[46,] 5.375561e-20 1.075112e-19 1.000000000
[47,] 2.659736e-16 5.319472e-16 1.000000000
[48,] 5.324009e-13 1.064802e-12 1.000000000
[49,] 4.130120e-03 8.260239e-03 0.995869880
[50,] 9.982139e-01 3.572292e-03 0.001786146
[51,] 9.974860e-01 5.028051e-03 0.002514026
> postscript(file="/var/www/html/rcomp/tmp/1x6851293305584.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/www/html/rcomp/tmp/2x6851293305584.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/www/html/rcomp/tmp/3qgpq1293305584.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/www/html/rcomp/tmp/4qgpq1293305584.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/www/html/rcomp/tmp/5qgpq1293305584.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 = 60
Frequency = 1
1 2 3 4 5 6
82.030608 93.712143 69.639288 74.263021 65.662520 71.842801
7 8 9 10 11 12
86.346564 50.813900 47.312645 44.764276 24.208380 27.516157
13 14 15 16 17 18
41.445811 55.746062 30.192675 15.581486 -4.204314 19.800703
19 20 21 22 23 24
23.766785 -34.100049 -21.750175 -12.549171 -8.332463 -36.797290
25 26 27 28 29 30
-22.402809 25.502961 4.784998 -32.896537 -48.233215 -20.045408
31 32 33 34 35 36
-19.664124 -70.862618 -71.679829 -87.700551 -61.478825 -55.622679
37 38 39 40 41 42
-68.115754 -13.857601 -11.155343 -64.110737 -29.186753 -47.309232
43 44 45 46 47 48
-50.027194 -85.424184 -88.327445 -81.826191 -99.481334 -104.013998
49 50 51 52 53 54
-86.535975 -52.418514 115.530558 -273.267787 647.082088 440.314501
55 56 57 58 59 60
-243.753988 -29.741996 -37.068639 -48.191118 -25.071148 -10.655945
> postscript(file="/var/www/html/rcomp/tmp/617ot1293305584.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 = 60
Frequency = 1
lag(myerror, k = 1) myerror
0 82.030608 NA
1 93.712143 82.030608
2 69.639288 93.712143
3 74.263021 69.639288
4 65.662520 74.263021
5 71.842801 65.662520
6 86.346564 71.842801
7 50.813900 86.346564
8 47.312645 50.813900
9 44.764276 47.312645
10 24.208380 44.764276
11 27.516157 24.208380
12 41.445811 27.516157
13 55.746062 41.445811
14 30.192675 55.746062
15 15.581486 30.192675
16 -4.204314 15.581486
17 19.800703 -4.204314
18 23.766785 19.800703
19 -34.100049 23.766785
20 -21.750175 -34.100049
21 -12.549171 -21.750175
22 -8.332463 -12.549171
23 -36.797290 -8.332463
24 -22.402809 -36.797290
25 25.502961 -22.402809
26 4.784998 25.502961
27 -32.896537 4.784998
28 -48.233215 -32.896537
29 -20.045408 -48.233215
30 -19.664124 -20.045408
31 -70.862618 -19.664124
32 -71.679829 -70.862618
33 -87.700551 -71.679829
34 -61.478825 -87.700551
35 -55.622679 -61.478825
36 -68.115754 -55.622679
37 -13.857601 -68.115754
38 -11.155343 -13.857601
39 -64.110737 -11.155343
40 -29.186753 -64.110737
41 -47.309232 -29.186753
42 -50.027194 -47.309232
43 -85.424184 -50.027194
44 -88.327445 -85.424184
45 -81.826191 -88.327445
46 -99.481334 -81.826191
47 -104.013998 -99.481334
48 -86.535975 -104.013998
49 -52.418514 -86.535975
50 115.530558 -52.418514
51 -273.267787 115.530558
52 647.082088 -273.267787
53 440.314501 647.082088
54 -243.753988 440.314501
55 -29.741996 -243.753988
56 -37.068639 -29.741996
57 -48.191118 -37.068639
58 -25.071148 -48.191118
59 -10.655945 -25.071148
60 NA -10.655945
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 93.712143 82.030608
[2,] 69.639288 93.712143
[3,] 74.263021 69.639288
[4,] 65.662520 74.263021
[5,] 71.842801 65.662520
[6,] 86.346564 71.842801
[7,] 50.813900 86.346564
[8,] 47.312645 50.813900
[9,] 44.764276 47.312645
[10,] 24.208380 44.764276
[11,] 27.516157 24.208380
[12,] 41.445811 27.516157
[13,] 55.746062 41.445811
[14,] 30.192675 55.746062
[15,] 15.581486 30.192675
[16,] -4.204314 15.581486
[17,] 19.800703 -4.204314
[18,] 23.766785 19.800703
[19,] -34.100049 23.766785
[20,] -21.750175 -34.100049
[21,] -12.549171 -21.750175
[22,] -8.332463 -12.549171
[23,] -36.797290 -8.332463
[24,] -22.402809 -36.797290
[25,] 25.502961 -22.402809
[26,] 4.784998 25.502961
[27,] -32.896537 4.784998
[28,] -48.233215 -32.896537
[29,] -20.045408 -48.233215
[30,] -19.664124 -20.045408
[31,] -70.862618 -19.664124
[32,] -71.679829 -70.862618
[33,] -87.700551 -71.679829
[34,] -61.478825 -87.700551
[35,] -55.622679 -61.478825
[36,] -68.115754 -55.622679
[37,] -13.857601 -68.115754
[38,] -11.155343 -13.857601
[39,] -64.110737 -11.155343
[40,] -29.186753 -64.110737
[41,] -47.309232 -29.186753
[42,] -50.027194 -47.309232
[43,] -85.424184 -50.027194
[44,] -88.327445 -85.424184
[45,] -81.826191 -88.327445
[46,] -99.481334 -81.826191
[47,] -104.013998 -99.481334
[48,] -86.535975 -104.013998
[49,] -52.418514 -86.535975
[50,] 115.530558 -52.418514
[51,] -273.267787 115.530558
[52,] 647.082088 -273.267787
[53,] 440.314501 647.082088
[54,] -243.753988 440.314501
[55,] -29.741996 -243.753988
[56,] -37.068639 -29.741996
[57,] -48.191118 -37.068639
[58,] -25.071148 -48.191118
[59,] -10.655945 -25.071148
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 93.712143 82.030608
2 69.639288 93.712143
3 74.263021 69.639288
4 65.662520 74.263021
5 71.842801 65.662520
6 86.346564 71.842801
7 50.813900 86.346564
8 47.312645 50.813900
9 44.764276 47.312645
10 24.208380 44.764276
11 27.516157 24.208380
12 41.445811 27.516157
13 55.746062 41.445811
14 30.192675 55.746062
15 15.581486 30.192675
16 -4.204314 15.581486
17 19.800703 -4.204314
18 23.766785 19.800703
19 -34.100049 23.766785
20 -21.750175 -34.100049
21 -12.549171 -21.750175
22 -8.332463 -12.549171
23 -36.797290 -8.332463
24 -22.402809 -36.797290
25 25.502961 -22.402809
26 4.784998 25.502961
27 -32.896537 4.784998
28 -48.233215 -32.896537
29 -20.045408 -48.233215
30 -19.664124 -20.045408
31 -70.862618 -19.664124
32 -71.679829 -70.862618
33 -87.700551 -71.679829
34 -61.478825 -87.700551
35 -55.622679 -61.478825
36 -68.115754 -55.622679
37 -13.857601 -68.115754
38 -11.155343 -13.857601
39 -64.110737 -11.155343
40 -29.186753 -64.110737
41 -47.309232 -29.186753
42 -50.027194 -47.309232
43 -85.424184 -50.027194
44 -88.327445 -85.424184
45 -81.826191 -88.327445
46 -99.481334 -81.826191
47 -104.013998 -99.481334
48 -86.535975 -104.013998
49 -52.418514 -86.535975
50 115.530558 -52.418514
51 -273.267787 115.530558
52 647.082088 -273.267787
53 440.314501 647.082088
54 -243.753988 440.314501
55 -29.741996 -243.753988
56 -37.068639 -29.741996
57 -48.191118 -37.068639
58 -25.071148 -48.191118
59 -10.655945 -25.071148
> 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/7tgne1293305584.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/www/html/rcomp/tmp/8tgne1293305584.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/www/html/rcomp/tmp/9tgne1293305584.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/www/html/rcomp/tmp/10475h1293305584.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/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/110ioi1293305585.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/123i4o1293305585.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/13ha2f1293305585.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/14kt021293305585.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/156tz81293305585.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/169uge1293305585.tab")
+ }
> try(system("convert tmp/1x6851293305584.ps tmp/1x6851293305584.png",intern=TRUE))
character(0)
> try(system("convert tmp/2x6851293305584.ps tmp/2x6851293305584.png",intern=TRUE))
character(0)
> try(system("convert tmp/3qgpq1293305584.ps tmp/3qgpq1293305584.png",intern=TRUE))
character(0)
> try(system("convert tmp/4qgpq1293305584.ps tmp/4qgpq1293305584.png",intern=TRUE))
character(0)
> try(system("convert tmp/5qgpq1293305584.ps tmp/5qgpq1293305584.png",intern=TRUE))
character(0)
> try(system("convert tmp/617ot1293305584.ps tmp/617ot1293305584.png",intern=TRUE))
character(0)
> try(system("convert tmp/7tgne1293305584.ps tmp/7tgne1293305584.png",intern=TRUE))
character(0)
> try(system("convert tmp/8tgne1293305584.ps tmp/8tgne1293305584.png",intern=TRUE))
character(0)
> try(system("convert tmp/9tgne1293305584.ps tmp/9tgne1293305584.png",intern=TRUE))
character(0)
> try(system("convert tmp/10475h1293305584.ps tmp/10475h1293305584.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
2.535 1.649 6.470