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(24
+ ,14
+ ,11
+ ,12
+ ,24
+ ,26
+ ,25
+ ,11
+ ,7
+ ,8
+ ,25
+ ,23
+ ,17
+ ,6
+ ,17
+ ,8
+ ,30
+ ,25
+ ,18
+ ,12
+ ,10
+ ,8
+ ,19
+ ,23
+ ,18
+ ,8
+ ,12
+ ,9
+ ,22
+ ,19
+ ,16
+ ,10
+ ,12
+ ,7
+ ,22
+ ,29
+ ,20
+ ,10
+ ,11
+ ,4
+ ,25
+ ,25
+ ,16
+ ,11
+ ,11
+ ,11
+ ,23
+ ,21
+ ,18
+ ,16
+ ,12
+ ,7
+ ,17
+ ,22
+ ,17
+ ,11
+ ,13
+ ,7
+ ,21
+ ,25
+ ,23
+ ,13
+ ,14
+ ,12
+ ,19
+ ,24
+ ,30
+ ,12
+ ,16
+ ,10
+ ,19
+ ,18
+ ,23
+ ,8
+ ,11
+ ,10
+ ,15
+ ,22
+ ,18
+ ,12
+ ,10
+ ,8
+ ,16
+ ,15
+ ,15
+ ,11
+ ,11
+ ,8
+ ,23
+ ,22
+ ,12
+ ,4
+ ,15
+ ,4
+ ,27
+ ,28
+ ,21
+ ,9
+ ,9
+ ,9
+ ,22
+ ,20
+ ,15
+ ,8
+ ,11
+ ,8
+ ,14
+ ,12
+ ,20
+ ,8
+ ,17
+ ,7
+ ,22
+ ,24
+ ,31
+ ,14
+ ,17
+ ,11
+ ,23
+ ,20
+ ,27
+ ,15
+ ,11
+ ,9
+ ,23
+ ,21
+ ,34
+ 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','Doubtsaboutactions','ParentalExpectations','ParentalCriticism','PersonalStandards','Organization'),1:159))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par20 = ''
> par19 = ''
> par18 = ''
> par17 = ''
> par16 = ''
> par15 = ''
> par14 = ''
> par13 = ''
> par12 = ''
> par11 = ''
> par10 = ''
> par9 = ''
> par8 = ''
> par7 = ''
> par6 = ''
> par5 = ''
> par4 = ''
> par3 = 'Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '3'
> 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
ParentalExpectations ConcernoverMistakes Doubtsaboutactions
1 11 24 14
2 7 25 11
3 17 17 6
4 10 18 12
5 12 18 8
6 12 16 10
7 11 20 10
8 11 16 11
9 12 18 16
10 13 17 11
11 14 23 13
12 16 30 12
13 11 23 8
14 10 18 12
15 11 15 11
16 15 12 4
17 9 21 9
18 11 15 8
19 17 20 8
20 17 31 14
21 11 27 15
22 18 34 16
23 14 21 9
24 10 31 14
25 11 19 11
26 15 16 8
27 15 20 9
28 13 21 9
29 16 22 9
30 13 17 9
31 9 24 10
32 18 25 16
33 18 26 11
34 12 25 8
35 17 17 9
36 9 32 16
37 9 33 11
38 12 13 16
39 18 32 12
40 12 25 12
41 18 29 14
42 14 22 9
43 15 18 10
44 16 17 9
45 10 20 10
46 11 15 12
47 14 20 14
48 9 33 14
49 12 29 10
50 17 23 14
51 5 26 16
52 12 18 9
53 12 20 10
54 6 11 6
55 24 28 8
56 12 26 13
57 12 22 10
58 14 17 8
59 7 12 7
60 13 14 15
61 12 17 9
62 13 21 10
63 14 19 12
64 8 18 13
65 11 10 10
66 9 29 11
67 11 31 8
68 13 19 9
69 10 9 13
70 11 20 11
71 12 28 8
72 9 19 9
73 15 30 9
74 18 29 15
75 15 26 9
76 12 23 10
77 13 13 14
78 14 21 12
79 10 19 12
80 13 28 11
81 13 23 14
82 11 18 6
83 13 21 12
84 16 20 8
85 8 23 14
86 16 21 11
87 11 21 10
88 9 15 14
89 16 28 12
90 12 19 10
91 14 26 14
92 8 10 5
93 9 16 11
94 15 22 10
95 11 19 9
96 21 31 10
97 14 31 16
98 18 29 13
99 12 19 9
100 13 22 10
101 15 23 10
102 12 15 7
103 19 20 9
104 15 18 8
105 11 23 14
106 11 25 14
107 10 21 8
108 13 24 9
109 15 25 14
110 12 17 14
111 12 13 8
112 16 28 8
113 9 21 8
114 18 25 7
115 8 9 6
116 13 16 8
117 17 19 6
118 9 17 11
119 15 25 14
120 8 20 11
121 7 29 11
122 12 14 11
123 14 22 14
124 6 15 8
125 8 19 20
126 17 20 11
127 10 15 8
128 11 20 11
129 14 18 10
130 11 33 14
131 13 22 11
132 12 16 9
133 11 17 9
134 9 16 8
135 12 21 10
136 20 26 13
137 12 18 13
138 13 18 12
139 12 17 8
140 12 22 13
141 9 30 14
142 15 30 12
143 24 24 14
144 7 21 15
145 17 21 13
146 11 29 16
147 17 31 9
148 11 20 9
149 12 16 9
150 14 22 8
151 11 20 7
152 16 28 16
153 21 38 11
154 14 22 9
155 20 20 11
156 13 17 9
157 11 28 14
158 15 22 13
159 19 31 16
ParentalCriticism PersonalStandards Organization t
1 12 24 26 1
2 8 25 23 2
3 8 30 25 3
4 8 19 23 4
5 9 22 19 5
6 7 22 29 6
7 4 25 25 7
8 11 23 21 8
9 7 17 22 9
10 7 21 25 10
11 12 19 24 11
12 10 19 18 12
13 10 15 22 13
14 8 16 15 14
15 8 23 22 15
16 4 27 28 16
17 9 22 20 17
18 8 14 12 18
19 7 22 24 19
20 11 23 20 20
21 9 23 21 21
22 11 21 20 22
23 13 19 21 23
24 8 18 23 24
25 8 20 28 25
26 9 23 24 26
27 6 25 24 27
28 9 19 24 28
29 9 24 23 29
30 6 22 23 30
31 6 25 29 31
32 16 26 24 32
33 5 29 18 33
34 7 32 25 34
35 9 25 21 35
36 6 29 26 36
37 6 28 22 37
38 5 17 22 38
39 12 28 22 39
40 7 29 23 40
41 10 26 30 41
42 9 25 23 42
43 8 14 17 43
44 5 25 23 44
45 8 26 23 45
46 8 20 25 46
47 10 18 24 47
48 6 32 24 48
49 8 25 23 49
50 7 25 21 50
51 4 23 24 51
52 8 21 24 52
53 8 20 28 53
54 4 15 16 54
55 20 30 20 55
56 8 24 29 56
57 8 26 27 57
58 6 24 22 58
59 4 22 28 59
60 8 14 16 60
61 9 24 25 61
62 6 24 24 62
63 7 24 28 63
64 9 24 24 64
65 5 19 23 65
66 5 31 30 66
67 8 22 24 67
68 8 27 21 68
69 6 19 25 69
70 8 25 25 70
71 7 20 22 71
72 7 21 23 72
73 9 27 26 73
74 11 23 23 74
75 6 25 25 75
76 8 20 21 76
77 6 21 25 77
78 9 22 24 78
79 8 23 29 79
80 6 25 22 80
81 10 25 27 81
82 8 17 26 82
83 8 19 22 83
84 10 25 24 84
85 5 19 27 85
86 7 20 24 86
87 5 26 24 87
88 8 23 29 88
89 14 27 22 89
90 7 17 21 90
91 8 17 24 91
92 6 19 24 92
93 5 17 23 93
94 6 22 20 94
95 10 21 27 95
96 12 32 26 96
97 9 21 25 97
98 12 21 21 98
99 7 18 21 99
100 8 18 19 100
101 10 23 21 101
102 6 19 21 102
103 10 20 16 103
104 10 21 22 104
105 10 20 29 105
106 5 17 15 106
107 7 18 17 107
108 10 19 15 108
109 11 22 21 109
110 6 15 21 110
111 7 14 19 111
112 12 18 24 112
113 11 24 20 113
114 11 35 17 114
115 11 29 23 115
116 5 21 24 116
117 8 25 14 117
118 6 20 19 118
119 9 22 24 119
120 4 13 13 120
121 4 26 22 121
122 7 17 16 122
123 11 25 19 123
124 6 20 25 124
125 7 19 25 125
126 8 21 23 126
127 4 22 24 127
128 8 24 26 128
129 9 21 26 129
130 8 26 25 130
131 11 24 18 131
132 8 16 21 132
133 5 23 26 133
134 4 18 23 134
135 8 16 23 135
136 10 26 22 136
137 6 19 20 137
138 9 21 13 138
139 9 21 24 139
140 13 22 15 140
141 9 23 14 141
142 10 29 22 142
143 20 21 10 143
144 5 21 24 144
145 11 23 22 145
146 6 27 24 146
147 9 25 19 147
148 7 21 20 148
149 9 10 13 149
150 10 20 20 150
151 9 26 22 151
152 8 24 24 152
153 7 29 29 153
154 6 19 12 154
155 13 24 20 155
156 6 19 21 156
157 8 24 24 157
158 10 22 22 158
159 16 17 20 159
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) ConcernoverMistakes Doubtsaboutactions
5.843986 0.089509 -0.125900
ParentalCriticism PersonalStandards Organization
0.665601 0.118116 -0.082036
t
0.002397
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-7.0299 -1.8038 0.1042 1.7765 7.0673
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.843986 1.892391 3.088 0.00239 **
ConcernoverMistakes 0.089509 0.048323 1.852 0.06592 .
Doubtsaboutactions -0.125900 0.087456 -1.440 0.15204
ParentalCriticism 0.665601 0.086519 7.693 1.68e-12 ***
PersonalStandards 0.118116 0.063446 1.862 0.06458 .
Organization -0.082036 0.063311 -1.296 0.19702
t 0.002397 0.004826 0.497 0.62017
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.702 on 152 degrees of freedom
Multiple R-squared: 0.4083, Adjusted R-squared: 0.385
F-statistic: 17.48 on 6 and 152 DF, p-value: 2.472e-15
> if (n > n25) {
+ kp3 <- k + 3
+ nmkm3 <- n - k - 3
+ gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
+ numgqtests <- 0
+ numsignificant1 <- 0
+ numsignificant5 <- 0
+ numsignificant10 <- 0
+ for (mypoint in kp3:nmkm3) {
+ j <- 0
+ numgqtests <- numgqtests + 1
+ for (myalt in c('greater', 'two.sided', 'less')) {
+ j <- j + 1
+ gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
+ }
+ if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
+ }
+ gqarr
+ }
[,1] [,2] [,3]
[1,] 0.56855677 0.86288647 0.43144323
[2,] 0.58814783 0.82370435 0.41185217
[3,] 0.61466334 0.77067332 0.38533666
[4,] 0.61221016 0.77557969 0.38778984
[5,] 0.57358764 0.85282473 0.42641236
[6,] 0.63604122 0.72791756 0.36395878
[7,] 0.55936702 0.88126596 0.44063298
[8,] 0.71320711 0.57358578 0.28679289
[9,] 0.63630659 0.72738681 0.36369341
[10,] 0.66263079 0.67473841 0.33736921
[11,] 0.61420246 0.77159509 0.38579754
[12,] 0.65336963 0.69326074 0.34663037
[13,] 0.65874218 0.68251563 0.34125782
[14,] 0.61068204 0.77863591 0.38931796
[15,] 0.71919991 0.56160018 0.28080009
[16,] 0.70612232 0.58775537 0.29387768
[17,] 0.64788153 0.70423694 0.35211847
[18,] 0.59774225 0.80451551 0.40225775
[19,] 0.54024050 0.91951900 0.45975950
[20,] 0.48059219 0.96118437 0.51940781
[21,] 0.42622313 0.85244627 0.57377687
[22,] 0.59288037 0.81423925 0.40711963
[23,] 0.53831331 0.92337339 0.46168669
[24,] 0.56085304 0.87829392 0.43914696
[25,] 0.66584861 0.66830278 0.33415139
[26,] 0.64449351 0.71101298 0.35550649
[27,] 0.72983309 0.54033383 0.27016691
[28,] 0.80618545 0.38762910 0.19381455
[29,] 0.78139924 0.43720152 0.21860076
[30,] 0.75029381 0.49941237 0.24970619
[31,] 0.73196595 0.53606809 0.26803405
[32,] 0.76226265 0.47547470 0.23773735
[33,] 0.72911582 0.54176835 0.27088418
[34,] 0.70296844 0.59406312 0.29703156
[35,] 0.74042657 0.51914687 0.25957343
[36,] 0.81844595 0.36310810 0.18155405
[37,] 0.80953977 0.38092046 0.19046023
[38,] 0.77335633 0.45328733 0.22664367
[39,] 0.82285705 0.35428590 0.17714295
[40,] 0.80795913 0.38408174 0.19204087
[41,] 0.84957659 0.30084683 0.15042341
[42,] 0.91620900 0.16758200 0.08379100
[43,] 0.90315784 0.19368431 0.09684216
[44,] 0.88185921 0.23628159 0.11814079
[45,] 0.91859024 0.16281952 0.08140976
[46,] 0.90051521 0.19896957 0.09948479
[47,] 0.87865339 0.24269321 0.12134661
[48,] 0.85950562 0.28098877 0.14049438
[49,] 0.84807025 0.30385949 0.15192975
[50,] 0.85238472 0.29523056 0.14761528
[51,] 0.83170846 0.33658307 0.16829154
[52,] 0.81337043 0.37325915 0.18662957
[53,] 0.78886309 0.42227383 0.21113691
[54,] 0.78169165 0.43661670 0.21830835
[55,] 0.86367374 0.27265253 0.13632626
[56,] 0.84779699 0.30440602 0.15220301
[57,] 0.84464120 0.31071761 0.15535880
[58,] 0.84437262 0.31125476 0.15562738
[59,] 0.81757493 0.36485014 0.18242507
[60,] 0.79298140 0.41403720 0.20701860
[61,] 0.77051469 0.45897062 0.22948531
[62,] 0.74273554 0.51452891 0.25726446
[63,] 0.74532046 0.50935909 0.25467954
[64,] 0.71411670 0.57176661 0.28588330
[65,] 0.72938368 0.54123263 0.27061632
[66,] 0.73318573 0.53362854 0.26681427
[67,] 0.69837593 0.60324814 0.30162407
[68,] 0.72577629 0.54844743 0.27422371
[69,] 0.69093160 0.61813680 0.30906840
[70,] 0.66782976 0.66434047 0.33217024
[71,] 0.62683903 0.74632195 0.37316097
[72,] 0.58446085 0.83107830 0.41553915
[73,] 0.54876857 0.90246287 0.45123143
[74,] 0.50568690 0.98862620 0.49431310
[75,] 0.47267930 0.94535860 0.52732070
[76,] 0.44381321 0.88762642 0.55618679
[77,] 0.52059275 0.95881450 0.47940725
[78,] 0.47649574 0.95299149 0.52350426
[79,] 0.45835815 0.91671631 0.54164185
[80,] 0.43609226 0.87218452 0.56390774
[81,] 0.39127132 0.78254264 0.60872868
[82,] 0.36949630 0.73899261 0.63050370
[83,] 0.36478981 0.72957962 0.63521019
[84,] 0.32273108 0.64546216 0.67726892
[85,] 0.34292010 0.68584019 0.65707990
[86,] 0.33797010 0.67594020 0.66202990
[87,] 0.37143669 0.74287338 0.62856331
[88,] 0.33026314 0.66052627 0.66973686
[89,] 0.30846480 0.61692961 0.69153520
[90,] 0.26822029 0.53644059 0.73177971
[91,] 0.23031065 0.46062131 0.76968935
[92,] 0.19737855 0.39475709 0.80262145
[93,] 0.17344764 0.34689527 0.82655236
[94,] 0.24827126 0.49654251 0.75172874
[95,] 0.22523468 0.45046935 0.77476532
[96,] 0.20301181 0.40602363 0.79698819
[97,] 0.17590497 0.35180993 0.82409503
[98,] 0.16512451 0.33024902 0.83487549
[99,] 0.14735527 0.29471053 0.85264473
[100,] 0.12200913 0.24401825 0.87799087
[101,] 0.12355145 0.24710290 0.87644855
[102,] 0.11079320 0.22158640 0.88920680
[103,] 0.08919526 0.17839051 0.91080474
[104,] 0.21161662 0.42323324 0.78838338
[105,] 0.18727046 0.37454093 0.81272954
[106,] 0.38981821 0.77963641 0.61018179
[107,] 0.39799694 0.79599389 0.60200306
[108,] 0.45394043 0.90788087 0.54605957
[109,] 0.41237943 0.82475887 0.58762057
[110,] 0.39618012 0.79236025 0.60381988
[111,] 0.36301838 0.72603677 0.63698162
[112,] 0.37569736 0.75139472 0.62430264
[113,] 0.37255368 0.74510737 0.62744632
[114,] 0.32218899 0.64437797 0.67781101
[115,] 0.40829952 0.81659904 0.59170048
[116,] 0.36005495 0.72010989 0.63994505
[117,] 0.50064970 0.99870061 0.49935030
[118,] 0.45386297 0.90772595 0.54613703
[119,] 0.40516818 0.81033635 0.59483182
[120,] 0.35433114 0.70866228 0.64566886
[121,] 0.35146968 0.70293935 0.64853032
[122,] 0.32002350 0.64004700 0.67997650
[123,] 0.26365527 0.52731054 0.73634473
[124,] 0.21450762 0.42901524 0.78549238
[125,] 0.16837952 0.33675903 0.83162048
[126,] 0.12865721 0.25731443 0.87134279
[127,] 0.25584893 0.51169787 0.74415107
[128,] 0.31055306 0.62110611 0.68944694
[129,] 0.31308813 0.62617627 0.68691187
[130,] 0.24734979 0.49469957 0.75265021
[131,] 0.24842958 0.49685916 0.75157042
[132,] 0.41443643 0.82887287 0.58556357
[133,] 0.36829478 0.73658956 0.63170522
[134,] 0.29715319 0.59430637 0.70284681
[135,] 0.24889948 0.49779896 0.75110052
[136,] 0.27588355 0.55176710 0.72411645
[137,] 0.20716614 0.41433228 0.79283386
[138,] 0.13496211 0.26992422 0.86503789
[139,] 0.08565553 0.17131105 0.91434447
[140,] 0.04293947 0.08587894 0.95706053
> postscript(file="/var/www/rcomp/tmp/1kbnv1322164970.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/2b0fa1322164970.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/3r2sj1322164970.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/42fu51322164970.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/5kjh41322164970.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 = 159
Frequency = 1
1 2 3 4 5 6
-3.92108034 -6.09250466 3.56515885 -1.63613581 -1.49022623 1.08975433
7 8 9 10 11 12
1.04363365 -3.22594522 1.67528057 1.90653317 -0.55492613 1.52920292
13 14 15 16 17 18
-2.54962292 -1.96203713 -1.07437278 4.99260946 -4.57957632 -1.21657101
19 20 21 22 23 24
5.03858442 1.69832576 -2.40689648 2.91303887 -1.81997581 -2.47776749
25 26 27 28 29 30
-0.60981136 1.93052540 3.45656386 0.07655329 2.31202974 1.99021493
31 32 33 34 35 36
-2.37498015 0.10420794 5.85785238 -1.54403826 3.46300759 -3.06620680
37 38 39 40 41 42
-3.99763922 3.38452750 1.21936916 -0.86453888 3.95862383 0.16275782
43 44 45 46 47 48
3.11696611 5.26791477 -2.99202893 -0.42231010 1.20254342 -3.95469566
49 50 51 52 53 54
-1.68907977 4.85070835 -4.68927127 -0.28306913 0.10767543 -3.32418084
55 56 57 58 59 60
1.31034497 -0.44929806 -0.87166331 2.47894215 -2.14216034 1.98172557
61 62 63 64 65 66
-1.15304434 1.52719144 2.61815442 -4.82817803 1.67874873 -2.74156697
67 68 69 70 71 72
-2.72665137 -0.36572900 0.63484191 -1.64385537 -0.72994770 -2.83694394
73 74 75 76 77 78
0.38226598 3.11993585 2.88650997 -0.79022213 3.14730054 0.98007572
79 80 81 82 83 84
-1.88563993 0.70120256 -0.72817548 -1.09612968 0.82397229 1.53165394
85 86 87 88 89 90
-1.70105659 4.40243846 -0.10335456 -2.29737275 -1.75550956 0.55421254
91 92 93 94 95 96
2.00935922 -2.59902521 -0.56327622 3.26908254 -2.56072644 3.77614979
97 98 99 100 101 102
0.74320357 2.21717819 0.28862675 0.31393081 0.46431159 0.93515751
103 104 105 106 107 108
4.54631657 0.97113511 -2.03103964 0.32140281 -2.36360650 -1.78762146
109 110 111 112 113 114
0.22223686 2.09073395 0.97941634 0.24409063 -6.50298298 0.46529623
115 116 117 118 119 120
-7.02994392 2.61347185 2.80112200 -2.06079273 1.77558055 -1.66830879
121 122 123 124 125 126
-4.27347987 0.64078925 -1.06120882 -4.78164091 -2.17875632 4.53033117
127 128 129 130 131 132
0.22410335 -1.58270452 1.15676489 -2.69168275 -2.42200106 0.04869851
133 134 135 136 137 138
0.53695958 -0.49175140 -0.11606480 5.21729123 1.25611580 -0.67946707
139 140 141 142 143 144
-1.19356342 -4.53284636 -5.66316179 -0.63537378 2.45557552 -3.01987605
145 146 147 148 149 150
2.33201522 -0.98914114 1.77739414 -1.35469937 -0.60523068 -0.54309803
151 152 153 154 155 156
-3.37140307 3.10913529 7.06734493 1.69745240 3.53236790 1.87852489
157 158 159
-2.15464790 0.99506851 0.99769489
> postscript(file="/var/www/rcomp/tmp/6i07b1322164970.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 = 159
Frequency = 1
lag(myerror, k = 1) myerror
0 -3.92108034 NA
1 -6.09250466 -3.92108034
2 3.56515885 -6.09250466
3 -1.63613581 3.56515885
4 -1.49022623 -1.63613581
5 1.08975433 -1.49022623
6 1.04363365 1.08975433
7 -3.22594522 1.04363365
8 1.67528057 -3.22594522
9 1.90653317 1.67528057
10 -0.55492613 1.90653317
11 1.52920292 -0.55492613
12 -2.54962292 1.52920292
13 -1.96203713 -2.54962292
14 -1.07437278 -1.96203713
15 4.99260946 -1.07437278
16 -4.57957632 4.99260946
17 -1.21657101 -4.57957632
18 5.03858442 -1.21657101
19 1.69832576 5.03858442
20 -2.40689648 1.69832576
21 2.91303887 -2.40689648
22 -1.81997581 2.91303887
23 -2.47776749 -1.81997581
24 -0.60981136 -2.47776749
25 1.93052540 -0.60981136
26 3.45656386 1.93052540
27 0.07655329 3.45656386
28 2.31202974 0.07655329
29 1.99021493 2.31202974
30 -2.37498015 1.99021493
31 0.10420794 -2.37498015
32 5.85785238 0.10420794
33 -1.54403826 5.85785238
34 3.46300759 -1.54403826
35 -3.06620680 3.46300759
36 -3.99763922 -3.06620680
37 3.38452750 -3.99763922
38 1.21936916 3.38452750
39 -0.86453888 1.21936916
40 3.95862383 -0.86453888
41 0.16275782 3.95862383
42 3.11696611 0.16275782
43 5.26791477 3.11696611
44 -2.99202893 5.26791477
45 -0.42231010 -2.99202893
46 1.20254342 -0.42231010
47 -3.95469566 1.20254342
48 -1.68907977 -3.95469566
49 4.85070835 -1.68907977
50 -4.68927127 4.85070835
51 -0.28306913 -4.68927127
52 0.10767543 -0.28306913
53 -3.32418084 0.10767543
54 1.31034497 -3.32418084
55 -0.44929806 1.31034497
56 -0.87166331 -0.44929806
57 2.47894215 -0.87166331
58 -2.14216034 2.47894215
59 1.98172557 -2.14216034
60 -1.15304434 1.98172557
61 1.52719144 -1.15304434
62 2.61815442 1.52719144
63 -4.82817803 2.61815442
64 1.67874873 -4.82817803
65 -2.74156697 1.67874873
66 -2.72665137 -2.74156697
67 -0.36572900 -2.72665137
68 0.63484191 -0.36572900
69 -1.64385537 0.63484191
70 -0.72994770 -1.64385537
71 -2.83694394 -0.72994770
72 0.38226598 -2.83694394
73 3.11993585 0.38226598
74 2.88650997 3.11993585
75 -0.79022213 2.88650997
76 3.14730054 -0.79022213
77 0.98007572 3.14730054
78 -1.88563993 0.98007572
79 0.70120256 -1.88563993
80 -0.72817548 0.70120256
81 -1.09612968 -0.72817548
82 0.82397229 -1.09612968
83 1.53165394 0.82397229
84 -1.70105659 1.53165394
85 4.40243846 -1.70105659
86 -0.10335456 4.40243846
87 -2.29737275 -0.10335456
88 -1.75550956 -2.29737275
89 0.55421254 -1.75550956
90 2.00935922 0.55421254
91 -2.59902521 2.00935922
92 -0.56327622 -2.59902521
93 3.26908254 -0.56327622
94 -2.56072644 3.26908254
95 3.77614979 -2.56072644
96 0.74320357 3.77614979
97 2.21717819 0.74320357
98 0.28862675 2.21717819
99 0.31393081 0.28862675
100 0.46431159 0.31393081
101 0.93515751 0.46431159
102 4.54631657 0.93515751
103 0.97113511 4.54631657
104 -2.03103964 0.97113511
105 0.32140281 -2.03103964
106 -2.36360650 0.32140281
107 -1.78762146 -2.36360650
108 0.22223686 -1.78762146
109 2.09073395 0.22223686
110 0.97941634 2.09073395
111 0.24409063 0.97941634
112 -6.50298298 0.24409063
113 0.46529623 -6.50298298
114 -7.02994392 0.46529623
115 2.61347185 -7.02994392
116 2.80112200 2.61347185
117 -2.06079273 2.80112200
118 1.77558055 -2.06079273
119 -1.66830879 1.77558055
120 -4.27347987 -1.66830879
121 0.64078925 -4.27347987
122 -1.06120882 0.64078925
123 -4.78164091 -1.06120882
124 -2.17875632 -4.78164091
125 4.53033117 -2.17875632
126 0.22410335 4.53033117
127 -1.58270452 0.22410335
128 1.15676489 -1.58270452
129 -2.69168275 1.15676489
130 -2.42200106 -2.69168275
131 0.04869851 -2.42200106
132 0.53695958 0.04869851
133 -0.49175140 0.53695958
134 -0.11606480 -0.49175140
135 5.21729123 -0.11606480
136 1.25611580 5.21729123
137 -0.67946707 1.25611580
138 -1.19356342 -0.67946707
139 -4.53284636 -1.19356342
140 -5.66316179 -4.53284636
141 -0.63537378 -5.66316179
142 2.45557552 -0.63537378
143 -3.01987605 2.45557552
144 2.33201522 -3.01987605
145 -0.98914114 2.33201522
146 1.77739414 -0.98914114
147 -1.35469937 1.77739414
148 -0.60523068 -1.35469937
149 -0.54309803 -0.60523068
150 -3.37140307 -0.54309803
151 3.10913529 -3.37140307
152 7.06734493 3.10913529
153 1.69745240 7.06734493
154 3.53236790 1.69745240
155 1.87852489 3.53236790
156 -2.15464790 1.87852489
157 0.99506851 -2.15464790
158 0.99769489 0.99506851
159 NA 0.99769489
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -6.09250466 -3.92108034
[2,] 3.56515885 -6.09250466
[3,] -1.63613581 3.56515885
[4,] -1.49022623 -1.63613581
[5,] 1.08975433 -1.49022623
[6,] 1.04363365 1.08975433
[7,] -3.22594522 1.04363365
[8,] 1.67528057 -3.22594522
[9,] 1.90653317 1.67528057
[10,] -0.55492613 1.90653317
[11,] 1.52920292 -0.55492613
[12,] -2.54962292 1.52920292
[13,] -1.96203713 -2.54962292
[14,] -1.07437278 -1.96203713
[15,] 4.99260946 -1.07437278
[16,] -4.57957632 4.99260946
[17,] -1.21657101 -4.57957632
[18,] 5.03858442 -1.21657101
[19,] 1.69832576 5.03858442
[20,] -2.40689648 1.69832576
[21,] 2.91303887 -2.40689648
[22,] -1.81997581 2.91303887
[23,] -2.47776749 -1.81997581
[24,] -0.60981136 -2.47776749
[25,] 1.93052540 -0.60981136
[26,] 3.45656386 1.93052540
[27,] 0.07655329 3.45656386
[28,] 2.31202974 0.07655329
[29,] 1.99021493 2.31202974
[30,] -2.37498015 1.99021493
[31,] 0.10420794 -2.37498015
[32,] 5.85785238 0.10420794
[33,] -1.54403826 5.85785238
[34,] 3.46300759 -1.54403826
[35,] -3.06620680 3.46300759
[36,] -3.99763922 -3.06620680
[37,] 3.38452750 -3.99763922
[38,] 1.21936916 3.38452750
[39,] -0.86453888 1.21936916
[40,] 3.95862383 -0.86453888
[41,] 0.16275782 3.95862383
[42,] 3.11696611 0.16275782
[43,] 5.26791477 3.11696611
[44,] -2.99202893 5.26791477
[45,] -0.42231010 -2.99202893
[46,] 1.20254342 -0.42231010
[47,] -3.95469566 1.20254342
[48,] -1.68907977 -3.95469566
[49,] 4.85070835 -1.68907977
[50,] -4.68927127 4.85070835
[51,] -0.28306913 -4.68927127
[52,] 0.10767543 -0.28306913
[53,] -3.32418084 0.10767543
[54,] 1.31034497 -3.32418084
[55,] -0.44929806 1.31034497
[56,] -0.87166331 -0.44929806
[57,] 2.47894215 -0.87166331
[58,] -2.14216034 2.47894215
[59,] 1.98172557 -2.14216034
[60,] -1.15304434 1.98172557
[61,] 1.52719144 -1.15304434
[62,] 2.61815442 1.52719144
[63,] -4.82817803 2.61815442
[64,] 1.67874873 -4.82817803
[65,] -2.74156697 1.67874873
[66,] -2.72665137 -2.74156697
[67,] -0.36572900 -2.72665137
[68,] 0.63484191 -0.36572900
[69,] -1.64385537 0.63484191
[70,] -0.72994770 -1.64385537
[71,] -2.83694394 -0.72994770
[72,] 0.38226598 -2.83694394
[73,] 3.11993585 0.38226598
[74,] 2.88650997 3.11993585
[75,] -0.79022213 2.88650997
[76,] 3.14730054 -0.79022213
[77,] 0.98007572 3.14730054
[78,] -1.88563993 0.98007572
[79,] 0.70120256 -1.88563993
[80,] -0.72817548 0.70120256
[81,] -1.09612968 -0.72817548
[82,] 0.82397229 -1.09612968
[83,] 1.53165394 0.82397229
[84,] -1.70105659 1.53165394
[85,] 4.40243846 -1.70105659
[86,] -0.10335456 4.40243846
[87,] -2.29737275 -0.10335456
[88,] -1.75550956 -2.29737275
[89,] 0.55421254 -1.75550956
[90,] 2.00935922 0.55421254
[91,] -2.59902521 2.00935922
[92,] -0.56327622 -2.59902521
[93,] 3.26908254 -0.56327622
[94,] -2.56072644 3.26908254
[95,] 3.77614979 -2.56072644
[96,] 0.74320357 3.77614979
[97,] 2.21717819 0.74320357
[98,] 0.28862675 2.21717819
[99,] 0.31393081 0.28862675
[100,] 0.46431159 0.31393081
[101,] 0.93515751 0.46431159
[102,] 4.54631657 0.93515751
[103,] 0.97113511 4.54631657
[104,] -2.03103964 0.97113511
[105,] 0.32140281 -2.03103964
[106,] -2.36360650 0.32140281
[107,] -1.78762146 -2.36360650
[108,] 0.22223686 -1.78762146
[109,] 2.09073395 0.22223686
[110,] 0.97941634 2.09073395
[111,] 0.24409063 0.97941634
[112,] -6.50298298 0.24409063
[113,] 0.46529623 -6.50298298
[114,] -7.02994392 0.46529623
[115,] 2.61347185 -7.02994392
[116,] 2.80112200 2.61347185
[117,] -2.06079273 2.80112200
[118,] 1.77558055 -2.06079273
[119,] -1.66830879 1.77558055
[120,] -4.27347987 -1.66830879
[121,] 0.64078925 -4.27347987
[122,] -1.06120882 0.64078925
[123,] -4.78164091 -1.06120882
[124,] -2.17875632 -4.78164091
[125,] 4.53033117 -2.17875632
[126,] 0.22410335 4.53033117
[127,] -1.58270452 0.22410335
[128,] 1.15676489 -1.58270452
[129,] -2.69168275 1.15676489
[130,] -2.42200106 -2.69168275
[131,] 0.04869851 -2.42200106
[132,] 0.53695958 0.04869851
[133,] -0.49175140 0.53695958
[134,] -0.11606480 -0.49175140
[135,] 5.21729123 -0.11606480
[136,] 1.25611580 5.21729123
[137,] -0.67946707 1.25611580
[138,] -1.19356342 -0.67946707
[139,] -4.53284636 -1.19356342
[140,] -5.66316179 -4.53284636
[141,] -0.63537378 -5.66316179
[142,] 2.45557552 -0.63537378
[143,] -3.01987605 2.45557552
[144,] 2.33201522 -3.01987605
[145,] -0.98914114 2.33201522
[146,] 1.77739414 -0.98914114
[147,] -1.35469937 1.77739414
[148,] -0.60523068 -1.35469937
[149,] -0.54309803 -0.60523068
[150,] -3.37140307 -0.54309803
[151,] 3.10913529 -3.37140307
[152,] 7.06734493 3.10913529
[153,] 1.69745240 7.06734493
[154,] 3.53236790 1.69745240
[155,] 1.87852489 3.53236790
[156,] -2.15464790 1.87852489
[157,] 0.99506851 -2.15464790
[158,] 0.99769489 0.99506851
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -6.09250466 -3.92108034
2 3.56515885 -6.09250466
3 -1.63613581 3.56515885
4 -1.49022623 -1.63613581
5 1.08975433 -1.49022623
6 1.04363365 1.08975433
7 -3.22594522 1.04363365
8 1.67528057 -3.22594522
9 1.90653317 1.67528057
10 -0.55492613 1.90653317
11 1.52920292 -0.55492613
12 -2.54962292 1.52920292
13 -1.96203713 -2.54962292
14 -1.07437278 -1.96203713
15 4.99260946 -1.07437278
16 -4.57957632 4.99260946
17 -1.21657101 -4.57957632
18 5.03858442 -1.21657101
19 1.69832576 5.03858442
20 -2.40689648 1.69832576
21 2.91303887 -2.40689648
22 -1.81997581 2.91303887
23 -2.47776749 -1.81997581
24 -0.60981136 -2.47776749
25 1.93052540 -0.60981136
26 3.45656386 1.93052540
27 0.07655329 3.45656386
28 2.31202974 0.07655329
29 1.99021493 2.31202974
30 -2.37498015 1.99021493
31 0.10420794 -2.37498015
32 5.85785238 0.10420794
33 -1.54403826 5.85785238
34 3.46300759 -1.54403826
35 -3.06620680 3.46300759
36 -3.99763922 -3.06620680
37 3.38452750 -3.99763922
38 1.21936916 3.38452750
39 -0.86453888 1.21936916
40 3.95862383 -0.86453888
41 0.16275782 3.95862383
42 3.11696611 0.16275782
43 5.26791477 3.11696611
44 -2.99202893 5.26791477
45 -0.42231010 -2.99202893
46 1.20254342 -0.42231010
47 -3.95469566 1.20254342
48 -1.68907977 -3.95469566
49 4.85070835 -1.68907977
50 -4.68927127 4.85070835
51 -0.28306913 -4.68927127
52 0.10767543 -0.28306913
53 -3.32418084 0.10767543
54 1.31034497 -3.32418084
55 -0.44929806 1.31034497
56 -0.87166331 -0.44929806
57 2.47894215 -0.87166331
58 -2.14216034 2.47894215
59 1.98172557 -2.14216034
60 -1.15304434 1.98172557
61 1.52719144 -1.15304434
62 2.61815442 1.52719144
63 -4.82817803 2.61815442
64 1.67874873 -4.82817803
65 -2.74156697 1.67874873
66 -2.72665137 -2.74156697
67 -0.36572900 -2.72665137
68 0.63484191 -0.36572900
69 -1.64385537 0.63484191
70 -0.72994770 -1.64385537
71 -2.83694394 -0.72994770
72 0.38226598 -2.83694394
73 3.11993585 0.38226598
74 2.88650997 3.11993585
75 -0.79022213 2.88650997
76 3.14730054 -0.79022213
77 0.98007572 3.14730054
78 -1.88563993 0.98007572
79 0.70120256 -1.88563993
80 -0.72817548 0.70120256
81 -1.09612968 -0.72817548
82 0.82397229 -1.09612968
83 1.53165394 0.82397229
84 -1.70105659 1.53165394
85 4.40243846 -1.70105659
86 -0.10335456 4.40243846
87 -2.29737275 -0.10335456
88 -1.75550956 -2.29737275
89 0.55421254 -1.75550956
90 2.00935922 0.55421254
91 -2.59902521 2.00935922
92 -0.56327622 -2.59902521
93 3.26908254 -0.56327622
94 -2.56072644 3.26908254
95 3.77614979 -2.56072644
96 0.74320357 3.77614979
97 2.21717819 0.74320357
98 0.28862675 2.21717819
99 0.31393081 0.28862675
100 0.46431159 0.31393081
101 0.93515751 0.46431159
102 4.54631657 0.93515751
103 0.97113511 4.54631657
104 -2.03103964 0.97113511
105 0.32140281 -2.03103964
106 -2.36360650 0.32140281
107 -1.78762146 -2.36360650
108 0.22223686 -1.78762146
109 2.09073395 0.22223686
110 0.97941634 2.09073395
111 0.24409063 0.97941634
112 -6.50298298 0.24409063
113 0.46529623 -6.50298298
114 -7.02994392 0.46529623
115 2.61347185 -7.02994392
116 2.80112200 2.61347185
117 -2.06079273 2.80112200
118 1.77558055 -2.06079273
119 -1.66830879 1.77558055
120 -4.27347987 -1.66830879
121 0.64078925 -4.27347987
122 -1.06120882 0.64078925
123 -4.78164091 -1.06120882
124 -2.17875632 -4.78164091
125 4.53033117 -2.17875632
126 0.22410335 4.53033117
127 -1.58270452 0.22410335
128 1.15676489 -1.58270452
129 -2.69168275 1.15676489
130 -2.42200106 -2.69168275
131 0.04869851 -2.42200106
132 0.53695958 0.04869851
133 -0.49175140 0.53695958
134 -0.11606480 -0.49175140
135 5.21729123 -0.11606480
136 1.25611580 5.21729123
137 -0.67946707 1.25611580
138 -1.19356342 -0.67946707
139 -4.53284636 -1.19356342
140 -5.66316179 -4.53284636
141 -0.63537378 -5.66316179
142 2.45557552 -0.63537378
143 -3.01987605 2.45557552
144 2.33201522 -3.01987605
145 -0.98914114 2.33201522
146 1.77739414 -0.98914114
147 -1.35469937 1.77739414
148 -0.60523068 -1.35469937
149 -0.54309803 -0.60523068
150 -3.37140307 -0.54309803
151 3.10913529 -3.37140307
152 7.06734493 3.10913529
153 1.69745240 7.06734493
154 3.53236790 1.69745240
155 1.87852489 3.53236790
156 -2.15464790 1.87852489
157 0.99506851 -2.15464790
158 0.99769489 0.99506851
> 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/7rcdb1322164970.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/8cqvw1322164970.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/91ird1322164970.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/10j6na1322164970.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/118fub1322164970.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/12vogf1322164970.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/137yjp1322164970.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/14yq1q1322164970.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/152e1f1322164970.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/165wb71322164970.tab")
+ }
>
> try(system("convert tmp/1kbnv1322164970.ps tmp/1kbnv1322164970.png",intern=TRUE))
character(0)
> try(system("convert tmp/2b0fa1322164970.ps tmp/2b0fa1322164970.png",intern=TRUE))
character(0)
> try(system("convert tmp/3r2sj1322164970.ps tmp/3r2sj1322164970.png",intern=TRUE))
character(0)
> try(system("convert tmp/42fu51322164970.ps tmp/42fu51322164970.png",intern=TRUE))
character(0)
> try(system("convert tmp/5kjh41322164970.ps tmp/5kjh41322164970.png",intern=TRUE))
character(0)
> try(system("convert tmp/6i07b1322164970.ps tmp/6i07b1322164970.png",intern=TRUE))
character(0)
> try(system("convert tmp/7rcdb1322164970.ps tmp/7rcdb1322164970.png",intern=TRUE))
character(0)
> try(system("convert tmp/8cqvw1322164970.ps tmp/8cqvw1322164970.png",intern=TRUE))
character(0)
> try(system("convert tmp/91ird1322164970.ps tmp/91ird1322164970.png",intern=TRUE))
character(0)
> try(system("convert tmp/10j6na1322164970.ps tmp/10j6na1322164970.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.400 0.360 4.707