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(8.00,96.80,8.10,114.10,7.70,110.30,7.50,103.90,7.60,101.60,7.80,94.60,7.80,95.90,7.80,104.70,7.50,102.80,7.50,98.10,7.10,113.90,7.50,80.90,7.50,95.70,7.60,113.20,7.70,105.90,7.70,108.80,7.90,102.30,8.10,99.00,8.20,100.70,8.20,115.50,8.20,100.70,7.90,109.90,7.30,114.60,6.90,85.40,6.60,100.50,6.70,114.80,6.90,116.50,7.00,112.90,7.10,102.00,7.20,106.00,7.10,105.30,6.90,118.80,7.00,106.10,6.80,109.30,6.40,117.20,6.70,92.50,6.60,104.20,6.40,112.50,6.30,122.40,6.20,113.30,6.50,100.00,6.80,110.70,6.80,112.80,6.40,109.80,6.10,117.30,5.80,109.10,6.10,115.90,7.20,96.00,7.30,99.80,6.90,116.80,6.10,115.70,5.80,99.40,6.20,94.30,7.10,91.00,7.70,93.20,7.90,103.10,7.70,94.10,7.40,91.80,7.50,102.70,8.00,82.60),dim=c(2,60),dimnames=list(c('Wman','Ecogr'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('Wman','Ecogr'),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
Wman Ecogr
1 8.0 96.8
2 8.1 114.1
3 7.7 110.3
4 7.5 103.9
5 7.6 101.6
6 7.8 94.6
7 7.8 95.9
8 7.8 104.7
9 7.5 102.8
10 7.5 98.1
11 7.1 113.9
12 7.5 80.9
13 7.5 95.7
14 7.6 113.2
15 7.7 105.9
16 7.7 108.8
17 7.9 102.3
18 8.1 99.0
19 8.2 100.7
20 8.2 115.5
21 8.2 100.7
22 7.9 109.9
23 7.3 114.6
24 6.9 85.4
25 6.6 100.5
26 6.7 114.8
27 6.9 116.5
28 7.0 112.9
29 7.1 102.0
30 7.2 106.0
31 7.1 105.3
32 6.9 118.8
33 7.0 106.1
34 6.8 109.3
35 6.4 117.2
36 6.7 92.5
37 6.6 104.2
38 6.4 112.5
39 6.3 122.4
40 6.2 113.3
41 6.5 100.0
42 6.8 110.7
43 6.8 112.8
44 6.4 109.8
45 6.1 117.3
46 5.8 109.1
47 6.1 115.9
48 7.2 96.0
49 7.3 99.8
50 6.9 116.8
51 6.1 115.7
52 5.8 99.4
53 6.2 94.3
54 7.1 91.0
55 7.7 93.2
56 7.9 103.1
57 7.7 94.1
58 7.4 91.8
59 7.5 102.7
60 8.0 82.6
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Ecogr
9.66287 -0.02380
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1.49691 -0.45539 0.02084 0.39658 1.28631
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 9.662874 0.900642 10.729 2.15e-15 ***
Ecogr -0.023802 0.008571 -2.777 0.00737 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.6232 on 58 degrees of freedom
Multiple R-squared: 0.1174, Adjusted R-squared: 0.1021
F-statistic: 7.712 on 1 and 58 DF, p-value: 0.007374
> 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.1217853868 0.2435707736 0.87821461
[2,] 0.0482542744 0.0965085488 0.95174573
[3,] 0.0172541545 0.0345083091 0.98274585
[4,] 0.0058531703 0.0117063406 0.99414683
[5,] 0.0038679255 0.0077358511 0.99613207
[6,] 0.0019741424 0.0039482847 0.99802586
[7,] 0.0072408103 0.0144816205 0.99275919
[8,] 0.0041485030 0.0082970060 0.99585150
[9,] 0.0019062890 0.0038125780 0.99809371
[10,] 0.0008625033 0.0017250065 0.99913750
[11,] 0.0003783000 0.0007566000 0.99962170
[12,] 0.0001709053 0.0003418105 0.99982909
[13,] 0.0001208472 0.0002416944 0.99987915
[14,] 0.0002142600 0.0004285200 0.99978574
[15,] 0.0006040889 0.0012081779 0.99939591
[16,] 0.0023394119 0.0046788238 0.99766059
[17,] 0.0058485781 0.0116971561 0.99415142
[18,] 0.0078584152 0.0157168303 0.99214158
[19,] 0.0129086370 0.0258172741 0.98709136
[20,] 0.0395209899 0.0790419798 0.96047901
[21,] 0.1568972254 0.3137944509 0.84310277
[22,] 0.2828942704 0.5657885407 0.71710573
[23,] 0.3302039144 0.6604078289 0.66979609
[24,] 0.3394833491 0.6789666983 0.66051665
[25,] 0.3127011981 0.6254023962 0.68729880
[26,] 0.2875111923 0.5750223846 0.71248881
[27,] 0.2637067895 0.5274135789 0.73629321
[28,] 0.2869652801 0.5739305602 0.71303472
[29,] 0.2661527191 0.5323054381 0.73384728
[30,] 0.2617608551 0.5235217102 0.73823914
[31,] 0.2986434335 0.5972868670 0.70135657
[32,] 0.3587380095 0.7174760189 0.64126199
[33,] 0.3635414817 0.7270829633 0.63645852
[34,] 0.3711370616 0.7422741233 0.62886294
[35,] 0.3653301031 0.7306602061 0.63466990
[36,] 0.3785342225 0.7570684449 0.62146578
[37,] 0.4010370767 0.8020741534 0.59896292
[38,] 0.3432468819 0.6864937638 0.65675312
[39,] 0.2959246520 0.5918493039 0.70407535
[40,] 0.2636331144 0.5272662289 0.73636689
[41,] 0.2388695921 0.4777391842 0.76113041
[42,] 0.3580205466 0.7160410931 0.64197945
[43,] 0.3332389992 0.6664779985 0.66676100
[44,] 0.2525159516 0.5050319031 0.74748405
[45,] 0.1847045266 0.3694090533 0.81529547
[46,] 0.1447154508 0.2894309016 0.85528455
[47,] 0.1169284070 0.2338568141 0.88307159
[48,] 0.4614224340 0.9228448681 0.53857757
[49,] 0.9282828928 0.1434342144 0.07171711
[50,] 0.9659304717 0.0681390566 0.03406953
[51,] 0.9018955437 0.1962089127 0.09810446
> postscript(file="/var/www/html/rcomp/tmp/1smqb1259174576.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/2u57z1259174576.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/3hhvp1259174576.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/4s2ri1259174576.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/5d1ed1259174576.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
0.64120619 1.15298904 0.66253963 0.31020378 0.35545808 0.38884075
7 8 9 10 11 12
0.41978397 0.62924576 0.28402106 0.17214941 0.14822855 -0.23725319
13 14 15 16 17 18
0.11502347 0.63156681 0.55780873 0.62683592 0.67211982 0.79357164
19 20 21 22 23 24
0.93403585 1.28631251 0.93403585 0.85301864 0.36489028 -0.73014204
25 26 27 28 29 30
-0.67072464 -0.23034922 0.01011499 0.02442607 -0.13502093 0.06018898
31 32 33 34 35 36
-0.05647275 0.06486068 -0.13743077 -0.26126285 -0.47322328 -0.76114446
37 38 39 40 41 42
-0.58265548 -0.58509492 -0.44945040 -0.76605294 -0.78262588 -0.22793938
43 44 45 46 47 48
-0.17795418 -0.64936161 -0.77084303 -1.26602334 -0.80416650 -0.17783579
49 50 51 52 53 54
0.01261363 0.01725573 -0.80892699 -1.49690737 -1.21830000 -0.39684817
55 56 57 58 59 60
0.25551728 0.69116180 0.27693951 -0.07780619 0.28164081 0.30321102
> postscript(file="/var/www/html/rcomp/tmp/69ae51259174576.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 0.64120619 NA
1 1.15298904 0.64120619
2 0.66253963 1.15298904
3 0.31020378 0.66253963
4 0.35545808 0.31020378
5 0.38884075 0.35545808
6 0.41978397 0.38884075
7 0.62924576 0.41978397
8 0.28402106 0.62924576
9 0.17214941 0.28402106
10 0.14822855 0.17214941
11 -0.23725319 0.14822855
12 0.11502347 -0.23725319
13 0.63156681 0.11502347
14 0.55780873 0.63156681
15 0.62683592 0.55780873
16 0.67211982 0.62683592
17 0.79357164 0.67211982
18 0.93403585 0.79357164
19 1.28631251 0.93403585
20 0.93403585 1.28631251
21 0.85301864 0.93403585
22 0.36489028 0.85301864
23 -0.73014204 0.36489028
24 -0.67072464 -0.73014204
25 -0.23034922 -0.67072464
26 0.01011499 -0.23034922
27 0.02442607 0.01011499
28 -0.13502093 0.02442607
29 0.06018898 -0.13502093
30 -0.05647275 0.06018898
31 0.06486068 -0.05647275
32 -0.13743077 0.06486068
33 -0.26126285 -0.13743077
34 -0.47322328 -0.26126285
35 -0.76114446 -0.47322328
36 -0.58265548 -0.76114446
37 -0.58509492 -0.58265548
38 -0.44945040 -0.58509492
39 -0.76605294 -0.44945040
40 -0.78262588 -0.76605294
41 -0.22793938 -0.78262588
42 -0.17795418 -0.22793938
43 -0.64936161 -0.17795418
44 -0.77084303 -0.64936161
45 -1.26602334 -0.77084303
46 -0.80416650 -1.26602334
47 -0.17783579 -0.80416650
48 0.01261363 -0.17783579
49 0.01725573 0.01261363
50 -0.80892699 0.01725573
51 -1.49690737 -0.80892699
52 -1.21830000 -1.49690737
53 -0.39684817 -1.21830000
54 0.25551728 -0.39684817
55 0.69116180 0.25551728
56 0.27693951 0.69116180
57 -0.07780619 0.27693951
58 0.28164081 -0.07780619
59 0.30321102 0.28164081
60 NA 0.30321102
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 1.15298904 0.64120619
[2,] 0.66253963 1.15298904
[3,] 0.31020378 0.66253963
[4,] 0.35545808 0.31020378
[5,] 0.38884075 0.35545808
[6,] 0.41978397 0.38884075
[7,] 0.62924576 0.41978397
[8,] 0.28402106 0.62924576
[9,] 0.17214941 0.28402106
[10,] 0.14822855 0.17214941
[11,] -0.23725319 0.14822855
[12,] 0.11502347 -0.23725319
[13,] 0.63156681 0.11502347
[14,] 0.55780873 0.63156681
[15,] 0.62683592 0.55780873
[16,] 0.67211982 0.62683592
[17,] 0.79357164 0.67211982
[18,] 0.93403585 0.79357164
[19,] 1.28631251 0.93403585
[20,] 0.93403585 1.28631251
[21,] 0.85301864 0.93403585
[22,] 0.36489028 0.85301864
[23,] -0.73014204 0.36489028
[24,] -0.67072464 -0.73014204
[25,] -0.23034922 -0.67072464
[26,] 0.01011499 -0.23034922
[27,] 0.02442607 0.01011499
[28,] -0.13502093 0.02442607
[29,] 0.06018898 -0.13502093
[30,] -0.05647275 0.06018898
[31,] 0.06486068 -0.05647275
[32,] -0.13743077 0.06486068
[33,] -0.26126285 -0.13743077
[34,] -0.47322328 -0.26126285
[35,] -0.76114446 -0.47322328
[36,] -0.58265548 -0.76114446
[37,] -0.58509492 -0.58265548
[38,] -0.44945040 -0.58509492
[39,] -0.76605294 -0.44945040
[40,] -0.78262588 -0.76605294
[41,] -0.22793938 -0.78262588
[42,] -0.17795418 -0.22793938
[43,] -0.64936161 -0.17795418
[44,] -0.77084303 -0.64936161
[45,] -1.26602334 -0.77084303
[46,] -0.80416650 -1.26602334
[47,] -0.17783579 -0.80416650
[48,] 0.01261363 -0.17783579
[49,] 0.01725573 0.01261363
[50,] -0.80892699 0.01725573
[51,] -1.49690737 -0.80892699
[52,] -1.21830000 -1.49690737
[53,] -0.39684817 -1.21830000
[54,] 0.25551728 -0.39684817
[55,] 0.69116180 0.25551728
[56,] 0.27693951 0.69116180
[57,] -0.07780619 0.27693951
[58,] 0.28164081 -0.07780619
[59,] 0.30321102 0.28164081
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 1.15298904 0.64120619
2 0.66253963 1.15298904
3 0.31020378 0.66253963
4 0.35545808 0.31020378
5 0.38884075 0.35545808
6 0.41978397 0.38884075
7 0.62924576 0.41978397
8 0.28402106 0.62924576
9 0.17214941 0.28402106
10 0.14822855 0.17214941
11 -0.23725319 0.14822855
12 0.11502347 -0.23725319
13 0.63156681 0.11502347
14 0.55780873 0.63156681
15 0.62683592 0.55780873
16 0.67211982 0.62683592
17 0.79357164 0.67211982
18 0.93403585 0.79357164
19 1.28631251 0.93403585
20 0.93403585 1.28631251
21 0.85301864 0.93403585
22 0.36489028 0.85301864
23 -0.73014204 0.36489028
24 -0.67072464 -0.73014204
25 -0.23034922 -0.67072464
26 0.01011499 -0.23034922
27 0.02442607 0.01011499
28 -0.13502093 0.02442607
29 0.06018898 -0.13502093
30 -0.05647275 0.06018898
31 0.06486068 -0.05647275
32 -0.13743077 0.06486068
33 -0.26126285 -0.13743077
34 -0.47322328 -0.26126285
35 -0.76114446 -0.47322328
36 -0.58265548 -0.76114446
37 -0.58509492 -0.58265548
38 -0.44945040 -0.58509492
39 -0.76605294 -0.44945040
40 -0.78262588 -0.76605294
41 -0.22793938 -0.78262588
42 -0.17795418 -0.22793938
43 -0.64936161 -0.17795418
44 -0.77084303 -0.64936161
45 -1.26602334 -0.77084303
46 -0.80416650 -1.26602334
47 -0.17783579 -0.80416650
48 0.01261363 -0.17783579
49 0.01725573 0.01261363
50 -0.80892699 0.01725573
51 -1.49690737 -0.80892699
52 -1.21830000 -1.49690737
53 -0.39684817 -1.21830000
54 0.25551728 -0.39684817
55 0.69116180 0.25551728
56 0.27693951 0.69116180
57 -0.07780619 0.27693951
58 0.28164081 -0.07780619
59 0.30321102 0.28164081
> 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/7tvz01259174576.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/8f84a1259174576.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/9kibk1259174576.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/10skxj1259174576.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/11xcu91259174576.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/12kgek1259174576.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/13zlej1259174576.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/14wla51259174576.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/15ginz1259174576.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/169ayo1259174576.tab")
+ }
> system("convert tmp/1smqb1259174576.ps tmp/1smqb1259174576.png")
> system("convert tmp/2u57z1259174576.ps tmp/2u57z1259174576.png")
> system("convert tmp/3hhvp1259174576.ps tmp/3hhvp1259174576.png")
> system("convert tmp/4s2ri1259174576.ps tmp/4s2ri1259174576.png")
> system("convert tmp/5d1ed1259174576.ps tmp/5d1ed1259174576.png")
> system("convert tmp/69ae51259174576.ps tmp/69ae51259174576.png")
> system("convert tmp/7tvz01259174576.ps tmp/7tvz01259174576.png")
> system("convert tmp/8f84a1259174576.ps tmp/8f84a1259174576.png")
> system("convert tmp/9kibk1259174576.ps tmp/9kibk1259174576.png")
> system("convert tmp/10skxj1259174576.ps tmp/10skxj1259174576.png")
>
>
> proc.time()
user system elapsed
2.432 1.553 2.890