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(6.4,7.7,9.2,8.6,7.4,8.6,6.2,6,6.6,5.1,4.7,5,3.6,1.9,-0.1,-5.7,-5.6,-6.4,-7.7,-8,-11.9,-15.4,-15.5,-13.4,-10.9,-10.8,-7.3,-6.5,-5.1,-5.3,-6.8,-8.4,-8.4,-9.7,-8.8,-9.6,-11.5,-11,-14.9,-16.2,-14.4,-17.3,-15.7,-12.6,-9.4,-8.1,-5.4,-4.6,-4.9,-4,-3.1,-1.3,0,-0.4,3,0.4,1.2,0.6,-1.3,-3.2,-1.8,-3.6,-4.2,-6.9,-8,-7.5,-8.2,-7.6,-3.7,-1.7,-0.7,0.2,0.6,2.2,3.3,5.3,5.5,6.3,7.7,6.5,5.5,6.9,5.7,6.9,6.1,4.8,3.7,5.8,6.8,8.5,7.2,5,4.7,2.3,2.4,0.1,1.9,1.7,2,-1.9,0.5,-1.3,-3.3,-2.8,-8,-13.9,-21.9,-28.8,-27.6,-31.4,-31.8,-29.4,-27.6,-23.6,-22.8,-18.2,-17.8,-14.2,-8.8,-7.9,-7,-7,-3.6,-2.4,-4.9,-7.7,-6.5,-5.1,-3.4,-2.8,0.8),dim=c(1,131),dimnames=list(c('Conjunctuur'),1:131))
> y <- array(NA,dim=c(1,131),dimnames=list(c('Conjunctuur'),1:131))
> 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
Conjunctuur M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 6.4 1 0 0 0 0 0 0 0 0 0 0 1
2 7.7 0 1 0 0 0 0 0 0 0 0 0 2
3 9.2 0 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 0 103
104 -2.8 0 0 0 0 0 0 0 1 0 0 0 104
105 -8.0 0 0 0 0 0 0 0 0 1 0 0 105
106 -13.9 0 0 0 0 0 0 0 0 0 1 0 106
107 -21.9 0 0 0 0 0 0 0 0 0 0 1 107
108 -28.8 0 0 0 0 0 0 0 0 0 0 0 108
109 -27.6 1 0 0 0 0 0 0 0 0 0 0 109
110 -31.4 0 1 0 0 0 0 0 0 0 0 0 110
111 -31.8 0 0 1 0 0 0 0 0 0 0 0 111
112 -29.4 0 0 0 1 0 0 0 0 0 0 0 112
113 -27.6 0 0 0 0 1 0 0 0 0 0 0 113
114 -23.6 0 0 0 0 0 1 0 0 0 0 0 114
115 -22.8 0 0 0 0 0 0 1 0 0 0 0 115
116 -18.2 0 0 0 0 0 0 0 1 0 0 0 116
117 -17.8 0 0 0 0 0 0 0 0 1 0 0 117
118 -14.2 0 0 0 0 0 0 0 0 0 1 0 118
119 -8.8 0 0 0 0 0 0 0 0 0 0 1 119
120 -7.9 0 0 0 0 0 0 0 0 0 0 0 120
121 -7.0 1 0 0 0 0 0 0 0 0 0 0 121
122 -7.0 0 1 0 0 0 0 0 0 0 0 0 122
123 -3.6 0 0 1 0 0 0 0 0 0 0 0 123
124 -2.4 0 0 0 1 0 0 0 0 0 0 0 124
125 -4.9 0 0 0 0 1 0 0 0 0 0 0 125
126 -7.7 0 0 0 0 0 1 0 0 0 0 0 126
127 -6.5 0 0 0 0 0 0 1 0 0 0 0 127
128 -5.1 0 0 0 0 0 0 0 1 0 0 0 128
129 -3.4 0 0 0 0 0 0 0 0 1 0 0 129
130 -2.8 0 0 0 0 0 0 0 0 0 1 0 130
131 0.8 0 0 0 0 0 0 0 0 0 0 1 131
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) M1 M2 M3 M4 M5
-1.90043 1.15503 0.81003 1.11047 0.82001 1.34773
M6 M7 M8 M9 M10 M11
1.33909 1.32136 1.56726 1.64044 1.12270 1.36860
t
-0.05499
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-24.906 -6.192 2.000 7.317 14.011
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.90043 3.34148 -0.569 0.571
M1 1.15503 4.15758 0.278 0.782
M2 0.81003 4.15705 0.195 0.846
M3 1.11047 4.15664 0.267 0.790
M4 0.82001 4.15635 0.197 0.844
M5 1.34773 4.15617 0.324 0.746
M6 1.33909 4.15612 0.322 0.748
M7 1.32136 4.15617 0.318 0.751
M8 1.56726 4.15635 0.377 0.707
M9 1.64044 4.15664 0.395 0.694
M10 1.12270 4.15705 0.270 0.788
M11 1.36860 4.15758 0.329 0.743
t -0.05499 0.02205 -2.494 0.014 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 9.512 on 118 degrees of freedom
Multiple R-squared: 0.05169, Adjusted R-squared: -0.04475
F-statistic: 0.536 on 12 and 118 DF, p-value: 0.8874
> 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,] 5.965661e-02 1.193132e-01 0.940343389
[2,] 2.685851e-02 5.371702e-02 0.973141491
[3,] 1.493571e-02 2.987142e-02 0.985064288
[4,] 6.094739e-03 1.218948e-02 0.993905261
[5,] 2.336637e-03 4.673275e-03 0.997663363
[6,] 2.044829e-03 4.089658e-03 0.997955171
[7,] 2.256823e-03 4.513645e-03 0.997743177
[8,] 1.840224e-03 3.680448e-03 0.998159776
[9,] 9.874776e-04 1.974955e-03 0.999012522
[10,] 5.359712e-04 1.071942e-03 0.999464029
[11,] 2.676731e-04 5.353462e-04 0.999732327
[12,] 2.315464e-04 4.630928e-04 0.999768454
[13,] 3.869092e-04 7.738183e-04 0.999613091
[14,] 6.490885e-04 1.298177e-03 0.999350912
[15,] 6.985851e-04 1.397170e-03 0.999301415
[16,] 6.662168e-04 1.332434e-03 0.999333783
[17,] 4.741527e-04 9.483054e-04 0.999525847
[18,] 3.927377e-04 7.854754e-04 0.999607262
[19,] 3.603253e-04 7.206506e-04 0.999639675
[20,] 3.542198e-04 7.084396e-04 0.999645780
[21,] 2.471848e-04 4.943696e-04 0.999752815
[22,] 1.469708e-04 2.939417e-04 0.999853029
[23,] 8.701517e-05 1.740303e-04 0.999912985
[24,] 4.998137e-05 9.996274e-05 0.999950019
[25,] 3.033209e-05 6.066418e-05 0.999969668
[26,] 1.810179e-05 3.620357e-05 0.999981898
[27,] 1.319474e-05 2.638949e-05 0.999986805
[28,] 9.429140e-06 1.885828e-05 0.999990571
[29,] 8.361732e-06 1.672346e-05 0.999991638
[30,] 1.313291e-05 2.626583e-05 0.999986867
[31,] 3.528491e-05 7.056983e-05 0.999964715
[32,] 1.144502e-04 2.289005e-04 0.999885550
[33,] 2.524392e-04 5.048785e-04 0.999747561
[34,] 4.370190e-04 8.740380e-04 0.999562981
[35,] 6.717615e-04 1.343523e-03 0.999328238
[36,] 1.002640e-03 2.005281e-03 0.998997360
[37,] 1.968969e-03 3.937938e-03 0.998031031
[38,] 3.338993e-03 6.677985e-03 0.996661007
[39,] 4.911842e-03 9.823684e-03 0.995088158
[40,] 9.568408e-03 1.913682e-02 0.990431592
[41,] 1.198673e-02 2.397346e-02 0.988013272
[42,] 1.457739e-02 2.915478e-02 0.985422612
[43,] 1.729990e-02 3.459980e-02 0.982700098
[44,] 1.698597e-02 3.397193e-02 0.983014034
[45,] 1.425193e-02 2.850386e-02 0.985748072
[46,] 1.182280e-02 2.364559e-02 0.988177204
[47,] 9.135886e-03 1.827177e-02 0.990864114
[48,] 7.036919e-03 1.407384e-02 0.992963081
[49,] 5.733670e-03 1.146734e-02 0.994266330
[50,] 4.976619e-03 9.953238e-03 0.995023381
[51,] 4.474853e-03 8.949706e-03 0.995525147
[52,] 4.317443e-03 8.634887e-03 0.995682557
[53,] 4.450659e-03 8.901319e-03 0.995549341
[54,] 4.168975e-03 8.337949e-03 0.995831025
[55,] 4.095878e-03 8.191756e-03 0.995904122
[56,] 4.056503e-03 8.113006e-03 0.995943497
[57,] 3.522407e-03 7.044814e-03 0.996477593
[58,] 2.886287e-03 5.772573e-03 0.997113713
[59,] 2.423763e-03 4.847526e-03 0.997576237
[60,] 2.100079e-03 4.200158e-03 0.997899921
[61,] 2.145439e-03 4.290878e-03 0.997854561
[62,] 2.055369e-03 4.110737e-03 0.997944631
[63,] 2.035448e-03 4.070895e-03 0.997964552
[64,] 2.133759e-03 4.267517e-03 0.997866241
[65,] 1.983509e-03 3.967019e-03 0.998016491
[66,] 1.618786e-03 3.237572e-03 0.998381214
[67,] 1.427129e-03 2.854259e-03 0.998572871
[68,] 1.121165e-03 2.242330e-03 0.998878835
[69,] 1.051401e-03 2.102802e-03 0.998948599
[70,] 8.260307e-04 1.652061e-03 0.999173969
[71,] 6.177502e-04 1.235500e-03 0.999382250
[72,] 4.200346e-04 8.400693e-04 0.999579965
[73,] 3.320817e-04 6.641634e-04 0.999667918
[74,] 2.761446e-04 5.522893e-04 0.999723855
[75,] 2.803163e-04 5.606325e-04 0.999719684
[76,] 2.612093e-04 5.224186e-04 0.999738791
[77,] 1.922571e-04 3.845142e-04 0.999807743
[78,] 1.476111e-04 2.952222e-04 0.999852389
[79,] 1.042606e-04 2.085213e-04 0.999895739
[80,] 7.643318e-05 1.528664e-04 0.999923567
[81,] 8.873385e-05 1.774677e-04 0.999911266
[82,] 1.286081e-04 2.572163e-04 0.999871392
[83,] 2.822014e-04 5.644029e-04 0.999717799
[84,] 7.294909e-04 1.458982e-03 0.999270509
[85,] 1.319310e-03 2.638621e-03 0.998680690
[86,] 4.636646e-03 9.273292e-03 0.995363354
[87,] 1.834690e-02 3.669380e-02 0.981653098
[88,] 7.500677e-02 1.500135e-01 0.924993235
[89,] 3.094063e-01 6.188126e-01 0.690593689
[90,] 7.308804e-01 5.382393e-01 0.269119626
[91,] 9.582997e-01 8.340065e-02 0.041700327
[92,] 9.782813e-01 4.343734e-02 0.021718671
[93,] 9.750169e-01 4.996621e-02 0.024983104
[94,] 9.677353e-01 6.452933e-02 0.032264664
[95,] 9.683241e-01 6.335180e-02 0.031675900
[96,] 9.853529e-01 2.929428e-02 0.014647140
[97,] 9.964297e-01 7.140662e-03 0.003570331
[98,] 9.993030e-01 1.394026e-03 0.000697013
[99,] 9.976948e-01 4.610308e-03 0.002305154
[100,] 9.956139e-01 8.772167e-03 0.004386083
> postscript(file="/var/www/html/rcomp/tmp/1tjm31293195933.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/24s3o1293195933.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/34s3o1293195933.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/44s3o1293195933.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/5xjlr1293195933.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 = 131
Frequency = 1
1 2 3 4 5 6
7.20038685 8.90038685 10.15493230 9.90038685 8.22765957 9.49129594
7 8 9 10 11 12
7.16402321 6.77311412 7.35493230 6.42765957 5.83675048 7.56034816
13 14 15 16 17 18
5.06030948 3.76030948 1.51485493 -3.73969052 -4.11241779 -4.84878143
19 20 21 22 23 24
-6.07605416 -6.56696325 -10.48514507 -13.41241779 -13.70332689 -10.17972921
25 26 27 28 29 30
-8.77976789 -8.27976789 -5.02522244 -3.87976789 -2.95249516 -3.08885880
31 32 33 34 35 36
-4.51613153 -6.30704062 -6.32522244 -7.05249516 -6.34340426 -5.71980658
37 38 39 40 41 42
-8.71984526 -7.81984526 -11.96529981 -12.91984526 -11.59257253 -14.42893617
43 44 45 46 47 48
-12.75620890 -9.84711799 -6.66529981 -4.79257253 -2.28348162 -0.05988395
49 50 51 52 53 54
-1.45992263 -0.15992263 0.49462282 2.64007737 3.46735010 3.13098646
55 56 57 58 59 60
6.60371373 3.81280464 4.59462282 4.56735010 2.47644101 2.00003868
61 62 63 64 65 66
2.30000000 0.90000000 0.05454545 -2.30000000 -3.87272727 -3.30909091
67 68 69 70 71 72
-3.93636364 -3.52727273 0.35454545 2.92727273 3.73636364 6.05996132
73 74 75 76 77 78
5.35992263 7.35992263 8.21446809 10.55992263 10.28719536 11.15083172
79 80 81 82 83 84
12.62355899 11.23264990 10.21446809 12.18719536 10.79628627 13.41988395
85 86 87 88 89 90
11.51984526 10.61984526 9.27439072 11.71984526 12.24711799 14.01075435
91 92 93 94 95 96
12.78348162 10.39257253 10.07439072 8.24711799 8.15620890 7.27980658
97 98 99 100 101 102
7.97976789 8.17976789 8.23431335 4.67976789 6.60704062 4.87067698
103 104 105 106 107 108
2.94340426 3.25249516 -1.96568665 -7.29295938 -15.48386847 -20.96027079
109 110 111 112 113 114
-20.86030948 -24.26030948 -24.90576402 -22.16030948 -20.83303675 -16.76940039
115 116 117 118 119 120
-15.89667311 -11.48758221 -11.10576402 -6.93303675 -1.72394584 0.59965184
121 122 123 124 125 126
0.39961315 0.79961315 3.95415861 5.49961315 2.52688588 -0.20947776
127 128 129 130 131
1.06324952 2.27234043 3.95415861 5.12688588 8.53597679
> postscript(file="/var/www/html/rcomp/tmp/6xjlr1293195933.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 = 131
Frequency = 1
lag(myerror, k = 1) myerror
0 7.20038685 NA
1 8.90038685 7.20038685
2 10.15493230 8.90038685
3 9.90038685 10.15493230
4 8.22765957 9.90038685
5 9.49129594 8.22765957
6 7.16402321 9.49129594
7 6.77311412 7.16402321
8 7.35493230 6.77311412
9 6.42765957 7.35493230
10 5.83675048 6.42765957
11 7.56034816 5.83675048
12 5.06030948 7.56034816
13 3.76030948 5.06030948
14 1.51485493 3.76030948
15 -3.73969052 1.51485493
16 -4.11241779 -3.73969052
17 -4.84878143 -4.11241779
18 -6.07605416 -4.84878143
19 -6.56696325 -6.07605416
20 -10.48514507 -6.56696325
21 -13.41241779 -10.48514507
22 -13.70332689 -13.41241779
23 -10.17972921 -13.70332689
24 -8.77976789 -10.17972921
25 -8.27976789 -8.77976789
26 -5.02522244 -8.27976789
27 -3.87976789 -5.02522244
28 -2.95249516 -3.87976789
29 -3.08885880 -2.95249516
30 -4.51613153 -3.08885880
31 -6.30704062 -4.51613153
32 -6.32522244 -6.30704062
33 -7.05249516 -6.32522244
34 -6.34340426 -7.05249516
35 -5.71980658 -6.34340426
36 -8.71984526 -5.71980658
37 -7.81984526 -8.71984526
38 -11.96529981 -7.81984526
39 -12.91984526 -11.96529981
40 -11.59257253 -12.91984526
41 -14.42893617 -11.59257253
42 -12.75620890 -14.42893617
43 -9.84711799 -12.75620890
44 -6.66529981 -9.84711799
45 -4.79257253 -6.66529981
46 -2.28348162 -4.79257253
47 -0.05988395 -2.28348162
48 -1.45992263 -0.05988395
49 -0.15992263 -1.45992263
50 0.49462282 -0.15992263
51 2.64007737 0.49462282
52 3.46735010 2.64007737
53 3.13098646 3.46735010
54 6.60371373 3.13098646
55 3.81280464 6.60371373
56 4.59462282 3.81280464
57 4.56735010 4.59462282
58 2.47644101 4.56735010
59 2.00003868 2.47644101
60 2.30000000 2.00003868
61 0.90000000 2.30000000
62 0.05454545 0.90000000
63 -2.30000000 0.05454545
64 -3.87272727 -2.30000000
65 -3.30909091 -3.87272727
66 -3.93636364 -3.30909091
67 -3.52727273 -3.93636364
68 0.35454545 -3.52727273
69 2.92727273 0.35454545
70 3.73636364 2.92727273
71 6.05996132 3.73636364
72 5.35992263 6.05996132
73 7.35992263 5.35992263
74 8.21446809 7.35992263
75 10.55992263 8.21446809
76 10.28719536 10.55992263
77 11.15083172 10.28719536
78 12.62355899 11.15083172
79 11.23264990 12.62355899
80 10.21446809 11.23264990
81 12.18719536 10.21446809
82 10.79628627 12.18719536
83 13.41988395 10.79628627
84 11.51984526 13.41988395
85 10.61984526 11.51984526
86 9.27439072 10.61984526
87 11.71984526 9.27439072
88 12.24711799 11.71984526
89 14.01075435 12.24711799
90 12.78348162 14.01075435
91 10.39257253 12.78348162
92 10.07439072 10.39257253
93 8.24711799 10.07439072
94 8.15620890 8.24711799
95 7.27980658 8.15620890
96 7.97976789 7.27980658
97 8.17976789 7.97976789
98 8.23431335 8.17976789
99 4.67976789 8.23431335
100 6.60704062 4.67976789
101 4.87067698 6.60704062
102 2.94340426 4.87067698
103 3.25249516 2.94340426
104 -1.96568665 3.25249516
105 -7.29295938 -1.96568665
106 -15.48386847 -7.29295938
107 -20.96027079 -15.48386847
108 -20.86030948 -20.96027079
109 -24.26030948 -20.86030948
110 -24.90576402 -24.26030948
111 -22.16030948 -24.90576402
112 -20.83303675 -22.16030948
113 -16.76940039 -20.83303675
114 -15.89667311 -16.76940039
115 -11.48758221 -15.89667311
116 -11.10576402 -11.48758221
117 -6.93303675 -11.10576402
118 -1.72394584 -6.93303675
119 0.59965184 -1.72394584
120 0.39961315 0.59965184
121 0.79961315 0.39961315
122 3.95415861 0.79961315
123 5.49961315 3.95415861
124 2.52688588 5.49961315
125 -0.20947776 2.52688588
126 1.06324952 -0.20947776
127 2.27234043 1.06324952
128 3.95415861 2.27234043
129 5.12688588 3.95415861
130 8.53597679 5.12688588
131 NA 8.53597679
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 8.90038685 7.20038685
[2,] 10.15493230 8.90038685
[3,] 9.90038685 10.15493230
[4,] 8.22765957 9.90038685
[5,] 9.49129594 8.22765957
[6,] 7.16402321 9.49129594
[7,] 6.77311412 7.16402321
[8,] 7.35493230 6.77311412
[9,] 6.42765957 7.35493230
[10,] 5.83675048 6.42765957
[11,] 7.56034816 5.83675048
[12,] 5.06030948 7.56034816
[13,] 3.76030948 5.06030948
[14,] 1.51485493 3.76030948
[15,] -3.73969052 1.51485493
[16,] -4.11241779 -3.73969052
[17,] -4.84878143 -4.11241779
[18,] -6.07605416 -4.84878143
[19,] -6.56696325 -6.07605416
[20,] -10.48514507 -6.56696325
[21,] -13.41241779 -10.48514507
[22,] -13.70332689 -13.41241779
[23,] -10.17972921 -13.70332689
[24,] -8.77976789 -10.17972921
[25,] -8.27976789 -8.77976789
[26,] -5.02522244 -8.27976789
[27,] -3.87976789 -5.02522244
[28,] -2.95249516 -3.87976789
[29,] -3.08885880 -2.95249516
[30,] -4.51613153 -3.08885880
[31,] -6.30704062 -4.51613153
[32,] -6.32522244 -6.30704062
[33,] -7.05249516 -6.32522244
[34,] -6.34340426 -7.05249516
[35,] -5.71980658 -6.34340426
[36,] -8.71984526 -5.71980658
[37,] -7.81984526 -8.71984526
[38,] -11.96529981 -7.81984526
[39,] -12.91984526 -11.96529981
[40,] -11.59257253 -12.91984526
[41,] -14.42893617 -11.59257253
[42,] -12.75620890 -14.42893617
[43,] -9.84711799 -12.75620890
[44,] -6.66529981 -9.84711799
[45,] -4.79257253 -6.66529981
[46,] -2.28348162 -4.79257253
[47,] -0.05988395 -2.28348162
[48,] -1.45992263 -0.05988395
[49,] -0.15992263 -1.45992263
[50,] 0.49462282 -0.15992263
[51,] 2.64007737 0.49462282
[52,] 3.46735010 2.64007737
[53,] 3.13098646 3.46735010
[54,] 6.60371373 3.13098646
[55,] 3.81280464 6.60371373
[56,] 4.59462282 3.81280464
[57,] 4.56735010 4.59462282
[58,] 2.47644101 4.56735010
[59,] 2.00003868 2.47644101
[60,] 2.30000000 2.00003868
[61,] 0.90000000 2.30000000
[62,] 0.05454545 0.90000000
[63,] -2.30000000 0.05454545
[64,] -3.87272727 -2.30000000
[65,] -3.30909091 -3.87272727
[66,] -3.93636364 -3.30909091
[67,] -3.52727273 -3.93636364
[68,] 0.35454545 -3.52727273
[69,] 2.92727273 0.35454545
[70,] 3.73636364 2.92727273
[71,] 6.05996132 3.73636364
[72,] 5.35992263 6.05996132
[73,] 7.35992263 5.35992263
[74,] 8.21446809 7.35992263
[75,] 10.55992263 8.21446809
[76,] 10.28719536 10.55992263
[77,] 11.15083172 10.28719536
[78,] 12.62355899 11.15083172
[79,] 11.23264990 12.62355899
[80,] 10.21446809 11.23264990
[81,] 12.18719536 10.21446809
[82,] 10.79628627 12.18719536
[83,] 13.41988395 10.79628627
[84,] 11.51984526 13.41988395
[85,] 10.61984526 11.51984526
[86,] 9.27439072 10.61984526
[87,] 11.71984526 9.27439072
[88,] 12.24711799 11.71984526
[89,] 14.01075435 12.24711799
[90,] 12.78348162 14.01075435
[91,] 10.39257253 12.78348162
[92,] 10.07439072 10.39257253
[93,] 8.24711799 10.07439072
[94,] 8.15620890 8.24711799
[95,] 7.27980658 8.15620890
[96,] 7.97976789 7.27980658
[97,] 8.17976789 7.97976789
[98,] 8.23431335 8.17976789
[99,] 4.67976789 8.23431335
[100,] 6.60704062 4.67976789
[101,] 4.87067698 6.60704062
[102,] 2.94340426 4.87067698
[103,] 3.25249516 2.94340426
[104,] -1.96568665 3.25249516
[105,] -7.29295938 -1.96568665
[106,] -15.48386847 -7.29295938
[107,] -20.96027079 -15.48386847
[108,] -20.86030948 -20.96027079
[109,] -24.26030948 -20.86030948
[110,] -24.90576402 -24.26030948
[111,] -22.16030948 -24.90576402
[112,] -20.83303675 -22.16030948
[113,] -16.76940039 -20.83303675
[114,] -15.89667311 -16.76940039
[115,] -11.48758221 -15.89667311
[116,] -11.10576402 -11.48758221
[117,] -6.93303675 -11.10576402
[118,] -1.72394584 -6.93303675
[119,] 0.59965184 -1.72394584
[120,] 0.39961315 0.59965184
[121,] 0.79961315 0.39961315
[122,] 3.95415861 0.79961315
[123,] 5.49961315 3.95415861
[124,] 2.52688588 5.49961315
[125,] -0.20947776 2.52688588
[126,] 1.06324952 -0.20947776
[127,] 2.27234043 1.06324952
[128,] 3.95415861 2.27234043
[129,] 5.12688588 3.95415861
[130,] 8.53597679 5.12688588
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 8.90038685 7.20038685
2 10.15493230 8.90038685
3 9.90038685 10.15493230
4 8.22765957 9.90038685
5 9.49129594 8.22765957
6 7.16402321 9.49129594
7 6.77311412 7.16402321
8 7.35493230 6.77311412
9 6.42765957 7.35493230
10 5.83675048 6.42765957
11 7.56034816 5.83675048
12 5.06030948 7.56034816
13 3.76030948 5.06030948
14 1.51485493 3.76030948
15 -3.73969052 1.51485493
16 -4.11241779 -3.73969052
17 -4.84878143 -4.11241779
18 -6.07605416 -4.84878143
19 -6.56696325 -6.07605416
20 -10.48514507 -6.56696325
21 -13.41241779 -10.48514507
22 -13.70332689 -13.41241779
23 -10.17972921 -13.70332689
24 -8.77976789 -10.17972921
25 -8.27976789 -8.77976789
26 -5.02522244 -8.27976789
27 -3.87976789 -5.02522244
28 -2.95249516 -3.87976789
29 -3.08885880 -2.95249516
30 -4.51613153 -3.08885880
31 -6.30704062 -4.51613153
32 -6.32522244 -6.30704062
33 -7.05249516 -6.32522244
34 -6.34340426 -7.05249516
35 -5.71980658 -6.34340426
36 -8.71984526 -5.71980658
37 -7.81984526 -8.71984526
38 -11.96529981 -7.81984526
39 -12.91984526 -11.96529981
40 -11.59257253 -12.91984526
41 -14.42893617 -11.59257253
42 -12.75620890 -14.42893617
43 -9.84711799 -12.75620890
44 -6.66529981 -9.84711799
45 -4.79257253 -6.66529981
46 -2.28348162 -4.79257253
47 -0.05988395 -2.28348162
48 -1.45992263 -0.05988395
49 -0.15992263 -1.45992263
50 0.49462282 -0.15992263
51 2.64007737 0.49462282
52 3.46735010 2.64007737
53 3.13098646 3.46735010
54 6.60371373 3.13098646
55 3.81280464 6.60371373
56 4.59462282 3.81280464
57 4.56735010 4.59462282
58 2.47644101 4.56735010
59 2.00003868 2.47644101
60 2.30000000 2.00003868
61 0.90000000 2.30000000
62 0.05454545 0.90000000
63 -2.30000000 0.05454545
64 -3.87272727 -2.30000000
65 -3.30909091 -3.87272727
66 -3.93636364 -3.30909091
67 -3.52727273 -3.93636364
68 0.35454545 -3.52727273
69 2.92727273 0.35454545
70 3.73636364 2.92727273
71 6.05996132 3.73636364
72 5.35992263 6.05996132
73 7.35992263 5.35992263
74 8.21446809 7.35992263
75 10.55992263 8.21446809
76 10.28719536 10.55992263
77 11.15083172 10.28719536
78 12.62355899 11.15083172
79 11.23264990 12.62355899
80 10.21446809 11.23264990
81 12.18719536 10.21446809
82 10.79628627 12.18719536
83 13.41988395 10.79628627
84 11.51984526 13.41988395
85 10.61984526 11.51984526
86 9.27439072 10.61984526
87 11.71984526 9.27439072
88 12.24711799 11.71984526
89 14.01075435 12.24711799
90 12.78348162 14.01075435
91 10.39257253 12.78348162
92 10.07439072 10.39257253
93 8.24711799 10.07439072
94 8.15620890 8.24711799
95 7.27980658 8.15620890
96 7.97976789 7.27980658
97 8.17976789 7.97976789
98 8.23431335 8.17976789
99 4.67976789 8.23431335
100 6.60704062 4.67976789
101 4.87067698 6.60704062
102 2.94340426 4.87067698
103 3.25249516 2.94340426
104 -1.96568665 3.25249516
105 -7.29295938 -1.96568665
106 -15.48386847 -7.29295938
107 -20.96027079 -15.48386847
108 -20.86030948 -20.96027079
109 -24.26030948 -20.86030948
110 -24.90576402 -24.26030948
111 -22.16030948 -24.90576402
112 -20.83303675 -22.16030948
113 -16.76940039 -20.83303675
114 -15.89667311 -16.76940039
115 -11.48758221 -15.89667311
116 -11.10576402 -11.48758221
117 -6.93303675 -11.10576402
118 -1.72394584 -6.93303675
119 0.59965184 -1.72394584
120 0.39961315 0.59965184
121 0.79961315 0.39961315
122 3.95415861 0.79961315
123 5.49961315 3.95415861
124 2.52688588 5.49961315
125 -0.20947776 2.52688588
126 1.06324952 -0.20947776
127 2.27234043 1.06324952
128 3.95415861 2.27234043
129 5.12688588 3.95415861
130 8.53597679 5.12688588
> 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/7pskc1293195933.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/8pskc1293195933.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/9i2jx1293195933.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/10i2jx1293195933.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/11mk0l1293195933.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/12ply91293195933.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/13ldw01293195933.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/146vdn1293195933.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/15aebb1293195933.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/16dwsh1293195933.tab")
+ }
>
> try(system("convert tmp/1tjm31293195933.ps tmp/1tjm31293195933.png",intern=TRUE))
character(0)
> try(system("convert tmp/24s3o1293195933.ps tmp/24s3o1293195933.png",intern=TRUE))
character(0)
> try(system("convert tmp/34s3o1293195933.ps tmp/34s3o1293195933.png",intern=TRUE))
character(0)
> try(system("convert tmp/44s3o1293195933.ps tmp/44s3o1293195933.png",intern=TRUE))
character(0)
> try(system("convert tmp/5xjlr1293195933.ps tmp/5xjlr1293195933.png",intern=TRUE))
character(0)
> try(system("convert tmp/6xjlr1293195933.ps tmp/6xjlr1293195933.png",intern=TRUE))
character(0)
> try(system("convert tmp/7pskc1293195933.ps tmp/7pskc1293195933.png",intern=TRUE))
character(0)
> try(system("convert tmp/8pskc1293195933.ps tmp/8pskc1293195933.png",intern=TRUE))
character(0)
> try(system("convert tmp/9i2jx1293195933.ps tmp/9i2jx1293195933.png",intern=TRUE))
character(0)
> try(system("convert tmp/10i2jx1293195933.ps tmp/10i2jx1293195933.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.652 1.773 9.010