R version 2.8.0 (2008-10-20)
Copyright (C) 2008 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.
Natural language support but running in an English locale
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
+ ,16
+ ,18
+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ions','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])
+ }
+ }
> par3 = 'Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '5'
> #'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
PersonalStandards ConcernoverMistakes Doubtsaboutactions
1 24 24 14
2 25 25 11
3 30 17 6
4 19 18 12
5 22 18 8
6 22 16 10
7 25 20 10
8 23 16 11
9 17 18 16
10 21 17 11
11 19 23 13
12 19 30 12
13 15 23 8
14 16 18 12
15 23 15 11
16 27 12 4
17 22 21 9
18 14 15 8
19 22 20 8
20 23 31 14
21 23 27 15
22 21 34 16
23 19 21 9
24 18 31 14
25 20 19 11
26 23 16 8
27 25 20 9
28 19 21 9
29 24 22 9
30 22 17 9
31 25 24 10
32 26 25 16
33 29 26 11
34 32 25 8
35 25 17 9
36 29 32 16
37 28 33 11
38 17 13 16
39 28 32 12
40 29 25 12
41 26 29 14
42 25 22 9
43 14 18 10
44 25 17 9
45 26 20 10
46 20 15 12
47 18 20 14
48 32 33 14
49 25 29 10
50 25 23 14
51 23 26 16
52 21 18 9
53 20 20 10
54 15 11 6
55 30 28 8
56 24 26 13
57 26 22 10
58 24 17 8
59 22 12 7
60 14 14 15
61 24 17 9
62 24 21 10
63 24 19 12
64 24 18 13
65 19 10 10
66 31 29 11
67 22 31 8
68 27 19 9
69 19 9 13
70 25 20 11
71 20 28 8
72 21 19 9
73 27 30 9
74 23 29 15
75 25 26 9
76 20 23 10
77 21 13 14
78 22 21 12
79 23 19 12
80 25 28 11
81 25 23 14
82 17 18 6
83 19 21 12
84 25 20 8
85 19 23 14
86 20 21 11
87 26 21 10
88 23 15 14
89 27 28 12
90 17 19 10
91 17 26 14
92 19 10 5
93 17 16 11
94 22 22 10
95 21 19 9
96 32 31 10
97 21 31 16
98 21 29 13
99 18 19 9
100 18 22 10
101 23 23 10
102 19 15 7
103 20 20 9
104 21 18 8
105 20 23 14
106 17 25 14
107 18 21 8
108 19 24 9
109 22 25 14
110 15 17 14
111 14 13 8
112 18 28 8
113 24 21 8
114 35 25 7
115 29 9 6
116 21 16 8
117 25 19 6
118 20 17 11
119 22 25 14
120 13 20 11
121 26 29 11
122 17 14 11
123 25 22 14
124 20 15 8
125 19 19 20
126 21 20 11
127 22 15 8
128 24 20 11
129 21 18 10
130 26 33 14
131 24 22 11
132 16 16 9
133 23 17 9
134 18 16 8
135 16 21 10
136 26 26 13
137 19 18 13
138 21 18 12
139 21 17 8
140 22 22 13
141 23 30 14
142 29 30 12
143 21 24 14
144 21 21 15
145 23 21 13
146 27 29 16
147 25 31 9
148 21 20 9
149 10 16 9
150 20 22 8
151 26 20 7
152 24 28 16
153 29 38 11
154 19 22 9
155 24 20 11
156 19 17 9
157 24 28 14
158 22 22 13
159 17 31 16
ParentalExpectations ParentalCriticism Organization t
1 11 12 26 1
2 7 8 23 2
3 17 8 25 3
4 10 8 23 4
5 12 9 19 5
6 12 7 29 6
7 11 4 25 7
8 11 11 21 8
9 12 7 22 9
10 13 7 25 10
11 14 12 24 11
12 16 10 18 12
13 11 10 22 13
14 10 8 15 14
15 11 8 22 15
16 15 4 28 16
17 9 9 20 17
18 11 8 12 18
19 17 7 24 19
20 17 11 20 20
21 11 9 21 21
22 18 11 20 22
23 14 13 21 23
24 10 8 23 24
25 11 8 28 25
26 15 9 24 26
27 15 6 24 27
28 13 9 24 28
29 16 9 23 29
30 13 6 23 30
31 9 6 29 31
32 18 16 24 32
33 18 5 18 33
34 12 7 25 34
35 17 9 21 35
36 9 6 26 36
37 9 6 22 37
38 12 5 22 38
39 18 12 22 39
40 12 7 23 40
41 18 10 30 41
42 14 9 23 42
43 15 8 17 43
44 16 5 23 44
45 10 8 23 45
46 11 8 25 46
47 14 10 24 47
48 9 6 24 48
49 12 8 23 49
50 17 7 21 50
51 5 4 24 51
52 12 8 24 52
53 12 8 28 53
54 6 4 16 54
55 24 20 20 55
56 12 8 29 56
57 12 8 27 57
58 14 6 22 58
59 7 4 28 59
60 13 8 16 60
61 12 9 25 61
62 13 6 24 62
63 14 7 28 63
64 8 9 24 64
65 11 5 23 65
66 9 5 30 66
67 11 8 24 67
68 13 8 21 68
69 10 6 25 69
70 11 8 25 70
71 12 7 22 71
72 9 7 23 72
73 15 9 26 73
74 18 11 23 74
75 15 6 25 75
76 12 8 21 76
77 13 6 25 77
78 14 9 24 78
79 10 8 29 79
80 13 6 22 80
81 13 10 27 81
82 11 8 26 82
83 13 8 22 83
84 16 10 24 84
85 8 5 27 85
86 16 7 24 86
87 11 5 24 87
88 9 8 29 88
89 16 14 22 89
90 12 7 21 90
91 14 8 24 91
92 8 6 24 92
93 9 5 23 93
94 15 6 20 94
95 11 10 27 95
96 21 12 26 96
97 14 9 25 97
98 18 12 21 98
99 12 7 21 99
100 13 8 19 100
101 15 10 21 101
102 12 6 21 102
103 19 10 16 103
104 15 10 22 104
105 11 10 29 105
106 11 5 15 106
107 10 7 17 107
108 13 10 15 108
109 15 11 21 109
110 12 6 21 110
111 12 7 19 111
112 16 12 24 112
113 9 11 20 113
114 18 11 17 114
115 8 11 23 115
116 13 5 24 116
117 17 8 14 117
118 9 6 19 118
119 15 9 24 119
120 8 4 13 120
121 7 4 22 121
122 12 7 16 122
123 14 11 19 123
124 6 6 25 124
125 8 7 25 125
126 17 8 23 126
127 10 4 24 127
128 11 8 26 128
129 14 9 26 129
130 11 8 25 130
131 13 11 18 131
132 12 8 21 132
133 11 5 26 133
134 9 4 23 134
135 12 8 23 135
136 20 10 22 136
137 12 6 20 137
138 13 9 13 138
139 12 9 24 139
140 12 13 15 140
141 9 9 14 141
142 15 10 22 142
143 24 20 10 143
144 7 5 24 144
145 17 11 22 145
146 11 6 24 146
147 17 9 19 147
148 11 7 20 148
149 12 9 13 149
150 14 10 20 150
151 11 9 22 151
152 16 8 24 152
153 21 7 29 153
154 14 6 12 154
155 20 13 20 155
156 13 6 21 156
157 11 8 24 157
158 15 10 22 158
159 19 16 20 159
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) ConcernoverMistakes Doubtsaboutactions
7.966042 0.329540 -0.359821
ParentalExpectations ParentalCriticism Organization
0.188741 0.021220 0.389773
t
-0.004009
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-8.4946 -2.2517 0.1415 2.1703 11.5144
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.966042 2.379902 3.347 0.00103 **
ConcernoverMistakes 0.329540 0.055687 5.918 2.09e-08 ***
Doubtsaboutactions -0.359821 0.107409 -3.350 0.00102 **
ParentalExpectations 0.188741 0.101382 1.862 0.06458 .
ParentalCriticism 0.021220 0.128902 0.165 0.86946
Organization 0.389773 0.074001 5.267 4.66e-07 ***
t -0.004009 0.006096 -0.658 0.51177
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 3.416 on 152 degrees of freedom
Multiple R-squared: 0.3689, Adjusted R-squared: 0.3439
F-statistic: 14.81 on 6 and 152 DF, p-value: 2.755e-13
> 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.30514473 0.61028946 0.6948553
[2,] 0.34730120 0.69460239 0.6526988
[3,] 0.25070955 0.50141909 0.7492905
[4,] 0.34429488 0.68858975 0.6557051
[5,] 0.26393922 0.52787843 0.7360608
[6,] 0.53287373 0.93425254 0.4671263
[7,] 0.46987056 0.93974113 0.5301294
[8,] 0.49297977 0.98595954 0.5070202
[9,] 0.46647324 0.93294648 0.5335268
[10,] 0.38319493 0.76638986 0.6168051
[11,] 0.48871153 0.97742306 0.5112885
[12,] 0.54067297 0.91865406 0.4593270
[13,] 0.47670675 0.95341350 0.5232933
[14,] 0.41610646 0.83221293 0.5838935
[15,] 0.41775173 0.83550345 0.5822483
[16,] 0.36262499 0.72524998 0.6373750
[17,] 0.32229217 0.64458435 0.6777078
[18,] 0.30594853 0.61189707 0.6940515
[19,] 0.28343367 0.56686733 0.7165663
[20,] 0.25681603 0.51363207 0.7431840
[21,] 0.21260627 0.42521253 0.7873937
[22,] 0.18423138 0.36846276 0.8157686
[23,] 0.24896159 0.49792317 0.7510384
[24,] 0.42158510 0.84317020 0.5784149
[25,] 0.65624840 0.68750320 0.3437516
[26,] 0.62477818 0.75044365 0.3752218
[27,] 0.65984495 0.68031011 0.3401551
[28,] 0.63646843 0.72706314 0.3635316
[29,] 0.60857277 0.78285447 0.3914272
[30,] 0.56729893 0.86540215 0.4327011
[31,] 0.61740633 0.76518734 0.3825937
[32,] 0.59625162 0.80749677 0.4037484
[33,] 0.54390212 0.91219577 0.4560979
[34,] 0.67114978 0.65770044 0.3288502
[35,] 0.63712130 0.72575740 0.3628787
[36,] 0.63439060 0.73121879 0.3656094
[37,] 0.59184618 0.81630763 0.4081538
[38,] 0.59988852 0.80022296 0.4001115
[39,] 0.68650294 0.62699411 0.3134971
[40,] 0.65119064 0.69761872 0.3488094
[41,] 0.63184028 0.73631944 0.3681597
[42,] 0.59379949 0.81240102 0.4062005
[43,] 0.56238119 0.87523763 0.4376188
[44,] 0.61142065 0.77715870 0.3885793
[45,] 0.58136263 0.83727475 0.4186374
[46,] 0.61869620 0.76260759 0.3813038
[47,] 0.59088609 0.81822783 0.4091139
[48,] 0.54865960 0.90268080 0.4513404
[49,] 0.51463189 0.97073623 0.4853681
[50,] 0.46816116 0.93632231 0.5318388
[51,] 0.42834483 0.85668966 0.5716552
[52,] 0.39058340 0.78116680 0.6094166
[53,] 0.35142169 0.70284338 0.6485783
[54,] 0.31110953 0.62221907 0.6888905
[55,] 0.33089698 0.66179397 0.6691030
[56,] 0.29056337 0.58112674 0.7094366
[57,] 0.30231746 0.60463492 0.6976825
[58,] 0.37883069 0.75766138 0.6211693
[59,] 0.44897434 0.89794867 0.5510257
[60,] 0.41072377 0.82144753 0.5892762
[61,] 0.39407501 0.78815001 0.6059250
[62,] 0.47210312 0.94420624 0.5278969
[63,] 0.42868280 0.85736560 0.5713172
[64,] 0.39057513 0.78115026 0.6094249
[65,] 0.35606033 0.71212065 0.6439397
[66,] 0.32668808 0.65337616 0.6733119
[67,] 0.30088700 0.60177401 0.6991130
[68,] 0.28208322 0.56416645 0.7179168
[69,] 0.24602832 0.49205665 0.7539717
[70,] 0.21361402 0.42722804 0.7863860
[71,] 0.18976176 0.37952352 0.8102382
[72,] 0.17138831 0.34277663 0.8286117
[73,] 0.26114026 0.52228052 0.7388597
[74,] 0.23692488 0.47384975 0.7630751
[75,] 0.21048032 0.42096064 0.7895197
[76,] 0.20589187 0.41178374 0.7941081
[77,] 0.19457779 0.38915558 0.8054222
[78,] 0.21407542 0.42815085 0.7859246
[79,] 0.20941206 0.41882412 0.7905879
[80,] 0.20645628 0.41291256 0.7935437
[81,] 0.20115892 0.40231783 0.7988411
[82,] 0.25880884 0.51761767 0.7411912
[83,] 0.22228929 0.44457858 0.7777107
[84,] 0.19854917 0.39709834 0.8014508
[85,] 0.17043797 0.34087594 0.8295620
[86,] 0.15001065 0.30002129 0.8499894
[87,] 0.16746614 0.33493228 0.8325339
[88,] 0.15717279 0.31434558 0.8428272
[89,] 0.14291862 0.28583723 0.8570814
[90,] 0.12909546 0.25819093 0.8709045
[91,] 0.11805075 0.23610150 0.8819493
[92,] 0.09750658 0.19501317 0.9024934
[93,] 0.07902519 0.15805039 0.9209748
[94,] 0.06283762 0.12567524 0.9371624
[95,] 0.04984855 0.09969711 0.9501514
[96,] 0.05094502 0.10189004 0.9490550
[97,] 0.04109537 0.08219075 0.9589046
[98,] 0.03627715 0.07255430 0.9637228
[99,] 0.03343709 0.06687418 0.9665629
[100,] 0.02662741 0.05325481 0.9733726
[101,] 0.02756617 0.05513234 0.9724338
[102,] 0.03857566 0.07715132 0.9614243
[103,] 0.25521428 0.51042855 0.7447857
[104,] 0.26908923 0.53817846 0.7309108
[105,] 0.63771999 0.72456003 0.3622800
[106,] 0.88332816 0.23334369 0.1166718
[107,] 0.85496212 0.29007576 0.1450379
[108,] 0.88300426 0.23399148 0.1169957
[109,] 0.85781754 0.28436492 0.1421825
[110,] 0.83863039 0.32273922 0.1613696
[111,] 0.88982026 0.22035949 0.1101797
[112,] 0.86623638 0.26752725 0.1337636
[113,] 0.83559074 0.32881852 0.1644093
[114,] 0.84440321 0.31119358 0.1555968
[115,] 0.80548414 0.38903172 0.1945159
[116,] 0.77477824 0.45044353 0.2252218
[117,] 0.73906294 0.52187412 0.2609371
[118,] 0.69422016 0.61155967 0.3057798
[119,] 0.64518749 0.70962501 0.3548125
[120,] 0.59232663 0.81534674 0.4076734
[121,] 0.54323832 0.91352337 0.4567617
[122,] 0.51676435 0.96647130 0.4832356
[123,] 0.54178997 0.91642005 0.4582100
[124,] 0.47779633 0.95559267 0.5222037
[125,] 0.44920123 0.89840246 0.5507988
[126,] 0.74669124 0.50661751 0.2533088
[127,] 0.68500601 0.62998798 0.3149940
[128,] 0.67448187 0.65103627 0.3255181
[129,] 0.62438748 0.75122504 0.3756125
[130,] 0.65062773 0.69874454 0.3493723
[131,] 0.57972442 0.84055116 0.4202756
[132,] 0.52167386 0.95665228 0.4783261
[133,] 0.48280771 0.96561541 0.5171923
[134,] 0.50839828 0.98320345 0.4916017
[135,] 0.45207285 0.90414571 0.5479271
[136,] 0.34755055 0.69510110 0.6524494
[137,] 0.31319049 0.62638098 0.6868095
[138,] 0.27233256 0.54466511 0.7276674
[139,] 0.17487816 0.34975632 0.8251218
[140,] 0.34743587 0.69487175 0.6525641
> postscript(file="/var/www/html/freestat/rcomp/tmp/1ppsx1293199535.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/2izaz1293199535.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/3izaz1293199535.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/4izaz1293199535.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/5izaz1293199535.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
0.701628488 2.305797260 5.480064882 -1.585810027 1.139305798 -1.333251960
7 8 9 10 11 12
2.164089764 3.256630113 -2.092971811 -0.916584854 -4.075238981 -4.734233857
13 14 15 16 17 18
-8.478115758 -1.427537602 3.288120047 2.753283033 0.735067396 -2.881587692
19 20 21 22 23 24
-2.313774406 -1.301565406 1.165535219 -3.751265718 -3.659234439 -6.070000789
25 26 27 28 29 30
-3.328582938 0.367490132 1.476820795 -4.534886883 -0.036867623 0.244721441
31 32 33 34 35 36
-0.281897768 2.589492134 6.036911993 6.652596855 3.225689182 4.430072661
37 38 39 40 41 42
2.864530090 -0.286570156 1.735921129 5.895479080 -1.623542644 1.392732875
43 44 45 46 47 48
-5.754164545 2.755845864 4.199843572 -0.397094732 -3.540032063 7.208546724
49 50 51 52 53 54
-0.127457925 3.150130850 2.044395485 -1.240088678 -4.094428744 -1.669249094
55 56 57 58 59 60
3.156284511 -1.369949721 1.652301272 2.198187846 0.515064626 -1.801493942
61 62 63 64 65 66
1.714540539 1.024902873 0.638580854 3.981047146 0.450339696 4.201991200
67 68 69 70 71 72
-4.635045696 5.475094629 1.263353311 2.691605759 -5.018366497 -0.512230532
73 74 75 76 77 78
-0.477359880 -1.424232361 -0.697751556 -2.262429113 1.770865624 -0.443710345
79 80 81 82 83 84
0.046698283 0.929655967 1.627082281 -6.790081139 -2.434158721 1.071899997
85 86 87 88 89 90
-3.307077630 -3.106500454 3.523832518 2.309320649 2.589577714 -3.866923513
91 92 93 94 95 96
-6.298428751 -1.085286331 -2.677339823 0.005263728 -2.420252644 3.449025686
97 98 99 100 101 102
-3.613423112 -3.289329073 -3.190662008 -3.245866415 0.229136387 -1.558897803
103 104 105 106 107 108
-0.940147928 -1.220552247 -3.678762243 -1.770916355 -2.240916133 -1.716041987
109 110 111 112 113 114
0.020192686 -3.667160110 -4.745590509 -8.494600631 2.717682637 11.514362077
115 116 117 118 119 120
9.979957443 -0.809328380 4.565524375 1.631219445 -1.066594634 -3.779564584
121 122 123 124 125 126
2.939375618 0.217749852 5.033225293 -0.537521377 1.067474434 -1.436784271
127 128 129 130 131 132
1.151754163 1.534361911 -1.749813110 0.727600245 3.564350219 -4.090962208
133 134 135 136 137 138
0.887044272 -2.571207928 -6.146357391 2.126820899 0.141498609 4.261695570
139 140 141 142 143 144
-0.942796200 3.635692859 3.404080656 4.416601763 1.883894936 1.306418913
145 146 147 148 149 150
1.355603951 4.261757579 -0.159298126 0.254758831 -6.925845699 -2.386004768
151 152 153 154 155 156
3.725160291 0.629207431 -2.332630235 0.192912457 2.176476454 -1.470584456
157 158 159
0.873316845 0.476884632 -6.508237648
> postscript(file="/var/www/html/freestat/rcomp/tmp/6aqr21293199535.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 0.701628488 NA
1 2.305797260 0.701628488
2 5.480064882 2.305797260
3 -1.585810027 5.480064882
4 1.139305798 -1.585810027
5 -1.333251960 1.139305798
6 2.164089764 -1.333251960
7 3.256630113 2.164089764
8 -2.092971811 3.256630113
9 -0.916584854 -2.092971811
10 -4.075238981 -0.916584854
11 -4.734233857 -4.075238981
12 -8.478115758 -4.734233857
13 -1.427537602 -8.478115758
14 3.288120047 -1.427537602
15 2.753283033 3.288120047
16 0.735067396 2.753283033
17 -2.881587692 0.735067396
18 -2.313774406 -2.881587692
19 -1.301565406 -2.313774406
20 1.165535219 -1.301565406
21 -3.751265718 1.165535219
22 -3.659234439 -3.751265718
23 -6.070000789 -3.659234439
24 -3.328582938 -6.070000789
25 0.367490132 -3.328582938
26 1.476820795 0.367490132
27 -4.534886883 1.476820795
28 -0.036867623 -4.534886883
29 0.244721441 -0.036867623
30 -0.281897768 0.244721441
31 2.589492134 -0.281897768
32 6.036911993 2.589492134
33 6.652596855 6.036911993
34 3.225689182 6.652596855
35 4.430072661 3.225689182
36 2.864530090 4.430072661
37 -0.286570156 2.864530090
38 1.735921129 -0.286570156
39 5.895479080 1.735921129
40 -1.623542644 5.895479080
41 1.392732875 -1.623542644
42 -5.754164545 1.392732875
43 2.755845864 -5.754164545
44 4.199843572 2.755845864
45 -0.397094732 4.199843572
46 -3.540032063 -0.397094732
47 7.208546724 -3.540032063
48 -0.127457925 7.208546724
49 3.150130850 -0.127457925
50 2.044395485 3.150130850
51 -1.240088678 2.044395485
52 -4.094428744 -1.240088678
53 -1.669249094 -4.094428744
54 3.156284511 -1.669249094
55 -1.369949721 3.156284511
56 1.652301272 -1.369949721
57 2.198187846 1.652301272
58 0.515064626 2.198187846
59 -1.801493942 0.515064626
60 1.714540539 -1.801493942
61 1.024902873 1.714540539
62 0.638580854 1.024902873
63 3.981047146 0.638580854
64 0.450339696 3.981047146
65 4.201991200 0.450339696
66 -4.635045696 4.201991200
67 5.475094629 -4.635045696
68 1.263353311 5.475094629
69 2.691605759 1.263353311
70 -5.018366497 2.691605759
71 -0.512230532 -5.018366497
72 -0.477359880 -0.512230532
73 -1.424232361 -0.477359880
74 -0.697751556 -1.424232361
75 -2.262429113 -0.697751556
76 1.770865624 -2.262429113
77 -0.443710345 1.770865624
78 0.046698283 -0.443710345
79 0.929655967 0.046698283
80 1.627082281 0.929655967
81 -6.790081139 1.627082281
82 -2.434158721 -6.790081139
83 1.071899997 -2.434158721
84 -3.307077630 1.071899997
85 -3.106500454 -3.307077630
86 3.523832518 -3.106500454
87 2.309320649 3.523832518
88 2.589577714 2.309320649
89 -3.866923513 2.589577714
90 -6.298428751 -3.866923513
91 -1.085286331 -6.298428751
92 -2.677339823 -1.085286331
93 0.005263728 -2.677339823
94 -2.420252644 0.005263728
95 3.449025686 -2.420252644
96 -3.613423112 3.449025686
97 -3.289329073 -3.613423112
98 -3.190662008 -3.289329073
99 -3.245866415 -3.190662008
100 0.229136387 -3.245866415
101 -1.558897803 0.229136387
102 -0.940147928 -1.558897803
103 -1.220552247 -0.940147928
104 -3.678762243 -1.220552247
105 -1.770916355 -3.678762243
106 -2.240916133 -1.770916355
107 -1.716041987 -2.240916133
108 0.020192686 -1.716041987
109 -3.667160110 0.020192686
110 -4.745590509 -3.667160110
111 -8.494600631 -4.745590509
112 2.717682637 -8.494600631
113 11.514362077 2.717682637
114 9.979957443 11.514362077
115 -0.809328380 9.979957443
116 4.565524375 -0.809328380
117 1.631219445 4.565524375
118 -1.066594634 1.631219445
119 -3.779564584 -1.066594634
120 2.939375618 -3.779564584
121 0.217749852 2.939375618
122 5.033225293 0.217749852
123 -0.537521377 5.033225293
124 1.067474434 -0.537521377
125 -1.436784271 1.067474434
126 1.151754163 -1.436784271
127 1.534361911 1.151754163
128 -1.749813110 1.534361911
129 0.727600245 -1.749813110
130 3.564350219 0.727600245
131 -4.090962208 3.564350219
132 0.887044272 -4.090962208
133 -2.571207928 0.887044272
134 -6.146357391 -2.571207928
135 2.126820899 -6.146357391
136 0.141498609 2.126820899
137 4.261695570 0.141498609
138 -0.942796200 4.261695570
139 3.635692859 -0.942796200
140 3.404080656 3.635692859
141 4.416601763 3.404080656
142 1.883894936 4.416601763
143 1.306418913 1.883894936
144 1.355603951 1.306418913
145 4.261757579 1.355603951
146 -0.159298126 4.261757579
147 0.254758831 -0.159298126
148 -6.925845699 0.254758831
149 -2.386004768 -6.925845699
150 3.725160291 -2.386004768
151 0.629207431 3.725160291
152 -2.332630235 0.629207431
153 0.192912457 -2.332630235
154 2.176476454 0.192912457
155 -1.470584456 2.176476454
156 0.873316845 -1.470584456
157 0.476884632 0.873316845
158 -6.508237648 0.476884632
159 NA -6.508237648
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 2.305797260 0.701628488
[2,] 5.480064882 2.305797260
[3,] -1.585810027 5.480064882
[4,] 1.139305798 -1.585810027
[5,] -1.333251960 1.139305798
[6,] 2.164089764 -1.333251960
[7,] 3.256630113 2.164089764
[8,] -2.092971811 3.256630113
[9,] -0.916584854 -2.092971811
[10,] -4.075238981 -0.916584854
[11,] -4.734233857 -4.075238981
[12,] -8.478115758 -4.734233857
[13,] -1.427537602 -8.478115758
[14,] 3.288120047 -1.427537602
[15,] 2.753283033 3.288120047
[16,] 0.735067396 2.753283033
[17,] -2.881587692 0.735067396
[18,] -2.313774406 -2.881587692
[19,] -1.301565406 -2.313774406
[20,] 1.165535219 -1.301565406
[21,] -3.751265718 1.165535219
[22,] -3.659234439 -3.751265718
[23,] -6.070000789 -3.659234439
[24,] -3.328582938 -6.070000789
[25,] 0.367490132 -3.328582938
[26,] 1.476820795 0.367490132
[27,] -4.534886883 1.476820795
[28,] -0.036867623 -4.534886883
[29,] 0.244721441 -0.036867623
[30,] -0.281897768 0.244721441
[31,] 2.589492134 -0.281897768
[32,] 6.036911993 2.589492134
[33,] 6.652596855 6.036911993
[34,] 3.225689182 6.652596855
[35,] 4.430072661 3.225689182
[36,] 2.864530090 4.430072661
[37,] -0.286570156 2.864530090
[38,] 1.735921129 -0.286570156
[39,] 5.895479080 1.735921129
[40,] -1.623542644 5.895479080
[41,] 1.392732875 -1.623542644
[42,] -5.754164545 1.392732875
[43,] 2.755845864 -5.754164545
[44,] 4.199843572 2.755845864
[45,] -0.397094732 4.199843572
[46,] -3.540032063 -0.397094732
[47,] 7.208546724 -3.540032063
[48,] -0.127457925 7.208546724
[49,] 3.150130850 -0.127457925
[50,] 2.044395485 3.150130850
[51,] -1.240088678 2.044395485
[52,] -4.094428744 -1.240088678
[53,] -1.669249094 -4.094428744
[54,] 3.156284511 -1.669249094
[55,] -1.369949721 3.156284511
[56,] 1.652301272 -1.369949721
[57,] 2.198187846 1.652301272
[58,] 0.515064626 2.198187846
[59,] -1.801493942 0.515064626
[60,] 1.714540539 -1.801493942
[61,] 1.024902873 1.714540539
[62,] 0.638580854 1.024902873
[63,] 3.981047146 0.638580854
[64,] 0.450339696 3.981047146
[65,] 4.201991200 0.450339696
[66,] -4.635045696 4.201991200
[67,] 5.475094629 -4.635045696
[68,] 1.263353311 5.475094629
[69,] 2.691605759 1.263353311
[70,] -5.018366497 2.691605759
[71,] -0.512230532 -5.018366497
[72,] -0.477359880 -0.512230532
[73,] -1.424232361 -0.477359880
[74,] -0.697751556 -1.424232361
[75,] -2.262429113 -0.697751556
[76,] 1.770865624 -2.262429113
[77,] -0.443710345 1.770865624
[78,] 0.046698283 -0.443710345
[79,] 0.929655967 0.046698283
[80,] 1.627082281 0.929655967
[81,] -6.790081139 1.627082281
[82,] -2.434158721 -6.790081139
[83,] 1.071899997 -2.434158721
[84,] -3.307077630 1.071899997
[85,] -3.106500454 -3.307077630
[86,] 3.523832518 -3.106500454
[87,] 2.309320649 3.523832518
[88,] 2.589577714 2.309320649
[89,] -3.866923513 2.589577714
[90,] -6.298428751 -3.866923513
[91,] -1.085286331 -6.298428751
[92,] -2.677339823 -1.085286331
[93,] 0.005263728 -2.677339823
[94,] -2.420252644 0.005263728
[95,] 3.449025686 -2.420252644
[96,] -3.613423112 3.449025686
[97,] -3.289329073 -3.613423112
[98,] -3.190662008 -3.289329073
[99,] -3.245866415 -3.190662008
[100,] 0.229136387 -3.245866415
[101,] -1.558897803 0.229136387
[102,] -0.940147928 -1.558897803
[103,] -1.220552247 -0.940147928
[104,] -3.678762243 -1.220552247
[105,] -1.770916355 -3.678762243
[106,] -2.240916133 -1.770916355
[107,] -1.716041987 -2.240916133
[108,] 0.020192686 -1.716041987
[109,] -3.667160110 0.020192686
[110,] -4.745590509 -3.667160110
[111,] -8.494600631 -4.745590509
[112,] 2.717682637 -8.494600631
[113,] 11.514362077 2.717682637
[114,] 9.979957443 11.514362077
[115,] -0.809328380 9.979957443
[116,] 4.565524375 -0.809328380
[117,] 1.631219445 4.565524375
[118,] -1.066594634 1.631219445
[119,] -3.779564584 -1.066594634
[120,] 2.939375618 -3.779564584
[121,] 0.217749852 2.939375618
[122,] 5.033225293 0.217749852
[123,] -0.537521377 5.033225293
[124,] 1.067474434 -0.537521377
[125,] -1.436784271 1.067474434
[126,] 1.151754163 -1.436784271
[127,] 1.534361911 1.151754163
[128,] -1.749813110 1.534361911
[129,] 0.727600245 -1.749813110
[130,] 3.564350219 0.727600245
[131,] -4.090962208 3.564350219
[132,] 0.887044272 -4.090962208
[133,] -2.571207928 0.887044272
[134,] -6.146357391 -2.571207928
[135,] 2.126820899 -6.146357391
[136,] 0.141498609 2.126820899
[137,] 4.261695570 0.141498609
[138,] -0.942796200 4.261695570
[139,] 3.635692859 -0.942796200
[140,] 3.404080656 3.635692859
[141,] 4.416601763 3.404080656
[142,] 1.883894936 4.416601763
[143,] 1.306418913 1.883894936
[144,] 1.355603951 1.306418913
[145,] 4.261757579 1.355603951
[146,] -0.159298126 4.261757579
[147,] 0.254758831 -0.159298126
[148,] -6.925845699 0.254758831
[149,] -2.386004768 -6.925845699
[150,] 3.725160291 -2.386004768
[151,] 0.629207431 3.725160291
[152,] -2.332630235 0.629207431
[153,] 0.192912457 -2.332630235
[154,] 2.176476454 0.192912457
[155,] -1.470584456 2.176476454
[156,] 0.873316845 -1.470584456
[157,] 0.476884632 0.873316845
[158,] -6.508237648 0.476884632
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 2.305797260 0.701628488
2 5.480064882 2.305797260
3 -1.585810027 5.480064882
4 1.139305798 -1.585810027
5 -1.333251960 1.139305798
6 2.164089764 -1.333251960
7 3.256630113 2.164089764
8 -2.092971811 3.256630113
9 -0.916584854 -2.092971811
10 -4.075238981 -0.916584854
11 -4.734233857 -4.075238981
12 -8.478115758 -4.734233857
13 -1.427537602 -8.478115758
14 3.288120047 -1.427537602
15 2.753283033 3.288120047
16 0.735067396 2.753283033
17 -2.881587692 0.735067396
18 -2.313774406 -2.881587692
19 -1.301565406 -2.313774406
20 1.165535219 -1.301565406
21 -3.751265718 1.165535219
22 -3.659234439 -3.751265718
23 -6.070000789 -3.659234439
24 -3.328582938 -6.070000789
25 0.367490132 -3.328582938
26 1.476820795 0.367490132
27 -4.534886883 1.476820795
28 -0.036867623 -4.534886883
29 0.244721441 -0.036867623
30 -0.281897768 0.244721441
31 2.589492134 -0.281897768
32 6.036911993 2.589492134
33 6.652596855 6.036911993
34 3.225689182 6.652596855
35 4.430072661 3.225689182
36 2.864530090 4.430072661
37 -0.286570156 2.864530090
38 1.735921129 -0.286570156
39 5.895479080 1.735921129
40 -1.623542644 5.895479080
41 1.392732875 -1.623542644
42 -5.754164545 1.392732875
43 2.755845864 -5.754164545
44 4.199843572 2.755845864
45 -0.397094732 4.199843572
46 -3.540032063 -0.397094732
47 7.208546724 -3.540032063
48 -0.127457925 7.208546724
49 3.150130850 -0.127457925
50 2.044395485 3.150130850
51 -1.240088678 2.044395485
52 -4.094428744 -1.240088678
53 -1.669249094 -4.094428744
54 3.156284511 -1.669249094
55 -1.369949721 3.156284511
56 1.652301272 -1.369949721
57 2.198187846 1.652301272
58 0.515064626 2.198187846
59 -1.801493942 0.515064626
60 1.714540539 -1.801493942
61 1.024902873 1.714540539
62 0.638580854 1.024902873
63 3.981047146 0.638580854
64 0.450339696 3.981047146
65 4.201991200 0.450339696
66 -4.635045696 4.201991200
67 5.475094629 -4.635045696
68 1.263353311 5.475094629
69 2.691605759 1.263353311
70 -5.018366497 2.691605759
71 -0.512230532 -5.018366497
72 -0.477359880 -0.512230532
73 -1.424232361 -0.477359880
74 -0.697751556 -1.424232361
75 -2.262429113 -0.697751556
76 1.770865624 -2.262429113
77 -0.443710345 1.770865624
78 0.046698283 -0.443710345
79 0.929655967 0.046698283
80 1.627082281 0.929655967
81 -6.790081139 1.627082281
82 -2.434158721 -6.790081139
83 1.071899997 -2.434158721
84 -3.307077630 1.071899997
85 -3.106500454 -3.307077630
86 3.523832518 -3.106500454
87 2.309320649 3.523832518
88 2.589577714 2.309320649
89 -3.866923513 2.589577714
90 -6.298428751 -3.866923513
91 -1.085286331 -6.298428751
92 -2.677339823 -1.085286331
93 0.005263728 -2.677339823
94 -2.420252644 0.005263728
95 3.449025686 -2.420252644
96 -3.613423112 3.449025686
97 -3.289329073 -3.613423112
98 -3.190662008 -3.289329073
99 -3.245866415 -3.190662008
100 0.229136387 -3.245866415
101 -1.558897803 0.229136387
102 -0.940147928 -1.558897803
103 -1.220552247 -0.940147928
104 -3.678762243 -1.220552247
105 -1.770916355 -3.678762243
106 -2.240916133 -1.770916355
107 -1.716041987 -2.240916133
108 0.020192686 -1.716041987
109 -3.667160110 0.020192686
110 -4.745590509 -3.667160110
111 -8.494600631 -4.745590509
112 2.717682637 -8.494600631
113 11.514362077 2.717682637
114 9.979957443 11.514362077
115 -0.809328380 9.979957443
116 4.565524375 -0.809328380
117 1.631219445 4.565524375
118 -1.066594634 1.631219445
119 -3.779564584 -1.066594634
120 2.939375618 -3.779564584
121 0.217749852 2.939375618
122 5.033225293 0.217749852
123 -0.537521377 5.033225293
124 1.067474434 -0.537521377
125 -1.436784271 1.067474434
126 1.151754163 -1.436784271
127 1.534361911 1.151754163
128 -1.749813110 1.534361911
129 0.727600245 -1.749813110
130 3.564350219 0.727600245
131 -4.090962208 3.564350219
132 0.887044272 -4.090962208
133 -2.571207928 0.887044272
134 -6.146357391 -2.571207928
135 2.126820899 -6.146357391
136 0.141498609 2.126820899
137 4.261695570 0.141498609
138 -0.942796200 4.261695570
139 3.635692859 -0.942796200
140 3.404080656 3.635692859
141 4.416601763 3.404080656
142 1.883894936 4.416601763
143 1.306418913 1.883894936
144 1.355603951 1.306418913
145 4.261757579 1.355603951
146 -0.159298126 4.261757579
147 0.254758831 -0.159298126
148 -6.925845699 0.254758831
149 -2.386004768 -6.925845699
150 3.725160291 -2.386004768
151 0.629207431 3.725160291
152 -2.332630235 0.629207431
153 0.192912457 -2.332630235
154 2.176476454 0.192912457
155 -1.470584456 2.176476454
156 0.873316845 -1.470584456
157 0.476884632 0.873316845
158 -6.508237648 0.476884632
> 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/freestat/rcomp/tmp/7wrb01293199536.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/8wrb01293199536.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/9wrb01293199536.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/www/html/freestat/rcomp/tmp/10o0al1293199536.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/11sjrr1293199536.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/freestat/rcomp/tmp/12djpx1293199536.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/freestat/rcomp/tmp/139tno1293199536.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/freestat/rcomp/tmp/14cclu1293199536.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/freestat/rcomp/tmp/1553ke1293199536.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/freestat/rcomp/tmp/16jd051293199536.tab")
+ }
>
> try(system("convert tmp/1ppsx1293199535.ps tmp/1ppsx1293199535.png",intern=TRUE))
character(0)
> try(system("convert tmp/2izaz1293199535.ps tmp/2izaz1293199535.png",intern=TRUE))
character(0)
> try(system("convert tmp/3izaz1293199535.ps tmp/3izaz1293199535.png",intern=TRUE))
character(0)
> try(system("convert tmp/4izaz1293199535.ps tmp/4izaz1293199535.png",intern=TRUE))
character(0)
> try(system("convert tmp/5izaz1293199535.ps tmp/5izaz1293199535.png",intern=TRUE))
character(0)
> try(system("convert tmp/6aqr21293199535.ps tmp/6aqr21293199535.png",intern=TRUE))
character(0)
> try(system("convert tmp/7wrb01293199536.ps tmp/7wrb01293199536.png",intern=TRUE))
character(0)
> try(system("convert tmp/8wrb01293199536.ps tmp/8wrb01293199536.png",intern=TRUE))
character(0)
> try(system("convert tmp/9wrb01293199536.ps tmp/9wrb01293199536.png",intern=TRUE))
character(0)
> try(system("convert tmp/10o0al1293199536.ps tmp/10o0al1293199536.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.761 2.698 7.388