R version 2.12.0 (2010-10-15)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-pc-linux-gnu (32-bit)
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(127,13,1235,115,12,1080,127,7,845,150,9,1522,156,6,1047,182,11,1979,156,12,1822,132,10,1253,137,9,1297,113,9,946,137,15,1713,117,11,1024,137,8,1147,153,6,1092,117,13,1152,126,10,1336,170,14,2131,182,8,1550,162,11,1884,184,10,2041,143,6,845,159,9,1483,108,14,1055,175,8,1545,108,6,729,179,9,1792,111,15,1175,187,8,1593,111,7,785,115,7,744,194,5,1356,168,7,1262,125,12,1250,114,11,1020,126,6,840,149,9,1515,155,5,1045,181,11,1972,155,11,1820,130,9,1248,136,8,1290,112,8,944,135,14,1713,114,11,1022,136,7,1143,152,5,1089,116,12,1149,125,10,1327,169,13,2128,181,7,1143,160,10,1880,183,9,2034,142,5,844,158,9,1879,107,13,1050,174,7,1541,107,5,724,178,8,1782,110,14,1170,186,7,1586,110,7,749,114,6,740,193,4,1352),dim=c(3,63),dimnames=list(c('Ouderdom','Aanbieders','Veilingprijs'),1:63))
> y <- array(NA,dim=c(3,63),dimnames=list(c('Ouderdom','Aanbieders','Veilingprijs'),1:63))
> 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
> 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
Ouderdom Aanbieders Veilingprijs
1 127 13 1235
2 115 12 1080
3 127 7 845
4 150 9 1522
5 156 6 1047
6 182 11 1979
7 156 12 1822
8 132 10 1253
9 137 9 1297
10 113 9 946
11 137 15 1713
12 117 11 1024
13 137 8 1147
14 153 6 1092
15 117 13 1152
16 126 10 1336
17 170 14 2131
18 182 8 1550
19 162 11 1884
20 184 10 2041
21 143 6 845
22 159 9 1483
23 108 14 1055
24 175 8 1545
25 108 6 729
26 179 9 1792
27 111 15 1175
28 187 8 1593
29 111 7 785
30 115 7 744
31 194 5 1356
32 168 7 1262
33 125 12 1250
34 114 11 1020
35 126 6 840
36 149 9 1515
37 155 5 1045
38 181 11 1972
39 155 11 1820
40 130 9 1248
41 136 8 1290
42 112 8 944
43 135 14 1713
44 114 11 1022
45 136 7 1143
46 152 5 1089
47 116 12 1149
48 125 10 1327
49 169 13 2128
50 181 7 1143
51 160 10 1880
52 183 9 2034
53 142 5 844
54 158 9 1879
55 107 13 1050
56 174 7 1541
57 107 5 724
58 178 8 1782
59 110 14 1170
60 186 7 1586
61 110 7 749
62 114 6 740
63 193 4 1352
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Aanbieders Veilingprijs
112.01776 -5.99868 0.06568
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-23.447 -8.268 0.840 5.346 35.898
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 112.017759 5.718066 19.59 < 2e-16 ***
Aanbieders -5.998675 0.542480 -11.06 4.14e-16 ***
Veilingprijs 0.065682 0.003872 16.96 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 11.18 on 60 degrees of freedom
Multiple R-squared: 0.8377, Adjusted R-squared: 0.8323
F-statistic: 154.8 on 2 and 60 DF, p-value: < 2.2e-16
> 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.392321037 0.784642073 0.6076790
[2,] 0.276424812 0.552849623 0.7235752
[3,] 0.194402117 0.388804234 0.8055979
[4,] 0.161176018 0.322352035 0.8388240
[5,] 0.155464005 0.310928010 0.8445360
[6,] 0.091839844 0.183679689 0.9081602
[7,] 0.051986554 0.103973108 0.9480134
[8,] 0.028768825 0.057537650 0.9712312
[9,] 0.019358653 0.038717307 0.9806413
[10,] 0.011412763 0.022825526 0.9885872
[11,] 0.028258622 0.056517244 0.9717414
[12,] 0.016319170 0.032638340 0.9836808
[13,] 0.043837467 0.087674934 0.9561625
[14,] 0.037233365 0.074466730 0.9627666
[15,] 0.022476088 0.044952175 0.9775239
[16,] 0.021375422 0.042750844 0.9786246
[17,] 0.012976886 0.025953773 0.9870231
[18,] 0.010987965 0.021975931 0.9890120
[19,] 0.009832490 0.019664980 0.9901675
[20,] 0.028356394 0.056712788 0.9716436
[21,] 0.018293542 0.036587085 0.9817065
[22,] 0.017983422 0.035966844 0.9820166
[23,] 0.042829256 0.085658511 0.9571707
[24,] 0.044567981 0.089135962 0.9554320
[25,] 0.030875263 0.061750525 0.9691247
[26,] 0.103675471 0.207350943 0.8963245
[27,] 0.130843648 0.261687295 0.8691564
[28,] 0.099263513 0.198527025 0.9007365
[29,] 0.071856814 0.143713628 0.9281432
[30,] 0.054980190 0.109960381 0.9450198
[31,] 0.049704158 0.099408317 0.9502958
[32,] 0.035250665 0.070501330 0.9647493
[33,] 0.027198185 0.054396370 0.9728018
[34,] 0.026664450 0.053328899 0.9733356
[35,] 0.023882306 0.047764611 0.9761177
[36,] 0.025972317 0.051944634 0.9740277
[37,] 0.030681734 0.061363468 0.9693183
[38,] 0.021071193 0.042142387 0.9789288
[39,] 0.012965309 0.025930618 0.9870347
[40,] 0.010190535 0.020381069 0.9898095
[41,] 0.005852501 0.011705003 0.9941475
[42,] 0.003244955 0.006489911 0.9967550
[43,] 0.003632837 0.007265674 0.9963672
[44,] 0.002022805 0.004045610 0.9979772
[45,] 0.126756541 0.253513083 0.8732435
[46,] 0.136908159 0.273816318 0.8630918
[47,] 0.108418448 0.216836897 0.8915816
[48,] 0.084842403 0.169684806 0.9151576
[49,] 0.525683837 0.948632325 0.4743162
[50,] 0.419587888 0.839175776 0.5804121
[51,] 0.294085562 0.588171123 0.7059144
[52,] 0.369885978 0.739771956 0.6301140
> postscript(file="/var/www/rcomp/tmp/1aaa71321789881.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/rcomp/tmp/2mqte1321789881.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/rcomp/tmp/3omwx1321789881.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/rcomp/tmp/4ukel1321789881.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/rcomp/tmp/5554s1321789881.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 = 63
Frequency = 1
1 2 3 4 5 6
11.8474801 4.0295488 1.4714932 -7.9980192 11.2050092 5.9825569
7 8 9 10 11 12
-3.7066589 -2.3308263 -6.2195195 -7.1650601 2.4487296 3.7090777
13 14 15 16 17 18
-2.3658619 5.2493092 7.2991044 -13.7824507 1.9948859 16.1642032
19 20 21 22 23 24
-7.7776321 -2.0884162 11.4728178 3.5635874 10.6689553 9.4926143
25 26 27 28 29 30
-15.9080447 3.2677812 11.7857643 18.3398677 -10.5875735 -3.8946025
31 32 33 34 35 36
22.9105275 15.0820072 2.8635713 0.9718066 -5.1987711 -8.5382436
37 38 39 40 41 42
4.3376981 5.4423325 -10.5739700 -10.0010907 -12.7584195 -14.0323711
43 44 45 46 47 48
-5.5499459 0.8404421 -9.1018085 -1.5523196 0.4974756 -14.1913107
49 50 51 52 53 54
-4.8067430 35.8981915 -15.5135787 -8.6273162 4.5398245 -23.4465720
55 56 57 58 59 60
3.9986909 2.7566677 -22.5783090 -3.0740720 5.1154999 11.8009677
61 62 63
-9.2230136 -10.6305491 16.1745809
> postscript(file="/var/www/rcomp/tmp/656he1321789881.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 = 63
Frequency = 1
lag(myerror, k = 1) myerror
0 11.8474801 NA
1 4.0295488 11.8474801
2 1.4714932 4.0295488
3 -7.9980192 1.4714932
4 11.2050092 -7.9980192
5 5.9825569 11.2050092
6 -3.7066589 5.9825569
7 -2.3308263 -3.7066589
8 -6.2195195 -2.3308263
9 -7.1650601 -6.2195195
10 2.4487296 -7.1650601
11 3.7090777 2.4487296
12 -2.3658619 3.7090777
13 5.2493092 -2.3658619
14 7.2991044 5.2493092
15 -13.7824507 7.2991044
16 1.9948859 -13.7824507
17 16.1642032 1.9948859
18 -7.7776321 16.1642032
19 -2.0884162 -7.7776321
20 11.4728178 -2.0884162
21 3.5635874 11.4728178
22 10.6689553 3.5635874
23 9.4926143 10.6689553
24 -15.9080447 9.4926143
25 3.2677812 -15.9080447
26 11.7857643 3.2677812
27 18.3398677 11.7857643
28 -10.5875735 18.3398677
29 -3.8946025 -10.5875735
30 22.9105275 -3.8946025
31 15.0820072 22.9105275
32 2.8635713 15.0820072
33 0.9718066 2.8635713
34 -5.1987711 0.9718066
35 -8.5382436 -5.1987711
36 4.3376981 -8.5382436
37 5.4423325 4.3376981
38 -10.5739700 5.4423325
39 -10.0010907 -10.5739700
40 -12.7584195 -10.0010907
41 -14.0323711 -12.7584195
42 -5.5499459 -14.0323711
43 0.8404421 -5.5499459
44 -9.1018085 0.8404421
45 -1.5523196 -9.1018085
46 0.4974756 -1.5523196
47 -14.1913107 0.4974756
48 -4.8067430 -14.1913107
49 35.8981915 -4.8067430
50 -15.5135787 35.8981915
51 -8.6273162 -15.5135787
52 4.5398245 -8.6273162
53 -23.4465720 4.5398245
54 3.9986909 -23.4465720
55 2.7566677 3.9986909
56 -22.5783090 2.7566677
57 -3.0740720 -22.5783090
58 5.1154999 -3.0740720
59 11.8009677 5.1154999
60 -9.2230136 11.8009677
61 -10.6305491 -9.2230136
62 16.1745809 -10.6305491
63 NA 16.1745809
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 4.0295488 11.8474801
[2,] 1.4714932 4.0295488
[3,] -7.9980192 1.4714932
[4,] 11.2050092 -7.9980192
[5,] 5.9825569 11.2050092
[6,] -3.7066589 5.9825569
[7,] -2.3308263 -3.7066589
[8,] -6.2195195 -2.3308263
[9,] -7.1650601 -6.2195195
[10,] 2.4487296 -7.1650601
[11,] 3.7090777 2.4487296
[12,] -2.3658619 3.7090777
[13,] 5.2493092 -2.3658619
[14,] 7.2991044 5.2493092
[15,] -13.7824507 7.2991044
[16,] 1.9948859 -13.7824507
[17,] 16.1642032 1.9948859
[18,] -7.7776321 16.1642032
[19,] -2.0884162 -7.7776321
[20,] 11.4728178 -2.0884162
[21,] 3.5635874 11.4728178
[22,] 10.6689553 3.5635874
[23,] 9.4926143 10.6689553
[24,] -15.9080447 9.4926143
[25,] 3.2677812 -15.9080447
[26,] 11.7857643 3.2677812
[27,] 18.3398677 11.7857643
[28,] -10.5875735 18.3398677
[29,] -3.8946025 -10.5875735
[30,] 22.9105275 -3.8946025
[31,] 15.0820072 22.9105275
[32,] 2.8635713 15.0820072
[33,] 0.9718066 2.8635713
[34,] -5.1987711 0.9718066
[35,] -8.5382436 -5.1987711
[36,] 4.3376981 -8.5382436
[37,] 5.4423325 4.3376981
[38,] -10.5739700 5.4423325
[39,] -10.0010907 -10.5739700
[40,] -12.7584195 -10.0010907
[41,] -14.0323711 -12.7584195
[42,] -5.5499459 -14.0323711
[43,] 0.8404421 -5.5499459
[44,] -9.1018085 0.8404421
[45,] -1.5523196 -9.1018085
[46,] 0.4974756 -1.5523196
[47,] -14.1913107 0.4974756
[48,] -4.8067430 -14.1913107
[49,] 35.8981915 -4.8067430
[50,] -15.5135787 35.8981915
[51,] -8.6273162 -15.5135787
[52,] 4.5398245 -8.6273162
[53,] -23.4465720 4.5398245
[54,] 3.9986909 -23.4465720
[55,] 2.7566677 3.9986909
[56,] -22.5783090 2.7566677
[57,] -3.0740720 -22.5783090
[58,] 5.1154999 -3.0740720
[59,] 11.8009677 5.1154999
[60,] -9.2230136 11.8009677
[61,] -10.6305491 -9.2230136
[62,] 16.1745809 -10.6305491
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 4.0295488 11.8474801
2 1.4714932 4.0295488
3 -7.9980192 1.4714932
4 11.2050092 -7.9980192
5 5.9825569 11.2050092
6 -3.7066589 5.9825569
7 -2.3308263 -3.7066589
8 -6.2195195 -2.3308263
9 -7.1650601 -6.2195195
10 2.4487296 -7.1650601
11 3.7090777 2.4487296
12 -2.3658619 3.7090777
13 5.2493092 -2.3658619
14 7.2991044 5.2493092
15 -13.7824507 7.2991044
16 1.9948859 -13.7824507
17 16.1642032 1.9948859
18 -7.7776321 16.1642032
19 -2.0884162 -7.7776321
20 11.4728178 -2.0884162
21 3.5635874 11.4728178
22 10.6689553 3.5635874
23 9.4926143 10.6689553
24 -15.9080447 9.4926143
25 3.2677812 -15.9080447
26 11.7857643 3.2677812
27 18.3398677 11.7857643
28 -10.5875735 18.3398677
29 -3.8946025 -10.5875735
30 22.9105275 -3.8946025
31 15.0820072 22.9105275
32 2.8635713 15.0820072
33 0.9718066 2.8635713
34 -5.1987711 0.9718066
35 -8.5382436 -5.1987711
36 4.3376981 -8.5382436
37 5.4423325 4.3376981
38 -10.5739700 5.4423325
39 -10.0010907 -10.5739700
40 -12.7584195 -10.0010907
41 -14.0323711 -12.7584195
42 -5.5499459 -14.0323711
43 0.8404421 -5.5499459
44 -9.1018085 0.8404421
45 -1.5523196 -9.1018085
46 0.4974756 -1.5523196
47 -14.1913107 0.4974756
48 -4.8067430 -14.1913107
49 35.8981915 -4.8067430
50 -15.5135787 35.8981915
51 -8.6273162 -15.5135787
52 4.5398245 -8.6273162
53 -23.4465720 4.5398245
54 3.9986909 -23.4465720
55 2.7566677 3.9986909
56 -22.5783090 2.7566677
57 -3.0740720 -22.5783090
58 5.1154999 -3.0740720
59 11.8009677 5.1154999
60 -9.2230136 11.8009677
61 -10.6305491 -9.2230136
62 16.1745809 -10.6305491
> 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/rcomp/tmp/7iut71321789881.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/rcomp/tmp/8uc141321789881.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/rcomp/tmp/9mbc91321789881.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/rcomp/tmp/1025oq1321789881.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/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/rcomp/tmp/11rkom1321789881.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/rcomp/tmp/12537a1321789881.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/rcomp/tmp/138b2d1321789881.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/rcomp/tmp/14hjr01321789881.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/rcomp/tmp/15el881321789881.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/rcomp/tmp/16x9ck1321789881.tab")
+ }
>
> try(system("convert tmp/1aaa71321789881.ps tmp/1aaa71321789881.png",intern=TRUE))
character(0)
> try(system("convert tmp/2mqte1321789881.ps tmp/2mqte1321789881.png",intern=TRUE))
character(0)
> try(system("convert tmp/3omwx1321789881.ps tmp/3omwx1321789881.png",intern=TRUE))
character(0)
> try(system("convert tmp/4ukel1321789881.ps tmp/4ukel1321789881.png",intern=TRUE))
character(0)
> try(system("convert tmp/5554s1321789881.ps tmp/5554s1321789881.png",intern=TRUE))
character(0)
> try(system("convert tmp/656he1321789881.ps tmp/656he1321789881.png",intern=TRUE))
character(0)
> try(system("convert tmp/7iut71321789881.ps tmp/7iut71321789881.png",intern=TRUE))
character(0)
> try(system("convert tmp/8uc141321789881.ps tmp/8uc141321789881.png",intern=TRUE))
character(0)
> try(system("convert tmp/9mbc91321789881.ps tmp/9mbc91321789881.png",intern=TRUE))
character(0)
> try(system("convert tmp/1025oq1321789881.ps tmp/1025oq1321789881.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.060 0.330 4.359