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(444,454,469,471,443,437,444,451,457,460,454,439,441,446,459,456,433,424,430,428,424,419,409,397,397,413,413,390,385,397,398,406,412,409,404,412,418,434,431,406,416,424,427,401),dim=c(1,44),dimnames=list(c('WLHC'),1:44))
> y <- array(NA,dim=c(1,44),dimnames=list(c('WLHC'),1:44))
> 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
WLHC M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 444 1 0 0 0 0 0 0 0 0 0 0 1
2 454 0 1 0 0 0 0 0 0 0 0 0 2
3 469 0 0 1 0 0 0 0 0 0 0 0 3
4 471 0 0 0 1 0 0 0 0 0 0 0 4
5 443 0 0 0 0 1 0 0 0 0 0 0 5
6 437 0 0 0 0 0 1 0 0 0 0 0 6
7 444 0 0 0 0 0 0 1 0 0 0 0 7
8 451 0 0 0 0 0 0 0 1 0 0 0 8
9 457 0 0 0 0 0 0 0 0 1 0 0 9
10 460 0 0 0 0 0 0 0 0 0 1 0 10
11 454 0 0 0 0 0 0 0 0 0 0 1 11
12 439 0 0 0 0 0 0 0 0 0 0 0 12
13 441 1 0 0 0 0 0 0 0 0 0 0 13
14 446 0 1 0 0 0 0 0 0 0 0 0 14
15 459 0 0 1 0 0 0 0 0 0 0 0 15
16 456 0 0 0 1 0 0 0 0 0 0 0 16
17 433 0 0 0 0 1 0 0 0 0 0 0 17
18 424 0 0 0 0 0 1 0 0 0 0 0 18
19 430 0 0 0 0 0 0 1 0 0 0 0 19
20 428 0 0 0 0 0 0 0 1 0 0 0 20
21 424 0 0 0 0 0 0 0 0 1 0 0 21
22 419 0 0 0 0 0 0 0 0 0 1 0 22
23 409 0 0 0 0 0 0 0 0 0 0 1 23
24 397 0 0 0 0 0 0 0 0 0 0 0 24
25 397 1 0 0 0 0 0 0 0 0 0 0 25
26 413 0 1 0 0 0 0 0 0 0 0 0 26
27 413 0 0 1 0 0 0 0 0 0 0 0 27
28 390 0 0 0 1 0 0 0 0 0 0 0 28
29 385 0 0 0 0 1 0 0 0 0 0 0 29
30 397 0 0 0 0 0 1 0 0 0 0 0 30
31 398 0 0 0 0 0 0 1 0 0 0 0 31
32 406 0 0 0 0 0 0 0 1 0 0 0 32
33 412 0 0 0 0 0 0 0 0 1 0 0 33
34 409 0 0 0 0 0 0 0 0 0 1 0 34
35 404 0 0 0 0 0 0 0 0 0 0 1 35
36 412 0 0 0 0 0 0 0 0 0 0 0 36
37 418 1 0 0 0 0 0 0 0 0 0 0 37
38 434 0 1 0 0 0 0 0 0 0 0 0 38
39 431 0 0 1 0 0 0 0 0 0 0 0 39
40 406 0 0 0 1 0 0 0 0 0 0 0 40
41 416 0 0 0 0 1 0 0 0 0 0 0 41
42 424 0 0 0 0 0 1 0 0 0 0 0 42
43 427 0 0 0 0 0 0 1 0 0 0 0 43
44 401 0 0 0 0 0 0 0 1 0 0 0 44
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) M1 M2 M3 M4 M5
445.833 2.785 15.778 23.271 12.264 2.007
M6 M7 M8 M9 M10 M11
4.500 9.993 7.986 11.271 10.847 5.090
t
-1.243
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-33.292 -7.260 -1.583 10.510 25.875
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 445.8333 10.8000 41.281 < 2e-16 ***
M1 2.7847 12.8183 0.217 0.8294
M2 15.7778 12.8041 1.232 0.2271
M3 23.2708 12.7930 1.819 0.0786 .
M4 12.2639 12.7851 0.959 0.3449
M5 2.0069 12.7803 0.157 0.8762
M6 4.5000 12.7787 0.352 0.7271
M7 9.9931 12.7803 0.782 0.4402
M8 7.9861 12.7851 0.625 0.5368
M9 11.2708 13.6744 0.824 0.4161
M10 10.8472 13.6670 0.794 0.4334
M11 5.0903 13.6625 0.373 0.7120
t -1.2431 0.2012 -6.177 7.43e-07 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 16.73 on 31 degrees of freedom
Multiple R-squared: 0.6033, Adjusted R-squared: 0.4498
F-statistic: 3.929 on 12 and 31 DF, p-value: 0.001046
> 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.0155628286 0.031125657 0.9844372
[2,] 0.0041665570 0.008333114 0.9958334
[3,] 0.0011900734 0.002380147 0.9988099
[4,] 0.0004959005 0.000991801 0.9995041
[5,] 0.0073859778 0.014771956 0.9926140
[6,] 0.0897441707 0.179488341 0.9102558
[7,] 0.4259900545 0.851980109 0.5740099
[8,] 0.7755979108 0.448804178 0.2244021
[9,] 0.7618698294 0.476260341 0.2381302
[10,] 0.6698128918 0.660374216 0.3301871
[11,] 0.5218784866 0.956243027 0.4781215
[12,] 0.4101951853 0.820390371 0.5898048
[13,] 0.4268044652 0.853608930 0.5731955
> postscript(file="/var/www/html/rcomp/tmp/1xga91291025755.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/2xga91291025755.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/3xga91291025755.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/47pru1291025755.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/57pru1291025755.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 = 44
Frequency = 1
1 2 3 4 5 6
-3.3750000 -5.1250000 3.6250000 17.8750000 1.3750000 -5.8750000
7 8 9 10 11 12
-3.1250000 7.1250000 11.0833333 15.7500000 16.7500000 8.0833333
13 14 15 16 17 18
8.5416667 1.7916667 8.5416667 17.7916667 6.2916667 -3.9583333
19 20 21 22 23 24
-2.2083333 -0.9583333 -7.0000000 -10.3333333 -13.3333333 -19.0000000
25 26 27 28 29 30
-20.5416667 -16.2916667 -22.5416667 -33.2916667 -26.7916667 -16.0416667
31 32 33 34 35 36
-19.2916667 -8.0416667 -4.0833333 -5.4166667 -3.4166667 10.9166667
37 38 39 40 41 42
15.3750000 19.6250000 10.3750000 -2.3750000 19.1250000 25.8750000
43 44
24.6250000 1.8750000
> postscript(file="/var/www/html/rcomp/tmp/67pru1291025755.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 = 44
Frequency = 1
lag(myerror, k = 1) myerror
0 -3.3750000 NA
1 -5.1250000 -3.3750000
2 3.6250000 -5.1250000
3 17.8750000 3.6250000
4 1.3750000 17.8750000
5 -5.8750000 1.3750000
6 -3.1250000 -5.8750000
7 7.1250000 -3.1250000
8 11.0833333 7.1250000
9 15.7500000 11.0833333
10 16.7500000 15.7500000
11 8.0833333 16.7500000
12 8.5416667 8.0833333
13 1.7916667 8.5416667
14 8.5416667 1.7916667
15 17.7916667 8.5416667
16 6.2916667 17.7916667
17 -3.9583333 6.2916667
18 -2.2083333 -3.9583333
19 -0.9583333 -2.2083333
20 -7.0000000 -0.9583333
21 -10.3333333 -7.0000000
22 -13.3333333 -10.3333333
23 -19.0000000 -13.3333333
24 -20.5416667 -19.0000000
25 -16.2916667 -20.5416667
26 -22.5416667 -16.2916667
27 -33.2916667 -22.5416667
28 -26.7916667 -33.2916667
29 -16.0416667 -26.7916667
30 -19.2916667 -16.0416667
31 -8.0416667 -19.2916667
32 -4.0833333 -8.0416667
33 -5.4166667 -4.0833333
34 -3.4166667 -5.4166667
35 10.9166667 -3.4166667
36 15.3750000 10.9166667
37 19.6250000 15.3750000
38 10.3750000 19.6250000
39 -2.3750000 10.3750000
40 19.1250000 -2.3750000
41 25.8750000 19.1250000
42 24.6250000 25.8750000
43 1.8750000 24.6250000
44 NA 1.8750000
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -5.1250000 -3.3750000
[2,] 3.6250000 -5.1250000
[3,] 17.8750000 3.6250000
[4,] 1.3750000 17.8750000
[5,] -5.8750000 1.3750000
[6,] -3.1250000 -5.8750000
[7,] 7.1250000 -3.1250000
[8,] 11.0833333 7.1250000
[9,] 15.7500000 11.0833333
[10,] 16.7500000 15.7500000
[11,] 8.0833333 16.7500000
[12,] 8.5416667 8.0833333
[13,] 1.7916667 8.5416667
[14,] 8.5416667 1.7916667
[15,] 17.7916667 8.5416667
[16,] 6.2916667 17.7916667
[17,] -3.9583333 6.2916667
[18,] -2.2083333 -3.9583333
[19,] -0.9583333 -2.2083333
[20,] -7.0000000 -0.9583333
[21,] -10.3333333 -7.0000000
[22,] -13.3333333 -10.3333333
[23,] -19.0000000 -13.3333333
[24,] -20.5416667 -19.0000000
[25,] -16.2916667 -20.5416667
[26,] -22.5416667 -16.2916667
[27,] -33.2916667 -22.5416667
[28,] -26.7916667 -33.2916667
[29,] -16.0416667 -26.7916667
[30,] -19.2916667 -16.0416667
[31,] -8.0416667 -19.2916667
[32,] -4.0833333 -8.0416667
[33,] -5.4166667 -4.0833333
[34,] -3.4166667 -5.4166667
[35,] 10.9166667 -3.4166667
[36,] 15.3750000 10.9166667
[37,] 19.6250000 15.3750000
[38,] 10.3750000 19.6250000
[39,] -2.3750000 10.3750000
[40,] 19.1250000 -2.3750000
[41,] 25.8750000 19.1250000
[42,] 24.6250000 25.8750000
[43,] 1.8750000 24.6250000
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -5.1250000 -3.3750000
2 3.6250000 -5.1250000
3 17.8750000 3.6250000
4 1.3750000 17.8750000
5 -5.8750000 1.3750000
6 -3.1250000 -5.8750000
7 7.1250000 -3.1250000
8 11.0833333 7.1250000
9 15.7500000 11.0833333
10 16.7500000 15.7500000
11 8.0833333 16.7500000
12 8.5416667 8.0833333
13 1.7916667 8.5416667
14 8.5416667 1.7916667
15 17.7916667 8.5416667
16 6.2916667 17.7916667
17 -3.9583333 6.2916667
18 -2.2083333 -3.9583333
19 -0.9583333 -2.2083333
20 -7.0000000 -0.9583333
21 -10.3333333 -7.0000000
22 -13.3333333 -10.3333333
23 -19.0000000 -13.3333333
24 -20.5416667 -19.0000000
25 -16.2916667 -20.5416667
26 -22.5416667 -16.2916667
27 -33.2916667 -22.5416667
28 -26.7916667 -33.2916667
29 -16.0416667 -26.7916667
30 -19.2916667 -16.0416667
31 -8.0416667 -19.2916667
32 -4.0833333 -8.0416667
33 -5.4166667 -4.0833333
34 -3.4166667 -5.4166667
35 10.9166667 -3.4166667
36 15.3750000 10.9166667
37 19.6250000 15.3750000
38 10.3750000 19.6250000
39 -2.3750000 10.3750000
40 19.1250000 -2.3750000
41 25.8750000 19.1250000
42 24.6250000 25.8750000
43 1.8750000 24.6250000
> 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/70y8x1291025755.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/8b7pi1291025755.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/9b7pi1291025755.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/10b7pi1291025755.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/117z5r1291025755.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/120qmc1291025755.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/13orj51291025755.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/14ziiq1291025755.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/15k1he1291025755.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/16ztfn1291025755.tab")
+ }
>
> try(system("convert tmp/1xga91291025755.ps tmp/1xga91291025755.png",intern=TRUE))
character(0)
> try(system("convert tmp/2xga91291025755.ps tmp/2xga91291025755.png",intern=TRUE))
character(0)
> try(system("convert tmp/3xga91291025755.ps tmp/3xga91291025755.png",intern=TRUE))
character(0)
> try(system("convert tmp/47pru1291025755.ps tmp/47pru1291025755.png",intern=TRUE))
character(0)
> try(system("convert tmp/57pru1291025755.ps tmp/57pru1291025755.png",intern=TRUE))
character(0)
> try(system("convert tmp/67pru1291025755.ps tmp/67pru1291025755.png",intern=TRUE))
character(0)
> try(system("convert tmp/70y8x1291025755.ps tmp/70y8x1291025755.png",intern=TRUE))
character(0)
> try(system("convert tmp/8b7pi1291025755.ps tmp/8b7pi1291025755.png",intern=TRUE))
character(0)
> try(system("convert tmp/9b7pi1291025755.ps tmp/9b7pi1291025755.png",intern=TRUE))
character(0)
> try(system("convert tmp/10b7pi1291025755.ps tmp/10b7pi1291025755.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
2.239 1.554 5.317