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(11,12,7,8,17,8,10,8,12,9,12,7,11,4,11,11,12,7,13,7,14,12,16,10,11,10,10,8,11,8,15,4,9,9,11,8,17,7,17,11,11,9,18,11,14,13,10,8,11,8,15,9,15,6,13,9,16,9,13,6,9,6,18,16,18,5,12,7,17,9,9,6,9,6,12,5,18,12,12,7,18,10,14,9,15,8,16,5,10,8,11,8,14,10,9,6,12,8,17,7,5,4,12,8,12,8,6,4,24,20,12,8,12,8,14,6,7,4,13,8,12,9,13,6,14,7,8,9,11,5,9,5,11,8,13,8,10,6,11,8,12,7,9,7,15,9,18,11,15,6,12,8,13,6,14,9,10,8,13,6,13,10,11,8,13,8,16,10,8,5,16,7,11,5,9,8,16,14,12,7,14,8,8,6,9,5,15,6,11,10,21,12,14,9,18,12,12,7,13,8,15,10,12,6,19,10,15,10,11,10,11,5,10,7,13,10,15,11,12,6,12,7,16,12,9,11,18,11,8,11,13,5,17,8,9,6,15,9,8,4,7,4,12,7,14,11,6,6,8,7,17,8,10,4,11,8,14,9,11,8,13,11,12,8,11,5,9,4,12,8,20,10,12,6,13,9,12,9,12,13,9,9,15,10,24,20,7,5,17,11,11,6,17,9,11,7,12,9,14,10,11,9,16,8,21,7,14,6,20,13,13,6,11,8,15,10,19,16),dim=c(2,159),dimnames=list(c('ParentalExpectations','ParentalCriticism'),1:159))
> y <- array(NA,dim=c(2,159),dimnames=list(c('ParentalExpectations','ParentalCriticism'),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 = '1'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following object(s) are masked from package:base :
as.Date.numeric
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
ParentalExpectations ParentalCriticism t
1 11 12 1
2 7 8 2
3 17 8 3
4 10 8 4
5 12 9 5
6 12 7 6
7 11 4 7
8 11 11 8
9 12 7 9
10 13 7 10
11 14 12 11
12 16 10 12
13 11 10 13
14 10 8 14
15 11 8 15
16 15 4 16
17 9 9 17
18 11 8 18
19 17 7 19
20 17 11 20
21 11 9 21
22 18 11 22
23 14 13 23
24 10 8 24
25 11 8 25
26 15 9 26
27 15 6 27
28 13 9 28
29 16 9 29
30 13 6 30
31 9 6 31
32 18 16 32
33 18 5 33
34 12 7 34
35 17 9 35
36 9 6 36
37 9 6 37
38 12 5 38
39 18 12 39
40 12 7 40
41 18 10 41
42 14 9 42
43 15 8 43
44 16 5 44
45 10 8 45
46 11 8 46
47 14 10 47
48 9 6 48
49 12 8 49
50 17 7 50
51 5 4 51
52 12 8 52
53 12 8 53
54 6 4 54
55 24 20 55
56 12 8 56
57 12 8 57
58 14 6 58
59 7 4 59
60 13 8 60
61 12 9 61
62 13 6 62
63 14 7 63
64 8 9 64
65 11 5 65
66 9 5 66
67 11 8 67
68 13 8 68
69 10 6 69
70 11 8 70
71 12 7 71
72 9 7 72
73 15 9 73
74 18 11 74
75 15 6 75
76 12 8 76
77 13 6 77
78 14 9 78
79 10 8 79
80 13 6 80
81 13 10 81
82 11 8 82
83 13 8 83
84 16 10 84
85 8 5 85
86 16 7 86
87 11 5 87
88 9 8 88
89 16 14 89
90 12 7 90
91 14 8 91
92 8 6 92
93 9 5 93
94 15 6 94
95 11 10 95
96 21 12 96
97 14 9 97
98 18 12 98
99 12 7 99
100 13 8 100
101 15 10 101
102 12 6 102
103 19 10 103
104 15 10 104
105 11 10 105
106 11 5 106
107 10 7 107
108 13 10 108
109 15 11 109
110 12 6 110
111 12 7 111
112 16 12 112
113 9 11 113
114 18 11 114
115 8 11 115
116 13 5 116
117 17 8 117
118 9 6 118
119 15 9 119
120 8 4 120
121 7 4 121
122 12 7 122
123 14 11 123
124 6 6 124
125 8 7 125
126 17 8 126
127 10 4 127
128 11 8 128
129 14 9 129
130 11 8 130
131 13 11 131
132 12 8 132
133 11 5 133
134 9 4 134
135 12 8 135
136 20 10 136
137 12 6 137
138 13 9 138
139 12 9 139
140 12 13 140
141 9 9 141
142 15 10 142
143 24 20 143
144 7 5 144
145 17 11 145
146 11 6 146
147 17 9 147
148 11 7 148
149 12 9 149
150 14 10 150
151 11 9 151
152 16 8 152
153 21 7 153
154 14 6 154
155 20 13 155
156 13 6 156
157 11 8 157
158 15 10 158
159 19 16 159
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) ParentalCriticism t
6.439836 0.752009 0.002865
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-7.04137 -1.82545 -0.02188 1.82323 8.85781
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 6.439836 0.788598 8.166 1.01e-13 ***
ParentalCriticism 0.752009 0.082102 9.159 2.82e-16 ***
t 0.002865 0.004827 0.593 0.554
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.788 on 156 degrees of freedom
Multiple R-squared: 0.3534, Adjusted R-squared: 0.3451
F-statistic: 42.62 on 2 and 156 DF, p-value: 1.705e-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.91327477 0.1734505 0.08672523
[2,] 0.84345702 0.3130860 0.15654298
[3,] 0.78119056 0.4376189 0.21880944
[4,] 0.67969959 0.6406008 0.32030041
[5,] 0.57946688 0.8410662 0.42053312
[6,] 0.48467730 0.9693546 0.51532270
[7,] 0.44332635 0.8866527 0.55667365
[8,] 0.46552427 0.9310485 0.53447573
[9,] 0.48428072 0.9685614 0.51571928
[10,] 0.42230006 0.8446001 0.57769994
[11,] 0.43442256 0.8688451 0.56557744
[12,] 0.51186424 0.9762715 0.48813576
[13,] 0.44940940 0.8988188 0.55059060
[14,] 0.57451253 0.8509749 0.42548747
[15,] 0.60798896 0.7840221 0.39201104
[16,] 0.60661440 0.7867712 0.39338560
[17,] 0.65513652 0.6897270 0.34486348
[18,] 0.60640087 0.7871983 0.39359913
[19,] 0.66727961 0.6654408 0.33272039
[20,] 0.65465052 0.6906990 0.34534948
[21,] 0.60590431 0.7881914 0.39409569
[22,] 0.57517870 0.8496426 0.42482130
[23,] 0.52281545 0.9543691 0.47718455
[24,] 0.48782366 0.9756473 0.51217634
[25,] 0.43860561 0.8772112 0.56139439
[26,] 0.52702568 0.9459486 0.47297432
[27,] 0.49393579 0.9878716 0.50606421
[28,] 0.64530749 0.7093850 0.35469251
[29,] 0.62418986 0.7516203 0.37581014
[30,] 0.61214288 0.7757142 0.38785712
[31,] 0.70079032 0.5984194 0.29920968
[32,] 0.75098492 0.4980302 0.24901508
[33,] 0.71481679 0.5703664 0.28518321
[34,] 0.69808288 0.6038342 0.30191712
[35,] 0.66536588 0.6692682 0.33463412
[36,] 0.67668080 0.6466384 0.32331920
[37,] 0.63318071 0.7336386 0.36681929
[38,] 0.59616996 0.8076601 0.40383004
[39,] 0.64865984 0.7026803 0.35134016
[40,] 0.70948533 0.5810293 0.29051467
[41,] 0.71640473 0.5671905 0.28359527
[42,] 0.67723095 0.6455381 0.32276905
[43,] 0.71176880 0.5764624 0.28823120
[44,] 0.68278136 0.6344373 0.31721864
[45,] 0.73942094 0.5211581 0.26057906
[46,] 0.86728061 0.2654388 0.13271939
[47,] 0.84588333 0.3082333 0.15411667
[48,] 0.82166718 0.3566656 0.17833282
[49,] 0.86650964 0.2669807 0.13349036
[50,] 0.86436013 0.2712797 0.13563987
[51,] 0.84142248 0.3171550 0.15857752
[52,] 0.81567119 0.3686576 0.18432881
[53,] 0.80907497 0.3818501 0.19092503
[54,] 0.81645551 0.3670890 0.18354449
[55,] 0.78429659 0.4314068 0.21570341
[56,] 0.76082370 0.4783526 0.23917630
[57,] 0.73652978 0.5269404 0.26347022
[58,] 0.71569158 0.5686168 0.28430842
[59,] 0.81765986 0.3646803 0.18234014
[60,] 0.78712565 0.4257487 0.21287435
[61,] 0.76352706 0.4729459 0.23647294
[62,] 0.74027128 0.5194574 0.25972872
[63,] 0.70185100 0.5962980 0.29814900
[64,] 0.66861788 0.6627642 0.33138212
[65,] 0.64077321 0.7184536 0.35922679
[66,] 0.59679901 0.8064020 0.40320099
[67,] 0.59943125 0.8011375 0.40056875
[68,] 0.56939191 0.8612162 0.43060809
[69,] 0.57861187 0.8427763 0.42138813
[70,] 0.61511424 0.7697715 0.38488576
[71,] 0.57364195 0.8527161 0.42635805
[72,] 0.54808561 0.9038288 0.45191439
[73,] 0.50477093 0.9904581 0.49522907
[74,] 0.50049732 0.9990054 0.49950268
[75,] 0.47540327 0.9508065 0.52459673
[76,] 0.43740570 0.8748114 0.56259430
[77,] 0.40790732 0.8158146 0.59209268
[78,] 0.36488815 0.7297763 0.63511185
[79,] 0.34114065 0.6822813 0.65885935
[80,] 0.32991220 0.6598244 0.67008780
[81,] 0.38048306 0.7609661 0.61951694
[82,] 0.34197563 0.6839513 0.65802437
[83,] 0.36804297 0.7360859 0.63195703
[84,] 0.33234699 0.6646940 0.66765301
[85,] 0.29193758 0.5838752 0.70806242
[86,] 0.26324565 0.5264913 0.73675435
[87,] 0.27008124 0.5401625 0.72991876
[88,] 0.24109891 0.4821978 0.75890109
[89,] 0.27754032 0.5550806 0.72245968
[90,] 0.28491944 0.5698389 0.71508056
[91,] 0.39738422 0.7947684 0.60261578
[92,] 0.35649349 0.7129870 0.64350651
[93,] 0.34774753 0.6954951 0.65225247
[94,] 0.30737578 0.6147516 0.69262422
[95,] 0.27035312 0.5407062 0.72964688
[96,] 0.23974627 0.4794925 0.76025373
[97,] 0.21267137 0.4253427 0.78732863
[98,] 0.31461441 0.6292288 0.68538559
[99,] 0.28910788 0.5782158 0.71089212
[100,] 0.28466101 0.5693220 0.71533899
[101,] 0.25626920 0.5125384 0.74373080
[102,] 0.22903070 0.4580614 0.77096930
[103,] 0.19710638 0.3942128 0.80289362
[104,] 0.16895633 0.3379127 0.83104367
[105,] 0.15050639 0.3010128 0.84949361
[106,] 0.12821030 0.2564206 0.87178970
[107,] 0.11001257 0.2200251 0.88998743
[108,] 0.17331022 0.3466204 0.82668978
[109,] 0.20322313 0.4064463 0.79677687
[110,] 0.36515464 0.7303093 0.63484536
[111,] 0.38511449 0.7702290 0.61488551
[112,] 0.51615413 0.9676917 0.48384587
[113,] 0.47600558 0.9520112 0.52399442
[114,] 0.47453881 0.9490776 0.52546119
[115,] 0.42855173 0.8571035 0.57144827
[116,] 0.39561967 0.7912393 0.60438033
[117,] 0.35542989 0.7108598 0.64457011
[118,] 0.30746671 0.6149334 0.69253329
[119,] 0.37180175 0.7436035 0.62819825
[120,] 0.39212054 0.7842411 0.60787946
[121,] 0.51272628 0.9745474 0.48727372
[122,] 0.46670218 0.9334044 0.53329782
[123,] 0.41409395 0.8281879 0.58590605
[124,] 0.37191647 0.7438329 0.62808353
[125,] 0.32182252 0.6436450 0.67817748
[126,] 0.27945466 0.5589093 0.72054534
[127,] 0.23018987 0.4603797 0.76981013
[128,] 0.19221305 0.3844261 0.80778695
[129,] 0.15223117 0.3044623 0.84776883
[130,] 0.11776889 0.2355378 0.88223111
[131,] 0.30325197 0.6065039 0.69674803
[132,] 0.28259966 0.5651993 0.71740034
[133,] 0.23630829 0.4726166 0.76369171
[134,] 0.18706390 0.3741278 0.81293610
[135,] 0.21405799 0.4281160 0.78594201
[136,] 0.27647577 0.5529515 0.72352423
[137,] 0.21793474 0.4358695 0.78206526
[138,] 0.18368667 0.3673733 0.81631333
[139,] 0.23138298 0.4627660 0.76861702
[140,] 0.19176476 0.3835295 0.80823524
[141,] 0.14729572 0.2945914 0.85270428
[142,] 0.15220794 0.3044159 0.84779206
[143,] 0.11646299 0.2329260 0.88353701
[144,] 0.10205817 0.2041163 0.89794183
[145,] 0.08139011 0.1627802 0.91860989
[146,] 0.48839573 0.9767915 0.51160427
[147,] 0.63117190 0.7376562 0.36882810
[148,] 0.85932950 0.2813410 0.14067050
> postscript(file="/var/www/html/freestat/rcomp/tmp/18pz71289556390.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/28pz71289556390.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/31ygs1289556390.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/41ygs1289556390.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/51ygs1289556390.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
> qqline(mysum$resid)
> grid()
> dev.off()
null device
1
> (myerror <- as.ts(mysum$resid))
Time Series:
Start = 1
End = 159
Frequency = 1
1 2 3 4 5 6
-4.46680608 -5.46163565 4.53549969 -2.46736498 -1.22223843 0.27891446
7 8 9 10 11 12
1.53207612 -3.73484998 0.27032045 1.26745578 -1.49545277 2.00570012
13 14 15 16 17 18
-2.99716455 -2.49601167 -1.49887633 5.50629410 -4.25661445 -1.50747034
19 20 21 22 23 24
5.24167377 2.23077400 -2.26807312 3.22504466 -2.28183756 -2.52465835
25 26 27 28 29 30
-1.52752302 1.71760354 3.97076520 -0.28812580 2.70900953 1.96217119
31 32 33 34 35 36
-2.04069348 -0.56364590 7.70558596 0.19870374 3.69182152 -2.05501682
37 38 39 40 41 42
-2.05788149 1.69126262 2.42433652 0.18151573 3.92262474 0.67176885
43 44 45 46 47 48
2.42091295 5.67407461 -2.58481638 -1.58768105 -0.09456327 -2.08939284
49 50 51 52 53 54
-0.59627506 5.15286905 -4.59396929 -0.60486906 -0.60773373 -3.60256329
55 56 57 58 59 60
2.36243162 -0.61632773 -0.61919240 2.88196048 -2.61688664 0.37221359
61 62 63 64 65 66
-1.38265985 1.87050181 2.11562836 -5.39125386 0.61391658 -1.38894809
67 68 69 70 71 72
-1.64783909 0.34929625 -1.14955087 -1.65643309 0.09271102 -2.91015365
73 74 75 76 77 78
1.58296413 3.07608191 3.83326112 -0.67362110 1.82753178 0.56864079
79 80 81 82 83 84
-2.68221511 1.81893778 -1.19196199 -1.69080911 0.30632622 1.79944400
85 86 87 88 89 90
-2.44337679 4.04974099 0.55089388 -3.70799712 -1.22291444 0.03828232
91 92 93 94 95 96
1.28340887 -3.21543824 -1.46629413 3.77883242 -3.23206735 5.26105043
97 98 99 100 101 102
0.51421209 2.25532109 0.01250030 0.25762686 0.75074464 0.75591508
103 104 105 106 107 108
4.74501530 0.74215063 -3.26071403 0.49646518 -2.01041704 -1.26930804
109 110 111 112 113 114
-0.02418148 0.73299773 -0.02187572 0.21521574 -6.03564016 2.96149518
115 116 117 118 119 120
-7.04136949 2.46781850 4.20892750 -2.28991962 1.45118939 -1.79163140
121 122 123 124 125 126
-2.79449607 -0.05338707 -1.06428684 -5.30710763 -4.06198107 4.18314548
127 128 129 130 131 132
0.18831592 -1.82258385 0.42254270 -1.82831319 -2.08720419 -0.83404253
133 134 135 136 137 138
0.41911913 -0.83173676 -0.84263653 5.65048125 0.65565168 -0.60323931
139 140 141 142 143 144
-1.60610398 -4.61700375 -4.61183332 0.63329324 2.11034081 -3.61239222
145 146 147 148 149 150
1.87269046 -0.37013033 3.37097867 -1.12786844 -1.63475066 -0.38962411
151 152 153 154 155 156
-2.64048000 3.10866411 8.85780822 2.60695232 3.34002622 1.60122299
157 158 159
-1.90565923 0.58745855 0.07254122
> postscript(file="/var/www/html/freestat/rcomp/tmp/6uqfd1289556390.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 159
Frequency = 1
lag(myerror, k = 1) myerror
0 -4.46680608 NA
1 -5.46163565 -4.46680608
2 4.53549969 -5.46163565
3 -2.46736498 4.53549969
4 -1.22223843 -2.46736498
5 0.27891446 -1.22223843
6 1.53207612 0.27891446
7 -3.73484998 1.53207612
8 0.27032045 -3.73484998
9 1.26745578 0.27032045
10 -1.49545277 1.26745578
11 2.00570012 -1.49545277
12 -2.99716455 2.00570012
13 -2.49601167 -2.99716455
14 -1.49887633 -2.49601167
15 5.50629410 -1.49887633
16 -4.25661445 5.50629410
17 -1.50747034 -4.25661445
18 5.24167377 -1.50747034
19 2.23077400 5.24167377
20 -2.26807312 2.23077400
21 3.22504466 -2.26807312
22 -2.28183756 3.22504466
23 -2.52465835 -2.28183756
24 -1.52752302 -2.52465835
25 1.71760354 -1.52752302
26 3.97076520 1.71760354
27 -0.28812580 3.97076520
28 2.70900953 -0.28812580
29 1.96217119 2.70900953
30 -2.04069348 1.96217119
31 -0.56364590 -2.04069348
32 7.70558596 -0.56364590
33 0.19870374 7.70558596
34 3.69182152 0.19870374
35 -2.05501682 3.69182152
36 -2.05788149 -2.05501682
37 1.69126262 -2.05788149
38 2.42433652 1.69126262
39 0.18151573 2.42433652
40 3.92262474 0.18151573
41 0.67176885 3.92262474
42 2.42091295 0.67176885
43 5.67407461 2.42091295
44 -2.58481638 5.67407461
45 -1.58768105 -2.58481638
46 -0.09456327 -1.58768105
47 -2.08939284 -0.09456327
48 -0.59627506 -2.08939284
49 5.15286905 -0.59627506
50 -4.59396929 5.15286905
51 -0.60486906 -4.59396929
52 -0.60773373 -0.60486906
53 -3.60256329 -0.60773373
54 2.36243162 -3.60256329
55 -0.61632773 2.36243162
56 -0.61919240 -0.61632773
57 2.88196048 -0.61919240
58 -2.61688664 2.88196048
59 0.37221359 -2.61688664
60 -1.38265985 0.37221359
61 1.87050181 -1.38265985
62 2.11562836 1.87050181
63 -5.39125386 2.11562836
64 0.61391658 -5.39125386
65 -1.38894809 0.61391658
66 -1.64783909 -1.38894809
67 0.34929625 -1.64783909
68 -1.14955087 0.34929625
69 -1.65643309 -1.14955087
70 0.09271102 -1.65643309
71 -2.91015365 0.09271102
72 1.58296413 -2.91015365
73 3.07608191 1.58296413
74 3.83326112 3.07608191
75 -0.67362110 3.83326112
76 1.82753178 -0.67362110
77 0.56864079 1.82753178
78 -2.68221511 0.56864079
79 1.81893778 -2.68221511
80 -1.19196199 1.81893778
81 -1.69080911 -1.19196199
82 0.30632622 -1.69080911
83 1.79944400 0.30632622
84 -2.44337679 1.79944400
85 4.04974099 -2.44337679
86 0.55089388 4.04974099
87 -3.70799712 0.55089388
88 -1.22291444 -3.70799712
89 0.03828232 -1.22291444
90 1.28340887 0.03828232
91 -3.21543824 1.28340887
92 -1.46629413 -3.21543824
93 3.77883242 -1.46629413
94 -3.23206735 3.77883242
95 5.26105043 -3.23206735
96 0.51421209 5.26105043
97 2.25532109 0.51421209
98 0.01250030 2.25532109
99 0.25762686 0.01250030
100 0.75074464 0.25762686
101 0.75591508 0.75074464
102 4.74501530 0.75591508
103 0.74215063 4.74501530
104 -3.26071403 0.74215063
105 0.49646518 -3.26071403
106 -2.01041704 0.49646518
107 -1.26930804 -2.01041704
108 -0.02418148 -1.26930804
109 0.73299773 -0.02418148
110 -0.02187572 0.73299773
111 0.21521574 -0.02187572
112 -6.03564016 0.21521574
113 2.96149518 -6.03564016
114 -7.04136949 2.96149518
115 2.46781850 -7.04136949
116 4.20892750 2.46781850
117 -2.28991962 4.20892750
118 1.45118939 -2.28991962
119 -1.79163140 1.45118939
120 -2.79449607 -1.79163140
121 -0.05338707 -2.79449607
122 -1.06428684 -0.05338707
123 -5.30710763 -1.06428684
124 -4.06198107 -5.30710763
125 4.18314548 -4.06198107
126 0.18831592 4.18314548
127 -1.82258385 0.18831592
128 0.42254270 -1.82258385
129 -1.82831319 0.42254270
130 -2.08720419 -1.82831319
131 -0.83404253 -2.08720419
132 0.41911913 -0.83404253
133 -0.83173676 0.41911913
134 -0.84263653 -0.83173676
135 5.65048125 -0.84263653
136 0.65565168 5.65048125
137 -0.60323931 0.65565168
138 -1.60610398 -0.60323931
139 -4.61700375 -1.60610398
140 -4.61183332 -4.61700375
141 0.63329324 -4.61183332
142 2.11034081 0.63329324
143 -3.61239222 2.11034081
144 1.87269046 -3.61239222
145 -0.37013033 1.87269046
146 3.37097867 -0.37013033
147 -1.12786844 3.37097867
148 -1.63475066 -1.12786844
149 -0.38962411 -1.63475066
150 -2.64048000 -0.38962411
151 3.10866411 -2.64048000
152 8.85780822 3.10866411
153 2.60695232 8.85780822
154 3.34002622 2.60695232
155 1.60122299 3.34002622
156 -1.90565923 1.60122299
157 0.58745855 -1.90565923
158 0.07254122 0.58745855
159 NA 0.07254122
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -5.46163565 -4.46680608
[2,] 4.53549969 -5.46163565
[3,] -2.46736498 4.53549969
[4,] -1.22223843 -2.46736498
[5,] 0.27891446 -1.22223843
[6,] 1.53207612 0.27891446
[7,] -3.73484998 1.53207612
[8,] 0.27032045 -3.73484998
[9,] 1.26745578 0.27032045
[10,] -1.49545277 1.26745578
[11,] 2.00570012 -1.49545277
[12,] -2.99716455 2.00570012
[13,] -2.49601167 -2.99716455
[14,] -1.49887633 -2.49601167
[15,] 5.50629410 -1.49887633
[16,] -4.25661445 5.50629410
[17,] -1.50747034 -4.25661445
[18,] 5.24167377 -1.50747034
[19,] 2.23077400 5.24167377
[20,] -2.26807312 2.23077400
[21,] 3.22504466 -2.26807312
[22,] -2.28183756 3.22504466
[23,] -2.52465835 -2.28183756
[24,] -1.52752302 -2.52465835
[25,] 1.71760354 -1.52752302
[26,] 3.97076520 1.71760354
[27,] -0.28812580 3.97076520
[28,] 2.70900953 -0.28812580
[29,] 1.96217119 2.70900953
[30,] -2.04069348 1.96217119
[31,] -0.56364590 -2.04069348
[32,] 7.70558596 -0.56364590
[33,] 0.19870374 7.70558596
[34,] 3.69182152 0.19870374
[35,] -2.05501682 3.69182152
[36,] -2.05788149 -2.05501682
[37,] 1.69126262 -2.05788149
[38,] 2.42433652 1.69126262
[39,] 0.18151573 2.42433652
[40,] 3.92262474 0.18151573
[41,] 0.67176885 3.92262474
[42,] 2.42091295 0.67176885
[43,] 5.67407461 2.42091295
[44,] -2.58481638 5.67407461
[45,] -1.58768105 -2.58481638
[46,] -0.09456327 -1.58768105
[47,] -2.08939284 -0.09456327
[48,] -0.59627506 -2.08939284
[49,] 5.15286905 -0.59627506
[50,] -4.59396929 5.15286905
[51,] -0.60486906 -4.59396929
[52,] -0.60773373 -0.60486906
[53,] -3.60256329 -0.60773373
[54,] 2.36243162 -3.60256329
[55,] -0.61632773 2.36243162
[56,] -0.61919240 -0.61632773
[57,] 2.88196048 -0.61919240
[58,] -2.61688664 2.88196048
[59,] 0.37221359 -2.61688664
[60,] -1.38265985 0.37221359
[61,] 1.87050181 -1.38265985
[62,] 2.11562836 1.87050181
[63,] -5.39125386 2.11562836
[64,] 0.61391658 -5.39125386
[65,] -1.38894809 0.61391658
[66,] -1.64783909 -1.38894809
[67,] 0.34929625 -1.64783909
[68,] -1.14955087 0.34929625
[69,] -1.65643309 -1.14955087
[70,] 0.09271102 -1.65643309
[71,] -2.91015365 0.09271102
[72,] 1.58296413 -2.91015365
[73,] 3.07608191 1.58296413
[74,] 3.83326112 3.07608191
[75,] -0.67362110 3.83326112
[76,] 1.82753178 -0.67362110
[77,] 0.56864079 1.82753178
[78,] -2.68221511 0.56864079
[79,] 1.81893778 -2.68221511
[80,] -1.19196199 1.81893778
[81,] -1.69080911 -1.19196199
[82,] 0.30632622 -1.69080911
[83,] 1.79944400 0.30632622
[84,] -2.44337679 1.79944400
[85,] 4.04974099 -2.44337679
[86,] 0.55089388 4.04974099
[87,] -3.70799712 0.55089388
[88,] -1.22291444 -3.70799712
[89,] 0.03828232 -1.22291444
[90,] 1.28340887 0.03828232
[91,] -3.21543824 1.28340887
[92,] -1.46629413 -3.21543824
[93,] 3.77883242 -1.46629413
[94,] -3.23206735 3.77883242
[95,] 5.26105043 -3.23206735
[96,] 0.51421209 5.26105043
[97,] 2.25532109 0.51421209
[98,] 0.01250030 2.25532109
[99,] 0.25762686 0.01250030
[100,] 0.75074464 0.25762686
[101,] 0.75591508 0.75074464
[102,] 4.74501530 0.75591508
[103,] 0.74215063 4.74501530
[104,] -3.26071403 0.74215063
[105,] 0.49646518 -3.26071403
[106,] -2.01041704 0.49646518
[107,] -1.26930804 -2.01041704
[108,] -0.02418148 -1.26930804
[109,] 0.73299773 -0.02418148
[110,] -0.02187572 0.73299773
[111,] 0.21521574 -0.02187572
[112,] -6.03564016 0.21521574
[113,] 2.96149518 -6.03564016
[114,] -7.04136949 2.96149518
[115,] 2.46781850 -7.04136949
[116,] 4.20892750 2.46781850
[117,] -2.28991962 4.20892750
[118,] 1.45118939 -2.28991962
[119,] -1.79163140 1.45118939
[120,] -2.79449607 -1.79163140
[121,] -0.05338707 -2.79449607
[122,] -1.06428684 -0.05338707
[123,] -5.30710763 -1.06428684
[124,] -4.06198107 -5.30710763
[125,] 4.18314548 -4.06198107
[126,] 0.18831592 4.18314548
[127,] -1.82258385 0.18831592
[128,] 0.42254270 -1.82258385
[129,] -1.82831319 0.42254270
[130,] -2.08720419 -1.82831319
[131,] -0.83404253 -2.08720419
[132,] 0.41911913 -0.83404253
[133,] -0.83173676 0.41911913
[134,] -0.84263653 -0.83173676
[135,] 5.65048125 -0.84263653
[136,] 0.65565168 5.65048125
[137,] -0.60323931 0.65565168
[138,] -1.60610398 -0.60323931
[139,] -4.61700375 -1.60610398
[140,] -4.61183332 -4.61700375
[141,] 0.63329324 -4.61183332
[142,] 2.11034081 0.63329324
[143,] -3.61239222 2.11034081
[144,] 1.87269046 -3.61239222
[145,] -0.37013033 1.87269046
[146,] 3.37097867 -0.37013033
[147,] -1.12786844 3.37097867
[148,] -1.63475066 -1.12786844
[149,] -0.38962411 -1.63475066
[150,] -2.64048000 -0.38962411
[151,] 3.10866411 -2.64048000
[152,] 8.85780822 3.10866411
[153,] 2.60695232 8.85780822
[154,] 3.34002622 2.60695232
[155,] 1.60122299 3.34002622
[156,] -1.90565923 1.60122299
[157,] 0.58745855 -1.90565923
[158,] 0.07254122 0.58745855
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -5.46163565 -4.46680608
2 4.53549969 -5.46163565
3 -2.46736498 4.53549969
4 -1.22223843 -2.46736498
5 0.27891446 -1.22223843
6 1.53207612 0.27891446
7 -3.73484998 1.53207612
8 0.27032045 -3.73484998
9 1.26745578 0.27032045
10 -1.49545277 1.26745578
11 2.00570012 -1.49545277
12 -2.99716455 2.00570012
13 -2.49601167 -2.99716455
14 -1.49887633 -2.49601167
15 5.50629410 -1.49887633
16 -4.25661445 5.50629410
17 -1.50747034 -4.25661445
18 5.24167377 -1.50747034
19 2.23077400 5.24167377
20 -2.26807312 2.23077400
21 3.22504466 -2.26807312
22 -2.28183756 3.22504466
23 -2.52465835 -2.28183756
24 -1.52752302 -2.52465835
25 1.71760354 -1.52752302
26 3.97076520 1.71760354
27 -0.28812580 3.97076520
28 2.70900953 -0.28812580
29 1.96217119 2.70900953
30 -2.04069348 1.96217119
31 -0.56364590 -2.04069348
32 7.70558596 -0.56364590
33 0.19870374 7.70558596
34 3.69182152 0.19870374
35 -2.05501682 3.69182152
36 -2.05788149 -2.05501682
37 1.69126262 -2.05788149
38 2.42433652 1.69126262
39 0.18151573 2.42433652
40 3.92262474 0.18151573
41 0.67176885 3.92262474
42 2.42091295 0.67176885
43 5.67407461 2.42091295
44 -2.58481638 5.67407461
45 -1.58768105 -2.58481638
46 -0.09456327 -1.58768105
47 -2.08939284 -0.09456327
48 -0.59627506 -2.08939284
49 5.15286905 -0.59627506
50 -4.59396929 5.15286905
51 -0.60486906 -4.59396929
52 -0.60773373 -0.60486906
53 -3.60256329 -0.60773373
54 2.36243162 -3.60256329
55 -0.61632773 2.36243162
56 -0.61919240 -0.61632773
57 2.88196048 -0.61919240
58 -2.61688664 2.88196048
59 0.37221359 -2.61688664
60 -1.38265985 0.37221359
61 1.87050181 -1.38265985
62 2.11562836 1.87050181
63 -5.39125386 2.11562836
64 0.61391658 -5.39125386
65 -1.38894809 0.61391658
66 -1.64783909 -1.38894809
67 0.34929625 -1.64783909
68 -1.14955087 0.34929625
69 -1.65643309 -1.14955087
70 0.09271102 -1.65643309
71 -2.91015365 0.09271102
72 1.58296413 -2.91015365
73 3.07608191 1.58296413
74 3.83326112 3.07608191
75 -0.67362110 3.83326112
76 1.82753178 -0.67362110
77 0.56864079 1.82753178
78 -2.68221511 0.56864079
79 1.81893778 -2.68221511
80 -1.19196199 1.81893778
81 -1.69080911 -1.19196199
82 0.30632622 -1.69080911
83 1.79944400 0.30632622
84 -2.44337679 1.79944400
85 4.04974099 -2.44337679
86 0.55089388 4.04974099
87 -3.70799712 0.55089388
88 -1.22291444 -3.70799712
89 0.03828232 -1.22291444
90 1.28340887 0.03828232
91 -3.21543824 1.28340887
92 -1.46629413 -3.21543824
93 3.77883242 -1.46629413
94 -3.23206735 3.77883242
95 5.26105043 -3.23206735
96 0.51421209 5.26105043
97 2.25532109 0.51421209
98 0.01250030 2.25532109
99 0.25762686 0.01250030
100 0.75074464 0.25762686
101 0.75591508 0.75074464
102 4.74501530 0.75591508
103 0.74215063 4.74501530
104 -3.26071403 0.74215063
105 0.49646518 -3.26071403
106 -2.01041704 0.49646518
107 -1.26930804 -2.01041704
108 -0.02418148 -1.26930804
109 0.73299773 -0.02418148
110 -0.02187572 0.73299773
111 0.21521574 -0.02187572
112 -6.03564016 0.21521574
113 2.96149518 -6.03564016
114 -7.04136949 2.96149518
115 2.46781850 -7.04136949
116 4.20892750 2.46781850
117 -2.28991962 4.20892750
118 1.45118939 -2.28991962
119 -1.79163140 1.45118939
120 -2.79449607 -1.79163140
121 -0.05338707 -2.79449607
122 -1.06428684 -0.05338707
123 -5.30710763 -1.06428684
124 -4.06198107 -5.30710763
125 4.18314548 -4.06198107
126 0.18831592 4.18314548
127 -1.82258385 0.18831592
128 0.42254270 -1.82258385
129 -1.82831319 0.42254270
130 -2.08720419 -1.82831319
131 -0.83404253 -2.08720419
132 0.41911913 -0.83404253
133 -0.83173676 0.41911913
134 -0.84263653 -0.83173676
135 5.65048125 -0.84263653
136 0.65565168 5.65048125
137 -0.60323931 0.65565168
138 -1.60610398 -0.60323931
139 -4.61700375 -1.60610398
140 -4.61183332 -4.61700375
141 0.63329324 -4.61183332
142 2.11034081 0.63329324
143 -3.61239222 2.11034081
144 1.87269046 -3.61239222
145 -0.37013033 1.87269046
146 3.37097867 -0.37013033
147 -1.12786844 3.37097867
148 -1.63475066 -1.12786844
149 -0.38962411 -1.63475066
150 -2.64048000 -0.38962411
151 3.10866411 -2.64048000
152 8.85780822 3.10866411
153 2.60695232 8.85780822
154 3.34002622 2.60695232
155 1.60122299 3.34002622
156 -1.90565923 1.60122299
157 0.58745855 -1.90565923
158 0.07254122 0.58745855
> 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/74hef1289556390.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/84hef1289556390.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/94hef1289556390.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/www/html/freestat/rcomp/tmp/10x8di1289556390.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/www/html/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/11irco1289556390.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/12m9tu1289556390.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/13i18l1289556390.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/143k791289556390.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/1572ox1289556390.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/16s3ml1289556390.tab")
+ }
>
> try(system("convert tmp/18pz71289556390.ps tmp/18pz71289556390.png",intern=TRUE))
character(0)
> try(system("convert tmp/28pz71289556390.ps tmp/28pz71289556390.png",intern=TRUE))
character(0)
> try(system("convert tmp/31ygs1289556390.ps tmp/31ygs1289556390.png",intern=TRUE))
character(0)
> try(system("convert tmp/41ygs1289556390.ps tmp/41ygs1289556390.png",intern=TRUE))
character(0)
> try(system("convert tmp/51ygs1289556390.ps tmp/51ygs1289556390.png",intern=TRUE))
character(0)
> try(system("convert tmp/6uqfd1289556390.ps tmp/6uqfd1289556390.png",intern=TRUE))
character(0)
> try(system("convert tmp/74hef1289556390.ps tmp/74hef1289556390.png",intern=TRUE))
character(0)
> try(system("convert tmp/84hef1289556390.ps tmp/84hef1289556390.png",intern=TRUE))
character(0)
> try(system("convert tmp/94hef1289556390.ps tmp/94hef1289556390.png",intern=TRUE))
character(0)
> try(system("convert tmp/10x8di1289556390.ps tmp/10x8di1289556390.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.269 2.627 5.603