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(2430.47
+ ,1213.8
+ ,2516.3
+ ,1245.6
+ ,2633.63
+ ,1306.3
+ ,2799.84
+ ,1255.8
+ ,3001.93
+ ,1257.6
+ ,3229.29
+ ,1287.8
+ ,3173.02
+ ,1300.4
+ ,3322.08
+ ,1320.9
+ ,3417.88
+ ,1370.8
+ ,3486.95
+ ,1327.3
+ ,3016.22
+ ,1320
+ ,2709.61
+ ,1345.3
+ ,2914.87
+ ,1346.7
+ ,3203.08
+ ,1395.4
+ ,3320.25
+ ,1462
+ ,3446.25
+ ,1491.6
+ ,3456.85
+ ,1461.8
+ ,3566.53
+ ,1477.9
+ ,3763.67
+ ,1490.3
+ ,3607.75
+ ,1521.1
+ ,3747.38
+ ,1561.9
+ ,3623.91
+ ,1552.6
+ ,3699.76
+ ,1523.6
+ ,3629.61
+ ,1548.3
+ ,3911.52
+ ,1552.4
+ ,4281.47
+ ,1587
+ ,4742.42
+ ,1621.3
+ ,4522.42
+ ,1648.7
+ ,4879.79
+ ,1641.8
+ ,5059.11
+ ,1650.6
+ ,5093.19
+ ,1688.6
+ ,4941.81
+ ,1670.7
+ ,4832.67
+ ,1682.2
+ ,4876.18
+ ,1678.9
+ ,5018.07
+ ,1650.6
+ ,4780.34
+ ,1662.4
+ ,4953.59
+ ,1664.5
+ ,4622.32
+ ,1683.2
+ ,4557.13
+ ,1736.2
+ ,4560.03
+ ,1747.6
+ ,4105.66
+ ,1749
+ ,4004.89
+ ,1759.7
+ ,4277.26
+ ,1793.6
+ ,4245.98
+ ,1817.4
+ ,4057.64
+ ,1858.4
+ ,3931.42
+ ,1839.9
+ ,3637.15
+ ,1809.1
+ ,3339.91
+ ,1877.7
+ ,3465.74
+ ,1880.3
+ ,3571.25
+ ,1930.9
+ ,3706.93
+ ,2039.3
+ ,3584.17
+ ,1992.7
+ ,3552.11
+ ,1987.8
+ ,3695.24
+ ,1984.4
+ ,3510
+ ,2016.5
+ ,3357.7
+ ,2016.7
+ ,3060.91
+ ,2064.1
+ ,2736.98
+ ,2031.5
+ ,2709.45
+ ,2000.3
+ ,2314.96
+ ,2057.8
+ ,2561.29
+ ,2041.2
+ ,2663.49
+ ,2093.2
+ ,2407.87
+ ,2158.3
+ ,2237.74
+ ,2128.8
+ ,2165.44
+ ,2131.9
+ ,2098.89
+ ,2170.3
+ ,2318.54
+ ,2190.8
+ ,2315.49
+ ,2217.7
+ ,2395.47
+ ,2254.4
+ ,2474.07
+ ,2223.3
+ ,2479.57
+ ,2210.5
+ ,2386.92
+ ,2250.8
+ ,2537.84
+ ,2249.1
+ ,2567.13
+ ,2288.6
+ ,2660.37
+ ,2329.2
+ ,2696.28
+ ,2313.8
+ ,2748.5
+ ,2309.8
+ ,2663.32
+ ,2345.9
+ ,2707.69
+ ,2361.3
+ ,2669.36
+ ,2372
+ ,2687.68
+ ,2410.4
+ ,2650.24
+ ,2398.5
+ ,2620.03
+ ,2362.3
+ ,2668.47
+ ,2419.1
+ ,2692.06
+ ,2421.6
+ ,2737.67
+ ,2465
+ ,2774.77
+ ,2480.5
+ ,2819.19
+ ,2506.1
+ ,2892.56
+ ,2506.6
+ ,2866.08
+ ,2525.8
+ ,2817.41
+ ,2550
+ ,2934.75
+ ,2578.3
+ ,3036.54
+ ,2807.8
+ ,3139.5
+ ,2815.3
+ ,3114.31
+ ,2767.7
+ ,3261.3
+ ,2815.4
+ ,3201.79
+ ,2838.8
+ ,3264.53
+ ,2864
+ ,3349.1
+ ,2948.6
+ ,3446.17
+ ,2922.8
+ ,3469.48
+ ,2917.2
+ ,3507.13
+ ,2936.8
+ ,3536.2
+ ,2993.4
+ ,3359.05
+ ,3007.8
+ ,3378.85
+ ,3046.3
+ ,3449.15
+ ,3011.5
+ ,3522.89
+ ,2958.6
+ ,3551.04
+ ,3019.8
+ ,3669.15
+ ,2998.5
+ ,3602
+ ,3040.4
+ ,3697.22
+ ,3166
+ ,3760.9
+ ,3110
+ ,3665.08
+ ,3099.2
+ ,3708.8
+ ,3150.3
+ ,3858.21
+ ,3163.6
+ ,3933.16
+ ,3182.6
+ ,3946.98
+ ,3244.4
+ ,3794.29
+ ,3223.2
+ ,3765.56
+ ,3143.6
+ ,3820.33
+ ,3217
+ ,3885.12
+ ,3182.3
+ ,3752.67
+ ,3217.2
+ ,3683.79
+ ,3262.5
+ ,3240.75
+ ,3227.9
+ ,3188.82
+ ,3171.6
+ ,3017.98
+ ,3219
+ ,3237.2
+ ,3195.4
+ ,3182.53
+ ,3221.6
+ ,2906.42
+ ,3262.1
+ ,2881.35
+ ,3179.5
+ ,2915.64
+ ,3133.6
+ ,2635.13
+ ,3219.2
+ ,2331.43
+ ,3245
+ ,2159.04
+ ,3265.3
+ ,2065.46
+ ,3312.5
+ ,1983.48
+ ,3383.6
+ ,1770.41
+ ,3386.3
+ ,1815.99
+ ,3411.1
+ ,2026.97
+ ,3467.2
+ ,2124.81
+ ,3487.7
+ ,2098.28
+ ,3575.5
+ ,2291.39
+ ,3571.5
+ ,2401.57
+ ,3582.3
+ ,2453.89
+ ,3637.1
+ ,2409.53
+ ,3685)
+ ,dim=c(2
+ ,145)
+ ,dimnames=list(c('y(t)'
+ ,'x(t)')
+ ,1:145))
> y <- array(NA,dim=c(2,145),dimnames=list(c('y(t)','x(t)'),1:145))
> 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 = '2'
> #'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
x(t) y(t)
1 1213.8 2430.47
2 1245.6 2516.30
3 1306.3 2633.63
4 1255.8 2799.84
5 1257.6 3001.93
6 1287.8 3229.29
7 1300.4 3173.02
8 1320.9 3322.08
9 1370.8 3417.88
10 1327.3 3486.95
11 1320.0 3016.22
12 1345.3 2709.61
13 1346.7 2914.87
14 1395.4 3203.08
15 1462.0 3320.25
16 1491.6 3446.25
17 1461.8 3456.85
18 1477.9 3566.53
19 1490.3 3763.67
20 1521.1 3607.75
21 1561.9 3747.38
22 1552.6 3623.91
23 1523.6 3699.76
24 1548.3 3629.61
25 1552.4 3911.52
26 1587.0 4281.47
27 1621.3 4742.42
28 1648.7 4522.42
29 1641.8 4879.79
30 1650.6 5059.11
31 1688.6 5093.19
32 1670.7 4941.81
33 1682.2 4832.67
34 1678.9 4876.18
35 1650.6 5018.07
36 1662.4 4780.34
37 1664.5 4953.59
38 1683.2 4622.32
39 1736.2 4557.13
40 1747.6 4560.03
41 1749.0 4105.66
42 1759.7 4004.89
43 1793.6 4277.26
44 1817.4 4245.98
45 1858.4 4057.64
46 1839.9 3931.42
47 1809.1 3637.15
48 1877.7 3339.91
49 1880.3 3465.74
50 1930.9 3571.25
51 2039.3 3706.93
52 1992.7 3584.17
53 1987.8 3552.11
54 1984.4 3695.24
55 2016.5 3510.00
56 2016.7 3357.70
57 2064.1 3060.91
58 2031.5 2736.98
59 2000.3 2709.45
60 2057.8 2314.96
61 2041.2 2561.29
62 2093.2 2663.49
63 2158.3 2407.87
64 2128.8 2237.74
65 2131.9 2165.44
66 2170.3 2098.89
67 2190.8 2318.54
68 2217.7 2315.49
69 2254.4 2395.47
70 2223.3 2474.07
71 2210.5 2479.57
72 2250.8 2386.92
73 2249.1 2537.84
74 2288.6 2567.13
75 2329.2 2660.37
76 2313.8 2696.28
77 2309.8 2748.50
78 2345.9 2663.32
79 2361.3 2707.69
80 2372.0 2669.36
81 2410.4 2687.68
82 2398.5 2650.24
83 2362.3 2620.03
84 2419.1 2668.47
85 2421.6 2692.06
86 2465.0 2737.67
87 2480.5 2774.77
88 2506.1 2819.19
89 2506.6 2892.56
90 2525.8 2866.08
91 2550.0 2817.41
92 2578.3 2934.75
93 2807.8 3036.54
94 2815.3 3139.50
95 2767.7 3114.31
96 2815.4 3261.30
97 2838.8 3201.79
98 2864.0 3264.53
99 2948.6 3349.10
100 2922.8 3446.17
101 2917.2 3469.48
102 2936.8 3507.13
103 2993.4 3536.20
104 3007.8 3359.05
105 3046.3 3378.85
106 3011.5 3449.15
107 2958.6 3522.89
108 3019.8 3551.04
109 2998.5 3669.15
110 3040.4 3602.00
111 3166.0 3697.22
112 3110.0 3760.90
113 3099.2 3665.08
114 3150.3 3708.80
115 3163.6 3858.21
116 3182.6 3933.16
117 3244.4 3946.98
118 3223.2 3794.29
119 3143.6 3765.56
120 3217.0 3820.33
121 3182.3 3885.12
122 3217.2 3752.67
123 3262.5 3683.79
124 3227.9 3240.75
125 3171.6 3188.82
126 3219.0 3017.98
127 3195.4 3237.20
128 3221.6 3182.53
129 3262.1 2906.42
130 3179.5 2881.35
131 3133.6 2915.64
132 3219.2 2635.13
133 3245.0 2331.43
134 3265.3 2159.04
135 3312.5 2065.46
136 3383.6 1983.48
137 3386.3 1770.41
138 3411.1 1815.99
139 3467.2 2026.97
140 3487.7 2124.81
141 3575.5 2098.28
142 3571.5 2291.39
143 3582.3 2401.57
144 3637.1 2453.89
145 3685.0 2409.53
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `y(t)`
3393.9871 -0.3207
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1400.8 -434.0 -165.9 670.3 1116.2
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3393.98714 243.73020 13.925 < 2e-16 ***
`y(t)` -0.32069 0.07285 -4.402 2.08e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 668.4 on 143 degrees of freedom
Multiple R-squared: 0.1194, Adjusted R-squared: 0.1132
F-statistic: 19.38 on 1 and 143 DF, p-value: 2.083e-05
> 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,] 2.573036e-04 5.146071e-04 9.997427e-01
[2,] 1.249158e-05 2.498316e-05 9.999875e-01
[3,] 6.334448e-07 1.266890e-06 9.999994e-01
[4,] 3.406053e-08 6.812106e-08 1.000000e+00
[5,] 5.880991e-09 1.176198e-08 1.000000e+00
[6,] 3.065407e-10 6.130813e-10 1.000000e+00
[7,] 2.538457e-11 5.076915e-11 1.000000e+00
[8,] 2.351961e-11 4.703921e-11 1.000000e+00
[9,] 4.687245e-12 9.374489e-12 1.000000e+00
[10,] 1.845612e-12 3.691224e-12 1.000000e+00
[11,] 3.484080e-12 6.968160e-12 1.000000e+00
[12,] 3.010352e-12 6.020704e-12 1.000000e+00
[13,] 6.776963e-13 1.355393e-12 1.000000e+00
[14,] 1.251718e-13 2.503437e-13 1.000000e+00
[15,] 1.600924e-14 3.201849e-14 1.000000e+00
[16,] 4.520142e-15 9.040284e-15 1.000000e+00
[17,] 1.291959e-15 2.583917e-15 1.000000e+00
[18,] 4.295732e-16 8.591464e-16 1.000000e+00
[19,] 6.500909e-17 1.300182e-16 1.000000e+00
[20,] 1.626924e-17 3.253847e-17 1.000000e+00
[21,] 2.103341e-18 4.206681e-18 1.000000e+00
[22,] 3.260672e-19 6.521343e-19 1.000000e+00
[23,] 1.110527e-19 2.221054e-19 1.000000e+00
[24,] 1.304036e-20 2.608072e-20 1.000000e+00
[25,] 2.999229e-21 5.998458e-21 1.000000e+00
[26,] 7.788577e-22 1.557715e-21 1.000000e+00
[27,] 1.021696e-22 2.043392e-22 1.000000e+00
[28,] 1.229836e-23 2.459672e-23 1.000000e+00
[29,] 1.433748e-24 2.867497e-24 1.000000e+00
[30,] 1.632259e-25 3.264518e-25 1.000000e+00
[31,] 2.753733e-26 5.507467e-26 1.000000e+00
[32,] 3.302992e-27 6.605984e-27 1.000000e+00
[33,] 4.249238e-28 8.498475e-28 1.000000e+00
[34,] 8.544961e-29 1.708992e-28 1.000000e+00
[35,] 8.181852e-29 1.636370e-28 1.000000e+00
[36,] 8.669431e-29 1.733886e-28 1.000000e+00
[37,] 1.666707e-27 3.333415e-27 1.000000e+00
[38,] 3.796003e-26 7.592006e-26 1.000000e+00
[39,] 2.035524e-25 4.071048e-25 1.000000e+00
[40,] 1.588915e-24 3.177831e-24 1.000000e+00
[41,] 6.181587e-23 1.236317e-22 1.000000e+00
[42,] 1.166720e-21 2.333441e-21 1.000000e+00
[43,] 2.232651e-20 4.465303e-20 1.000000e+00
[44,] 2.987790e-18 5.975579e-18 1.000000e+00
[45,] 7.637849e-17 1.527570e-16 1.000000e+00
[46,] 1.610854e-15 3.221707e-15 1.000000e+00
[47,] 5.790374e-14 1.158075e-13 1.000000e+00
[48,] 7.729303e-13 1.545861e-12 1.000000e+00
[49,] 7.055823e-12 1.411165e-11 1.000000e+00
[50,] 4.138962e-11 8.277924e-11 1.000000e+00
[51,] 3.167224e-10 6.334448e-10 1.000000e+00
[52,] 2.220592e-09 4.441184e-09 1.000000e+00
[53,] 1.966016e-08 3.932031e-08 1.000000e+00
[54,] 1.164323e-07 2.328646e-07 9.999999e-01
[55,] 4.434651e-07 8.869302e-07 9.999996e-01
[56,] 1.747708e-06 3.495416e-06 9.999983e-01
[57,] 4.914783e-06 9.829566e-06 9.999951e-01
[58,] 1.376831e-05 2.753663e-05 9.999862e-01
[59,] 3.786879e-05 7.573757e-05 9.999621e-01
[60,] 7.967742e-05 1.593548e-04 9.999203e-01
[61,] 1.491231e-04 2.982461e-04 9.998509e-01
[62,] 2.683584e-04 5.367169e-04 9.997316e-01
[63,] 4.864063e-04 9.728127e-04 9.995136e-01
[64,] 8.599471e-04 1.719894e-03 9.991401e-01
[65,] 1.526490e-03 3.052980e-03 9.984735e-01
[66,] 2.592601e-03 5.185203e-03 9.974074e-01
[67,] 4.328029e-03 8.656059e-03 9.956720e-01
[68,] 7.119194e-03 1.423839e-02 9.928808e-01
[69,] 1.190271e-02 2.380543e-02 9.880973e-01
[70,] 1.978483e-02 3.956966e-02 9.802152e-01
[71,] 3.263648e-02 6.527296e-02 9.673635e-01
[72,] 5.260280e-02 1.052056e-01 9.473972e-01
[73,] 8.333365e-02 1.666673e-01 9.166663e-01
[74,] 1.270485e-01 2.540971e-01 8.729515e-01
[75,] 1.880510e-01 3.761019e-01 8.119490e-01
[76,] 2.687403e-01 5.374807e-01 7.312597e-01
[77,] 3.668394e-01 7.336788e-01 6.331606e-01
[78,] 4.844021e-01 9.688041e-01 5.155979e-01
[79,] 6.241305e-01 7.517389e-01 3.758695e-01
[80,] 7.510883e-01 4.978233e-01 2.489117e-01
[81,] 8.599575e-01 2.800849e-01 1.400425e-01
[82,] 9.323242e-01 1.353517e-01 6.767584e-02
[83,] 9.736922e-01 5.261554e-02 2.630777e-02
[84,] 9.919307e-01 1.613852e-02 8.069260e-03
[85,] 9.982493e-01 3.501329e-03 1.750664e-03
[86,] 9.997600e-01 4.800694e-04 2.400347e-04
[87,] 9.999827e-01 3.456422e-05 1.728211e-05
[88,] 9.999993e-01 1.436743e-06 7.183715e-07
[89,] 9.999999e-01 2.171148e-07 1.085574e-07
[90,] 1.000000e+00 3.423904e-08 1.711952e-08
[91,] 1.000000e+00 2.931440e-09 1.465720e-09
[92,] 1.000000e+00 3.807198e-10 1.903599e-10
[93,] 1.000000e+00 4.529400e-11 2.264700e-11
[94,] 1.000000e+00 6.508835e-12 3.254418e-12
[95,] 1.000000e+00 2.134887e-12 1.067444e-12
[96,] 1.000000e+00 6.808976e-13 3.404488e-13
[97,] 1.000000e+00 2.112042e-13 1.056021e-13
[98,] 1.000000e+00 8.143533e-14 4.071766e-14
[99,] 1.000000e+00 5.254657e-14 2.627329e-14
[100,] 1.000000e+00 3.116112e-14 1.558056e-14
[101,] 1.000000e+00 2.634799e-14 1.317399e-14
[102,] 1.000000e+00 1.935508e-14 9.677539e-15
[103,] 1.000000e+00 8.932956e-15 4.466478e-15
[104,] 1.000000e+00 7.807644e-15 3.903822e-15
[105,] 1.000000e+00 6.457222e-15 3.228611e-15
[106,] 1.000000e+00 7.003680e-15 3.501840e-15
[107,] 1.000000e+00 1.491320e-14 7.456600e-15
[108,] 1.000000e+00 3.145011e-14 1.572506e-14
[109,] 1.000000e+00 6.209246e-14 3.104623e-14
[110,] 1.000000e+00 1.548678e-13 7.743388e-14
[111,] 1.000000e+00 4.141666e-13 2.070833e-13
[112,] 1.000000e+00 1.123255e-12 5.616273e-13
[113,] 1.000000e+00 2.435833e-12 1.217916e-12
[114,] 1.000000e+00 6.649600e-12 3.324800e-12
[115,] 1.000000e+00 2.120049e-11 1.060025e-11
[116,] 1.000000e+00 6.148779e-11 3.074389e-11
[117,] 1.000000e+00 1.933296e-10 9.666479e-11
[118,] 1.000000e+00 5.725748e-10 2.862874e-10
[119,] 1.000000e+00 1.300843e-09 6.504216e-10
[120,] 1.000000e+00 4.552579e-09 2.276289e-09
[121,] 1.000000e+00 1.587312e-08 7.936560e-09
[122,] 1.000000e+00 5.540295e-08 2.770147e-08
[123,] 9.999999e-01 1.960276e-07 9.801380e-08
[124,] 9.999997e-01 6.897524e-07 3.448762e-07
[125,] 9.999988e-01 2.365117e-06 1.182559e-06
[126,] 9.999970e-01 5.906093e-06 2.953046e-06
[127,] 9.999973e-01 5.317835e-06 2.658917e-06
[128,] 9.999990e-01 2.050788e-06 1.025394e-06
[129,] 9.999998e-01 4.862395e-07 2.431198e-07
[130,] 1.000000e+00 8.917433e-08 4.458716e-08
[131,] 1.000000e+00 1.652927e-08 8.264634e-09
[132,] 1.000000e+00 4.509103e-08 2.254551e-08
[133,] 9.999996e-01 7.380650e-07 3.690325e-07
[134,] 9.999943e-01 1.144771e-05 5.723853e-06
[135,] 9.999284e-01 1.431766e-04 7.158832e-05
[136,] 9.995158e-01 9.683940e-04 4.841970e-04
> postscript(file="/var/www/html/rcomp/tmp/1m66u1260631971.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/2fcje1260631971.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/3ttan1260631971.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/4b89n1260631971.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/5ekuh1260631971.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 = 145
Frequency = 1
1 2 3 4 5 6
-1400.76911 -1341.44462 -1243.11851 -1240.31727 -1173.70981 -1070.59861
7 8 9 10 11 12
-1076.04362 -1007.74214 -927.12041 -948.47062 -1106.72720 -1179.75278
13 14 15 16 17 18
-1112.52874 -971.40379 -867.22900 -797.22255 -823.62327 -772.35042
19 20 21 22 23 24
-696.73035 -715.93174 -630.35433 -679.24945 -683.92540 -681.72154
25 26 27 28 29 30
-587.21691 -433.97907 -251.85880 -295.00975 -187.30615 -121.00071
31 32 33 34 35 36
-72.07172 -138.51719 -162.01688 -151.36382 -134.16167 -198.59838
37 38 39 40 41 42
-140.93951 -228.47320 -196.37873 -184.04874 -328.35890 -349.97444
43 44 45 46 47 48
-228.72916 -214.96022 -234.35825 -293.33525 -418.50356 -445.22431
49 50 51 52 53 54
-402.27237 -317.83678 -165.92608 -251.89351 -267.07471 -224.57491
55 56 57 58 59 60
-251.87881 -300.51930 -348.29574 -484.77560 -524.80409 -593.81156
61 62 63 64 65 66
-531.41695 -446.64282 -463.51661 -547.57495 -567.66055 -550.60222
67 68 69 70 71 72
-459.66351 -433.74160 -371.39312 -377.28719 -388.32342 -377.73499
73 74 75 76 77 78
-331.03704 -282.14414 -211.64337 -215.52753 -202.78130 -193.99734
79 80 81 82 83 84
-164.36850 -165.96040 -121.68543 -145.59192 -191.47984 -119.14581
85 86 87 88 89 90
-109.08082 -51.05433 -23.65687 16.18801 40.21675 50.92498
91 92 93 94 95 96
59.51718 125.44650 387.58914 428.10698 372.42890 467.26655
97 98 99 100 101 102
471.58252 516.90237 628.62280 633.95180 635.82699 667.50083
103 104 105 106 107 108
733.42317 691.01362 735.86321 723.60744 694.35484 764.58215
109 110 111 112 113 114
781.15839 801.52432 957.66005 922.08135 880.55320 945.67360
115 116 117 118 119 120
1006.88731 1049.92274 1116.15462 1045.98906 957.17574 1048.13972
121 122 123 124 125 126
1034.21698 1026.64210 1049.85324 873.17645 800.22322 792.83720
127 128 129 130 131 132
839.53802 848.20611 800.16146 709.52186 674.61818 670.26252
133 134 135 136 137 138
598.67014 563.68705 580.87725 625.68740 560.05880 599.47568
139 140 141 142 143 144
723.23404 775.10997 854.40217 912.32986 958.46306 1030.04136
145
1063.71572
> postscript(file="/var/www/html/rcomp/tmp/6uz681260631971.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 = 145
Frequency = 1
lag(myerror, k = 1) myerror
0 -1400.76911 NA
1 -1341.44462 -1400.76911
2 -1243.11851 -1341.44462
3 -1240.31727 -1243.11851
4 -1173.70981 -1240.31727
5 -1070.59861 -1173.70981
6 -1076.04362 -1070.59861
7 -1007.74214 -1076.04362
8 -927.12041 -1007.74214
9 -948.47062 -927.12041
10 -1106.72720 -948.47062
11 -1179.75278 -1106.72720
12 -1112.52874 -1179.75278
13 -971.40379 -1112.52874
14 -867.22900 -971.40379
15 -797.22255 -867.22900
16 -823.62327 -797.22255
17 -772.35042 -823.62327
18 -696.73035 -772.35042
19 -715.93174 -696.73035
20 -630.35433 -715.93174
21 -679.24945 -630.35433
22 -683.92540 -679.24945
23 -681.72154 -683.92540
24 -587.21691 -681.72154
25 -433.97907 -587.21691
26 -251.85880 -433.97907
27 -295.00975 -251.85880
28 -187.30615 -295.00975
29 -121.00071 -187.30615
30 -72.07172 -121.00071
31 -138.51719 -72.07172
32 -162.01688 -138.51719
33 -151.36382 -162.01688
34 -134.16167 -151.36382
35 -198.59838 -134.16167
36 -140.93951 -198.59838
37 -228.47320 -140.93951
38 -196.37873 -228.47320
39 -184.04874 -196.37873
40 -328.35890 -184.04874
41 -349.97444 -328.35890
42 -228.72916 -349.97444
43 -214.96022 -228.72916
44 -234.35825 -214.96022
45 -293.33525 -234.35825
46 -418.50356 -293.33525
47 -445.22431 -418.50356
48 -402.27237 -445.22431
49 -317.83678 -402.27237
50 -165.92608 -317.83678
51 -251.89351 -165.92608
52 -267.07471 -251.89351
53 -224.57491 -267.07471
54 -251.87881 -224.57491
55 -300.51930 -251.87881
56 -348.29574 -300.51930
57 -484.77560 -348.29574
58 -524.80409 -484.77560
59 -593.81156 -524.80409
60 -531.41695 -593.81156
61 -446.64282 -531.41695
62 -463.51661 -446.64282
63 -547.57495 -463.51661
64 -567.66055 -547.57495
65 -550.60222 -567.66055
66 -459.66351 -550.60222
67 -433.74160 -459.66351
68 -371.39312 -433.74160
69 -377.28719 -371.39312
70 -388.32342 -377.28719
71 -377.73499 -388.32342
72 -331.03704 -377.73499
73 -282.14414 -331.03704
74 -211.64337 -282.14414
75 -215.52753 -211.64337
76 -202.78130 -215.52753
77 -193.99734 -202.78130
78 -164.36850 -193.99734
79 -165.96040 -164.36850
80 -121.68543 -165.96040
81 -145.59192 -121.68543
82 -191.47984 -145.59192
83 -119.14581 -191.47984
84 -109.08082 -119.14581
85 -51.05433 -109.08082
86 -23.65687 -51.05433
87 16.18801 -23.65687
88 40.21675 16.18801
89 50.92498 40.21675
90 59.51718 50.92498
91 125.44650 59.51718
92 387.58914 125.44650
93 428.10698 387.58914
94 372.42890 428.10698
95 467.26655 372.42890
96 471.58252 467.26655
97 516.90237 471.58252
98 628.62280 516.90237
99 633.95180 628.62280
100 635.82699 633.95180
101 667.50083 635.82699
102 733.42317 667.50083
103 691.01362 733.42317
104 735.86321 691.01362
105 723.60744 735.86321
106 694.35484 723.60744
107 764.58215 694.35484
108 781.15839 764.58215
109 801.52432 781.15839
110 957.66005 801.52432
111 922.08135 957.66005
112 880.55320 922.08135
113 945.67360 880.55320
114 1006.88731 945.67360
115 1049.92274 1006.88731
116 1116.15462 1049.92274
117 1045.98906 1116.15462
118 957.17574 1045.98906
119 1048.13972 957.17574
120 1034.21698 1048.13972
121 1026.64210 1034.21698
122 1049.85324 1026.64210
123 873.17645 1049.85324
124 800.22322 873.17645
125 792.83720 800.22322
126 839.53802 792.83720
127 848.20611 839.53802
128 800.16146 848.20611
129 709.52186 800.16146
130 674.61818 709.52186
131 670.26252 674.61818
132 598.67014 670.26252
133 563.68705 598.67014
134 580.87725 563.68705
135 625.68740 580.87725
136 560.05880 625.68740
137 599.47568 560.05880
138 723.23404 599.47568
139 775.10997 723.23404
140 854.40217 775.10997
141 912.32986 854.40217
142 958.46306 912.32986
143 1030.04136 958.46306
144 1063.71572 1030.04136
145 NA 1063.71572
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -1341.44462 -1400.76911
[2,] -1243.11851 -1341.44462
[3,] -1240.31727 -1243.11851
[4,] -1173.70981 -1240.31727
[5,] -1070.59861 -1173.70981
[6,] -1076.04362 -1070.59861
[7,] -1007.74214 -1076.04362
[8,] -927.12041 -1007.74214
[9,] -948.47062 -927.12041
[10,] -1106.72720 -948.47062
[11,] -1179.75278 -1106.72720
[12,] -1112.52874 -1179.75278
[13,] -971.40379 -1112.52874
[14,] -867.22900 -971.40379
[15,] -797.22255 -867.22900
[16,] -823.62327 -797.22255
[17,] -772.35042 -823.62327
[18,] -696.73035 -772.35042
[19,] -715.93174 -696.73035
[20,] -630.35433 -715.93174
[21,] -679.24945 -630.35433
[22,] -683.92540 -679.24945
[23,] -681.72154 -683.92540
[24,] -587.21691 -681.72154
[25,] -433.97907 -587.21691
[26,] -251.85880 -433.97907
[27,] -295.00975 -251.85880
[28,] -187.30615 -295.00975
[29,] -121.00071 -187.30615
[30,] -72.07172 -121.00071
[31,] -138.51719 -72.07172
[32,] -162.01688 -138.51719
[33,] -151.36382 -162.01688
[34,] -134.16167 -151.36382
[35,] -198.59838 -134.16167
[36,] -140.93951 -198.59838
[37,] -228.47320 -140.93951
[38,] -196.37873 -228.47320
[39,] -184.04874 -196.37873
[40,] -328.35890 -184.04874
[41,] -349.97444 -328.35890
[42,] -228.72916 -349.97444
[43,] -214.96022 -228.72916
[44,] -234.35825 -214.96022
[45,] -293.33525 -234.35825
[46,] -418.50356 -293.33525
[47,] -445.22431 -418.50356
[48,] -402.27237 -445.22431
[49,] -317.83678 -402.27237
[50,] -165.92608 -317.83678
[51,] -251.89351 -165.92608
[52,] -267.07471 -251.89351
[53,] -224.57491 -267.07471
[54,] -251.87881 -224.57491
[55,] -300.51930 -251.87881
[56,] -348.29574 -300.51930
[57,] -484.77560 -348.29574
[58,] -524.80409 -484.77560
[59,] -593.81156 -524.80409
[60,] -531.41695 -593.81156
[61,] -446.64282 -531.41695
[62,] -463.51661 -446.64282
[63,] -547.57495 -463.51661
[64,] -567.66055 -547.57495
[65,] -550.60222 -567.66055
[66,] -459.66351 -550.60222
[67,] -433.74160 -459.66351
[68,] -371.39312 -433.74160
[69,] -377.28719 -371.39312
[70,] -388.32342 -377.28719
[71,] -377.73499 -388.32342
[72,] -331.03704 -377.73499
[73,] -282.14414 -331.03704
[74,] -211.64337 -282.14414
[75,] -215.52753 -211.64337
[76,] -202.78130 -215.52753
[77,] -193.99734 -202.78130
[78,] -164.36850 -193.99734
[79,] -165.96040 -164.36850
[80,] -121.68543 -165.96040
[81,] -145.59192 -121.68543
[82,] -191.47984 -145.59192
[83,] -119.14581 -191.47984
[84,] -109.08082 -119.14581
[85,] -51.05433 -109.08082
[86,] -23.65687 -51.05433
[87,] 16.18801 -23.65687
[88,] 40.21675 16.18801
[89,] 50.92498 40.21675
[90,] 59.51718 50.92498
[91,] 125.44650 59.51718
[92,] 387.58914 125.44650
[93,] 428.10698 387.58914
[94,] 372.42890 428.10698
[95,] 467.26655 372.42890
[96,] 471.58252 467.26655
[97,] 516.90237 471.58252
[98,] 628.62280 516.90237
[99,] 633.95180 628.62280
[100,] 635.82699 633.95180
[101,] 667.50083 635.82699
[102,] 733.42317 667.50083
[103,] 691.01362 733.42317
[104,] 735.86321 691.01362
[105,] 723.60744 735.86321
[106,] 694.35484 723.60744
[107,] 764.58215 694.35484
[108,] 781.15839 764.58215
[109,] 801.52432 781.15839
[110,] 957.66005 801.52432
[111,] 922.08135 957.66005
[112,] 880.55320 922.08135
[113,] 945.67360 880.55320
[114,] 1006.88731 945.67360
[115,] 1049.92274 1006.88731
[116,] 1116.15462 1049.92274
[117,] 1045.98906 1116.15462
[118,] 957.17574 1045.98906
[119,] 1048.13972 957.17574
[120,] 1034.21698 1048.13972
[121,] 1026.64210 1034.21698
[122,] 1049.85324 1026.64210
[123,] 873.17645 1049.85324
[124,] 800.22322 873.17645
[125,] 792.83720 800.22322
[126,] 839.53802 792.83720
[127,] 848.20611 839.53802
[128,] 800.16146 848.20611
[129,] 709.52186 800.16146
[130,] 674.61818 709.52186
[131,] 670.26252 674.61818
[132,] 598.67014 670.26252
[133,] 563.68705 598.67014
[134,] 580.87725 563.68705
[135,] 625.68740 580.87725
[136,] 560.05880 625.68740
[137,] 599.47568 560.05880
[138,] 723.23404 599.47568
[139,] 775.10997 723.23404
[140,] 854.40217 775.10997
[141,] 912.32986 854.40217
[142,] 958.46306 912.32986
[143,] 1030.04136 958.46306
[144,] 1063.71572 1030.04136
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -1341.44462 -1400.76911
2 -1243.11851 -1341.44462
3 -1240.31727 -1243.11851
4 -1173.70981 -1240.31727
5 -1070.59861 -1173.70981
6 -1076.04362 -1070.59861
7 -1007.74214 -1076.04362
8 -927.12041 -1007.74214
9 -948.47062 -927.12041
10 -1106.72720 -948.47062
11 -1179.75278 -1106.72720
12 -1112.52874 -1179.75278
13 -971.40379 -1112.52874
14 -867.22900 -971.40379
15 -797.22255 -867.22900
16 -823.62327 -797.22255
17 -772.35042 -823.62327
18 -696.73035 -772.35042
19 -715.93174 -696.73035
20 -630.35433 -715.93174
21 -679.24945 -630.35433
22 -683.92540 -679.24945
23 -681.72154 -683.92540
24 -587.21691 -681.72154
25 -433.97907 -587.21691
26 -251.85880 -433.97907
27 -295.00975 -251.85880
28 -187.30615 -295.00975
29 -121.00071 -187.30615
30 -72.07172 -121.00071
31 -138.51719 -72.07172
32 -162.01688 -138.51719
33 -151.36382 -162.01688
34 -134.16167 -151.36382
35 -198.59838 -134.16167
36 -140.93951 -198.59838
37 -228.47320 -140.93951
38 -196.37873 -228.47320
39 -184.04874 -196.37873
40 -328.35890 -184.04874
41 -349.97444 -328.35890
42 -228.72916 -349.97444
43 -214.96022 -228.72916
44 -234.35825 -214.96022
45 -293.33525 -234.35825
46 -418.50356 -293.33525
47 -445.22431 -418.50356
48 -402.27237 -445.22431
49 -317.83678 -402.27237
50 -165.92608 -317.83678
51 -251.89351 -165.92608
52 -267.07471 -251.89351
53 -224.57491 -267.07471
54 -251.87881 -224.57491
55 -300.51930 -251.87881
56 -348.29574 -300.51930
57 -484.77560 -348.29574
58 -524.80409 -484.77560
59 -593.81156 -524.80409
60 -531.41695 -593.81156
61 -446.64282 -531.41695
62 -463.51661 -446.64282
63 -547.57495 -463.51661
64 -567.66055 -547.57495
65 -550.60222 -567.66055
66 -459.66351 -550.60222
67 -433.74160 -459.66351
68 -371.39312 -433.74160
69 -377.28719 -371.39312
70 -388.32342 -377.28719
71 -377.73499 -388.32342
72 -331.03704 -377.73499
73 -282.14414 -331.03704
74 -211.64337 -282.14414
75 -215.52753 -211.64337
76 -202.78130 -215.52753
77 -193.99734 -202.78130
78 -164.36850 -193.99734
79 -165.96040 -164.36850
80 -121.68543 -165.96040
81 -145.59192 -121.68543
82 -191.47984 -145.59192
83 -119.14581 -191.47984
84 -109.08082 -119.14581
85 -51.05433 -109.08082
86 -23.65687 -51.05433
87 16.18801 -23.65687
88 40.21675 16.18801
89 50.92498 40.21675
90 59.51718 50.92498
91 125.44650 59.51718
92 387.58914 125.44650
93 428.10698 387.58914
94 372.42890 428.10698
95 467.26655 372.42890
96 471.58252 467.26655
97 516.90237 471.58252
98 628.62280 516.90237
99 633.95180 628.62280
100 635.82699 633.95180
101 667.50083 635.82699
102 733.42317 667.50083
103 691.01362 733.42317
104 735.86321 691.01362
105 723.60744 735.86321
106 694.35484 723.60744
107 764.58215 694.35484
108 781.15839 764.58215
109 801.52432 781.15839
110 957.66005 801.52432
111 922.08135 957.66005
112 880.55320 922.08135
113 945.67360 880.55320
114 1006.88731 945.67360
115 1049.92274 1006.88731
116 1116.15462 1049.92274
117 1045.98906 1116.15462
118 957.17574 1045.98906
119 1048.13972 957.17574
120 1034.21698 1048.13972
121 1026.64210 1034.21698
122 1049.85324 1026.64210
123 873.17645 1049.85324
124 800.22322 873.17645
125 792.83720 800.22322
126 839.53802 792.83720
127 848.20611 839.53802
128 800.16146 848.20611
129 709.52186 800.16146
130 674.61818 709.52186
131 670.26252 674.61818
132 598.67014 670.26252
133 563.68705 598.67014
134 580.87725 563.68705
135 625.68740 580.87725
136 560.05880 625.68740
137 599.47568 560.05880
138 723.23404 599.47568
139 775.10997 723.23404
140 854.40217 775.10997
141 912.32986 854.40217
142 958.46306 912.32986
143 1030.04136 958.46306
144 1063.71572 1030.04136
> 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/7182c1260631971.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/888u81260631971.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/9dfbd1260631971.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/10imlm1260631971.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/11o0jh1260631971.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/12eanx1260631971.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/13exxp1260631971.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/14g1y71260631971.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/15zwuk1260631971.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/16p4h81260631971.tab")
+ }
>
> try(system("convert tmp/1m66u1260631971.ps tmp/1m66u1260631971.png",intern=TRUE))
character(0)
> try(system("convert tmp/2fcje1260631971.ps tmp/2fcje1260631971.png",intern=TRUE))
character(0)
> try(system("convert tmp/3ttan1260631971.ps tmp/3ttan1260631971.png",intern=TRUE))
character(0)
> try(system("convert tmp/4b89n1260631971.ps tmp/4b89n1260631971.png",intern=TRUE))
character(0)
> try(system("convert tmp/5ekuh1260631971.ps tmp/5ekuh1260631971.png",intern=TRUE))
character(0)
> try(system("convert tmp/6uz681260631971.ps tmp/6uz681260631971.png",intern=TRUE))
character(0)
> try(system("convert tmp/7182c1260631971.ps tmp/7182c1260631971.png",intern=TRUE))
character(0)
> try(system("convert tmp/888u81260631971.ps tmp/888u81260631971.png",intern=TRUE))
character(0)
> try(system("convert tmp/9dfbd1260631971.ps tmp/9dfbd1260631971.png",intern=TRUE))
character(0)
> try(system("convert tmp/10imlm1260631971.ps tmp/10imlm1260631971.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.559 1.683 5.847