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(106.1,97.89,106,98.69,105.9,99.01,105.8,99.18,105.7,98.45,105.6,98.13,105.4,98.29,105.4,99.1,105.5,99.26,105.6,98.85,105.7,98.05,105.9,98.53,106.1,99.34,106,100.14,105.8,100.3,105.8,100.22,105.7,99.9,105.5,99.58,105.3,99.9,105.2,100.78,105.2,100.78,105,100.46,105.1,100.06,105.1,100.28,105.2,100.78,104.9,101.58,104.8,102.06,104.5,102.02,104.5,101.68,104.4,101.32,104.4,101.81,104.2,102.3,104.1,102.12,103.9,102.1,103.8,101.75,103.9,101.5,104.2,102.16,104.1,103.47,103.8,104.05,103.6,104.09,103.7,103.55,103.5,102.77,103.4,102.89,103.1,103.6,103.1,103.76,103.1,103.92,103.2,103.35,103.3,103.32,103.5,104.2,103.6,105.44,103.5,105.81,103.3,106.25,103.2,105.94,103.1,105.82,103.2,105.96,103,106.49,103,106.32,103.1,105.88,103.4,105.07),dim=c(2,59),dimnames=list(c('Werkl','Infl'),1:59))
> y <- array(NA,dim=c(2,59),dimnames=list(c('Werkl','Infl'),1:59))
> 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
Werkl Infl
1 106.1 97.89
2 106.0 98.69
3 105.9 99.01
4 105.8 99.18
5 105.7 98.45
6 105.6 98.13
7 105.4 98.29
8 105.4 99.10
9 105.5 99.26
10 105.6 98.85
11 105.7 98.05
12 105.9 98.53
13 106.1 99.34
14 106.0 100.14
15 105.8 100.30
16 105.8 100.22
17 105.7 99.90
18 105.5 99.58
19 105.3 99.90
20 105.2 100.78
21 105.2 100.78
22 105.0 100.46
23 105.1 100.06
24 105.1 100.28
25 105.2 100.78
26 104.9 101.58
27 104.8 102.06
28 104.5 102.02
29 104.5 101.68
30 104.4 101.32
31 104.4 101.81
32 104.2 102.30
33 104.1 102.12
34 103.9 102.10
35 103.8 101.75
36 103.9 101.50
37 104.2 102.16
38 104.1 103.47
39 103.8 104.05
40 103.6 104.09
41 103.7 103.55
42 103.5 102.77
43 103.4 102.89
44 103.1 103.60
45 103.1 103.76
46 103.1 103.92
47 103.2 103.35
48 103.3 103.32
49 103.5 104.20
50 103.6 105.44
51 103.5 105.81
52 103.3 106.25
53 103.2 105.94
54 103.1 105.82
55 103.2 105.96
56 103.0 106.49
57 103.0 106.32
58 103.1 105.88
59 103.4 105.07
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Infl
143.7513 -0.3854
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-0.73758 -0.22155 0.04945 0.28676 0.84194
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 143.75126 2.15361 66.75 <2e-16 ***
Infl -0.38539 0.02113 -18.23 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.4068 on 57 degrees of freedom
Multiple R-squared: 0.8537, Adjusted R-squared: 0.8511
F-statistic: 332.5 on 1 and 57 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.06570439 0.1314087825 0.9342956088
[2,] 0.08894526 0.1778905288 0.9110547356
[3,] 0.14688029 0.2937605879 0.8531197061
[4,] 0.14818775 0.2963754934 0.8518122533
[5,] 0.09309788 0.1861957554 0.9069021223
[6,] 0.05161050 0.1032209962 0.9483895019
[7,] 0.02811230 0.0562246010 0.9718876995
[8,] 0.01717035 0.0343406950 0.9828296525
[9,] 0.02924049 0.0584809805 0.9707595098
[10,] 0.02875128 0.0575025616 0.9712487192
[11,] 0.02258119 0.0451623734 0.9774188133
[12,] 0.01907130 0.0381425913 0.9809287044
[13,] 0.01528325 0.0305664929 0.9847167535
[14,] 0.01490567 0.0298113303 0.9850943348
[15,] 0.02573943 0.0514788524 0.9742605738
[16,] 0.04443405 0.0888681029 0.9555659485
[17,] 0.05736040 0.1147207942 0.9426396029
[18,] 0.08988407 0.1797681394 0.9101159303
[19,] 0.10556883 0.2111376542 0.8944311729
[20,] 0.11615861 0.2323172255 0.8838413873
[21,] 0.14494962 0.2898992493 0.8550503753
[22,] 0.19884054 0.3976810814 0.8011594593
[23,] 0.30226790 0.6045358012 0.6977320994
[24,] 0.40303445 0.8060688945 0.5969655527
[25,] 0.50902770 0.9819446071 0.4909723036
[26,] 0.62731854 0.7453629268 0.3726814634
[27,] 0.71385325 0.5722934965 0.2861467483
[28,] 0.76748647 0.4650270588 0.2325135294
[29,] 0.81051409 0.3789718104 0.1894859052
[30,] 0.84331668 0.3133666452 0.1566833226
[31,] 0.88709556 0.2258088733 0.1129044366
[32,] 0.90705627 0.1858874510 0.0929437255
[33,] 0.94329734 0.1134053167 0.0567026584
[34,] 0.98730574 0.0253885168 0.0126942584
[35,] 0.99401196 0.0119760829 0.0059880414
[36,] 0.99365505 0.0126899089 0.0063449544
[37,] 0.99647787 0.0070442589 0.0035221295
[38,] 0.99655303 0.0068939356 0.0034469678
[39,] 0.99572106 0.0085578748 0.0042789374
[40,] 0.99472080 0.0105583935 0.0052791967
[41,] 0.99335792 0.0132841675 0.0066420837
[42,] 0.99227935 0.0154412947 0.0077206474
[43,] 0.99204321 0.0159135865 0.0079567932
[44,] 0.99552754 0.0089449217 0.0044724608
[45,] 0.99355056 0.0128988770 0.0064494385
[46,] 0.99529901 0.0094019817 0.0047009908
[47,] 0.99868234 0.0026353231 0.0013176616
[48,] 0.99981490 0.0003702011 0.0001851005
[49,] 0.99923578 0.0015284307 0.0007642153
[50,] 0.99691528 0.0061694473 0.0030847237
> postscript(file="/var/www/html/rcomp/tmp/117e81258666686.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/2ezq81258666686.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/38wvm1258666686.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/4srwz1258666686.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/5bska1258666686.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 = 59
Frequency = 1
1 2 3 4 5 6
0.074808499 0.283122477 0.306448068 0.271964788 -0.109371716 -0.332697307
7 8 9 10 11 12
-0.471034512 -0.158866609 0.002796186 -0.055214727 -0.263528705 0.121459681
13 14 15 16 17 18
0.633627584 0.841941562 0.703604357 0.672772959 0.449447368 0.126121777
19 20 21 22 23 24
0.049447368 0.288592744 0.288592744 -0.034732847 -0.088889836 -0.004103492
25 26 27 28 29 30
0.288592744 0.296906722 0.381895108 0.066479409 -0.064554031 -0.303295321
31 32 33 34 35 36
-0.114453010 -0.125610698 -0.294981343 -0.502689193 -0.737576558 -0.733924676
37 38 39 40 41 42
-0.179565645 0.225298494 0.148826128 -0.035758173 -0.143870108 -0.644476236
43 44 45 46 47 48
-0.698229140 -0.724600485 -0.662937689 -0.601274893 -0.720948603 -0.632510377
49 50 51 52 53 54
-0.093365001 0.484521664 0.527116879 0.496689567 0.277217900 0.130970804
55 56 57 58 59
0.284925750 0.289183760 0.223667040 0.154094352 0.141926450
> postscript(file="/var/www/html/rcomp/tmp/6plpo1258666686.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 = 59
Frequency = 1
lag(myerror, k = 1) myerror
0 0.074808499 NA
1 0.283122477 0.074808499
2 0.306448068 0.283122477
3 0.271964788 0.306448068
4 -0.109371716 0.271964788
5 -0.332697307 -0.109371716
6 -0.471034512 -0.332697307
7 -0.158866609 -0.471034512
8 0.002796186 -0.158866609
9 -0.055214727 0.002796186
10 -0.263528705 -0.055214727
11 0.121459681 -0.263528705
12 0.633627584 0.121459681
13 0.841941562 0.633627584
14 0.703604357 0.841941562
15 0.672772959 0.703604357
16 0.449447368 0.672772959
17 0.126121777 0.449447368
18 0.049447368 0.126121777
19 0.288592744 0.049447368
20 0.288592744 0.288592744
21 -0.034732847 0.288592744
22 -0.088889836 -0.034732847
23 -0.004103492 -0.088889836
24 0.288592744 -0.004103492
25 0.296906722 0.288592744
26 0.381895108 0.296906722
27 0.066479409 0.381895108
28 -0.064554031 0.066479409
29 -0.303295321 -0.064554031
30 -0.114453010 -0.303295321
31 -0.125610698 -0.114453010
32 -0.294981343 -0.125610698
33 -0.502689193 -0.294981343
34 -0.737576558 -0.502689193
35 -0.733924676 -0.737576558
36 -0.179565645 -0.733924676
37 0.225298494 -0.179565645
38 0.148826128 0.225298494
39 -0.035758173 0.148826128
40 -0.143870108 -0.035758173
41 -0.644476236 -0.143870108
42 -0.698229140 -0.644476236
43 -0.724600485 -0.698229140
44 -0.662937689 -0.724600485
45 -0.601274893 -0.662937689
46 -0.720948603 -0.601274893
47 -0.632510377 -0.720948603
48 -0.093365001 -0.632510377
49 0.484521664 -0.093365001
50 0.527116879 0.484521664
51 0.496689567 0.527116879
52 0.277217900 0.496689567
53 0.130970804 0.277217900
54 0.284925750 0.130970804
55 0.289183760 0.284925750
56 0.223667040 0.289183760
57 0.154094352 0.223667040
58 0.141926450 0.154094352
59 NA 0.141926450
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.283122477 0.074808499
[2,] 0.306448068 0.283122477
[3,] 0.271964788 0.306448068
[4,] -0.109371716 0.271964788
[5,] -0.332697307 -0.109371716
[6,] -0.471034512 -0.332697307
[7,] -0.158866609 -0.471034512
[8,] 0.002796186 -0.158866609
[9,] -0.055214727 0.002796186
[10,] -0.263528705 -0.055214727
[11,] 0.121459681 -0.263528705
[12,] 0.633627584 0.121459681
[13,] 0.841941562 0.633627584
[14,] 0.703604357 0.841941562
[15,] 0.672772959 0.703604357
[16,] 0.449447368 0.672772959
[17,] 0.126121777 0.449447368
[18,] 0.049447368 0.126121777
[19,] 0.288592744 0.049447368
[20,] 0.288592744 0.288592744
[21,] -0.034732847 0.288592744
[22,] -0.088889836 -0.034732847
[23,] -0.004103492 -0.088889836
[24,] 0.288592744 -0.004103492
[25,] 0.296906722 0.288592744
[26,] 0.381895108 0.296906722
[27,] 0.066479409 0.381895108
[28,] -0.064554031 0.066479409
[29,] -0.303295321 -0.064554031
[30,] -0.114453010 -0.303295321
[31,] -0.125610698 -0.114453010
[32,] -0.294981343 -0.125610698
[33,] -0.502689193 -0.294981343
[34,] -0.737576558 -0.502689193
[35,] -0.733924676 -0.737576558
[36,] -0.179565645 -0.733924676
[37,] 0.225298494 -0.179565645
[38,] 0.148826128 0.225298494
[39,] -0.035758173 0.148826128
[40,] -0.143870108 -0.035758173
[41,] -0.644476236 -0.143870108
[42,] -0.698229140 -0.644476236
[43,] -0.724600485 -0.698229140
[44,] -0.662937689 -0.724600485
[45,] -0.601274893 -0.662937689
[46,] -0.720948603 -0.601274893
[47,] -0.632510377 -0.720948603
[48,] -0.093365001 -0.632510377
[49,] 0.484521664 -0.093365001
[50,] 0.527116879 0.484521664
[51,] 0.496689567 0.527116879
[52,] 0.277217900 0.496689567
[53,] 0.130970804 0.277217900
[54,] 0.284925750 0.130970804
[55,] 0.289183760 0.284925750
[56,] 0.223667040 0.289183760
[57,] 0.154094352 0.223667040
[58,] 0.141926450 0.154094352
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.283122477 0.074808499
2 0.306448068 0.283122477
3 0.271964788 0.306448068
4 -0.109371716 0.271964788
5 -0.332697307 -0.109371716
6 -0.471034512 -0.332697307
7 -0.158866609 -0.471034512
8 0.002796186 -0.158866609
9 -0.055214727 0.002796186
10 -0.263528705 -0.055214727
11 0.121459681 -0.263528705
12 0.633627584 0.121459681
13 0.841941562 0.633627584
14 0.703604357 0.841941562
15 0.672772959 0.703604357
16 0.449447368 0.672772959
17 0.126121777 0.449447368
18 0.049447368 0.126121777
19 0.288592744 0.049447368
20 0.288592744 0.288592744
21 -0.034732847 0.288592744
22 -0.088889836 -0.034732847
23 -0.004103492 -0.088889836
24 0.288592744 -0.004103492
25 0.296906722 0.288592744
26 0.381895108 0.296906722
27 0.066479409 0.381895108
28 -0.064554031 0.066479409
29 -0.303295321 -0.064554031
30 -0.114453010 -0.303295321
31 -0.125610698 -0.114453010
32 -0.294981343 -0.125610698
33 -0.502689193 -0.294981343
34 -0.737576558 -0.502689193
35 -0.733924676 -0.737576558
36 -0.179565645 -0.733924676
37 0.225298494 -0.179565645
38 0.148826128 0.225298494
39 -0.035758173 0.148826128
40 -0.143870108 -0.035758173
41 -0.644476236 -0.143870108
42 -0.698229140 -0.644476236
43 -0.724600485 -0.698229140
44 -0.662937689 -0.724600485
45 -0.601274893 -0.662937689
46 -0.720948603 -0.601274893
47 -0.632510377 -0.720948603
48 -0.093365001 -0.632510377
49 0.484521664 -0.093365001
50 0.527116879 0.484521664
51 0.496689567 0.527116879
52 0.277217900 0.496689567
53 0.130970804 0.277217900
54 0.284925750 0.130970804
55 0.289183760 0.284925750
56 0.223667040 0.289183760
57 0.154094352 0.223667040
58 0.141926450 0.154094352
> 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/7aif71258666686.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/8qy6v1258666686.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/950as1258666686.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/10cri91258666686.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/11571c1258666686.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/12oarf1258666686.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/13sc1c1258666687.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/14e6b71258666687.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/150onf1258666687.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/16vuq31258666687.tab")
+ }
>
> system("convert tmp/117e81258666686.ps tmp/117e81258666686.png")
> system("convert tmp/2ezq81258666686.ps tmp/2ezq81258666686.png")
> system("convert tmp/38wvm1258666686.ps tmp/38wvm1258666686.png")
> system("convert tmp/4srwz1258666686.ps tmp/4srwz1258666686.png")
> system("convert tmp/5bska1258666686.ps tmp/5bska1258666686.png")
> system("convert tmp/6plpo1258666686.ps tmp/6plpo1258666686.png")
> system("convert tmp/7aif71258666686.ps tmp/7aif71258666686.png")
> system("convert tmp/8qy6v1258666686.ps tmp/8qy6v1258666686.png")
> system("convert tmp/950as1258666686.ps tmp/950as1258666686.png")
> system("convert tmp/10cri91258666686.ps tmp/10cri91258666686.png")
>
>
> proc.time()
user system elapsed
2.455 1.555 2.980