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(9.1
+ ,4.5
+ ,1.0
+ ,-1.0
+ ,1989.3
+ ,9.0
+ ,4.3
+ ,1.0
+ ,3.0
+ ,2097.8
+ ,9.0
+ ,4.3
+ ,1.3
+ ,2.0
+ ,2154.9
+ ,8.9
+ ,4.2
+ ,1.1
+ ,3.0
+ ,2152.2
+ ,8.8
+ ,4.0
+ ,0.8
+ ,5.0
+ ,2250.3
+ ,8.7
+ ,3.8
+ ,0.7
+ ,5.0
+ ,2346.9
+ ,8.5
+ ,4.1
+ ,0.7
+ ,3.0
+ ,2525.6
+ ,8.3
+ ,4.2
+ ,0.9
+ ,2.0
+ ,2409.4
+ ,8.1
+ ,4.0
+ ,1.3
+ ,1.0
+ ,2394.4
+ ,7.9
+ ,4.3
+ ,1.4
+ ,-4.0
+ ,2401.3
+ ,7.8
+ ,4.7
+ ,1.6
+ ,1.0
+ ,2354.3
+ ,7.6
+ ,5.0
+ ,2.1
+ ,1.0
+ ,2450.4
+ ,7.4
+ ,5.1
+ ,0.3
+ ,6.0
+ ,2504.7
+ ,7.2
+ ,5.4
+ ,2.1
+ ,3.0
+ ,2661.4
+ ,7.0
+ ,5.4
+ ,2.5
+ ,2.0
+ ,2880.4
+ ,7.0
+ ,5.4
+ ,2.3
+ ,2.0
+ ,3064.4
+ ,6.8
+ ,5.5
+ ,2.4
+ ,2.0
+ ,3141.1
+ ,6.8
+ ,5.8
+ ,3.0
+ ,-8.0
+ ,3327.7
+ ,6.7
+ ,5.7
+ ,1.7
+ ,0.0
+ ,3565.0
+ ,6.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
+ ,2197.8)
+ ,dim=c(5
+ ,142)
+ ,dimnames=list(c('Werkloosheid'
+ ,'rente'
+ ,'inflatie'
+ ,'consumer'
+ ,'Bel20')
+ ,1:142))
> y <- array(NA,dim=c(5,142),dimnames=list(c('Werkloosheid','rente','inflatie','consumer','Bel20'),1:142))
> 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 = '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
Werkloosheid rente inflatie consumer Bel20 t
1 9.1 4.5 1.0 -1 1989.3 1
2 9.0 4.3 1.0 3 2097.8 2
3 9.0 4.3 1.3 2 2154.9 3
4 8.9 4.2 1.1 3 2152.2 4
5 8.8 4.0 0.8 5 2250.3 5
6 8.7 3.8 0.7 5 2346.9 6
7 8.5 4.1 0.7 3 2525.6 7
8 8.3 4.2 0.9 2 2409.4 8
9 8.1 4.0 1.3 1 2394.4 9
10 7.9 4.3 1.4 -4 2401.3 10
11 7.8 4.7 1.6 1 2354.3 11
12 7.6 5.0 2.1 1 2450.4 12
13 7.4 5.1 0.3 6 2504.7 13
14 7.2 5.4 2.1 3 2661.4 14
15 7.0 5.4 2.5 2 2880.4 15
16 7.0 5.4 2.3 2 3064.4 16
17 6.8 5.5 2.4 2 3141.1 17
18 6.8 5.8 3.0 -8 3327.7 18
19 6.7 5.7 1.7 0 3565.0 19
20 6.8 5.5 3.5 -2 3403.1 20
21 6.7 5.6 4.0 3 3149.9 21
22 6.7 5.6 3.7 5 3006.8 22
23 6.7 5.5 3.7 8 3230.7 23
24 6.5 5.5 3.0 8 3361.1 24
25 6.3 5.7 2.7 9 3484.7 25
26 6.3 5.6 2.5 11 3411.1 26
27 6.3 5.6 2.2 13 3288.2 27
28 6.5 5.4 2.9 12 3280.4 28
29 6.6 5.2 3.1 13 3174.0 29
30 6.5 5.1 3.0 15 3165.3 30
31 6.3 5.1 2.8 13 3092.7 31
32 6.3 5.0 2.5 16 3053.1 32
33 6.5 5.3 1.9 10 3182.0 33
34 7.0 5.4 1.9 14 2999.9 34
35 7.1 5.3 1.8 14 3249.6 35
36 7.3 5.1 2.0 15 3210.5 36
37 7.3 5.0 2.6 13 3030.3 37
38 7.4 5.0 2.5 8 2803.5 38
39 7.4 4.6 2.5 7 2767.6 39
40 7.3 4.8 1.6 3 2882.6 40
41 7.4 5.1 1.4 3 2863.4 41
42 7.5 5.1 0.8 4 2897.1 42
43 7.7 5.1 1.1 4 3012.6 43
44 7.7 5.4 1.3 0 3143.0 44
45 7.7 5.3 1.2 -4 3032.9 45
46 7.7 5.3 1.3 -14 3045.8 46
47 7.7 5.1 1.1 -18 3110.5 47
48 7.8 4.9 1.3 -8 3013.2 48
49 8.0 4.7 1.2 -1 2987.1 49
50 8.1 4.4 1.6 1 2995.6 50
51 8.1 4.6 1.7 2 2833.2 51
52 8.2 4.5 1.5 0 2849.0 52
53 8.2 4.2 0.9 1 2794.8 53
54 8.2 4.0 1.5 0 2845.3 54
55 8.1 3.9 1.4 -1 2915.0 55
56 8.1 4.1 1.6 -3 2892.6 56
57 8.2 4.1 1.7 -3 2604.4 57
58 8.3 3.7 1.4 -3 2641.7 58
59 8.3 3.8 1.8 -4 2659.8 59
60 8.4 4.1 1.7 -8 2638.5 60
61 8.5 4.1 1.4 -9 2720.3 61
62 8.5 4.0 1.2 -13 2745.9 62
63 8.4 4.3 1.0 -18 2735.7 63
64 8.0 4.4 1.7 -11 2811.7 64
65 7.9 4.2 2.4 -9 2799.4 65
66 8.1 4.2 2.0 -10 2555.3 66
67 8.5 4.0 2.1 -13 2305.0 67
68 8.8 4.0 2.0 -11 2215.0 68
69 8.8 4.3 1.8 -5 2065.8 69
70 8.6 4.4 2.7 -15 1940.5 70
71 8.3 4.4 2.3 -6 2042.0 71
72 8.3 4.3 1.9 -6 1995.4 72
73 8.3 4.1 2.0 -3 1946.8 73
74 8.4 4.1 2.3 -1 1765.9 74
75 8.4 3.9 2.8 -3 1635.3 75
76 8.5 3.8 2.4 -4 1833.4 76
77 8.6 3.7 2.3 -6 1910.4 77
78 8.6 3.5 2.7 0 1959.7 78
79 8.6 3.7 2.7 -4 1969.6 79
80 8.6 3.7 2.9 -2 2061.4 80
81 8.6 3.5 3.0 -2 2093.5 81
82 8.5 3.3 2.2 -6 2120.9 82
83 8.4 3.2 2.3 -7 2174.6 83
84 8.4 3.3 2.8 -6 2196.7 84
85 8.4 3.1 2.8 -6 2350.4 85
86 8.5 3.2 2.8 -3 2440.3 86
87 8.5 3.4 2.2 -2 2408.6 87
88 8.6 3.5 2.6 -5 2472.8 88
89 8.6 3.3 2.8 -11 2407.6 89
90 8.4 3.5 2.5 -11 2454.6 90
91 8.2 3.5 2.4 -11 2448.1 91
92 8.0 3.8 2.3 -10 2497.8 92
93 8.0 4.0 1.9 -14 2645.6 93
94 8.0 4.0 1.7 -8 2756.8 94
95 8.0 4.1 2.0 -9 2849.3 95
96 7.9 4.0 2.1 -5 2921.4 96
97 7.9 3.8 1.7 -1 2981.9 97
98 7.8 3.7 1.8 -2 3080.6 98
99 7.8 3.8 1.8 -5 3106.2 99
100 8.0 3.7 1.8 -4 3119.3 100
101 7.8 4.0 1.3 -6 3061.3 101
102 7.4 4.2 1.3 -2 3097.3 102
103 7.2 4.0 1.3 -2 3161.7 103
104 7.0 4.1 1.2 -2 3257.2 104
105 7.0 4.2 1.4 -2 3277.0 105
106 7.2 4.5 2.2 2 3295.3 106
107 7.2 4.6 2.9 1 3364.0 107
108 7.2 4.5 3.1 -8 3494.2 108
109 7.0 4.5 3.5 -1 3667.0 109
110 6.9 4.5 3.6 1 3813.1 110
111 6.8 4.4 4.4 -1 3918.0 111
112 6.8 4.3 4.1 2 3895.5 112
113 6.8 4.5 5.1 2 3801.1 113
114 6.9 4.1 5.8 1 3570.1 114
115 7.2 4.1 5.9 -1 3701.6 115
116 7.2 4.3 5.4 -2 3862.3 116
117 7.2 4.4 5.5 -2 3970.1 117
118 7.1 4.7 4.8 -1 4138.5 118
119 7.2 5.0 3.2 -8 4199.8 119
120 7.3 4.7 2.7 -4 4290.9 120
121 7.5 4.5 2.1 -6 4443.9 121
122 7.6 4.5 1.9 -3 4502.6 122
123 7.7 4.5 0.6 -3 4357.0 123
124 7.7 5.5 0.7 -7 4591.3 124
125 7.7 4.5 -0.2 -9 4697.0 125
126 7.8 4.4 -1.0 -11 4621.4 126
127 8.0 4.2 -1.7 -13 4562.8 127
128 8.1 3.9 -0.7 -11 4202.5 128
129 8.1 3.9 -1.0 -9 4296.5 129
130 8.0 4.2 -0.9 -17 4435.2 130
131 8.1 4.0 0.0 -22 4105.2 131
132 8.2 3.8 0.3 -25 4116.7 132
133 8.3 3.7 0.8 -20 3844.5 133
134 8.4 3.7 0.8 -24 3721.0 134
135 8.4 3.7 1.9 -24 3674.4 135
136 8.4 3.7 2.1 -22 3857.6 136
137 8.5 3.7 2.5 -19 3801.1 137
138 8.5 3.8 2.7 -18 3504.4 138
139 8.6 3.7 2.4 -17 3032.6 139
140 8.6 3.5 2.4 -11 3047.0 140
141 8.5 3.5 2.9 -11 2962.3 141
142 8.5 3.1 3.1 -12 2197.8 142
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) rente inflatie consumer Bel20 t
11.6359824 -0.5593203 -0.1438996 -0.0296060 -0.0003337 -0.0026812
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-0.86356 -0.19670 -0.03018 0.20871 0.89830
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.164e+01 2.674e-01 43.520 < 2e-16 ***
rente -5.593e-01 7.558e-02 -7.400 1.27e-11 ***
inflatie -1.439e-01 2.429e-02 -5.923 2.45e-08 ***
consumer -2.961e-02 4.442e-03 -6.665 6.07e-10 ***
Bel20 -3.337e-04 6.961e-05 -4.794 4.23e-06 ***
t -2.681e-03 1.503e-03 -1.784 0.0767 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.3072 on 136 degrees of freedom
Multiple R-squared: 0.8214, Adjusted R-squared: 0.8148
F-statistic: 125.1 on 5 and 136 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,] 3.154002e-02 6.308005e-02 9.684600e-01
[2,] 8.811649e-03 1.762330e-02 9.911884e-01
[3,] 1.945980e-03 3.891961e-03 9.980540e-01
[4,] 4.380720e-04 8.761440e-04 9.995619e-01
[5,] 1.232592e-04 2.465184e-04 9.998767e-01
[6,] 4.753799e-05 9.507598e-05 9.999525e-01
[7,] 1.692712e-05 3.385425e-05 9.999831e-01
[8,] 7.903131e-06 1.580626e-05 9.999921e-01
[9,] 1.692677e-06 3.385355e-06 9.999983e-01
[10,] 1.181677e-05 2.363355e-05 9.999882e-01
[11,] 3.617337e-06 7.234673e-06 9.999964e-01
[12,] 4.045914e-05 8.091828e-05 9.999595e-01
[13,] 9.913315e-05 1.982663e-04 9.999009e-01
[14,] 3.394398e-04 6.788796e-04 9.996606e-01
[15,] 3.004867e-04 6.009733e-04 9.996995e-01
[16,] 2.070559e-04 4.141118e-04 9.997929e-01
[17,] 1.228634e-04 2.457268e-04 9.998771e-01
[18,] 9.855927e-05 1.971185e-04 9.999014e-01
[19,] 1.422926e-04 2.845851e-04 9.998577e-01
[20,] 4.625667e-04 9.251335e-04 9.995374e-01
[21,] 8.955483e-04 1.791097e-03 9.991045e-01
[22,] 6.426895e-04 1.285379e-03 9.993573e-01
[23,] 5.620171e-04 1.124034e-03 9.994380e-01
[24,] 5.247807e-04 1.049561e-03 9.994752e-01
[25,] 1.467238e-02 2.934476e-02 9.853276e-01
[26,] 2.168784e-01 4.337568e-01 7.831216e-01
[27,] 5.708046e-01 8.583908e-01 4.291954e-01
[28,] 8.114731e-01 3.770538e-01 1.885269e-01
[29,] 8.653630e-01 2.692741e-01 1.346370e-01
[30,] 8.502557e-01 2.994885e-01 1.497443e-01
[31,] 8.181955e-01 3.636089e-01 1.818045e-01
[32,] 7.999442e-01 4.001116e-01 2.000558e-01
[33,] 7.702302e-01 4.595396e-01 2.297698e-01
[34,] 7.380656e-01 5.238688e-01 2.619344e-01
[35,] 7.645644e-01 4.708712e-01 2.354356e-01
[36,] 8.176976e-01 3.646049e-01 1.823024e-01
[37,] 7.881645e-01 4.236711e-01 2.118355e-01
[38,] 7.615699e-01 4.768602e-01 2.384301e-01
[39,] 7.824079e-01 4.351842e-01 2.175921e-01
[40,] 7.502223e-01 4.995554e-01 2.497777e-01
[41,] 7.314583e-01 5.370833e-01 2.685417e-01
[42,] 7.301496e-01 5.397008e-01 2.698504e-01
[43,] 7.334871e-01 5.330257e-01 2.665129e-01
[44,] 7.302842e-01 5.394317e-01 2.697158e-01
[45,] 7.049051e-01 5.901898e-01 2.950949e-01
[46,] 6.770642e-01 6.458717e-01 3.229358e-01
[47,] 6.481017e-01 7.037966e-01 3.518983e-01
[48,] 6.084541e-01 7.830918e-01 3.915459e-01
[49,] 5.835888e-01 8.328225e-01 4.164112e-01
[50,] 5.729700e-01 8.540599e-01 4.270300e-01
[51,] 5.396117e-01 9.207766e-01 4.603883e-01
[52,] 5.011106e-01 9.977789e-01 4.988894e-01
[53,] 4.750777e-01 9.501554e-01 5.249223e-01
[54,] 4.352705e-01 8.705409e-01 5.647295e-01
[55,] 4.072865e-01 8.145731e-01 5.927135e-01
[56,] 3.757333e-01 7.514665e-01 6.242667e-01
[57,] 3.465929e-01 6.931858e-01 6.534071e-01
[58,] 3.300870e-01 6.601739e-01 6.699130e-01
[59,] 2.938881e-01 5.877762e-01 7.061119e-01
[60,] 2.776442e-01 5.552885e-01 7.223558e-01
[61,] 3.280499e-01 6.560997e-01 6.719501e-01
[62,] 2.903829e-01 5.807658e-01 7.096171e-01
[63,] 2.648998e-01 5.297996e-01 7.351002e-01
[64,] 2.543529e-01 5.087058e-01 7.456471e-01
[65,] 2.438452e-01 4.876903e-01 7.561548e-01
[66,] 2.299287e-01 4.598574e-01 7.700713e-01
[67,] 2.124994e-01 4.249988e-01 7.875006e-01
[68,] 1.953415e-01 3.906830e-01 8.046585e-01
[69,] 1.804150e-01 3.608299e-01 8.195850e-01
[70,] 1.912643e-01 3.825285e-01 8.087357e-01
[71,] 2.048815e-01 4.097630e-01 7.951185e-01
[72,] 2.770802e-01 5.541603e-01 7.229198e-01
[73,] 3.420398e-01 6.840796e-01 6.579602e-01
[74,] 3.433767e-01 6.867533e-01 6.566233e-01
[75,] 3.489067e-01 6.978134e-01 6.510933e-01
[76,] 3.210959e-01 6.421918e-01 6.789041e-01
[77,] 2.868243e-01 5.736487e-01 7.131757e-01
[78,] 3.057684e-01 6.115369e-01 6.942316e-01
[79,] 3.740788e-01 7.481576e-01 6.259212e-01
[80,] 5.678820e-01 8.642360e-01 4.321180e-01
[81,] 6.361632e-01 7.276735e-01 3.638368e-01
[82,] 6.674533e-01 6.650934e-01 3.325467e-01
[83,] 6.690645e-01 6.618709e-01 3.309355e-01
[84,] 6.562187e-01 6.875625e-01 3.437813e-01
[85,] 6.329680e-01 7.340640e-01 3.670320e-01
[86,] 6.299722e-01 7.400556e-01 3.700278e-01
[87,] 6.630862e-01 6.738276e-01 3.369138e-01
[88,] 7.228348e-01 5.543305e-01 2.771652e-01
[89,] 8.039505e-01 3.920989e-01 1.960495e-01
[90,] 8.535386e-01 2.929227e-01 1.464614e-01
[91,] 9.061892e-01 1.876215e-01 9.381076e-02
[92,] 9.961249e-01 7.750111e-03 3.875055e-03
[93,] 9.999435e-01 1.129478e-04 5.647392e-05
[94,] 9.999898e-01 2.042426e-05 1.021213e-05
[95,] 9.999934e-01 1.311355e-05 6.556776e-06
[96,] 9.999933e-01 1.338954e-05 6.694770e-06
[97,] 9.999920e-01 1.592645e-05 7.963226e-06
[98,] 9.999928e-01 1.441272e-05 7.206360e-06
[99,] 9.999985e-01 2.921678e-06 1.460839e-06
[100,] 9.999998e-01 3.356903e-07 1.678452e-07
[101,] 1.000000e+00 4.635008e-08 2.317504e-08
[102,] 1.000000e+00 2.444034e-08 1.222017e-08
[103,] 1.000000e+00 6.043044e-08 3.021522e-08
[104,] 9.999999e-01 1.224465e-07 6.122325e-08
[105,] 9.999999e-01 1.646543e-07 8.232714e-08
[106,] 9.999999e-01 2.517377e-07 1.258688e-07
[107,] 9.999999e-01 2.389855e-07 1.194927e-07
[108,] 9.999999e-01 2.460618e-07 1.230309e-07
[109,] 9.999999e-01 2.832596e-07 1.416298e-07
[110,] 9.999997e-01 5.167315e-07 2.583657e-07
[111,] 9.999996e-01 8.900795e-07 4.450398e-07
[112,] 9.999995e-01 9.782517e-07 4.891258e-07
[113,] 9.999989e-01 2.245320e-06 1.122660e-06
[114,] 9.999972e-01 5.625854e-06 2.812927e-06
[115,] 9.999917e-01 1.667353e-05 8.336763e-06
[116,] 9.999920e-01 1.608365e-05 8.041825e-06
[117,] 9.999793e-01 4.147580e-05 2.073790e-05
[118,] 9.999766e-01 4.683778e-05 2.341889e-05
[119,] 9.999083e-01 1.834698e-04 9.173490e-05
[120,] 9.996674e-01 6.652633e-04 3.326317e-04
[121,] 9.996036e-01 7.928690e-04 3.964345e-04
[122,] 9.987189e-01 2.562223e-03 1.281111e-03
[123,] 9.982183e-01 3.563385e-03 1.781692e-03
[124,] 9.975957e-01 4.808663e-03 2.404331e-03
[125,] 9.898618e-01 2.027644e-02 1.013822e-02
> postscript(file="/var/www/html/rcomp/tmp/17dzq1293187912.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/27dzq1293187912.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/3inyt1293187912.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/4inyt1293187912.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/5inyt1293187912.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 = 142
Frequency = 1
1 2 3 4 5 6
0.761741960 0.707188259 0.742487017 0.589161281 0.428755404 0.237416967
7 8 9 10 11 12
0.208312605 0.027325088 -0.258909262 -0.419769394 -0.132233696 -0.057739073
13 14 15 16 17 18
-0.291995874 -0.099028158 -0.195315148 -0.160015031 -0.261417872 -0.238394105
19 20 21 22 23 24
-0.262682146 -0.126082035 -0.031979300 -0.061006965 0.049273142 -0.205262267
25 26 27 28 29 30
-0.263036903 -0.310415240 -0.332702382 -0.173364300 -0.159665824 -0.270997771
31 32 33 34 35 36
-0.580534263 -0.601351151 -0.451836853 0.164435440 0.280116866 0.416272630
37 38 39 40 41 42
0.330018787 0.194599456 -0.068032892 -0.263046838 -0.027756283 0.029436480
43 44 45 46 47 48
0.313828662 0.438175082 0.215371226 -0.059312718 -0.294109677 -0.010920905
49 50 51 52 53 54
0.264038768 0.318531991 0.422882045 0.386911652 0.146977026 0.111379236
55 56 57 58 59 60
-0.062609378 0.014029224 0.034931129 -0.116839062 -0.024232196 0.106323691
61 62 63 64 65 66
0.163524838 -0.028387338 -0.138123426 -0.146178327 -0.199523939 -0.165462086
67 68 69 70 71 72
-0.032595332 0.284875816 0.554422580 0.204674460 0.150119023 0.023758445
73 74 75 76 77 78
0.001566144 0.146264761 0.006239917 0.031927138 0.030768485 0.173232142
79 80 81 82 83 84
0.172657057 0.293962785 0.209881302 -0.223702004 -0.374249735 -0.206706217
85 86 87 88 89 90
-0.264601040 0.012828769 0.060062320 0.208840323 -0.070954987 -0.183896191
91 92 93 94 95 96
-0.397773926 -0.395496254 -0.407615411 -0.218972057 -0.115928665 -0.112306666
97 98 99 100 101 102
-0.140437278 -0.275968991 -0.297631218 -0.116904752 -0.296943147 -0.451961188
103 104 105 106 107 108
-0.739654464 -0.863563858 -0.769563663 -0.159436321 -0.006774908 -0.254253207
109 110 111 112 113 114
-0.129108888 -0.104073787 -0.166412903 -0.181523705 0.045420857 -0.081584577
115 116 117 118 119 120
0.220154782 0.286768169 0.395743065 0.451289919 0.304741290 0.316499581
121 122 123 124 125 126
0.312819500 0.495126258 0.362152869 0.898303885 0.188214163 0.035404833
127 128 129 130 131 132
-0.053273856 -0.035505505 0.014584559 -0.091113233 -0.228933804 -0.279927283
133 134 135 136 137 138
-0.104028711 -0.160982014 -0.015561216 0.136243713 0.366449203 0.384442708
139 140 141 142
0.260193372 0.333451448 0.279818947 -0.197159501
> postscript(file="/var/www/html/rcomp/tmp/6awxe1293187912.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 = 142
Frequency = 1
lag(myerror, k = 1) myerror
0 0.761741960 NA
1 0.707188259 0.761741960
2 0.742487017 0.707188259
3 0.589161281 0.742487017
4 0.428755404 0.589161281
5 0.237416967 0.428755404
6 0.208312605 0.237416967
7 0.027325088 0.208312605
8 -0.258909262 0.027325088
9 -0.419769394 -0.258909262
10 -0.132233696 -0.419769394
11 -0.057739073 -0.132233696
12 -0.291995874 -0.057739073
13 -0.099028158 -0.291995874
14 -0.195315148 -0.099028158
15 -0.160015031 -0.195315148
16 -0.261417872 -0.160015031
17 -0.238394105 -0.261417872
18 -0.262682146 -0.238394105
19 -0.126082035 -0.262682146
20 -0.031979300 -0.126082035
21 -0.061006965 -0.031979300
22 0.049273142 -0.061006965
23 -0.205262267 0.049273142
24 -0.263036903 -0.205262267
25 -0.310415240 -0.263036903
26 -0.332702382 -0.310415240
27 -0.173364300 -0.332702382
28 -0.159665824 -0.173364300
29 -0.270997771 -0.159665824
30 -0.580534263 -0.270997771
31 -0.601351151 -0.580534263
32 -0.451836853 -0.601351151
33 0.164435440 -0.451836853
34 0.280116866 0.164435440
35 0.416272630 0.280116866
36 0.330018787 0.416272630
37 0.194599456 0.330018787
38 -0.068032892 0.194599456
39 -0.263046838 -0.068032892
40 -0.027756283 -0.263046838
41 0.029436480 -0.027756283
42 0.313828662 0.029436480
43 0.438175082 0.313828662
44 0.215371226 0.438175082
45 -0.059312718 0.215371226
46 -0.294109677 -0.059312718
47 -0.010920905 -0.294109677
48 0.264038768 -0.010920905
49 0.318531991 0.264038768
50 0.422882045 0.318531991
51 0.386911652 0.422882045
52 0.146977026 0.386911652
53 0.111379236 0.146977026
54 -0.062609378 0.111379236
55 0.014029224 -0.062609378
56 0.034931129 0.014029224
57 -0.116839062 0.034931129
58 -0.024232196 -0.116839062
59 0.106323691 -0.024232196
60 0.163524838 0.106323691
61 -0.028387338 0.163524838
62 -0.138123426 -0.028387338
63 -0.146178327 -0.138123426
64 -0.199523939 -0.146178327
65 -0.165462086 -0.199523939
66 -0.032595332 -0.165462086
67 0.284875816 -0.032595332
68 0.554422580 0.284875816
69 0.204674460 0.554422580
70 0.150119023 0.204674460
71 0.023758445 0.150119023
72 0.001566144 0.023758445
73 0.146264761 0.001566144
74 0.006239917 0.146264761
75 0.031927138 0.006239917
76 0.030768485 0.031927138
77 0.173232142 0.030768485
78 0.172657057 0.173232142
79 0.293962785 0.172657057
80 0.209881302 0.293962785
81 -0.223702004 0.209881302
82 -0.374249735 -0.223702004
83 -0.206706217 -0.374249735
84 -0.264601040 -0.206706217
85 0.012828769 -0.264601040
86 0.060062320 0.012828769
87 0.208840323 0.060062320
88 -0.070954987 0.208840323
89 -0.183896191 -0.070954987
90 -0.397773926 -0.183896191
91 -0.395496254 -0.397773926
92 -0.407615411 -0.395496254
93 -0.218972057 -0.407615411
94 -0.115928665 -0.218972057
95 -0.112306666 -0.115928665
96 -0.140437278 -0.112306666
97 -0.275968991 -0.140437278
98 -0.297631218 -0.275968991
99 -0.116904752 -0.297631218
100 -0.296943147 -0.116904752
101 -0.451961188 -0.296943147
102 -0.739654464 -0.451961188
103 -0.863563858 -0.739654464
104 -0.769563663 -0.863563858
105 -0.159436321 -0.769563663
106 -0.006774908 -0.159436321
107 -0.254253207 -0.006774908
108 -0.129108888 -0.254253207
109 -0.104073787 -0.129108888
110 -0.166412903 -0.104073787
111 -0.181523705 -0.166412903
112 0.045420857 -0.181523705
113 -0.081584577 0.045420857
114 0.220154782 -0.081584577
115 0.286768169 0.220154782
116 0.395743065 0.286768169
117 0.451289919 0.395743065
118 0.304741290 0.451289919
119 0.316499581 0.304741290
120 0.312819500 0.316499581
121 0.495126258 0.312819500
122 0.362152869 0.495126258
123 0.898303885 0.362152869
124 0.188214163 0.898303885
125 0.035404833 0.188214163
126 -0.053273856 0.035404833
127 -0.035505505 -0.053273856
128 0.014584559 -0.035505505
129 -0.091113233 0.014584559
130 -0.228933804 -0.091113233
131 -0.279927283 -0.228933804
132 -0.104028711 -0.279927283
133 -0.160982014 -0.104028711
134 -0.015561216 -0.160982014
135 0.136243713 -0.015561216
136 0.366449203 0.136243713
137 0.384442708 0.366449203
138 0.260193372 0.384442708
139 0.333451448 0.260193372
140 0.279818947 0.333451448
141 -0.197159501 0.279818947
142 NA -0.197159501
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.707188259 0.761741960
[2,] 0.742487017 0.707188259
[3,] 0.589161281 0.742487017
[4,] 0.428755404 0.589161281
[5,] 0.237416967 0.428755404
[6,] 0.208312605 0.237416967
[7,] 0.027325088 0.208312605
[8,] -0.258909262 0.027325088
[9,] -0.419769394 -0.258909262
[10,] -0.132233696 -0.419769394
[11,] -0.057739073 -0.132233696
[12,] -0.291995874 -0.057739073
[13,] -0.099028158 -0.291995874
[14,] -0.195315148 -0.099028158
[15,] -0.160015031 -0.195315148
[16,] -0.261417872 -0.160015031
[17,] -0.238394105 -0.261417872
[18,] -0.262682146 -0.238394105
[19,] -0.126082035 -0.262682146
[20,] -0.031979300 -0.126082035
[21,] -0.061006965 -0.031979300
[22,] 0.049273142 -0.061006965
[23,] -0.205262267 0.049273142
[24,] -0.263036903 -0.205262267
[25,] -0.310415240 -0.263036903
[26,] -0.332702382 -0.310415240
[27,] -0.173364300 -0.332702382
[28,] -0.159665824 -0.173364300
[29,] -0.270997771 -0.159665824
[30,] -0.580534263 -0.270997771
[31,] -0.601351151 -0.580534263
[32,] -0.451836853 -0.601351151
[33,] 0.164435440 -0.451836853
[34,] 0.280116866 0.164435440
[35,] 0.416272630 0.280116866
[36,] 0.330018787 0.416272630
[37,] 0.194599456 0.330018787
[38,] -0.068032892 0.194599456
[39,] -0.263046838 -0.068032892
[40,] -0.027756283 -0.263046838
[41,] 0.029436480 -0.027756283
[42,] 0.313828662 0.029436480
[43,] 0.438175082 0.313828662
[44,] 0.215371226 0.438175082
[45,] -0.059312718 0.215371226
[46,] -0.294109677 -0.059312718
[47,] -0.010920905 -0.294109677
[48,] 0.264038768 -0.010920905
[49,] 0.318531991 0.264038768
[50,] 0.422882045 0.318531991
[51,] 0.386911652 0.422882045
[52,] 0.146977026 0.386911652
[53,] 0.111379236 0.146977026
[54,] -0.062609378 0.111379236
[55,] 0.014029224 -0.062609378
[56,] 0.034931129 0.014029224
[57,] -0.116839062 0.034931129
[58,] -0.024232196 -0.116839062
[59,] 0.106323691 -0.024232196
[60,] 0.163524838 0.106323691
[61,] -0.028387338 0.163524838
[62,] -0.138123426 -0.028387338
[63,] -0.146178327 -0.138123426
[64,] -0.199523939 -0.146178327
[65,] -0.165462086 -0.199523939
[66,] -0.032595332 -0.165462086
[67,] 0.284875816 -0.032595332
[68,] 0.554422580 0.284875816
[69,] 0.204674460 0.554422580
[70,] 0.150119023 0.204674460
[71,] 0.023758445 0.150119023
[72,] 0.001566144 0.023758445
[73,] 0.146264761 0.001566144
[74,] 0.006239917 0.146264761
[75,] 0.031927138 0.006239917
[76,] 0.030768485 0.031927138
[77,] 0.173232142 0.030768485
[78,] 0.172657057 0.173232142
[79,] 0.293962785 0.172657057
[80,] 0.209881302 0.293962785
[81,] -0.223702004 0.209881302
[82,] -0.374249735 -0.223702004
[83,] -0.206706217 -0.374249735
[84,] -0.264601040 -0.206706217
[85,] 0.012828769 -0.264601040
[86,] 0.060062320 0.012828769
[87,] 0.208840323 0.060062320
[88,] -0.070954987 0.208840323
[89,] -0.183896191 -0.070954987
[90,] -0.397773926 -0.183896191
[91,] -0.395496254 -0.397773926
[92,] -0.407615411 -0.395496254
[93,] -0.218972057 -0.407615411
[94,] -0.115928665 -0.218972057
[95,] -0.112306666 -0.115928665
[96,] -0.140437278 -0.112306666
[97,] -0.275968991 -0.140437278
[98,] -0.297631218 -0.275968991
[99,] -0.116904752 -0.297631218
[100,] -0.296943147 -0.116904752
[101,] -0.451961188 -0.296943147
[102,] -0.739654464 -0.451961188
[103,] -0.863563858 -0.739654464
[104,] -0.769563663 -0.863563858
[105,] -0.159436321 -0.769563663
[106,] -0.006774908 -0.159436321
[107,] -0.254253207 -0.006774908
[108,] -0.129108888 -0.254253207
[109,] -0.104073787 -0.129108888
[110,] -0.166412903 -0.104073787
[111,] -0.181523705 -0.166412903
[112,] 0.045420857 -0.181523705
[113,] -0.081584577 0.045420857
[114,] 0.220154782 -0.081584577
[115,] 0.286768169 0.220154782
[116,] 0.395743065 0.286768169
[117,] 0.451289919 0.395743065
[118,] 0.304741290 0.451289919
[119,] 0.316499581 0.304741290
[120,] 0.312819500 0.316499581
[121,] 0.495126258 0.312819500
[122,] 0.362152869 0.495126258
[123,] 0.898303885 0.362152869
[124,] 0.188214163 0.898303885
[125,] 0.035404833 0.188214163
[126,] -0.053273856 0.035404833
[127,] -0.035505505 -0.053273856
[128,] 0.014584559 -0.035505505
[129,] -0.091113233 0.014584559
[130,] -0.228933804 -0.091113233
[131,] -0.279927283 -0.228933804
[132,] -0.104028711 -0.279927283
[133,] -0.160982014 -0.104028711
[134,] -0.015561216 -0.160982014
[135,] 0.136243713 -0.015561216
[136,] 0.366449203 0.136243713
[137,] 0.384442708 0.366449203
[138,] 0.260193372 0.384442708
[139,] 0.333451448 0.260193372
[140,] 0.279818947 0.333451448
[141,] -0.197159501 0.279818947
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.707188259 0.761741960
2 0.742487017 0.707188259
3 0.589161281 0.742487017
4 0.428755404 0.589161281
5 0.237416967 0.428755404
6 0.208312605 0.237416967
7 0.027325088 0.208312605
8 -0.258909262 0.027325088
9 -0.419769394 -0.258909262
10 -0.132233696 -0.419769394
11 -0.057739073 -0.132233696
12 -0.291995874 -0.057739073
13 -0.099028158 -0.291995874
14 -0.195315148 -0.099028158
15 -0.160015031 -0.195315148
16 -0.261417872 -0.160015031
17 -0.238394105 -0.261417872
18 -0.262682146 -0.238394105
19 -0.126082035 -0.262682146
20 -0.031979300 -0.126082035
21 -0.061006965 -0.031979300
22 0.049273142 -0.061006965
23 -0.205262267 0.049273142
24 -0.263036903 -0.205262267
25 -0.310415240 -0.263036903
26 -0.332702382 -0.310415240
27 -0.173364300 -0.332702382
28 -0.159665824 -0.173364300
29 -0.270997771 -0.159665824
30 -0.580534263 -0.270997771
31 -0.601351151 -0.580534263
32 -0.451836853 -0.601351151
33 0.164435440 -0.451836853
34 0.280116866 0.164435440
35 0.416272630 0.280116866
36 0.330018787 0.416272630
37 0.194599456 0.330018787
38 -0.068032892 0.194599456
39 -0.263046838 -0.068032892
40 -0.027756283 -0.263046838
41 0.029436480 -0.027756283
42 0.313828662 0.029436480
43 0.438175082 0.313828662
44 0.215371226 0.438175082
45 -0.059312718 0.215371226
46 -0.294109677 -0.059312718
47 -0.010920905 -0.294109677
48 0.264038768 -0.010920905
49 0.318531991 0.264038768
50 0.422882045 0.318531991
51 0.386911652 0.422882045
52 0.146977026 0.386911652
53 0.111379236 0.146977026
54 -0.062609378 0.111379236
55 0.014029224 -0.062609378
56 0.034931129 0.014029224
57 -0.116839062 0.034931129
58 -0.024232196 -0.116839062
59 0.106323691 -0.024232196
60 0.163524838 0.106323691
61 -0.028387338 0.163524838
62 -0.138123426 -0.028387338
63 -0.146178327 -0.138123426
64 -0.199523939 -0.146178327
65 -0.165462086 -0.199523939
66 -0.032595332 -0.165462086
67 0.284875816 -0.032595332
68 0.554422580 0.284875816
69 0.204674460 0.554422580
70 0.150119023 0.204674460
71 0.023758445 0.150119023
72 0.001566144 0.023758445
73 0.146264761 0.001566144
74 0.006239917 0.146264761
75 0.031927138 0.006239917
76 0.030768485 0.031927138
77 0.173232142 0.030768485
78 0.172657057 0.173232142
79 0.293962785 0.172657057
80 0.209881302 0.293962785
81 -0.223702004 0.209881302
82 -0.374249735 -0.223702004
83 -0.206706217 -0.374249735
84 -0.264601040 -0.206706217
85 0.012828769 -0.264601040
86 0.060062320 0.012828769
87 0.208840323 0.060062320
88 -0.070954987 0.208840323
89 -0.183896191 -0.070954987
90 -0.397773926 -0.183896191
91 -0.395496254 -0.397773926
92 -0.407615411 -0.395496254
93 -0.218972057 -0.407615411
94 -0.115928665 -0.218972057
95 -0.112306666 -0.115928665
96 -0.140437278 -0.112306666
97 -0.275968991 -0.140437278
98 -0.297631218 -0.275968991
99 -0.116904752 -0.297631218
100 -0.296943147 -0.116904752
101 -0.451961188 -0.296943147
102 -0.739654464 -0.451961188
103 -0.863563858 -0.739654464
104 -0.769563663 -0.863563858
105 -0.159436321 -0.769563663
106 -0.006774908 -0.159436321
107 -0.254253207 -0.006774908
108 -0.129108888 -0.254253207
109 -0.104073787 -0.129108888
110 -0.166412903 -0.104073787
111 -0.181523705 -0.166412903
112 0.045420857 -0.181523705
113 -0.081584577 0.045420857
114 0.220154782 -0.081584577
115 0.286768169 0.220154782
116 0.395743065 0.286768169
117 0.451289919 0.395743065
118 0.304741290 0.451289919
119 0.316499581 0.304741290
120 0.312819500 0.316499581
121 0.495126258 0.312819500
122 0.362152869 0.495126258
123 0.898303885 0.362152869
124 0.188214163 0.898303885
125 0.035404833 0.188214163
126 -0.053273856 0.035404833
127 -0.035505505 -0.053273856
128 0.014584559 -0.035505505
129 -0.091113233 0.014584559
130 -0.228933804 -0.091113233
131 -0.279927283 -0.228933804
132 -0.104028711 -0.279927283
133 -0.160982014 -0.104028711
134 -0.015561216 -0.160982014
135 0.136243713 -0.015561216
136 0.366449203 0.136243713
137 0.384442708 0.366449203
138 0.260193372 0.384442708
139 0.333451448 0.260193372
140 0.279818947 0.333451448
141 -0.197159501 0.279818947
> 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/7lnwz1293187912.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/8lnwz1293187912.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/9lnwz1293187912.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/10eeek1293187912.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/11zfc81293187912.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/12lgbw1293187912.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/13hp841293187912.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/142q7s1293187912.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/15n85g1293187912.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/16r9441293187912.tab")
+ }
>
> try(system("convert tmp/17dzq1293187912.ps tmp/17dzq1293187912.png",intern=TRUE))
character(0)
> try(system("convert tmp/27dzq1293187912.ps tmp/27dzq1293187912.png",intern=TRUE))
character(0)
> try(system("convert tmp/3inyt1293187912.ps tmp/3inyt1293187912.png",intern=TRUE))
character(0)
> try(system("convert tmp/4inyt1293187912.ps tmp/4inyt1293187912.png",intern=TRUE))
character(0)
> try(system("convert tmp/5inyt1293187912.ps tmp/5inyt1293187912.png",intern=TRUE))
character(0)
> try(system("convert tmp/6awxe1293187912.ps tmp/6awxe1293187912.png",intern=TRUE))
character(0)
> try(system("convert tmp/7lnwz1293187912.ps tmp/7lnwz1293187912.png",intern=TRUE))
character(0)
> try(system("convert tmp/8lnwz1293187912.ps tmp/8lnwz1293187912.png",intern=TRUE))
character(0)
> try(system("convert tmp/9lnwz1293187912.ps tmp/9lnwz1293187912.png",intern=TRUE))
character(0)
> try(system("convert tmp/10eeek1293187912.ps tmp/10eeek1293187912.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.819 1.762 8.729