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(41.85,41.75,41.75,41.75,41.58,41.61,41.42,41.37,41.37,41.33,41.37,41.34,41.33,41.29,41.29,41.27,41.04,40.90,40.89,40.72,40.72,40.58,40.24,40.07,40.12,40.10,40.10,40.08,40.06,39.99,40.05,39.66,39.66,39.67,39.56,39.64,39.73,39.70,39.70,39.68,39.76,40.00,39.96,40.01,40.01,40.01,40.00,39.91,39.86,39.79,39.79,39.80,39.64,39.55,39.36,39.28),dim=c(1,56),dimnames=list(c('gemiddeldeprijzenbadpakken'),1:56))
> y <- array(NA,dim=c(1,56),dimnames=list(c('gemiddeldeprijzenbadpakken'),1:56))
> 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
gemiddeldeprijzenbadpakken M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 41.85 1 0 0 0 0 0 0 0 0 0 0 1
2 41.75 0 1 0 0 0 0 0 0 0 0 0 2
3 41.75 0 0 1 0 0 0 0 0 0 0 0 3
4 41.75 0 0 0 1 0 0 0 0 0 0 0 4
5 41.58 0 0 0 0 1 0 0 0 0 0 0 5
6 41.61 0 0 0 0 0 1 0 0 0 0 0 6
7 41.42 0 0 0 0 0 0 1 0 0 0 0 7
8 41.37 0 0 0 0 0 0 0 1 0 0 0 8
9 41.37 0 0 0 0 0 0 0 0 1 0 0 9
10 41.33 0 0 0 0 0 0 0 0 0 1 0 10
11 41.37 0 0 0 0 0 0 0 0 0 0 1 11
12 41.34 0 0 0 0 0 0 0 0 0 0 0 12
13 41.33 1 0 0 0 0 0 0 0 0 0 0 13
14 41.29 0 1 0 0 0 0 0 0 0 0 0 14
15 41.29 0 0 1 0 0 0 0 0 0 0 0 15
16 41.27 0 0 0 1 0 0 0 0 0 0 0 16
17 41.04 0 0 0 0 1 0 0 0 0 0 0 17
18 40.90 0 0 0 0 0 1 0 0 0 0 0 18
19 40.89 0 0 0 0 0 0 1 0 0 0 0 19
20 40.72 0 0 0 0 0 0 0 1 0 0 0 20
21 40.72 0 0 0 0 0 0 0 0 1 0 0 21
22 40.58 0 0 0 0 0 0 0 0 0 1 0 22
23 40.24 0 0 0 0 0 0 0 0 0 0 1 23
24 40.07 0 0 0 0 0 0 0 0 0 0 0 24
25 40.12 1 0 0 0 0 0 0 0 0 0 0 25
26 40.10 0 1 0 0 0 0 0 0 0 0 0 26
27 40.10 0 0 1 0 0 0 0 0 0 0 0 27
28 40.08 0 0 0 1 0 0 0 0 0 0 0 28
29 40.06 0 0 0 0 1 0 0 0 0 0 0 29
30 39.99 0 0 0 0 0 1 0 0 0 0 0 30
31 40.05 0 0 0 0 0 0 1 0 0 0 0 31
32 39.66 0 0 0 0 0 0 0 1 0 0 0 32
33 39.66 0 0 0 0 0 0 0 0 1 0 0 33
34 39.67 0 0 0 0 0 0 0 0 0 1 0 34
35 39.56 0 0 0 0 0 0 0 0 0 0 1 35
36 39.64 0 0 0 0 0 0 0 0 0 0 0 36
37 39.73 1 0 0 0 0 0 0 0 0 0 0 37
38 39.70 0 1 0 0 0 0 0 0 0 0 0 38
39 39.70 0 0 1 0 0 0 0 0 0 0 0 39
40 39.68 0 0 0 1 0 0 0 0 0 0 0 40
41 39.76 0 0 0 0 1 0 0 0 0 0 0 41
42 40.00 0 0 0 0 0 1 0 0 0 0 0 42
43 39.96 0 0 0 0 0 0 1 0 0 0 0 43
44 40.01 0 0 0 0 0 0 0 1 0 0 0 44
45 40.01 0 0 0 0 0 0 0 0 1 0 0 45
46 40.01 0 0 0 0 0 0 0 0 0 1 0 46
47 40.00 0 0 0 0 0 0 0 0 0 0 1 47
48 39.91 0 0 0 0 0 0 0 0 0 0 0 48
49 39.86 1 0 0 0 0 0 0 0 0 0 0 49
50 39.79 0 1 0 0 0 0 0 0 0 0 0 50
51 39.79 0 0 1 0 0 0 0 0 0 0 0 51
52 39.80 0 0 0 1 0 0 0 0 0 0 0 52
53 39.64 0 0 0 0 1 0 0 0 0 0 0 53
54 39.55 0 0 0 0 0 1 0 0 0 0 0 54
55 39.36 0 0 0 0 0 0 1 0 0 0 0 55
56 39.28 0 0 0 0 0 0 0 1 0 0 0 56
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) M1 M2 M3 M4 M5
41.539250 0.121458 0.112767 0.156075 0.189383 0.132692
M6 M7 M8 M9 M10 M11
0.170000 0.139308 0.054617 0.070075 0.070883 0.009192
t
-0.043308
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-0.5480 -0.3133 0.1106 0.2368 0.4871
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 41.539250 0.191341 217.096 <2e-16 ***
M1 0.121458 0.230051 0.528 0.600
M2 0.112767 0.229892 0.491 0.626
M3 0.156075 0.229768 0.679 0.501
M4 0.189383 0.229679 0.825 0.414
M5 0.132692 0.229626 0.578 0.566
M6 0.170000 0.229609 0.740 0.463
M7 0.139308 0.229626 0.607 0.547
M8 0.054617 0.229679 0.238 0.813
M9 0.070075 0.242180 0.289 0.774
M10 0.070883 0.242096 0.293 0.771
M11 0.009192 0.242046 0.038 0.970
t -0.043308 0.002852 -15.183 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.3423 on 43 degrees of freedom
Multiple R-squared: 0.8463, Adjusted R-squared: 0.8035
F-statistic: 19.74 on 12 and 43 DF, p-value: 1.070e-13
> 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.0003934283 0.0007868565 0.9996066
[2,] 0.0001233623 0.0002467245 0.9998766
[3,] 0.0020884940 0.0041769880 0.9979115
[4,] 0.0006091678 0.0012183356 0.9993908
[5,] 0.0004967536 0.0009935072 0.9995032
[6,] 0.0003840186 0.0007680371 0.9996160
[7,] 0.0008568617 0.0017137235 0.9991431
[8,] 0.0508731567 0.1017463135 0.9491268
[9,] 0.2166945911 0.4333891822 0.7833054
[10,] 0.2752114432 0.5504228864 0.7247886
[11,] 0.2600453748 0.5200907495 0.7399546
[12,] 0.2297372482 0.4594744964 0.7702628
[13,] 0.1957633567 0.3915267133 0.8042366
[14,] 0.1493119550 0.2986239100 0.8506880
[15,] 0.1003368252 0.2006736503 0.8996632
[16,] 0.0898729183 0.1797458365 0.9101271
[17,] 0.0592491554 0.1184983108 0.9407508
[18,] 0.0517857705 0.1035715409 0.9482142
[19,] 0.0449860909 0.0899721818 0.9550139
[20,] 0.0637863439 0.1275726877 0.9362137
[21,] 0.0780815044 0.1561630088 0.9219185
[22,] 0.0875534092 0.1751068184 0.9124466
[23,] 0.0981307152 0.1962614304 0.9018693
[24,] 0.1330391877 0.2660783753 0.8669608
[25,] 0.3682880938 0.7365761877 0.6317119
> postscript(file="/var/www/html/rcomp/tmp/1xnz41292779541.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/2qeyp1292779541.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/3qeyp1292779541.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/4qeyp1292779541.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/516fa1292779541.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 = 56
Frequency = 1
1 2 3 4 5 6 7 8
0.23260 0.18460 0.18460 0.19460 0.12460 0.16060 0.04460 0.12260
9 10 11 12 13 14 15 16
0.15045 0.15295 0.29795 0.32045 0.23230 0.24430 0.24430 0.23430
17 18 19 20 21 22 23 24
0.10430 -0.02970 0.03430 -0.00770 0.02015 -0.07735 -0.31235 -0.42985
25 26 27 28 29 30 31 32
-0.45800 -0.42600 -0.42600 -0.43600 -0.35600 -0.42000 -0.28600 -0.54800
33 34 35 36 37 38 39 40
-0.52015 -0.46765 -0.47265 -0.34015 -0.32830 -0.30630 -0.30630 -0.31630
41 42 43 44 45 46 47 48
-0.13630 0.10970 0.14370 0.32170 0.34955 0.39205 0.48705 0.44955
49 50 51 52 53 54 55 56
0.32140 0.30340 0.30340 0.32340 0.26340 0.17940 0.06340 0.11140
> postscript(file="/var/www/html/rcomp/tmp/616fa1292779541.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 = 56
Frequency = 1
lag(myerror, k = 1) myerror
0 0.23260 NA
1 0.18460 0.23260
2 0.18460 0.18460
3 0.19460 0.18460
4 0.12460 0.19460
5 0.16060 0.12460
6 0.04460 0.16060
7 0.12260 0.04460
8 0.15045 0.12260
9 0.15295 0.15045
10 0.29795 0.15295
11 0.32045 0.29795
12 0.23230 0.32045
13 0.24430 0.23230
14 0.24430 0.24430
15 0.23430 0.24430
16 0.10430 0.23430
17 -0.02970 0.10430
18 0.03430 -0.02970
19 -0.00770 0.03430
20 0.02015 -0.00770
21 -0.07735 0.02015
22 -0.31235 -0.07735
23 -0.42985 -0.31235
24 -0.45800 -0.42985
25 -0.42600 -0.45800
26 -0.42600 -0.42600
27 -0.43600 -0.42600
28 -0.35600 -0.43600
29 -0.42000 -0.35600
30 -0.28600 -0.42000
31 -0.54800 -0.28600
32 -0.52015 -0.54800
33 -0.46765 -0.52015
34 -0.47265 -0.46765
35 -0.34015 -0.47265
36 -0.32830 -0.34015
37 -0.30630 -0.32830
38 -0.30630 -0.30630
39 -0.31630 -0.30630
40 -0.13630 -0.31630
41 0.10970 -0.13630
42 0.14370 0.10970
43 0.32170 0.14370
44 0.34955 0.32170
45 0.39205 0.34955
46 0.48705 0.39205
47 0.44955 0.48705
48 0.32140 0.44955
49 0.30340 0.32140
50 0.30340 0.30340
51 0.32340 0.30340
52 0.26340 0.32340
53 0.17940 0.26340
54 0.06340 0.17940
55 0.11140 0.06340
56 NA 0.11140
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.18460 0.23260
[2,] 0.18460 0.18460
[3,] 0.19460 0.18460
[4,] 0.12460 0.19460
[5,] 0.16060 0.12460
[6,] 0.04460 0.16060
[7,] 0.12260 0.04460
[8,] 0.15045 0.12260
[9,] 0.15295 0.15045
[10,] 0.29795 0.15295
[11,] 0.32045 0.29795
[12,] 0.23230 0.32045
[13,] 0.24430 0.23230
[14,] 0.24430 0.24430
[15,] 0.23430 0.24430
[16,] 0.10430 0.23430
[17,] -0.02970 0.10430
[18,] 0.03430 -0.02970
[19,] -0.00770 0.03430
[20,] 0.02015 -0.00770
[21,] -0.07735 0.02015
[22,] -0.31235 -0.07735
[23,] -0.42985 -0.31235
[24,] -0.45800 -0.42985
[25,] -0.42600 -0.45800
[26,] -0.42600 -0.42600
[27,] -0.43600 -0.42600
[28,] -0.35600 -0.43600
[29,] -0.42000 -0.35600
[30,] -0.28600 -0.42000
[31,] -0.54800 -0.28600
[32,] -0.52015 -0.54800
[33,] -0.46765 -0.52015
[34,] -0.47265 -0.46765
[35,] -0.34015 -0.47265
[36,] -0.32830 -0.34015
[37,] -0.30630 -0.32830
[38,] -0.30630 -0.30630
[39,] -0.31630 -0.30630
[40,] -0.13630 -0.31630
[41,] 0.10970 -0.13630
[42,] 0.14370 0.10970
[43,] 0.32170 0.14370
[44,] 0.34955 0.32170
[45,] 0.39205 0.34955
[46,] 0.48705 0.39205
[47,] 0.44955 0.48705
[48,] 0.32140 0.44955
[49,] 0.30340 0.32140
[50,] 0.30340 0.30340
[51,] 0.32340 0.30340
[52,] 0.26340 0.32340
[53,] 0.17940 0.26340
[54,] 0.06340 0.17940
[55,] 0.11140 0.06340
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.18460 0.23260
2 0.18460 0.18460
3 0.19460 0.18460
4 0.12460 0.19460
5 0.16060 0.12460
6 0.04460 0.16060
7 0.12260 0.04460
8 0.15045 0.12260
9 0.15295 0.15045
10 0.29795 0.15295
11 0.32045 0.29795
12 0.23230 0.32045
13 0.24430 0.23230
14 0.24430 0.24430
15 0.23430 0.24430
16 0.10430 0.23430
17 -0.02970 0.10430
18 0.03430 -0.02970
19 -0.00770 0.03430
20 0.02015 -0.00770
21 -0.07735 0.02015
22 -0.31235 -0.07735
23 -0.42985 -0.31235
24 -0.45800 -0.42985
25 -0.42600 -0.45800
26 -0.42600 -0.42600
27 -0.43600 -0.42600
28 -0.35600 -0.43600
29 -0.42000 -0.35600
30 -0.28600 -0.42000
31 -0.54800 -0.28600
32 -0.52015 -0.54800
33 -0.46765 -0.52015
34 -0.47265 -0.46765
35 -0.34015 -0.47265
36 -0.32830 -0.34015
37 -0.30630 -0.32830
38 -0.30630 -0.30630
39 -0.31630 -0.30630
40 -0.13630 -0.31630
41 0.10970 -0.13630
42 0.14370 0.10970
43 0.32170 0.14370
44 0.34955 0.32170
45 0.39205 0.34955
46 0.48705 0.39205
47 0.44955 0.48705
48 0.32140 0.44955
49 0.30340 0.32140
50 0.30340 0.30340
51 0.32340 0.30340
52 0.26340 0.32340
53 0.17940 0.26340
54 0.06340 0.17940
55 0.11140 0.06340
> 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/7bfxd1292779541.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/8bfxd1292779541.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/9m6wg1292779541.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/10m6wg1292779541.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/117pc41292779541.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/12tpba1292779541.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/13iq8m1292779541.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/14396r1292779541.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/156rnf1292779541.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/16ssm31292779541.tab")
+ }
>
> try(system("convert tmp/1xnz41292779541.ps tmp/1xnz41292779541.png",intern=TRUE))
character(0)
> try(system("convert tmp/2qeyp1292779541.ps tmp/2qeyp1292779541.png",intern=TRUE))
character(0)
> try(system("convert tmp/3qeyp1292779541.ps tmp/3qeyp1292779541.png",intern=TRUE))
character(0)
> try(system("convert tmp/4qeyp1292779541.ps tmp/4qeyp1292779541.png",intern=TRUE))
character(0)
> try(system("convert tmp/516fa1292779541.ps tmp/516fa1292779541.png",intern=TRUE))
character(0)
> try(system("convert tmp/616fa1292779541.ps tmp/616fa1292779541.png",intern=TRUE))
character(0)
> try(system("convert tmp/7bfxd1292779541.ps tmp/7bfxd1292779541.png",intern=TRUE))
character(0)
> try(system("convert tmp/8bfxd1292779541.ps tmp/8bfxd1292779541.png",intern=TRUE))
character(0)
> try(system("convert tmp/9m6wg1292779541.ps tmp/9m6wg1292779541.png",intern=TRUE))
character(0)
> try(system("convert tmp/10m6wg1292779541.ps tmp/10m6wg1292779541.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
2.430 1.663 7.664