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(121.6,0,118.8,0,114.0,1,111.5,1,97.2,1,102.5,1,113.4,1,109.8,1,104.9,1,126.1,1,80.0,1,96.8,1,117.2,1,112.3,1,117.3,1,111.1,0,102.2,0,104.3,0,122.9,0,107.6,0,121.3,0,131.5,0,89.0,0,104.4,0,128.9,0,135.9,0,133.3,0,121.3,0,120.5,0,120.4,0,137.9,0,126.1,0,133.2,0,151.1,0,105.0,0,119.0,0,140.4,0,156.6,0,137.1,0,122.7,0,125.8,0,139.3,0,134.9,0,149.2,1,132.3,0,149.0,1,117.2,1,119.6,1,152.0,1,149.4,1,127.3,1,114.1,1,102.1,1,107.7,1,104.4,1,102.1,1,96.0,1,109.3,1,90.0,1,83.9,1),dim=c(2,60),dimnames=list(c('Promet','Dummy'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('Promet','Dummy'),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
Promet Dummy
1 121.6 0
2 118.8 0
3 114.0 1
4 111.5 1
5 97.2 1
6 102.5 1
7 113.4 1
8 109.8 1
9 104.9 1
10 126.1 1
11 80.0 1
12 96.8 1
13 117.2 1
14 112.3 1
15 117.3 1
16 111.1 0
17 102.2 0
18 104.3 0
19 122.9 0
20 107.6 0
21 121.3 0
22 131.5 0
23 89.0 0
24 104.4 0
25 128.9 0
26 135.9 0
27 133.3 0
28 121.3 0
29 120.5 0
30 120.4 0
31 137.9 0
32 126.1 0
33 133.2 0
34 151.1 0
35 105.0 0
36 119.0 0
37 140.4 0
38 156.6 0
39 137.1 0
40 122.7 0
41 125.8 0
42 139.3 0
43 134.9 0
44 149.2 1
45 132.3 0
46 149.0 1
47 117.2 1
48 119.6 1
49 152.0 1
50 149.4 1
51 127.3 1
52 114.1 1
53 102.1 1
54 107.7 1
55 104.4 1
56 102.1 1
57 96.0 1
58 109.3 1
59 90.0 1
60 83.9 1
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Dummy
124.40 -11.42
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-35.400 -10.576 -1.488 8.825 39.024
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 124.400 3.016 41.248 <2e-16 ***
Dummy -11.424 4.338 -2.633 0.0108 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 16.79 on 58 degrees of freedom
Multiple R-squared: 0.1068, Adjusted R-squared: 0.0914
F-statistic: 6.935 on 1 and 58 DF, p-value: 0.01082
> 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.093990235 0.187980470 0.90600976
[2,] 0.039226138 0.078452275 0.96077386
[3,] 0.019630595 0.039261189 0.98036941
[4,] 0.006674143 0.013348286 0.99332586
[5,] 0.002312577 0.004625154 0.99768742
[6,] 0.011628615 0.023257229 0.98837139
[7,] 0.120958204 0.241916408 0.87904180
[8,] 0.095980125 0.191960251 0.90401987
[9,] 0.075710206 0.151420411 0.92428979
[10,] 0.048369003 0.096738007 0.95163100
[11,] 0.035231028 0.070462055 0.96476897
[12,] 0.024391018 0.048782035 0.97560898
[13,] 0.025251157 0.050502314 0.97474884
[14,] 0.020339804 0.040679607 0.97966020
[15,] 0.015166849 0.030333698 0.98483315
[16,] 0.010832001 0.021664001 0.98916800
[17,] 0.007253678 0.014507356 0.99274632
[18,] 0.008268498 0.016536996 0.99173150
[19,] 0.038198454 0.076396908 0.96180155
[20,] 0.038077749 0.076155499 0.96192225
[21,] 0.036764171 0.073528342 0.96323583
[22,] 0.046718224 0.093436448 0.95328178
[23,] 0.045543574 0.091087147 0.95445643
[24,] 0.032144978 0.064289955 0.96785502
[25,] 0.022392958 0.044785915 0.97760704
[26,] 0.015475204 0.030950407 0.98452480
[27,] 0.017191536 0.034383072 0.98280846
[28,] 0.011701234 0.023402468 0.98829877
[29,] 0.009252595 0.018505190 0.99074740
[30,] 0.023215123 0.046430247 0.97678488
[31,] 0.032213691 0.064427382 0.96778631
[32,] 0.024995114 0.049990228 0.97500489
[33,] 0.023544677 0.047089353 0.97645532
[34,] 0.059153635 0.118307270 0.94084637
[35,] 0.046466957 0.092933914 0.95353304
[36,] 0.032221098 0.064442196 0.96777890
[37,] 0.021555363 0.043110727 0.97844464
[38,] 0.016319994 0.032639989 0.98368001
[39,] 0.010667530 0.021335060 0.98933247
[40,] 0.048011773 0.096023545 0.95198823
[41,] 0.031299606 0.062599211 0.96870039
[42,] 0.105796587 0.211593173 0.89420341
[43,] 0.071698600 0.143397201 0.92830140
[44,] 0.048253145 0.096506291 0.95174685
[45,] 0.239642722 0.479285445 0.76035728
[46,] 0.776972366 0.446055267 0.22302763
[47,] 0.912437622 0.175124756 0.08756238
[48,] 0.917728271 0.164543457 0.08227173
[49,] 0.852323028 0.295353943 0.14767697
[50,] 0.796587033 0.406825934 0.20341297
[51,] 0.690384406 0.619231187 0.30961559
> postscript(file="/var/www/html/rcomp/tmp/1i64j1258618947.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/2eegc1258618948.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/35lh21258618948.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/4tfq21258618948.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/5m72d1258618948.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
-2.8000000 -5.6000000 1.0241379 -1.4758621 -15.7758621 -10.4758621
7 8 9 10 11 12
0.4241379 -3.1758621 -8.0758621 13.1241379 -32.9758621 -16.1758621
13 14 15 16 17 18
4.2241379 -0.6758621 4.3241379 -13.3000000 -22.2000000 -20.1000000
19 20 21 22 23 24
-1.5000000 -16.8000000 -3.1000000 7.1000000 -35.4000000 -20.0000000
25 26 27 28 29 30
4.5000000 11.5000000 8.9000000 -3.1000000 -3.9000000 -4.0000000
31 32 33 34 35 36
13.5000000 1.7000000 8.8000000 26.7000000 -19.4000000 -5.4000000
37 38 39 40 41 42
16.0000000 32.2000000 12.7000000 -1.7000000 1.4000000 14.9000000
43 44 45 46 47 48
10.5000000 36.2241379 7.9000000 36.0241379 4.2241379 6.6241379
49 50 51 52 53 54
39.0241379 36.4241379 14.3241379 1.1241379 -10.8758621 -5.2758621
55 56 57 58 59 60
-8.5758621 -10.8758621 -16.9758621 -3.6758621 -22.9758621 -29.0758621
> postscript(file="/var/www/html/rcomp/tmp/6l1651258618948.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 -2.8000000 NA
1 -5.6000000 -2.8000000
2 1.0241379 -5.6000000
3 -1.4758621 1.0241379
4 -15.7758621 -1.4758621
5 -10.4758621 -15.7758621
6 0.4241379 -10.4758621
7 -3.1758621 0.4241379
8 -8.0758621 -3.1758621
9 13.1241379 -8.0758621
10 -32.9758621 13.1241379
11 -16.1758621 -32.9758621
12 4.2241379 -16.1758621
13 -0.6758621 4.2241379
14 4.3241379 -0.6758621
15 -13.3000000 4.3241379
16 -22.2000000 -13.3000000
17 -20.1000000 -22.2000000
18 -1.5000000 -20.1000000
19 -16.8000000 -1.5000000
20 -3.1000000 -16.8000000
21 7.1000000 -3.1000000
22 -35.4000000 7.1000000
23 -20.0000000 -35.4000000
24 4.5000000 -20.0000000
25 11.5000000 4.5000000
26 8.9000000 11.5000000
27 -3.1000000 8.9000000
28 -3.9000000 -3.1000000
29 -4.0000000 -3.9000000
30 13.5000000 -4.0000000
31 1.7000000 13.5000000
32 8.8000000 1.7000000
33 26.7000000 8.8000000
34 -19.4000000 26.7000000
35 -5.4000000 -19.4000000
36 16.0000000 -5.4000000
37 32.2000000 16.0000000
38 12.7000000 32.2000000
39 -1.7000000 12.7000000
40 1.4000000 -1.7000000
41 14.9000000 1.4000000
42 10.5000000 14.9000000
43 36.2241379 10.5000000
44 7.9000000 36.2241379
45 36.0241379 7.9000000
46 4.2241379 36.0241379
47 6.6241379 4.2241379
48 39.0241379 6.6241379
49 36.4241379 39.0241379
50 14.3241379 36.4241379
51 1.1241379 14.3241379
52 -10.8758621 1.1241379
53 -5.2758621 -10.8758621
54 -8.5758621 -5.2758621
55 -10.8758621 -8.5758621
56 -16.9758621 -10.8758621
57 -3.6758621 -16.9758621
58 -22.9758621 -3.6758621
59 -29.0758621 -22.9758621
60 NA -29.0758621
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -5.6000000 -2.8000000
[2,] 1.0241379 -5.6000000
[3,] -1.4758621 1.0241379
[4,] -15.7758621 -1.4758621
[5,] -10.4758621 -15.7758621
[6,] 0.4241379 -10.4758621
[7,] -3.1758621 0.4241379
[8,] -8.0758621 -3.1758621
[9,] 13.1241379 -8.0758621
[10,] -32.9758621 13.1241379
[11,] -16.1758621 -32.9758621
[12,] 4.2241379 -16.1758621
[13,] -0.6758621 4.2241379
[14,] 4.3241379 -0.6758621
[15,] -13.3000000 4.3241379
[16,] -22.2000000 -13.3000000
[17,] -20.1000000 -22.2000000
[18,] -1.5000000 -20.1000000
[19,] -16.8000000 -1.5000000
[20,] -3.1000000 -16.8000000
[21,] 7.1000000 -3.1000000
[22,] -35.4000000 7.1000000
[23,] -20.0000000 -35.4000000
[24,] 4.5000000 -20.0000000
[25,] 11.5000000 4.5000000
[26,] 8.9000000 11.5000000
[27,] -3.1000000 8.9000000
[28,] -3.9000000 -3.1000000
[29,] -4.0000000 -3.9000000
[30,] 13.5000000 -4.0000000
[31,] 1.7000000 13.5000000
[32,] 8.8000000 1.7000000
[33,] 26.7000000 8.8000000
[34,] -19.4000000 26.7000000
[35,] -5.4000000 -19.4000000
[36,] 16.0000000 -5.4000000
[37,] 32.2000000 16.0000000
[38,] 12.7000000 32.2000000
[39,] -1.7000000 12.7000000
[40,] 1.4000000 -1.7000000
[41,] 14.9000000 1.4000000
[42,] 10.5000000 14.9000000
[43,] 36.2241379 10.5000000
[44,] 7.9000000 36.2241379
[45,] 36.0241379 7.9000000
[46,] 4.2241379 36.0241379
[47,] 6.6241379 4.2241379
[48,] 39.0241379 6.6241379
[49,] 36.4241379 39.0241379
[50,] 14.3241379 36.4241379
[51,] 1.1241379 14.3241379
[52,] -10.8758621 1.1241379
[53,] -5.2758621 -10.8758621
[54,] -8.5758621 -5.2758621
[55,] -10.8758621 -8.5758621
[56,] -16.9758621 -10.8758621
[57,] -3.6758621 -16.9758621
[58,] -22.9758621 -3.6758621
[59,] -29.0758621 -22.9758621
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -5.6000000 -2.8000000
2 1.0241379 -5.6000000
3 -1.4758621 1.0241379
4 -15.7758621 -1.4758621
5 -10.4758621 -15.7758621
6 0.4241379 -10.4758621
7 -3.1758621 0.4241379
8 -8.0758621 -3.1758621
9 13.1241379 -8.0758621
10 -32.9758621 13.1241379
11 -16.1758621 -32.9758621
12 4.2241379 -16.1758621
13 -0.6758621 4.2241379
14 4.3241379 -0.6758621
15 -13.3000000 4.3241379
16 -22.2000000 -13.3000000
17 -20.1000000 -22.2000000
18 -1.5000000 -20.1000000
19 -16.8000000 -1.5000000
20 -3.1000000 -16.8000000
21 7.1000000 -3.1000000
22 -35.4000000 7.1000000
23 -20.0000000 -35.4000000
24 4.5000000 -20.0000000
25 11.5000000 4.5000000
26 8.9000000 11.5000000
27 -3.1000000 8.9000000
28 -3.9000000 -3.1000000
29 -4.0000000 -3.9000000
30 13.5000000 -4.0000000
31 1.7000000 13.5000000
32 8.8000000 1.7000000
33 26.7000000 8.8000000
34 -19.4000000 26.7000000
35 -5.4000000 -19.4000000
36 16.0000000 -5.4000000
37 32.2000000 16.0000000
38 12.7000000 32.2000000
39 -1.7000000 12.7000000
40 1.4000000 -1.7000000
41 14.9000000 1.4000000
42 10.5000000 14.9000000
43 36.2241379 10.5000000
44 7.9000000 36.2241379
45 36.0241379 7.9000000
46 4.2241379 36.0241379
47 6.6241379 4.2241379
48 39.0241379 6.6241379
49 36.4241379 39.0241379
50 14.3241379 36.4241379
51 1.1241379 14.3241379
52 -10.8758621 1.1241379
53 -5.2758621 -10.8758621
54 -8.5758621 -5.2758621
55 -10.8758621 -8.5758621
56 -16.9758621 -10.8758621
57 -3.6758621 -16.9758621
58 -22.9758621 -3.6758621
59 -29.0758621 -22.9758621
> 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/76v9h1258618948.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/8s9rq1258618948.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/9fqgc1258618948.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/10yg0y1258618948.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/114gvq1258618948.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/12fjx11258618948.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/13hits1258618948.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/14z29k1258618948.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/15390f1258618948.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/16qu341258618948.tab")
+ }
>
> system("convert tmp/1i64j1258618947.ps tmp/1i64j1258618947.png")
> system("convert tmp/2eegc1258618948.ps tmp/2eegc1258618948.png")
> system("convert tmp/35lh21258618948.ps tmp/35lh21258618948.png")
> system("convert tmp/4tfq21258618948.ps tmp/4tfq21258618948.png")
> system("convert tmp/5m72d1258618948.ps tmp/5m72d1258618948.png")
> system("convert tmp/6l1651258618948.ps tmp/6l1651258618948.png")
> system("convert tmp/76v9h1258618948.ps tmp/76v9h1258618948.png")
> system("convert tmp/8s9rq1258618948.ps tmp/8s9rq1258618948.png")
> system("convert tmp/9fqgc1258618948.ps tmp/9fqgc1258618948.png")
> system("convert tmp/10yg0y1258618948.ps tmp/10yg0y1258618948.png")
>
>
> proc.time()
user system elapsed
2.448 1.546 9.030