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(611,19,594,18,595,19,591,19,589,22,584,23,573,20,567,14,569,14,621,14,629,15,628,11,612,17,595,16,597,20,593,24,590,23,580,20,574,21,573,19,573,23,620,23,626,23,620,23,588,27,566,26,557,17,561,24,549,26,532,24,526,27,511,27,499,26,555,24,565,23,542,23,527,24,510,17,514,21,517,19,508,22,493,22,490,18,469,16,478,14,528,12,534,14,518,16,506,8,502,3,516,0,528,5,533,1,536,1,537,3,524,6,536,7,587,8,597,14,581,14),dim=c(2,60),dimnames=list(c('WHL','ICONS'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('WHL','ICONS'),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
WHL ICONS
1 611 19
2 594 18
3 595 19
4 591 19
5 589 22
6 584 23
7 573 20
8 567 14
9 569 14
10 621 14
11 629 15
12 628 11
13 612 17
14 595 16
15 597 20
16 593 24
17 590 23
18 580 20
19 574 21
20 573 19
21 573 23
22 620 23
23 626 23
24 620 23
25 588 27
26 566 26
27 557 17
28 561 24
29 549 26
30 532 24
31 526 27
32 511 27
33 499 26
34 555 24
35 565 23
36 542 23
37 527 24
38 510 17
39 514 21
40 517 19
41 508 22
42 493 22
43 490 18
44 469 16
45 478 14
46 528 12
47 534 14
48 518 16
49 506 8
50 502 3
51 516 0
52 528 5
53 533 1
54 536 1
55 537 3
56 524 6
57 536 7
58 587 8
59 597 14
60 581 14
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) ICONS
537.427 1.134
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-86.5734 -33.8782 -0.3112 29.2712 78.0973
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 537.427 13.961 38.495 <2e-16 ***
ICONS 1.134 0.745 1.522 0.133
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 41.33 on 58 degrees of freedom
Multiple R-squared: 0.03842, Adjusted R-squared: 0.02184
F-statistic: 2.317 on 1 and 58 DF, p-value: 0.1334
> 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.0154693578 0.0309387156 0.984530642
[2,] 0.0029995899 0.0059991798 0.997000410
[3,] 0.0040432006 0.0080864013 0.995956799
[4,] 0.0053386260 0.0106772520 0.994661374
[5,] 0.0019507008 0.0039014016 0.998049299
[6,] 0.0095487669 0.0190975338 0.990451233
[7,] 0.0209497004 0.0418994008 0.979050300
[8,] 0.0224183623 0.0448367246 0.977581638
[9,] 0.0170678321 0.0341356642 0.982932168
[10,] 0.0102299323 0.0204598646 0.989770068
[11,] 0.0060950188 0.0121900375 0.993904981
[12,] 0.0035640773 0.0071281546 0.996435923
[13,] 0.0019301316 0.0038602632 0.998069868
[14,] 0.0011924007 0.0023848015 0.998807599
[15,] 0.0007830684 0.0015661368 0.999216932
[16,] 0.0006125495 0.0012250989 0.999387451
[17,] 0.0003373991 0.0006747982 0.999662601
[18,] 0.0013781818 0.0027563637 0.998621818
[19,] 0.0071653421 0.0143306842 0.992834658
[20,] 0.0227241479 0.0454482959 0.977275852
[21,] 0.0244216893 0.0488433786 0.975578311
[22,] 0.0270284068 0.0540568136 0.972971593
[23,] 0.0460424928 0.0920849857 0.953957507
[24,] 0.0539602748 0.1079205496 0.946039725
[25,] 0.0655407913 0.1310815827 0.934459209
[26,] 0.1066603338 0.2133206675 0.893339666
[27,] 0.1329506726 0.2659013452 0.867049327
[28,] 0.1869663632 0.3739327264 0.813033637
[29,] 0.2936969993 0.5873939985 0.706303001
[30,] 0.2718260157 0.5436520314 0.728173984
[31,] 0.2899113664 0.5798227328 0.710088634
[32,] 0.2843122863 0.5686245726 0.715687714
[33,] 0.2787209053 0.5574418107 0.721279095
[34,] 0.4175341817 0.8350683634 0.582465818
[35,] 0.4396489794 0.8792979589 0.560351021
[36,] 0.4581658630 0.9163317260 0.541834137
[37,] 0.4563817047 0.9127634094 0.543618295
[38,] 0.5029350958 0.9941298084 0.497064904
[39,] 0.6092654695 0.7814690610 0.390734530
[40,] 0.8560420302 0.2879159396 0.143957970
[41,] 0.9667254077 0.0665491845 0.033274592
[42,] 0.9560033022 0.0879933955 0.043996698
[43,] 0.9413161145 0.1173677710 0.058683885
[44,] 0.9815162871 0.0369674259 0.018483713
[45,] 0.9947987426 0.0104025148 0.005201257
[46,] 0.9959900577 0.0080198847 0.004009942
[47,] 0.9894608503 0.0210782994 0.010539150
[48,] 0.9806737956 0.0386524088 0.019326204
[49,] 0.9533770674 0.0932458652 0.046622933
[50,] 0.9084260246 0.1831479508 0.091573975
[51,] 0.8157794425 0.3684411149 0.184220557
> postscript(file="/var/www/html/rcomp/tmp/1sfap1261066900.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/2fp3q1261066900.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/3akih1261066900.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/4pab31261066900.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/570ms1261066900.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 = 60
Frequency = 1
1 2 3 4 5 6 7
52.024196 36.158337 36.024196 32.024196 26.621772 20.487631 12.890055
8 9 10 11 12 13 14
13.694901 15.694901 67.694901 74.560760 78.097325 55.292478 39.426619
15 16 17 18 19 20 21
36.890055 28.353490 26.487631 19.890055 12.755914 14.024196 9.487631
22 23 24 25 26 27 28
56.487631 62.487631 56.487631 19.951067 -0.914792 0.292478 -3.646510
29 30 31 32 33 34 35
-17.914792 -32.646510 -42.048933 -57.048933 -67.914792 -9.646510 1.487631
36 37 38 39 40 41 42
-21.512369 -37.646510 -46.707522 -47.244086 -41.975804 -54.378228 -69.378228
43 44 45 46 47 48 49
-67.841663 -86.573381 -75.305099 -23.036816 -19.305099 -37.573381 -40.500252
50 51 52 53 54 55 56
-38.829546 -21.427123 -15.097829 -5.561264 -2.561264 -3.829546 -20.231970
57 58 59 60
-9.366111 40.499748 43.694901 27.694901
> postscript(file="/var/www/html/rcomp/tmp/6i5j31261066900.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 = 60
Frequency = 1
lag(myerror, k = 1) myerror
0 52.024196 NA
1 36.158337 52.024196
2 36.024196 36.158337
3 32.024196 36.024196
4 26.621772 32.024196
5 20.487631 26.621772
6 12.890055 20.487631
7 13.694901 12.890055
8 15.694901 13.694901
9 67.694901 15.694901
10 74.560760 67.694901
11 78.097325 74.560760
12 55.292478 78.097325
13 39.426619 55.292478
14 36.890055 39.426619
15 28.353490 36.890055
16 26.487631 28.353490
17 19.890055 26.487631
18 12.755914 19.890055
19 14.024196 12.755914
20 9.487631 14.024196
21 56.487631 9.487631
22 62.487631 56.487631
23 56.487631 62.487631
24 19.951067 56.487631
25 -0.914792 19.951067
26 0.292478 -0.914792
27 -3.646510 0.292478
28 -17.914792 -3.646510
29 -32.646510 -17.914792
30 -42.048933 -32.646510
31 -57.048933 -42.048933
32 -67.914792 -57.048933
33 -9.646510 -67.914792
34 1.487631 -9.646510
35 -21.512369 1.487631
36 -37.646510 -21.512369
37 -46.707522 -37.646510
38 -47.244086 -46.707522
39 -41.975804 -47.244086
40 -54.378228 -41.975804
41 -69.378228 -54.378228
42 -67.841663 -69.378228
43 -86.573381 -67.841663
44 -75.305099 -86.573381
45 -23.036816 -75.305099
46 -19.305099 -23.036816
47 -37.573381 -19.305099
48 -40.500252 -37.573381
49 -38.829546 -40.500252
50 -21.427123 -38.829546
51 -15.097829 -21.427123
52 -5.561264 -15.097829
53 -2.561264 -5.561264
54 -3.829546 -2.561264
55 -20.231970 -3.829546
56 -9.366111 -20.231970
57 40.499748 -9.366111
58 43.694901 40.499748
59 27.694901 43.694901
60 NA 27.694901
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 36.158337 52.024196
[2,] 36.024196 36.158337
[3,] 32.024196 36.024196
[4,] 26.621772 32.024196
[5,] 20.487631 26.621772
[6,] 12.890055 20.487631
[7,] 13.694901 12.890055
[8,] 15.694901 13.694901
[9,] 67.694901 15.694901
[10,] 74.560760 67.694901
[11,] 78.097325 74.560760
[12,] 55.292478 78.097325
[13,] 39.426619 55.292478
[14,] 36.890055 39.426619
[15,] 28.353490 36.890055
[16,] 26.487631 28.353490
[17,] 19.890055 26.487631
[18,] 12.755914 19.890055
[19,] 14.024196 12.755914
[20,] 9.487631 14.024196
[21,] 56.487631 9.487631
[22,] 62.487631 56.487631
[23,] 56.487631 62.487631
[24,] 19.951067 56.487631
[25,] -0.914792 19.951067
[26,] 0.292478 -0.914792
[27,] -3.646510 0.292478
[28,] -17.914792 -3.646510
[29,] -32.646510 -17.914792
[30,] -42.048933 -32.646510
[31,] -57.048933 -42.048933
[32,] -67.914792 -57.048933
[33,] -9.646510 -67.914792
[34,] 1.487631 -9.646510
[35,] -21.512369 1.487631
[36,] -37.646510 -21.512369
[37,] -46.707522 -37.646510
[38,] -47.244086 -46.707522
[39,] -41.975804 -47.244086
[40,] -54.378228 -41.975804
[41,] -69.378228 -54.378228
[42,] -67.841663 -69.378228
[43,] -86.573381 -67.841663
[44,] -75.305099 -86.573381
[45,] -23.036816 -75.305099
[46,] -19.305099 -23.036816
[47,] -37.573381 -19.305099
[48,] -40.500252 -37.573381
[49,] -38.829546 -40.500252
[50,] -21.427123 -38.829546
[51,] -15.097829 -21.427123
[52,] -5.561264 -15.097829
[53,] -2.561264 -5.561264
[54,] -3.829546 -2.561264
[55,] -20.231970 -3.829546
[56,] -9.366111 -20.231970
[57,] 40.499748 -9.366111
[58,] 43.694901 40.499748
[59,] 27.694901 43.694901
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 36.158337 52.024196
2 36.024196 36.158337
3 32.024196 36.024196
4 26.621772 32.024196
5 20.487631 26.621772
6 12.890055 20.487631
7 13.694901 12.890055
8 15.694901 13.694901
9 67.694901 15.694901
10 74.560760 67.694901
11 78.097325 74.560760
12 55.292478 78.097325
13 39.426619 55.292478
14 36.890055 39.426619
15 28.353490 36.890055
16 26.487631 28.353490
17 19.890055 26.487631
18 12.755914 19.890055
19 14.024196 12.755914
20 9.487631 14.024196
21 56.487631 9.487631
22 62.487631 56.487631
23 56.487631 62.487631
24 19.951067 56.487631
25 -0.914792 19.951067
26 0.292478 -0.914792
27 -3.646510 0.292478
28 -17.914792 -3.646510
29 -32.646510 -17.914792
30 -42.048933 -32.646510
31 -57.048933 -42.048933
32 -67.914792 -57.048933
33 -9.646510 -67.914792
34 1.487631 -9.646510
35 -21.512369 1.487631
36 -37.646510 -21.512369
37 -46.707522 -37.646510
38 -47.244086 -46.707522
39 -41.975804 -47.244086
40 -54.378228 -41.975804
41 -69.378228 -54.378228
42 -67.841663 -69.378228
43 -86.573381 -67.841663
44 -75.305099 -86.573381
45 -23.036816 -75.305099
46 -19.305099 -23.036816
47 -37.573381 -19.305099
48 -40.500252 -37.573381
49 -38.829546 -40.500252
50 -21.427123 -38.829546
51 -15.097829 -21.427123
52 -5.561264 -15.097829
53 -2.561264 -5.561264
54 -3.829546 -2.561264
55 -20.231970 -3.829546
56 -9.366111 -20.231970
57 40.499748 -9.366111
58 43.694901 40.499748
59 27.694901 43.694901
> 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/78w6u1261066901.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/8qh8w1261066901.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/9hrtl1261066901.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/104y131261066901.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/1144ba1261066901.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/12o7ir1261066901.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/13gdlx1261066901.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/141thj1261066901.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/15kypz1261066901.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/16j71g1261066901.tab")
+ }
>
> try(system("convert tmp/1sfap1261066900.ps tmp/1sfap1261066900.png",intern=TRUE))
character(0)
> try(system("convert tmp/2fp3q1261066900.ps tmp/2fp3q1261066900.png",intern=TRUE))
character(0)
> try(system("convert tmp/3akih1261066900.ps tmp/3akih1261066900.png",intern=TRUE))
character(0)
> try(system("convert tmp/4pab31261066900.ps tmp/4pab31261066900.png",intern=TRUE))
character(0)
> try(system("convert tmp/570ms1261066900.ps tmp/570ms1261066900.png",intern=TRUE))
character(0)
> try(system("convert tmp/6i5j31261066900.ps tmp/6i5j31261066900.png",intern=TRUE))
character(0)
> try(system("convert tmp/78w6u1261066901.ps tmp/78w6u1261066901.png",intern=TRUE))
character(0)
> try(system("convert tmp/8qh8w1261066901.ps tmp/8qh8w1261066901.png",intern=TRUE))
character(0)
> try(system("convert tmp/9hrtl1261066901.ps tmp/9hrtl1261066901.png",intern=TRUE))
character(0)
> try(system("convert tmp/104y131261066901.ps tmp/104y131261066901.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
2.437 1.569 2.900