R version 2.12.0 (2010-10-15)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-pc-linux-gnu (32-bit)
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
+ ,3484.7
+ ,9.0
+ ,4.3
+ ,1.0
+ ,3.0
+ ,3411.1
+ ,9.0
+ ,4.3
+ ,1.3
+ ,2.0
+ ,3288.2
+ ,8.9
+ ,4.2
+ ,1.1
+ ,3.0
+ ,3280.4
+ ,8.8
+ ,4.0
+ ,0.8
+ ,5.0
+ ,3174.0
+ ,8.7
+ ,3.8
+ ,0.7
+ ,5.0
+ ,3165.3
+ ,8.5
+ ,4.1
+ ,0.7
+ ,3.0
+ ,3092.7
+ ,8.3
+ ,4.2
+ ,0.9
+ ,2.0
+ ,3053.1
+ ,8.1
+ ,4.0
+ ,1.3
+ ,1.0
+ ,3182.0
+ ,7.9
+ ,4.3
+ ,1.4
+ ,-4.0
+ ,2999.9
+ ,7.8
+ ,4.7
+ ,1.6
+ ,1.0
+ ,3249.6
+ ,7.6
+ ,5.0
+ ,2.1
+ ,1.0
+ ,3210.5
+ ,7.4
+ ,5.1
+ ,0.3
+ ,6.0
+ ,3030.3
+ ,7.2
+ ,5.4
+ ,2.1
+ ,3.0
+ ,2803.5
+ ,7.0
+ ,5.4
+ ,2.5
+ ,2.0
+ ,2767.6
+ ,7.0
+ ,5.4
+ ,2.3
+ ,2.0
+ ,2882.6
+ ,6.8
+ ,5.5
+ ,2.4
+ ,2.0
+ ,2863.4
+ ,6.8
+ ,5.8
+ ,3.0
+ ,-8.0
+ ,2897.1
+ ,6.7
+ ,5.7
+ ,1.7
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 ,3.1
+ ,3.1
+ ,-12.0
+ ,2649.2)
+ ,dim=c(5
+ ,142)
+ ,dimnames=list(c('werkloosheid'
+ ,'rente'
+ ,'hicp'
+ ,'consumer'
+ ,'bel20')
+ ,1:142))
> y <- array(NA,dim=c(5,142),dimnames=list(c('werkloosheid','rente','hicp','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
> 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 hicp consumer bel20 t
1 9.1 4.5 1.0 -1 3484.7 1
2 9.0 4.3 1.0 3 3411.1 2
3 9.0 4.3 1.3 2 3288.2 3
4 8.9 4.2 1.1 3 3280.4 4
5 8.8 4.0 0.8 5 3174.0 5
6 8.7 3.8 0.7 5 3165.3 6
7 8.5 4.1 0.7 3 3092.7 7
8 8.3 4.2 0.9 2 3053.1 8
9 8.1 4.0 1.3 1 3182.0 9
10 7.9 4.3 1.4 -4 2999.9 10
11 7.8 4.7 1.6 1 3249.6 11
12 7.6 5.0 2.1 1 3210.5 12
13 7.4 5.1 0.3 6 3030.3 13
14 7.2 5.4 2.1 3 2803.5 14
15 7.0 5.4 2.5 2 2767.6 15
16 7.0 5.4 2.3 2 2882.6 16
17 6.8 5.5 2.4 2 2863.4 17
18 6.8 5.8 3.0 -8 2897.1 18
19 6.7 5.7 1.7 0 3012.6 19
20 6.8 5.5 3.5 -2 3143.0 20
21 6.7 5.6 4.0 3 3032.9 21
22 6.7 5.6 3.7 5 3045.8 22
23 6.7 5.5 3.7 8 3110.5 23
24 6.5 5.5 3.0 8 3013.2 24
25 6.3 5.7 2.7 9 2987.1 25
26 6.3 5.6 2.5 11 2995.6 26
27 6.3 5.6 2.2 13 2833.2 27
28 6.5 5.4 2.9 12 2849.0 28
29 6.6 5.2 3.1 13 2794.8 29
30 6.5 5.1 3.0 15 2845.3 30
31 6.3 5.1 2.8 13 2915.0 31
32 6.3 5.0 2.5 16 2892.6 32
33 6.5 5.3 1.9 10 2604.4 33
34 7.0 5.4 1.9 14 2641.7 34
35 7.1 5.3 1.8 14 2659.8 35
36 7.3 5.1 2.0 15 2638.5 36
37 7.3 5.0 2.6 13 2720.3 37
38 7.4 5.0 2.5 8 2745.9 38
39 7.4 4.6 2.5 7 2735.7 39
40 7.3 4.8 1.6 3 2811.7 40
41 7.4 5.1 1.4 3 2799.4 41
42 7.5 5.1 0.8 4 2555.3 42
43 7.7 5.1 1.1 4 2305.0 43
44 7.7 5.4 1.3 0 2215.0 44
45 7.7 5.3 1.2 -4 2065.8 45
46 7.7 5.3 1.3 -14 1940.5 46
47 7.7 5.1 1.1 -18 2042.0 47
48 7.8 4.9 1.3 -8 1995.4 48
49 8.0 4.7 1.2 -1 1946.8 49
50 8.1 4.4 1.6 1 1765.9 50
51 8.1 4.6 1.7 2 1635.3 51
52 8.2 4.5 1.5 0 1833.4 52
53 8.2 4.2 0.9 1 1910.4 53
54 8.2 4.0 1.5 0 1959.7 54
55 8.1 3.9 1.4 -1 1969.6 55
56 8.1 4.1 1.6 -3 2061.4 56
57 8.2 4.1 1.7 -3 2093.5 57
58 8.3 3.7 1.4 -3 2120.9 58
59 8.3 3.8 1.8 -4 2174.6 59
60 8.4 4.1 1.7 -8 2196.7 60
61 8.5 4.1 1.4 -9 2350.4 61
62 8.5 4.0 1.2 -13 2440.3 62
63 8.4 4.3 1.0 -18 2408.6 63
64 8.0 4.4 1.7 -11 2472.8 64
65 7.9 4.2 2.4 -9 2407.6 65
66 8.1 4.2 2.0 -10 2454.6 66
67 8.5 4.0 2.1 -13 2448.1 67
68 8.8 4.0 2.0 -11 2497.8 68
69 8.8 4.3 1.8 -5 2645.6 69
70 8.6 4.4 2.7 -15 2756.8 70
71 8.3 4.4 2.3 -6 2849.3 71
72 8.3 4.3 1.9 -6 2921.4 72
73 8.3 4.1 2.0 -3 2981.9 73
74 8.4 4.1 2.3 -1 3080.6 74
75 8.4 3.9 2.8 -3 3106.2 75
76 8.5 3.8 2.4 -4 3119.3 76
77 8.6 3.7 2.3 -6 3061.3 77
78 8.6 3.5 2.7 0 3097.3 78
79 8.6 3.7 2.7 -4 3161.7 79
80 8.6 3.7 2.9 -2 3257.2 80
81 8.6 3.5 3.0 -2 3277.0 81
82 8.5 3.3 2.2 -6 3295.3 82
83 8.4 3.2 2.3 -7 3364.0 83
84 8.4 3.3 2.8 -6 3494.2 84
85 8.4 3.1 2.8 -6 3667.0 85
86 8.5 3.2 2.8 -3 3813.1 86
87 8.5 3.4 2.2 -2 3918.0 87
88 8.6 3.5 2.6 -5 3895.5 88
89 8.6 3.3 2.8 -11 3801.1 89
90 8.4 3.5 2.5 -11 3570.1 90
91 8.2 3.5 2.4 -11 3701.6 91
92 8.0 3.8 2.3 -10 3862.3 92
93 8.0 4.0 1.9 -14 3970.1 93
94 8.0 4.0 1.7 -8 4138.5 94
95 8.0 4.1 2.0 -9 4199.8 95
96 7.9 4.0 2.1 -5 4290.9 96
97 7.9 3.8 1.7 -1 4443.9 97
98 7.8 3.7 1.8 -2 4502.6 98
99 7.8 3.8 1.8 -5 4357.0 99
100 8.0 3.7 1.8 -4 4591.3 100
101 7.8 4.0 1.3 -6 4697.0 101
102 7.4 4.2 1.3 -2 4621.4 102
103 7.2 4.0 1.3 -2 4562.8 103
104 7.0 4.1 1.2 -2 4202.5 104
105 7.0 4.2 1.4 -2 4296.5 105
106 7.2 4.5 2.2 2 4435.2 106
107 7.2 4.6 2.9 1 4105.2 107
108 7.2 4.5 3.1 -8 4116.7 108
109 7.0 4.5 3.5 -1 3844.5 109
110 6.9 4.5 3.6 1 3721.0 110
111 6.8 4.4 4.4 -1 3674.4 111
112 6.8 4.3 4.1 2 3857.6 112
113 6.8 4.5 5.1 2 3801.1 113
114 6.9 4.1 5.8 1 3504.4 114
115 7.2 4.1 5.9 -1 3032.6 115
116 7.2 4.3 5.4 -2 3047.0 116
117 7.2 4.4 5.5 -2 2962.3 117
118 7.1 4.7 4.8 -1 2197.8 118
119 7.2 5.0 3.2 -8 2014.5 119
120 7.3 4.7 2.7 -4 1862.8 120
121 7.5 4.5 2.1 -6 1905.4 121
122 7.6 4.5 1.9 -3 1811.0 122
123 7.7 4.5 0.6 -3 1670.1 123
124 7.7 5.5 0.7 -7 1864.4 124
125 7.7 4.5 -0.2 -9 2052.0 125
126 7.8 4.4 -1.0 -11 2029.6 126
127 8.0 4.2 -1.7 -13 2070.8 127
128 8.1 3.9 -0.7 -11 2293.4 128
129 8.1 3.9 -1.0 -9 2443.3 129
130 8.0 4.2 -0.9 -17 2513.2 130
131 8.1 4.0 0.0 -22 2466.9 131
132 8.2 3.8 0.3 -25 2502.7 132
133 8.3 3.7 0.8 -20 2539.9 133
134 8.4 3.7 0.8 -24 2482.6 134
135 8.4 3.7 1.9 -24 2626.2 135
136 8.4 3.7 2.1 -22 2656.3 136
137 8.5 3.7 2.5 -19 2446.7 137
138 8.5 3.8 2.7 -18 2467.4 138
139 8.6 3.7 2.4 -17 2462.3 139
140 8.6 3.5 2.4 -11 2504.6 140
141 8.5 3.5 2.9 -11 2579.4 141
142 8.5 3.1 3.1 -12 2649.2 142
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) rente hicp consumer bel20 t
13.1121249 -0.9316784 -0.0777024 -0.0276137 -0.0001959 -0.0083751
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-0.68289 -0.21888 -0.03415 0.20455 0.97702
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.311e+01 3.089e-01 42.447 < 2e-16 ***
rente -9.317e-01 5.194e-02 -17.939 < 2e-16 ***
hicp -7.770e-02 2.324e-02 -3.343 0.00107 **
consumer -2.761e-02 4.500e-03 -6.136 8.65e-09 ***
bel20 -1.959e-04 3.961e-05 -4.947 2.19e-06 ***
t -8.375e-03 8.908e-04 -9.401 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.3058 on 136 degrees of freedom
Multiple R-squared: 0.823, Adjusted R-squared: 0.8165
F-statistic: 126.5 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,] 4.483011e-03 8.966021e-03 9.955170e-01
[2,] 1.639077e-03 3.278154e-03 9.983609e-01
[3,] 6.294067e-04 1.258813e-03 9.993706e-01
[4,] 1.408611e-04 2.817221e-04 9.998591e-01
[5,] 5.715780e-05 1.143156e-04 9.999428e-01
[6,] 4.750460e-05 9.500920e-05 9.999525e-01
[7,] 1.873965e-05 3.747930e-05 9.999813e-01
[8,] 7.461770e-06 1.492354e-05 9.999925e-01
[9,] 1.622351e-06 3.244703e-06 9.999984e-01
[10,] 4.225084e-05 8.450167e-05 9.999577e-01
[11,] 3.555276e-05 7.110552e-05 9.999644e-01
[12,] 5.306661e-05 1.061332e-04 9.999469e-01
[13,] 3.152846e-05 6.305691e-05 9.999685e-01
[14,] 2.647708e-05 5.295417e-05 9.999735e-01
[15,] 1.320232e-05 2.640463e-05 9.999868e-01
[16,] 6.430783e-06 1.286157e-05 9.999936e-01
[17,] 2.682246e-06 5.364492e-06 9.999973e-01
[18,] 1.313398e-06 2.626795e-06 9.999987e-01
[19,] 3.162510e-06 6.325019e-06 9.999968e-01
[20,] 3.381361e-05 6.762722e-05 9.999662e-01
[21,] 1.810054e-04 3.620108e-04 9.998190e-01
[22,] 1.532093e-04 3.064187e-04 9.998468e-01
[23,] 1.427644e-04 2.855288e-04 9.998572e-01
[24,] 1.608975e-04 3.217950e-04 9.998391e-01
[25,] 2.127827e-02 4.255654e-02 9.787217e-01
[26,] 4.696452e-01 9.392904e-01 5.303548e-01
[27,] 8.006993e-01 3.986014e-01 1.993007e-01
[28,] 9.355164e-01 1.289672e-01 6.448359e-02
[29,] 9.703873e-01 5.922531e-02 2.961266e-02
[30,] 9.789869e-01 4.202628e-02 2.101314e-02
[31,] 9.742404e-01 5.151922e-02 2.575961e-02
[32,] 9.719263e-01 5.614733e-02 2.807367e-02
[33,] 9.648747e-01 7.025055e-02 3.512527e-02
[34,] 9.584292e-01 8.314165e-02 4.157082e-02
[35,] 9.691075e-01 6.178502e-02 3.089251e-02
[36,] 9.811275e-01 3.774491e-02 1.887246e-02
[37,] 9.768048e-01 4.639031e-02 2.319516e-02
[38,] 9.700074e-01 5.998530e-02 2.999265e-02
[39,] 9.755212e-01 4.895765e-02 2.447882e-02
[40,] 9.692285e-01 6.154291e-02 3.077145e-02
[41,] 9.611880e-01 7.762410e-02 3.881205e-02
[42,] 9.507543e-01 9.849141e-02 4.924571e-02
[43,] 9.451168e-01 1.097663e-01 5.488317e-02
[44,] 9.339227e-01 1.321545e-01 6.607726e-02
[45,] 9.205122e-01 1.589756e-01 7.948782e-02
[46,] 9.112139e-01 1.775721e-01 8.878607e-02
[47,] 9.294687e-01 1.410626e-01 7.053132e-02
[48,] 9.258091e-01 1.483819e-01 7.419094e-02
[49,] 9.141110e-01 1.717780e-01 8.588902e-02
[50,] 9.299265e-01 1.401470e-01 7.007348e-02
[51,] 9.344744e-01 1.310512e-01 6.552560e-02
[52,] 9.266865e-01 1.466271e-01 7.331355e-02
[53,] 9.142544e-01 1.714911e-01 8.574557e-02
[54,] 9.042149e-01 1.915702e-01 9.578512e-02
[55,] 8.944014e-01 2.111972e-01 1.055986e-01
[56,] 8.983837e-01 2.032325e-01 1.016163e-01
[57,] 9.353680e-01 1.292641e-01 6.463204e-02
[58,] 9.520811e-01 9.583780e-02 4.791890e-02
[59,] 9.596711e-01 8.065787e-02 4.032893e-02
[60,] 9.663362e-01 6.732760e-02 3.366380e-02
[61,] 9.903065e-01 1.938697e-02 9.693486e-03
[62,] 9.921375e-01 1.572504e-02 7.862520e-03
[63,] 9.911152e-01 1.776961e-02 8.884803e-03
[64,] 9.880026e-01 2.399488e-02 1.199744e-02
[65,] 9.836243e-01 3.275135e-02 1.637568e-02
[66,] 9.832106e-01 3.357877e-02 1.678939e-02
[67,] 9.786614e-01 4.267713e-02 2.133857e-02
[68,] 9.728520e-01 5.429609e-02 2.714805e-02
[69,] 9.653728e-01 6.925432e-02 3.462716e-02
[70,] 9.577763e-01 8.444738e-02 4.222369e-02
[71,] 9.545550e-01 9.089004e-02 4.544502e-02
[72,] 9.624253e-01 7.514946e-02 3.757473e-02
[73,] 9.626046e-01 7.479083e-02 3.739542e-02
[74,] 9.666470e-01 6.670593e-02 3.335297e-02
[75,] 9.785434e-01 4.291320e-02 2.145660e-02
[76,] 9.766544e-01 4.669129e-02 2.334564e-02
[77,] 9.804838e-01 3.903231e-02 1.951615e-02
[78,] 9.749342e-01 5.013156e-02 2.506578e-02
[79,] 9.729887e-01 5.402261e-02 2.701131e-02
[80,] 9.797481e-01 4.050378e-02 2.025189e-02
[81,] 9.761944e-01 4.761125e-02 2.380563e-02
[82,] 9.713633e-01 5.727341e-02 2.863670e-02
[83,] 9.695091e-01 6.098170e-02 3.049085e-02
[84,] 9.640618e-01 7.187638e-02 3.593819e-02
[85,] 9.567946e-01 8.641074e-02 4.320537e-02
[86,] 9.530315e-01 9.393708e-02 4.696854e-02
[87,] 9.604965e-01 7.900692e-02 3.950346e-02
[88,] 9.701963e-01 5.960737e-02 2.980369e-02
[89,] 9.797896e-01 4.042074e-02 2.021037e-02
[90,] 9.836133e-01 3.277349e-02 1.638675e-02
[91,] 9.895604e-01 2.087925e-02 1.043962e-02
[92,] 9.993596e-01 1.280832e-03 6.404158e-04
[93,] 9.999917e-01 1.656736e-05 8.283682e-06
[94,] 9.999990e-01 1.957801e-06 9.789006e-07
[95,] 9.999994e-01 1.142268e-06 5.711341e-07
[96,] 9.999993e-01 1.475883e-06 7.379415e-07
[97,] 9.999987e-01 2.681938e-06 1.340969e-06
[98,] 9.999994e-01 1.103205e-06 5.516027e-07
[99,] 1.000000e+00 5.706995e-08 2.853498e-08
[100,] 1.000000e+00 2.286024e-09 1.143012e-09
[101,] 1.000000e+00 5.378577e-10 2.689288e-10
[102,] 1.000000e+00 6.726393e-10 3.363197e-10
[103,] 1.000000e+00 2.356099e-09 1.178050e-09
[104,] 1.000000e+00 7.147059e-09 3.573529e-09
[105,] 1.000000e+00 1.630298e-08 8.151491e-09
[106,] 1.000000e+00 2.088100e-08 1.044050e-08
[107,] 1.000000e+00 3.954787e-08 1.977393e-08
[108,] 1.000000e+00 7.685353e-08 3.842677e-08
[109,] 1.000000e+00 2.756035e-08 1.378017e-08
[110,] 1.000000e+00 8.588401e-08 4.294200e-08
[111,] 9.999999e-01 2.513667e-07 1.256833e-07
[112,] 9.999998e-01 4.360989e-07 2.180494e-07
[113,] 9.999993e-01 1.474995e-06 7.374976e-07
[114,] 9.999973e-01 5.481475e-06 2.740737e-06
[115,] 9.999901e-01 1.984446e-05 9.922229e-06
[116,] 9.999834e-01 3.316267e-05 1.658134e-05
[117,] 9.999681e-01 6.384263e-05 3.192131e-05
[118,] 9.999913e-01 1.744140e-05 8.720700e-06
[119,] 9.999802e-01 3.960218e-05 1.980109e-05
[120,] 9.999301e-01 1.398892e-04 6.994459e-05
[121,] 9.998410e-01 3.179002e-04 1.589501e-04
[122,] 9.992550e-01 1.489938e-03 7.449692e-04
[123,] 9.988536e-01 2.292797e-03 1.146398e-03
[124,] 9.990022e-01 1.995587e-03 9.977934e-04
[125,] 9.939096e-01 1.218075e-02 6.090374e-03
> postscript(file="/var/www/rcomp/tmp/17pru1292948297.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/rcomp/tmp/27pru1292948297.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/rcomp/tmp/30z8f1292948297.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/rcomp/tmp/40z8f1292948297.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/rcomp/tmp/50z8f1292948297.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.921665492 0.739738834 0.719730653 0.545482832 0.278591437 -0.008843999
7 8 9 10 11 12
0.009582460 -0.108706764 -0.457944041 -0.536043203 -0.052462957 0.066605882
13 14 15 16 17 18
-0.068954605 0.031509457 -0.163682164 -0.148315038 -0.242763766 -0.177797371
19 20 21 22 23 24
-0.220063426 -0.187837052 -0.030946896 0.011872403 0.022597680 -0.242483345
25 26 27 28 29 30
-0.248583483 -0.292023896 -0.283551943 -0.231638697 -0.277064753 -0.404505666
31 32 33 34 35 36
-0.653241727 -0.682893093 -0.463786307 0.255519722 0.266503179 0.327523374
37 38 39 40 41 42
0.250152234 0.217704679 -0.176203776 -0.246988818 0.122939358 0.164479043
43 44 45 46 47 48
0.347122460 0.522452798 0.290201693 0.005659721 -0.278408653 -0.073822546
49 50 51 52 53 54
0.124219938 0.003955279 0.208460947 0.191715052 -0.083334177 -0.232627364
55 56 57 58 59 60
-0.450864244 -0.277853482 -0.155418606 -0.437656978 -0.322125009 -0.048141129
61 62 63 64 65 66
0.039424750 -0.153748621 -0.125689944 -0.163880541 -0.344996982 -0.186107576
67 68 69 70 71 72
-0.040412486 0.325157697 0.792137052 0.509263428 0.453204594 0.351457789
73 74 75 76 77 78
0.275962541 0.482214501 0.292893744 0.251973122 0.192818605 0.218674710
79 80 81 82 83 84
0.315549027 0.413403751 0.247092942 -0.199898662 -0.391074095 -0.197555533
85 86 87 88 89 90
-0.341658584 -0.028648537 0.167608032 0.312982434 -0.033615908 -0.107476731
91 92 93 94 95 96
-0.281106439 -0.141897649 -0.067600746 0.123911330 0.233162158 0.184444028
97 98 99 100 101 102
0.115835186 -0.077299593 -0.087125727 0.101602722 0.116113108 0.006465958
103 104 105 106 107 108
-0.382976373 -0.559798902 -0.424297582 0.263373866 0.327036440 0.011514403
109 110 111 112 113 114
-0.009067192 -0.061892403 -0.248881064 -0.238248263 0.023094691 -0.272557333
115 116 117 118 119 120
-0.104081279 0.026986102 0.119703654 0.131012229 0.165356443 0.036108221
121 122 123 124 125 126
-0.035354336 0.121825092 0.101579848 0.977019076 -0.034686443 -0.141257398
127 128 129 130 131 132
-0.220764508 -0.215348065 -0.145685717 -0.157250364 -0.312418864 -0.442895250
133 134 135 136 137 138
-0.243479607 -0.256786227 -0.134802191 -0.049761594 0.131467628 0.280220611
139 140 141 142
0.298731569 0.294741085 0.256623349 -0.106069845
> postscript(file="/var/www/rcomp/tmp/6a8701292948297.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.921665492 NA
1 0.739738834 0.921665492
2 0.719730653 0.739738834
3 0.545482832 0.719730653
4 0.278591437 0.545482832
5 -0.008843999 0.278591437
6 0.009582460 -0.008843999
7 -0.108706764 0.009582460
8 -0.457944041 -0.108706764
9 -0.536043203 -0.457944041
10 -0.052462957 -0.536043203
11 0.066605882 -0.052462957
12 -0.068954605 0.066605882
13 0.031509457 -0.068954605
14 -0.163682164 0.031509457
15 -0.148315038 -0.163682164
16 -0.242763766 -0.148315038
17 -0.177797371 -0.242763766
18 -0.220063426 -0.177797371
19 -0.187837052 -0.220063426
20 -0.030946896 -0.187837052
21 0.011872403 -0.030946896
22 0.022597680 0.011872403
23 -0.242483345 0.022597680
24 -0.248583483 -0.242483345
25 -0.292023896 -0.248583483
26 -0.283551943 -0.292023896
27 -0.231638697 -0.283551943
28 -0.277064753 -0.231638697
29 -0.404505666 -0.277064753
30 -0.653241727 -0.404505666
31 -0.682893093 -0.653241727
32 -0.463786307 -0.682893093
33 0.255519722 -0.463786307
34 0.266503179 0.255519722
35 0.327523374 0.266503179
36 0.250152234 0.327523374
37 0.217704679 0.250152234
38 -0.176203776 0.217704679
39 -0.246988818 -0.176203776
40 0.122939358 -0.246988818
41 0.164479043 0.122939358
42 0.347122460 0.164479043
43 0.522452798 0.347122460
44 0.290201693 0.522452798
45 0.005659721 0.290201693
46 -0.278408653 0.005659721
47 -0.073822546 -0.278408653
48 0.124219938 -0.073822546
49 0.003955279 0.124219938
50 0.208460947 0.003955279
51 0.191715052 0.208460947
52 -0.083334177 0.191715052
53 -0.232627364 -0.083334177
54 -0.450864244 -0.232627364
55 -0.277853482 -0.450864244
56 -0.155418606 -0.277853482
57 -0.437656978 -0.155418606
58 -0.322125009 -0.437656978
59 -0.048141129 -0.322125009
60 0.039424750 -0.048141129
61 -0.153748621 0.039424750
62 -0.125689944 -0.153748621
63 -0.163880541 -0.125689944
64 -0.344996982 -0.163880541
65 -0.186107576 -0.344996982
66 -0.040412486 -0.186107576
67 0.325157697 -0.040412486
68 0.792137052 0.325157697
69 0.509263428 0.792137052
70 0.453204594 0.509263428
71 0.351457789 0.453204594
72 0.275962541 0.351457789
73 0.482214501 0.275962541
74 0.292893744 0.482214501
75 0.251973122 0.292893744
76 0.192818605 0.251973122
77 0.218674710 0.192818605
78 0.315549027 0.218674710
79 0.413403751 0.315549027
80 0.247092942 0.413403751
81 -0.199898662 0.247092942
82 -0.391074095 -0.199898662
83 -0.197555533 -0.391074095
84 -0.341658584 -0.197555533
85 -0.028648537 -0.341658584
86 0.167608032 -0.028648537
87 0.312982434 0.167608032
88 -0.033615908 0.312982434
89 -0.107476731 -0.033615908
90 -0.281106439 -0.107476731
91 -0.141897649 -0.281106439
92 -0.067600746 -0.141897649
93 0.123911330 -0.067600746
94 0.233162158 0.123911330
95 0.184444028 0.233162158
96 0.115835186 0.184444028
97 -0.077299593 0.115835186
98 -0.087125727 -0.077299593
99 0.101602722 -0.087125727
100 0.116113108 0.101602722
101 0.006465958 0.116113108
102 -0.382976373 0.006465958
103 -0.559798902 -0.382976373
104 -0.424297582 -0.559798902
105 0.263373866 -0.424297582
106 0.327036440 0.263373866
107 0.011514403 0.327036440
108 -0.009067192 0.011514403
109 -0.061892403 -0.009067192
110 -0.248881064 -0.061892403
111 -0.238248263 -0.248881064
112 0.023094691 -0.238248263
113 -0.272557333 0.023094691
114 -0.104081279 -0.272557333
115 0.026986102 -0.104081279
116 0.119703654 0.026986102
117 0.131012229 0.119703654
118 0.165356443 0.131012229
119 0.036108221 0.165356443
120 -0.035354336 0.036108221
121 0.121825092 -0.035354336
122 0.101579848 0.121825092
123 0.977019076 0.101579848
124 -0.034686443 0.977019076
125 -0.141257398 -0.034686443
126 -0.220764508 -0.141257398
127 -0.215348065 -0.220764508
128 -0.145685717 -0.215348065
129 -0.157250364 -0.145685717
130 -0.312418864 -0.157250364
131 -0.442895250 -0.312418864
132 -0.243479607 -0.442895250
133 -0.256786227 -0.243479607
134 -0.134802191 -0.256786227
135 -0.049761594 -0.134802191
136 0.131467628 -0.049761594
137 0.280220611 0.131467628
138 0.298731569 0.280220611
139 0.294741085 0.298731569
140 0.256623349 0.294741085
141 -0.106069845 0.256623349
142 NA -0.106069845
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.739738834 0.921665492
[2,] 0.719730653 0.739738834
[3,] 0.545482832 0.719730653
[4,] 0.278591437 0.545482832
[5,] -0.008843999 0.278591437
[6,] 0.009582460 -0.008843999
[7,] -0.108706764 0.009582460
[8,] -0.457944041 -0.108706764
[9,] -0.536043203 -0.457944041
[10,] -0.052462957 -0.536043203
[11,] 0.066605882 -0.052462957
[12,] -0.068954605 0.066605882
[13,] 0.031509457 -0.068954605
[14,] -0.163682164 0.031509457
[15,] -0.148315038 -0.163682164
[16,] -0.242763766 -0.148315038
[17,] -0.177797371 -0.242763766
[18,] -0.220063426 -0.177797371
[19,] -0.187837052 -0.220063426
[20,] -0.030946896 -0.187837052
[21,] 0.011872403 -0.030946896
[22,] 0.022597680 0.011872403
[23,] -0.242483345 0.022597680
[24,] -0.248583483 -0.242483345
[25,] -0.292023896 -0.248583483
[26,] -0.283551943 -0.292023896
[27,] -0.231638697 -0.283551943
[28,] -0.277064753 -0.231638697
[29,] -0.404505666 -0.277064753
[30,] -0.653241727 -0.404505666
[31,] -0.682893093 -0.653241727
[32,] -0.463786307 -0.682893093
[33,] 0.255519722 -0.463786307
[34,] 0.266503179 0.255519722
[35,] 0.327523374 0.266503179
[36,] 0.250152234 0.327523374
[37,] 0.217704679 0.250152234
[38,] -0.176203776 0.217704679
[39,] -0.246988818 -0.176203776
[40,] 0.122939358 -0.246988818
[41,] 0.164479043 0.122939358
[42,] 0.347122460 0.164479043
[43,] 0.522452798 0.347122460
[44,] 0.290201693 0.522452798
[45,] 0.005659721 0.290201693
[46,] -0.278408653 0.005659721
[47,] -0.073822546 -0.278408653
[48,] 0.124219938 -0.073822546
[49,] 0.003955279 0.124219938
[50,] 0.208460947 0.003955279
[51,] 0.191715052 0.208460947
[52,] -0.083334177 0.191715052
[53,] -0.232627364 -0.083334177
[54,] -0.450864244 -0.232627364
[55,] -0.277853482 -0.450864244
[56,] -0.155418606 -0.277853482
[57,] -0.437656978 -0.155418606
[58,] -0.322125009 -0.437656978
[59,] -0.048141129 -0.322125009
[60,] 0.039424750 -0.048141129
[61,] -0.153748621 0.039424750
[62,] -0.125689944 -0.153748621
[63,] -0.163880541 -0.125689944
[64,] -0.344996982 -0.163880541
[65,] -0.186107576 -0.344996982
[66,] -0.040412486 -0.186107576
[67,] 0.325157697 -0.040412486
[68,] 0.792137052 0.325157697
[69,] 0.509263428 0.792137052
[70,] 0.453204594 0.509263428
[71,] 0.351457789 0.453204594
[72,] 0.275962541 0.351457789
[73,] 0.482214501 0.275962541
[74,] 0.292893744 0.482214501
[75,] 0.251973122 0.292893744
[76,] 0.192818605 0.251973122
[77,] 0.218674710 0.192818605
[78,] 0.315549027 0.218674710
[79,] 0.413403751 0.315549027
[80,] 0.247092942 0.413403751
[81,] -0.199898662 0.247092942
[82,] -0.391074095 -0.199898662
[83,] -0.197555533 -0.391074095
[84,] -0.341658584 -0.197555533
[85,] -0.028648537 -0.341658584
[86,] 0.167608032 -0.028648537
[87,] 0.312982434 0.167608032
[88,] -0.033615908 0.312982434
[89,] -0.107476731 -0.033615908
[90,] -0.281106439 -0.107476731
[91,] -0.141897649 -0.281106439
[92,] -0.067600746 -0.141897649
[93,] 0.123911330 -0.067600746
[94,] 0.233162158 0.123911330
[95,] 0.184444028 0.233162158
[96,] 0.115835186 0.184444028
[97,] -0.077299593 0.115835186
[98,] -0.087125727 -0.077299593
[99,] 0.101602722 -0.087125727
[100,] 0.116113108 0.101602722
[101,] 0.006465958 0.116113108
[102,] -0.382976373 0.006465958
[103,] -0.559798902 -0.382976373
[104,] -0.424297582 -0.559798902
[105,] 0.263373866 -0.424297582
[106,] 0.327036440 0.263373866
[107,] 0.011514403 0.327036440
[108,] -0.009067192 0.011514403
[109,] -0.061892403 -0.009067192
[110,] -0.248881064 -0.061892403
[111,] -0.238248263 -0.248881064
[112,] 0.023094691 -0.238248263
[113,] -0.272557333 0.023094691
[114,] -0.104081279 -0.272557333
[115,] 0.026986102 -0.104081279
[116,] 0.119703654 0.026986102
[117,] 0.131012229 0.119703654
[118,] 0.165356443 0.131012229
[119,] 0.036108221 0.165356443
[120,] -0.035354336 0.036108221
[121,] 0.121825092 -0.035354336
[122,] 0.101579848 0.121825092
[123,] 0.977019076 0.101579848
[124,] -0.034686443 0.977019076
[125,] -0.141257398 -0.034686443
[126,] -0.220764508 -0.141257398
[127,] -0.215348065 -0.220764508
[128,] -0.145685717 -0.215348065
[129,] -0.157250364 -0.145685717
[130,] -0.312418864 -0.157250364
[131,] -0.442895250 -0.312418864
[132,] -0.243479607 -0.442895250
[133,] -0.256786227 -0.243479607
[134,] -0.134802191 -0.256786227
[135,] -0.049761594 -0.134802191
[136,] 0.131467628 -0.049761594
[137,] 0.280220611 0.131467628
[138,] 0.298731569 0.280220611
[139,] 0.294741085 0.298731569
[140,] 0.256623349 0.294741085
[141,] -0.106069845 0.256623349
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.739738834 0.921665492
2 0.719730653 0.739738834
3 0.545482832 0.719730653
4 0.278591437 0.545482832
5 -0.008843999 0.278591437
6 0.009582460 -0.008843999
7 -0.108706764 0.009582460
8 -0.457944041 -0.108706764
9 -0.536043203 -0.457944041
10 -0.052462957 -0.536043203
11 0.066605882 -0.052462957
12 -0.068954605 0.066605882
13 0.031509457 -0.068954605
14 -0.163682164 0.031509457
15 -0.148315038 -0.163682164
16 -0.242763766 -0.148315038
17 -0.177797371 -0.242763766
18 -0.220063426 -0.177797371
19 -0.187837052 -0.220063426
20 -0.030946896 -0.187837052
21 0.011872403 -0.030946896
22 0.022597680 0.011872403
23 -0.242483345 0.022597680
24 -0.248583483 -0.242483345
25 -0.292023896 -0.248583483
26 -0.283551943 -0.292023896
27 -0.231638697 -0.283551943
28 -0.277064753 -0.231638697
29 -0.404505666 -0.277064753
30 -0.653241727 -0.404505666
31 -0.682893093 -0.653241727
32 -0.463786307 -0.682893093
33 0.255519722 -0.463786307
34 0.266503179 0.255519722
35 0.327523374 0.266503179
36 0.250152234 0.327523374
37 0.217704679 0.250152234
38 -0.176203776 0.217704679
39 -0.246988818 -0.176203776
40 0.122939358 -0.246988818
41 0.164479043 0.122939358
42 0.347122460 0.164479043
43 0.522452798 0.347122460
44 0.290201693 0.522452798
45 0.005659721 0.290201693
46 -0.278408653 0.005659721
47 -0.073822546 -0.278408653
48 0.124219938 -0.073822546
49 0.003955279 0.124219938
50 0.208460947 0.003955279
51 0.191715052 0.208460947
52 -0.083334177 0.191715052
53 -0.232627364 -0.083334177
54 -0.450864244 -0.232627364
55 -0.277853482 -0.450864244
56 -0.155418606 -0.277853482
57 -0.437656978 -0.155418606
58 -0.322125009 -0.437656978
59 -0.048141129 -0.322125009
60 0.039424750 -0.048141129
61 -0.153748621 0.039424750
62 -0.125689944 -0.153748621
63 -0.163880541 -0.125689944
64 -0.344996982 -0.163880541
65 -0.186107576 -0.344996982
66 -0.040412486 -0.186107576
67 0.325157697 -0.040412486
68 0.792137052 0.325157697
69 0.509263428 0.792137052
70 0.453204594 0.509263428
71 0.351457789 0.453204594
72 0.275962541 0.351457789
73 0.482214501 0.275962541
74 0.292893744 0.482214501
75 0.251973122 0.292893744
76 0.192818605 0.251973122
77 0.218674710 0.192818605
78 0.315549027 0.218674710
79 0.413403751 0.315549027
80 0.247092942 0.413403751
81 -0.199898662 0.247092942
82 -0.391074095 -0.199898662
83 -0.197555533 -0.391074095
84 -0.341658584 -0.197555533
85 -0.028648537 -0.341658584
86 0.167608032 -0.028648537
87 0.312982434 0.167608032
88 -0.033615908 0.312982434
89 -0.107476731 -0.033615908
90 -0.281106439 -0.107476731
91 -0.141897649 -0.281106439
92 -0.067600746 -0.141897649
93 0.123911330 -0.067600746
94 0.233162158 0.123911330
95 0.184444028 0.233162158
96 0.115835186 0.184444028
97 -0.077299593 0.115835186
98 -0.087125727 -0.077299593
99 0.101602722 -0.087125727
100 0.116113108 0.101602722
101 0.006465958 0.116113108
102 -0.382976373 0.006465958
103 -0.559798902 -0.382976373
104 -0.424297582 -0.559798902
105 0.263373866 -0.424297582
106 0.327036440 0.263373866
107 0.011514403 0.327036440
108 -0.009067192 0.011514403
109 -0.061892403 -0.009067192
110 -0.248881064 -0.061892403
111 -0.238248263 -0.248881064
112 0.023094691 -0.238248263
113 -0.272557333 0.023094691
114 -0.104081279 -0.272557333
115 0.026986102 -0.104081279
116 0.119703654 0.026986102
117 0.131012229 0.119703654
118 0.165356443 0.131012229
119 0.036108221 0.165356443
120 -0.035354336 0.036108221
121 0.121825092 -0.035354336
122 0.101579848 0.121825092
123 0.977019076 0.101579848
124 -0.034686443 0.977019076
125 -0.141257398 -0.034686443
126 -0.220764508 -0.141257398
127 -0.215348065 -0.220764508
128 -0.145685717 -0.215348065
129 -0.157250364 -0.145685717
130 -0.312418864 -0.157250364
131 -0.442895250 -0.312418864
132 -0.243479607 -0.442895250
133 -0.256786227 -0.243479607
134 -0.134802191 -0.256786227
135 -0.049761594 -0.134802191
136 0.131467628 -0.049761594
137 0.280220611 0.131467628
138 0.298731569 0.280220611
139 0.294741085 0.298731569
140 0.256623349 0.294741085
141 -0.106069845 0.256623349
> 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/rcomp/tmp/73h6l1292948297.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/rcomp/tmp/83h6l1292948297.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/rcomp/tmp/93h6l1292948297.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/rcomp/tmp/10w8oo1292948297.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/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/rcomp/tmp/11hrmc1292948297.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/rcomp/tmp/12lr301292948297.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/rcomp/tmp/13zjjr1292948297.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/rcomp/tmp/142khw1292948297.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/rcomp/tmp/15nkf21292948297.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/rcomp/tmp/166y6r1292948298.tab")
+ }
>
> try(system("convert tmp/17pru1292948297.ps tmp/17pru1292948297.png",intern=TRUE))
character(0)
> try(system("convert tmp/27pru1292948297.ps tmp/27pru1292948297.png",intern=TRUE))
character(0)
> try(system("convert tmp/30z8f1292948297.ps tmp/30z8f1292948297.png",intern=TRUE))
character(0)
> try(system("convert tmp/40z8f1292948297.ps tmp/40z8f1292948297.png",intern=TRUE))
character(0)
> try(system("convert tmp/50z8f1292948297.ps tmp/50z8f1292948297.png",intern=TRUE))
character(0)
> try(system("convert tmp/6a8701292948297.ps tmp/6a8701292948297.png",intern=TRUE))
character(0)
> try(system("convert tmp/73h6l1292948297.ps tmp/73h6l1292948297.png",intern=TRUE))
character(0)
> try(system("convert tmp/83h6l1292948297.ps tmp/83h6l1292948297.png",intern=TRUE))
character(0)
> try(system("convert tmp/93h6l1292948297.ps tmp/93h6l1292948297.png",intern=TRUE))
character(0)
> try(system("convert tmp/10w8oo1292948297.ps tmp/10w8oo1292948297.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.260 1.180 5.727