R version 2.9.0 (2009-04-17)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(7
+ ,7
+ ,1
+ ,7
+ ,7
+ ,1
+ ,7
+ ,7
+ ,1
+ ,5
+ ,6
+ ,1
+ ,5
+ ,5
+ ,1
+ ,5
+ ,5
+ ,1
+ ,6
+ ,6
+ ,2
+ ,5
+ ,6
+ ,1
+ ,4
+ ,5
+ ,1
+ ,4
+ ,5
+ ,2
+ ,5
+ ,6
+ ,2
+ ,5
+ ,6
+ ,2
+ ,5
+ ,6
+ ,2
+ ,5
+ ,6
+ ,2
+ ,5
+ ,6
+ ,1
+ ,6
+ ,7
+ ,1
+ ,7
+ ,5
+ ,1
+ ,6
+ ,7
+ ,1
+ ,7
+ ,7
+ ,1
+ ,7
+ ,7
+ ,1
+ ,7
+ ,6
+ ,2
+ ,6
+ ,7
+ ,1
+ ,5
+ ,6
+ ,1
+ ,5
+ ,7
+ ,1
+ ,6
+ ,7
+ ,1
+ ,3
+ ,7
+ ,2
+ ,7
+ ,7
+ ,1
+ ,6
+ ,6
+ ,1
+ ,6
+ ,6
+ ,1
+ ,5
+ ,6
+ ,1
+ ,5
+ ,4
+ ,1
+ ,7
+ ,7
+ ,1
+ ,4
+ ,7
+ ,2
+ ,5
+ ,6
+ ,1
+ ,6
+ ,7
+ ,1
+ ,6
+ ,7
+ ,2
+ ,4
+ ,6
+ ,1
+ ,5
+ ,6
+ ,1
+ ,4
+ ,5
+ ,1
+ ,6
+ ,7
+ ,1
+ ,3
+ ,6
+ ,1
+ ,6
+ ,6
+ ,1
+ ,6
+ ,6
+ ,1
+ ,7
+ ,7
+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'
+ ,'GENDER')
+ ,1:164))
> y <- array(NA,dim=c(9,164),dimnames=list(c('Q1_2','Q1_3','Q1_5','Q1_7','Q1_8','Q1_12','Q1_16','Q1_22','GENDER'),1:164))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '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 ='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7 1 5 7 5 6 7 1
146 4 5 1 6 6 1 5 5 1
147 4 6 2 5 7 3 6 7 2
148 7 7 1 6 6 2 7 5 2
149 6 6 1 6 5 1 5 6 2
150 5 5 2 6 4 3 5 5 2
151 5 6 1 5 7 2 5 7 1
152 5 7 1 6 7 2 6 7 1
153 7 6 1 7 5 1 7 5 1
154 6 7 1 7 7 1 7 7 2
155 6 7 1 6 6 1 6 6 2
156 5 6 2 6 5 1 5 6 2
157 2 6 2 6 6 2 6 6 1
158 4 4 4 7 7 4 4 7 1
159 6 7 1 6 7 3 6 6 1
160 5 6 1 5 6 1 6 5 1
161 5 4 1 5 5 1 4 5 2
162 5 5 1 5 6 1 5 5 1
163 4 6 1 4 5 1 5 7 1
164 4 5 5 4 6 4 5 7 1
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Q1_3 Q1_5 Q1_7 Q1_8 Q1_12
1.4798970 0.2115363 -0.2269592 0.1422726 -0.1732516 0.0994301
Q1_16 Q1_22 GENDER
0.5356705 0.0009568 -0.0478596
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-4.10570 -0.42673 0.07607 0.60158 2.52342
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.4798970 0.7848610 1.886 0.06125 .
Q1_3 0.2115363 0.0808263 2.617 0.00976 **
Q1_5 -0.2269592 0.1183893 -1.917 0.05709 .
Q1_7 0.1422726 0.0743753 1.913 0.05763 .
Q1_8 -0.1732516 0.1151316 -1.505 0.13443
Q1_12 0.0994301 0.0985048 1.009 0.31438
Q1_16 0.5356705 0.0868789 6.166 5.97e-09 ***
Q1_22 0.0009568 0.1001314 0.010 0.99239
GENDER -0.0478596 0.1655715 -0.289 0.77293
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.9905 on 153 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.3481, Adjusted R-squared: 0.314
F-statistic: 10.21 on 8 and 153 DF, p-value: 2.238e-11
> 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.11897271 0.23794543 0.881027285
[2,] 0.32917983 0.65835965 0.670820174
[3,] 0.20188379 0.40376757 0.798116214
[4,] 0.18831289 0.37662578 0.811687110
[5,] 0.13744754 0.27489507 0.862552463
[6,] 0.17592063 0.35184126 0.824079368
[7,] 0.11780554 0.23561108 0.882194460
[8,] 0.86078093 0.27843814 0.139219068
[9,] 0.82141195 0.35717610 0.178588050
[10,] 0.77377238 0.45245523 0.226227617
[11,] 0.76137843 0.47724314 0.238621568
[12,] 0.69719845 0.60560309 0.302801547
[13,] 0.68991467 0.62017066 0.310085331
[14,] 0.64022056 0.71955888 0.359779442
[15,] 0.57936154 0.84127692 0.420638459
[16,] 0.50879833 0.98240334 0.491201672
[17,] 0.44757269 0.89514538 0.552427312
[18,] 0.63071409 0.73857182 0.369285910
[19,] 0.57003791 0.85992419 0.429962093
[20,] 0.53953575 0.92092851 0.460464253
[21,] 0.53875095 0.92249810 0.461249050
[22,] 0.48290388 0.96580776 0.517096119
[23,] 0.45242266 0.90484532 0.547577339
[24,] 0.42640622 0.85281244 0.573593780
[25,] 0.36713888 0.73427777 0.632861117
[26,] 0.33082386 0.66164771 0.669176144
[27,] 0.29586380 0.59172759 0.704136203
[28,] 0.26478817 0.52957633 0.735211833
[29,] 0.22005026 0.44010052 0.779949740
[30,] 0.18154359 0.36308718 0.818456411
[31,] 0.14855352 0.29710704 0.851446480
[32,] 0.11804326 0.23608652 0.881956739
[33,] 0.24904574 0.49809149 0.750954257
[34,] 0.26406923 0.52813846 0.735930768
[35,] 0.33419944 0.66839888 0.665800560
[36,] 0.28998040 0.57996081 0.710019596
[37,] 0.28473814 0.56947628 0.715261859
[38,] 0.54297900 0.91404200 0.457020999
[39,] 0.50415277 0.99169446 0.495847230
[40,] 0.57293076 0.85413848 0.427069238
[41,] 0.56163905 0.87672189 0.438360947
[42,] 0.65669326 0.68661348 0.343306742
[43,] 0.61389168 0.77221665 0.386108323
[44,] 0.61802936 0.76394127 0.381970637
[45,] 0.56983261 0.86033478 0.430167392
[46,] 0.52189627 0.95620745 0.478103726
[47,] 0.96794401 0.06411199 0.032055994
[48,] 0.96016103 0.07967794 0.039838972
[49,] 0.99141156 0.01717687 0.008588435
[50,] 0.98937896 0.02124207 0.010621036
[51,] 0.98548932 0.02902136 0.014510678
[52,] 0.98870944 0.02258111 0.011290556
[53,] 0.98546680 0.02906640 0.014533198
[54,] 0.98282433 0.03435135 0.017175673
[55,] 0.97799059 0.04401882 0.022009412
[56,] 0.97149019 0.05701961 0.028509806
[57,] 0.96307520 0.07384960 0.036924800
[58,] 0.97944105 0.04111790 0.020558949
[59,] 0.97289001 0.05421999 0.027109994
[60,] 0.96760112 0.06479775 0.032398877
[61,] 0.96176551 0.07646898 0.038234492
[62,] 0.95130239 0.09739521 0.048697606
[63,] 0.93848322 0.12303356 0.061516781
[64,] 0.92471723 0.15056554 0.075282771
[65,] 0.90641306 0.18717388 0.093586938
[66,] 0.89809811 0.20380377 0.101901887
[67,] 0.90936588 0.18126824 0.090634121
[68,] 0.89743655 0.20512690 0.102563451
[69,] 0.92210822 0.15578355 0.077891775
[70,] 0.91993823 0.16012353 0.080061766
[71,] 0.90813528 0.18372944 0.091864721
[72,] 0.90689622 0.18620756 0.093103782
[73,] 0.96036481 0.07927037 0.039635187
[74,] 0.97187276 0.05625447 0.028127237
[75,] 0.96490148 0.07019703 0.035098517
[76,] 0.95456689 0.09086623 0.045433113
[77,] 0.95195080 0.09609840 0.048049201
[78,] 0.93879690 0.12240620 0.061203102
[79,] 0.93871684 0.12256632 0.061283160
[80,] 0.94628724 0.10742551 0.053712756
[81,] 0.93249398 0.13501204 0.067506021
[82,] 0.91987247 0.16025506 0.080127529
[83,] 0.90612700 0.18774600 0.093872999
[84,] 0.88504377 0.22991246 0.114956232
[85,] 0.86492817 0.27014367 0.135071835
[86,] 0.83685962 0.32628076 0.163140379
[87,] 0.85873135 0.28253729 0.141268647
[88,] 0.82970484 0.34059032 0.170295161
[89,] 0.85319976 0.29360048 0.146800240
[90,] 0.82304313 0.35391375 0.176956874
[91,] 0.81663832 0.36672337 0.183361683
[92,] 0.79339685 0.41320630 0.206603148
[93,] 0.75588820 0.48822360 0.244111801
[94,] 0.77243273 0.45513454 0.227567270
[95,] 0.76111808 0.47776383 0.238881915
[96,] 0.78920845 0.42158311 0.210791554
[97,] 0.77021997 0.45956006 0.229780028
[98,] 0.73714948 0.52570103 0.262850516
[99,] 0.75444856 0.49110289 0.245551443
[100,] 0.71975917 0.56048167 0.280240833
[101,] 0.68103890 0.63792221 0.318961105
[102,] 0.64053523 0.71892954 0.359464770
[103,] 0.59746978 0.80506044 0.402530221
[104,] 0.55088258 0.89823484 0.449117419
[105,] 0.65380276 0.69239448 0.346197239
[106,] 0.60597097 0.78805807 0.394029035
[107,] 0.58698878 0.82602244 0.413011218
[108,] 0.54905920 0.90188160 0.450940800
[109,] 0.52102206 0.95795588 0.478977938
[110,] 0.46890573 0.93781145 0.531094274
[111,] 0.50607757 0.98784486 0.493922432
[112,] 0.48916730 0.97833461 0.510832697
[113,] 0.44180369 0.88360739 0.558196306
[114,] 0.63472149 0.73055701 0.365278507
[115,] 0.60947187 0.78105625 0.390528126
[116,] 0.55870934 0.88258131 0.441290655
[117,] 0.51277911 0.97444177 0.487220886
[118,] 0.46146740 0.92293480 0.538532600
[119,] 0.45279701 0.90559401 0.547202995
[120,] 0.39032441 0.78064881 0.609675594
[121,] 0.33610305 0.67220609 0.663896953
[122,] 0.33977643 0.67955286 0.660223569
[123,] 0.29887224 0.59774448 0.701127761
[124,] 0.27984379 0.55968757 0.720156215
[125,] 0.37504950 0.75009900 0.624950499
[126,] 0.33152865 0.66305731 0.668471347
[127,] 0.26929259 0.53858518 0.730707412
[128,] 0.21261893 0.42523786 0.787381068
[129,] 0.19002779 0.38005558 0.809972211
[130,] 0.22873327 0.45746653 0.771266733
[131,] 0.17053929 0.34107858 0.829460712
[132,] 0.16584744 0.33169488 0.834152558
[133,] 0.15635149 0.31270299 0.843648507
[134,] 0.15954952 0.31909904 0.840450479
[135,] 0.10991653 0.21983307 0.890083466
[136,] 0.08241435 0.16482871 0.917585645
[137,] 0.06109856 0.12219713 0.938901437
[138,] 0.03697414 0.07394829 0.963025857
[139,] 0.01763888 0.03527776 0.982361120
[140,] 0.57973474 0.84053053 0.420265263
[141,] 0.50621454 0.98757092 0.493785460
> postscript(file="/var/www/html/rcomp/tmp/1lcrd1290553729.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)
Warning message:
In x[, 1] - mysum$resid :
longer object length is not a multiple of shorter object length
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/2elqg1290553729.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/3elqg1290553729.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/4pcpj1290553729.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/5pcpj1290553729.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 = 162
Frequency = 1
1 2 3 4 5 6
0.675199908 -0.101967297 1.833913983 -0.542747406 0.197856698 -0.135632808
7 8 9 10 11 12
0.724016272 0.857834465 0.144860300 0.928054912 0.964679772 -0.387461124
13 14 15 16 17 18
-0.393045251 0.607665998 -0.113263796 -0.389384224 -1.083179828 1.258729966
19 20 21 23 24 25
-2.741270034 -0.306834787 -0.882871586 -1.142103776 0.085478378 -2.141352941
26 27 28 29 30 31
0.462604900 0.462604900 0.353915989 0.045178194 2.070327526 0.297971439
32 33 34 35 36 37
-0.427058224 0.162156570 -0.256073160 -1.168619093 1.104400448 -0.041922879
38 39 40 41 42 43
0.080859180 0.723059507 -0.425753998 -0.111186561 0.241501879 -0.086688530
44 45 46 47 48 49
-0.336172317 1.901601354 1.381983346 0.909193195 0.148397199 1.197856698
50 51 52 53 54 55
-1.961631800 -0.265516079 -1.141556232 1.185036356 -1.668371215 0.401959344
56 57 58 59 60 61
0.797645876 0.071284290 0.211827131 -4.105704381 0.331834386 2.523422327
62 63 64 65 66 67
-0.194954026 -0.001724641 1.258628019 -0.356960909 0.622105601 0.340813990
68 69 70 71 72 73
-0.245188511 0.101306499 -1.856807714 0.031086052 0.612538876 -0.659186010
74 75 76 77 78 79
0.021229506 0.111440304 -0.369503984 -0.015695074 0.695927126 1.258729966
80 81 82 83 84 85
-0.642880628 -1.447321787 0.929011676 0.603920750 -0.961424457 -2.069807904
86 87 88 89 90 91
1.509507735 0.322976600 0.125343508 -0.865550772 0.054627320 -0.859553974
92 93 94 95 96 97
1.259339269 0.155239619 0.354099744 -0.520851691 -0.253459175 0.441200817
98 99 100 101 102 103
0.194255620 1.338333383 0.116789388 -1.397036015 -0.091435642 0.873722536
104 105 106 107 108 109
-0.607615547 0.015155985 -1.004604505 -0.715042229 1.213412733 -0.897982251
110 111 112 113 114 115
0.392384453 -1.324800092 0.322976600 -0.063682588 -0.228188135 0.210870366
116 117 118 119 120 122
0.011267571 1.368483507 -0.213496488 0.984989605 -0.895809528 -0.732879620
123 124 125 126 127 128
0.298243525 1.670233231 0.675199908 -0.545289773 1.634899723 0.721849466
129 130 131 132 133 134
0.115214885 0.440244053 0.029750074 -1.047438891 0.556392731 -0.639297605
135 136 137 138 139 140
0.733255071 0.705028791 0.455517639 -1.545146712 0.401959344 -0.306834787
141 142 143 144 145 146
-0.603241460 -0.124016474 -1.743964333 -0.205947037 1.097695344 -0.859452027
147 148 149 150 151 152
-1.217089401 0.594564000 0.802662924 -0.129996493 0.143192286 -0.746287083
153 154 155 156 157 158
0.542146558 -0.276940493 0.228707756 0.029622159 -3.480086374 0.299407689
159 160 161 162 163 164
0.155239619 -0.464386168 0.904635353 0.282820586 -0.961608212 0.032726423
> postscript(file="/var/www/html/rcomp/tmp/6pcpj1290553729.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 = 162
Frequency = 1
lag(myerror, k = 1) myerror
0 0.675199908 NA
1 -0.101967297 0.675199908
2 1.833913983 -0.101967297
3 -0.542747406 1.833913983
4 0.197856698 -0.542747406
5 -0.135632808 0.197856698
6 0.724016272 -0.135632808
7 0.857834465 0.724016272
8 0.144860300 0.857834465
9 0.928054912 0.144860300
10 0.964679772 0.928054912
11 -0.387461124 0.964679772
12 -0.393045251 -0.387461124
13 0.607665998 -0.393045251
14 -0.113263796 0.607665998
15 -0.389384224 -0.113263796
16 -1.083179828 -0.389384224
17 1.258729966 -1.083179828
18 -2.741270034 1.258729966
19 -0.306834787 -2.741270034
20 -0.882871586 -0.306834787
21 -1.142103776 -0.882871586
22 0.085478378 -1.142103776
23 -2.141352941 0.085478378
24 0.462604900 -2.141352941
25 0.462604900 0.462604900
26 0.353915989 0.462604900
27 0.045178194 0.353915989
28 2.070327526 0.045178194
29 0.297971439 2.070327526
30 -0.427058224 0.297971439
31 0.162156570 -0.427058224
32 -0.256073160 0.162156570
33 -1.168619093 -0.256073160
34 1.104400448 -1.168619093
35 -0.041922879 1.104400448
36 0.080859180 -0.041922879
37 0.723059507 0.080859180
38 -0.425753998 0.723059507
39 -0.111186561 -0.425753998
40 0.241501879 -0.111186561
41 -0.086688530 0.241501879
42 -0.336172317 -0.086688530
43 1.901601354 -0.336172317
44 1.381983346 1.901601354
45 0.909193195 1.381983346
46 0.148397199 0.909193195
47 1.197856698 0.148397199
48 -1.961631800 1.197856698
49 -0.265516079 -1.961631800
50 -1.141556232 -0.265516079
51 1.185036356 -1.141556232
52 -1.668371215 1.185036356
53 0.401959344 -1.668371215
54 0.797645876 0.401959344
55 0.071284290 0.797645876
56 0.211827131 0.071284290
57 -4.105704381 0.211827131
58 0.331834386 -4.105704381
59 2.523422327 0.331834386
60 -0.194954026 2.523422327
61 -0.001724641 -0.194954026
62 1.258628019 -0.001724641
63 -0.356960909 1.258628019
64 0.622105601 -0.356960909
65 0.340813990 0.622105601
66 -0.245188511 0.340813990
67 0.101306499 -0.245188511
68 -1.856807714 0.101306499
69 0.031086052 -1.856807714
70 0.612538876 0.031086052
71 -0.659186010 0.612538876
72 0.021229506 -0.659186010
73 0.111440304 0.021229506
74 -0.369503984 0.111440304
75 -0.015695074 -0.369503984
76 0.695927126 -0.015695074
77 1.258729966 0.695927126
78 -0.642880628 1.258729966
79 -1.447321787 -0.642880628
80 0.929011676 -1.447321787
81 0.603920750 0.929011676
82 -0.961424457 0.603920750
83 -2.069807904 -0.961424457
84 1.509507735 -2.069807904
85 0.322976600 1.509507735
86 0.125343508 0.322976600
87 -0.865550772 0.125343508
88 0.054627320 -0.865550772
89 -0.859553974 0.054627320
90 1.259339269 -0.859553974
91 0.155239619 1.259339269
92 0.354099744 0.155239619
93 -0.520851691 0.354099744
94 -0.253459175 -0.520851691
95 0.441200817 -0.253459175
96 0.194255620 0.441200817
97 1.338333383 0.194255620
98 0.116789388 1.338333383
99 -1.397036015 0.116789388
100 -0.091435642 -1.397036015
101 0.873722536 -0.091435642
102 -0.607615547 0.873722536
103 0.015155985 -0.607615547
104 -1.004604505 0.015155985
105 -0.715042229 -1.004604505
106 1.213412733 -0.715042229
107 -0.897982251 1.213412733
108 0.392384453 -0.897982251
109 -1.324800092 0.392384453
110 0.322976600 -1.324800092
111 -0.063682588 0.322976600
112 -0.228188135 -0.063682588
113 0.210870366 -0.228188135
114 0.011267571 0.210870366
115 1.368483507 0.011267571
116 -0.213496488 1.368483507
117 0.984989605 -0.213496488
118 -0.895809528 0.984989605
119 -0.732879620 -0.895809528
120 0.298243525 -0.732879620
121 1.670233231 0.298243525
122 0.675199908 1.670233231
123 -0.545289773 0.675199908
124 1.634899723 -0.545289773
125 0.721849466 1.634899723
126 0.115214885 0.721849466
127 0.440244053 0.115214885
128 0.029750074 0.440244053
129 -1.047438891 0.029750074
130 0.556392731 -1.047438891
131 -0.639297605 0.556392731
132 0.733255071 -0.639297605
133 0.705028791 0.733255071
134 0.455517639 0.705028791
135 -1.545146712 0.455517639
136 0.401959344 -1.545146712
137 -0.306834787 0.401959344
138 -0.603241460 -0.306834787
139 -0.124016474 -0.603241460
140 -1.743964333 -0.124016474
141 -0.205947037 -1.743964333
142 1.097695344 -0.205947037
143 -0.859452027 1.097695344
144 -1.217089401 -0.859452027
145 0.594564000 -1.217089401
146 0.802662924 0.594564000
147 -0.129996493 0.802662924
148 0.143192286 -0.129996493
149 -0.746287083 0.143192286
150 0.542146558 -0.746287083
151 -0.276940493 0.542146558
152 0.228707756 -0.276940493
153 0.029622159 0.228707756
154 -3.480086374 0.029622159
155 0.299407689 -3.480086374
156 0.155239619 0.299407689
157 -0.464386168 0.155239619
158 0.904635353 -0.464386168
159 0.282820586 0.904635353
160 -0.961608212 0.282820586
161 0.032726423 -0.961608212
162 NA 0.032726423
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.101967297 0.675199908
[2,] 1.833913983 -0.101967297
[3,] -0.542747406 1.833913983
[4,] 0.197856698 -0.542747406
[5,] -0.135632808 0.197856698
[6,] 0.724016272 -0.135632808
[7,] 0.857834465 0.724016272
[8,] 0.144860300 0.857834465
[9,] 0.928054912 0.144860300
[10,] 0.964679772 0.928054912
[11,] -0.387461124 0.964679772
[12,] -0.393045251 -0.387461124
[13,] 0.607665998 -0.393045251
[14,] -0.113263796 0.607665998
[15,] -0.389384224 -0.113263796
[16,] -1.083179828 -0.389384224
[17,] 1.258729966 -1.083179828
[18,] -2.741270034 1.258729966
[19,] -0.306834787 -2.741270034
[20,] -0.882871586 -0.306834787
[21,] -1.142103776 -0.882871586
[22,] 0.085478378 -1.142103776
[23,] -2.141352941 0.085478378
[24,] 0.462604900 -2.141352941
[25,] 0.462604900 0.462604900
[26,] 0.353915989 0.462604900
[27,] 0.045178194 0.353915989
[28,] 2.070327526 0.045178194
[29,] 0.297971439 2.070327526
[30,] -0.427058224 0.297971439
[31,] 0.162156570 -0.427058224
[32,] -0.256073160 0.162156570
[33,] -1.168619093 -0.256073160
[34,] 1.104400448 -1.168619093
[35,] -0.041922879 1.104400448
[36,] 0.080859180 -0.041922879
[37,] 0.723059507 0.080859180
[38,] -0.425753998 0.723059507
[39,] -0.111186561 -0.425753998
[40,] 0.241501879 -0.111186561
[41,] -0.086688530 0.241501879
[42,] -0.336172317 -0.086688530
[43,] 1.901601354 -0.336172317
[44,] 1.381983346 1.901601354
[45,] 0.909193195 1.381983346
[46,] 0.148397199 0.909193195
[47,] 1.197856698 0.148397199
[48,] -1.961631800 1.197856698
[49,] -0.265516079 -1.961631800
[50,] -1.141556232 -0.265516079
[51,] 1.185036356 -1.141556232
[52,] -1.668371215 1.185036356
[53,] 0.401959344 -1.668371215
[54,] 0.797645876 0.401959344
[55,] 0.071284290 0.797645876
[56,] 0.211827131 0.071284290
[57,] -4.105704381 0.211827131
[58,] 0.331834386 -4.105704381
[59,] 2.523422327 0.331834386
[60,] -0.194954026 2.523422327
[61,] -0.001724641 -0.194954026
[62,] 1.258628019 -0.001724641
[63,] -0.356960909 1.258628019
[64,] 0.622105601 -0.356960909
[65,] 0.340813990 0.622105601
[66,] -0.245188511 0.340813990
[67,] 0.101306499 -0.245188511
[68,] -1.856807714 0.101306499
[69,] 0.031086052 -1.856807714
[70,] 0.612538876 0.031086052
[71,] -0.659186010 0.612538876
[72,] 0.021229506 -0.659186010
[73,] 0.111440304 0.021229506
[74,] -0.369503984 0.111440304
[75,] -0.015695074 -0.369503984
[76,] 0.695927126 -0.015695074
[77,] 1.258729966 0.695927126
[78,] -0.642880628 1.258729966
[79,] -1.447321787 -0.642880628
[80,] 0.929011676 -1.447321787
[81,] 0.603920750 0.929011676
[82,] -0.961424457 0.603920750
[83,] -2.069807904 -0.961424457
[84,] 1.509507735 -2.069807904
[85,] 0.322976600 1.509507735
[86,] 0.125343508 0.322976600
[87,] -0.865550772 0.125343508
[88,] 0.054627320 -0.865550772
[89,] -0.859553974 0.054627320
[90,] 1.259339269 -0.859553974
[91,] 0.155239619 1.259339269
[92,] 0.354099744 0.155239619
[93,] -0.520851691 0.354099744
[94,] -0.253459175 -0.520851691
[95,] 0.441200817 -0.253459175
[96,] 0.194255620 0.441200817
[97,] 1.338333383 0.194255620
[98,] 0.116789388 1.338333383
[99,] -1.397036015 0.116789388
[100,] -0.091435642 -1.397036015
[101,] 0.873722536 -0.091435642
[102,] -0.607615547 0.873722536
[103,] 0.015155985 -0.607615547
[104,] -1.004604505 0.015155985
[105,] -0.715042229 -1.004604505
[106,] 1.213412733 -0.715042229
[107,] -0.897982251 1.213412733
[108,] 0.392384453 -0.897982251
[109,] -1.324800092 0.392384453
[110,] 0.322976600 -1.324800092
[111,] -0.063682588 0.322976600
[112,] -0.228188135 -0.063682588
[113,] 0.210870366 -0.228188135
[114,] 0.011267571 0.210870366
[115,] 1.368483507 0.011267571
[116,] -0.213496488 1.368483507
[117,] 0.984989605 -0.213496488
[118,] -0.895809528 0.984989605
[119,] -0.732879620 -0.895809528
[120,] 0.298243525 -0.732879620
[121,] 1.670233231 0.298243525
[122,] 0.675199908 1.670233231
[123,] -0.545289773 0.675199908
[124,] 1.634899723 -0.545289773
[125,] 0.721849466 1.634899723
[126,] 0.115214885 0.721849466
[127,] 0.440244053 0.115214885
[128,] 0.029750074 0.440244053
[129,] -1.047438891 0.029750074
[130,] 0.556392731 -1.047438891
[131,] -0.639297605 0.556392731
[132,] 0.733255071 -0.639297605
[133,] 0.705028791 0.733255071
[134,] 0.455517639 0.705028791
[135,] -1.545146712 0.455517639
[136,] 0.401959344 -1.545146712
[137,] -0.306834787 0.401959344
[138,] -0.603241460 -0.306834787
[139,] -0.124016474 -0.603241460
[140,] -1.743964333 -0.124016474
[141,] -0.205947037 -1.743964333
[142,] 1.097695344 -0.205947037
[143,] -0.859452027 1.097695344
[144,] -1.217089401 -0.859452027
[145,] 0.594564000 -1.217089401
[146,] 0.802662924 0.594564000
[147,] -0.129996493 0.802662924
[148,] 0.143192286 -0.129996493
[149,] -0.746287083 0.143192286
[150,] 0.542146558 -0.746287083
[151,] -0.276940493 0.542146558
[152,] 0.228707756 -0.276940493
[153,] 0.029622159 0.228707756
[154,] -3.480086374 0.029622159
[155,] 0.299407689 -3.480086374
[156,] 0.155239619 0.299407689
[157,] -0.464386168 0.155239619
[158,] 0.904635353 -0.464386168
[159,] 0.282820586 0.904635353
[160,] -0.961608212 0.282820586
[161,] 0.032726423 -0.961608212
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.101967297 0.675199908
2 1.833913983 -0.101967297
3 -0.542747406 1.833913983
4 0.197856698 -0.542747406
5 -0.135632808 0.197856698
6 0.724016272 -0.135632808
7 0.857834465 0.724016272
8 0.144860300 0.857834465
9 0.928054912 0.144860300
10 0.964679772 0.928054912
11 -0.387461124 0.964679772
12 -0.393045251 -0.387461124
13 0.607665998 -0.393045251
14 -0.113263796 0.607665998
15 -0.389384224 -0.113263796
16 -1.083179828 -0.389384224
17 1.258729966 -1.083179828
18 -2.741270034 1.258729966
19 -0.306834787 -2.741270034
20 -0.882871586 -0.306834787
21 -1.142103776 -0.882871586
22 0.085478378 -1.142103776
23 -2.141352941 0.085478378
24 0.462604900 -2.141352941
25 0.462604900 0.462604900
26 0.353915989 0.462604900
27 0.045178194 0.353915989
28 2.070327526 0.045178194
29 0.297971439 2.070327526
30 -0.427058224 0.297971439
31 0.162156570 -0.427058224
32 -0.256073160 0.162156570
33 -1.168619093 -0.256073160
34 1.104400448 -1.168619093
35 -0.041922879 1.104400448
36 0.080859180 -0.041922879
37 0.723059507 0.080859180
38 -0.425753998 0.723059507
39 -0.111186561 -0.425753998
40 0.241501879 -0.111186561
41 -0.086688530 0.241501879
42 -0.336172317 -0.086688530
43 1.901601354 -0.336172317
44 1.381983346 1.901601354
45 0.909193195 1.381983346
46 0.148397199 0.909193195
47 1.197856698 0.148397199
48 -1.961631800 1.197856698
49 -0.265516079 -1.961631800
50 -1.141556232 -0.265516079
51 1.185036356 -1.141556232
52 -1.668371215 1.185036356
53 0.401959344 -1.668371215
54 0.797645876 0.401959344
55 0.071284290 0.797645876
56 0.211827131 0.071284290
57 -4.105704381 0.211827131
58 0.331834386 -4.105704381
59 2.523422327 0.331834386
60 -0.194954026 2.523422327
61 -0.001724641 -0.194954026
62 1.258628019 -0.001724641
63 -0.356960909 1.258628019
64 0.622105601 -0.356960909
65 0.340813990 0.622105601
66 -0.245188511 0.340813990
67 0.101306499 -0.245188511
68 -1.856807714 0.101306499
69 0.031086052 -1.856807714
70 0.612538876 0.031086052
71 -0.659186010 0.612538876
72 0.021229506 -0.659186010
73 0.111440304 0.021229506
74 -0.369503984 0.111440304
75 -0.015695074 -0.369503984
76 0.695927126 -0.015695074
77 1.258729966 0.695927126
78 -0.642880628 1.258729966
79 -1.447321787 -0.642880628
80 0.929011676 -1.447321787
81 0.603920750 0.929011676
82 -0.961424457 0.603920750
83 -2.069807904 -0.961424457
84 1.509507735 -2.069807904
85 0.322976600 1.509507735
86 0.125343508 0.322976600
87 -0.865550772 0.125343508
88 0.054627320 -0.865550772
89 -0.859553974 0.054627320
90 1.259339269 -0.859553974
91 0.155239619 1.259339269
92 0.354099744 0.155239619
93 -0.520851691 0.354099744
94 -0.253459175 -0.520851691
95 0.441200817 -0.253459175
96 0.194255620 0.441200817
97 1.338333383 0.194255620
98 0.116789388 1.338333383
99 -1.397036015 0.116789388
100 -0.091435642 -1.397036015
101 0.873722536 -0.091435642
102 -0.607615547 0.873722536
103 0.015155985 -0.607615547
104 -1.004604505 0.015155985
105 -0.715042229 -1.004604505
106 1.213412733 -0.715042229
107 -0.897982251 1.213412733
108 0.392384453 -0.897982251
109 -1.324800092 0.392384453
110 0.322976600 -1.324800092
111 -0.063682588 0.322976600
112 -0.228188135 -0.063682588
113 0.210870366 -0.228188135
114 0.011267571 0.210870366
115 1.368483507 0.011267571
116 -0.213496488 1.368483507
117 0.984989605 -0.213496488
118 -0.895809528 0.984989605
119 -0.732879620 -0.895809528
120 0.298243525 -0.732879620
121 1.670233231 0.298243525
122 0.675199908 1.670233231
123 -0.545289773 0.675199908
124 1.634899723 -0.545289773
125 0.721849466 1.634899723
126 0.115214885 0.721849466
127 0.440244053 0.115214885
128 0.029750074 0.440244053
129 -1.047438891 0.029750074
130 0.556392731 -1.047438891
131 -0.639297605 0.556392731
132 0.733255071 -0.639297605
133 0.705028791 0.733255071
134 0.455517639 0.705028791
135 -1.545146712 0.455517639
136 0.401959344 -1.545146712
137 -0.306834787 0.401959344
138 -0.603241460 -0.306834787
139 -0.124016474 -0.603241460
140 -1.743964333 -0.124016474
141 -0.205947037 -1.743964333
142 1.097695344 -0.205947037
143 -0.859452027 1.097695344
144 -1.217089401 -0.859452027
145 0.594564000 -1.217089401
146 0.802662924 0.594564000
147 -0.129996493 0.802662924
148 0.143192286 -0.129996493
149 -0.746287083 0.143192286
150 0.542146558 -0.746287083
151 -0.276940493 0.542146558
152 0.228707756 -0.276940493
153 0.029622159 0.228707756
154 -3.480086374 0.029622159
155 0.299407689 -3.480086374
156 0.155239619 0.299407689
157 -0.464386168 0.155239619
158 0.904635353 -0.464386168
159 0.282820586 0.904635353
160 -0.961608212 0.282820586
161 0.032726423 -0.961608212
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/7hmo41290553729.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/8sv671290553729.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/9sv671290553729.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/www/html/rcomp/tmp/102mna1290553729.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/html/rcomp/tmp/1165ly1290553729.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/html/rcomp/tmp/12r5231290553729.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/html/rcomp/tmp/13nxiu1290553729.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/html/rcomp/tmp/14rfg01290553729.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/www/html/rcomp/tmp/15uyf61290553729.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/www/html/rcomp/tmp/16yhdc1290553729.tab")
+ }
>
> try(system("convert tmp/1lcrd1290553729.ps tmp/1lcrd1290553729.png",intern=TRUE))
character(0)
> try(system("convert tmp/2elqg1290553729.ps tmp/2elqg1290553729.png",intern=TRUE))
character(0)
> try(system("convert tmp/3elqg1290553729.ps tmp/3elqg1290553729.png",intern=TRUE))
character(0)
> try(system("convert tmp/4pcpj1290553729.ps tmp/4pcpj1290553729.png",intern=TRUE))
character(0)
> try(system("convert tmp/5pcpj1290553729.ps tmp/5pcpj1290553729.png",intern=TRUE))
character(0)
> try(system("convert tmp/6pcpj1290553729.ps tmp/6pcpj1290553729.png",intern=TRUE))
character(0)
> try(system("convert tmp/7hmo41290553729.ps tmp/7hmo41290553729.png",intern=TRUE))
character(0)
> try(system("convert tmp/8sv671290553729.ps tmp/8sv671290553729.png",intern=TRUE))
character(0)
> try(system("convert tmp/9sv671290553729.ps tmp/9sv671290553729.png",intern=TRUE))
character(0)
> try(system("convert tmp/102mna1290553729.ps tmp/102mna1290553729.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.560 1.859 10.141