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(8715.1
+ ,0
+ ,8919.9
+ ,0
+ ,10085.8
+ ,0
+ ,9511.7
+ ,0
+ ,8991.3
+ ,0
+ ,10311.2
+ ,0
+ ,8895.4
+ ,0
+ ,7449.8
+ ,0
+ ,10084.0
+ ,0
+ ,9859.4
+ ,0
+ ,9100.1
+ ,0
+ ,8920.8
+ ,0
+ ,8502.7
+ ,0
+ ,8599.6
+ ,0
+ ,10394.4
+ ,0
+ ,9290.4
+ ,0
+ ,8742.2
+ ,0
+ ,10217.3
+ ,0
+ ,8639.0
+ ,0
+ ,8139.6
+ ,0
+ ,10779.1
+ ,0
+ ,10427.7
+ ,0
+ ,10349.1
+ ,0
+ ,10036.4
+ ,0
+ ,9492.1
+ ,0
+ ,10638.8
+ ,0
+ ,12054.5
+ ,0
+ ,10324.7
+ ,0
+ ,11817.3
+ ,0
+ ,11008.9
+ ,0
+ ,9996.6
+ ,0
+ ,9419.5
+ ,0
+ ,11958.8
+ ,0
+ ,12594.6
+ ,0
+ ,11890.6
+ ,0
+ ,10871.7
+ ,0
+ ,11835.7
+ ,0
+ ,11542.2
+ ,0
+ ,13093.7
+ ,0
+ ,11180.2
+ ,0
+ ,12035.7
+ ,0
+ ,12112.0
+ ,0
+ ,10875.2
+ ,0
+ ,9897.3
+ ,0
+ ,11672.1
+ ,1
+ ,12385.7
+ ,1
+ ,11405.6
+ ,1
+ ,9830.9
+ ,1
+ ,11025.1
+ ,1
+ ,10853.8
+ ,1
+ ,12252.6
+ ,1
+ ,11839.4
+ ,1
+ ,11669.1
+ ,1
+ ,11601.4
+ ,1
+ ,11178.4
+ ,1
+ ,9516.4
+ ,1
+ ,12102.8
+ ,1
+ ,12989.0
+ ,1
+ ,11610.2
+ ,1
+ ,10205.5
+ ,1
+ ,11356.2
+ ,1
+ ,11307.1
+ ,1
+ ,12648.6
+ ,1
+ ,11947.2
+ ,1
+ ,11714.1
+ ,1
+ ,12192.5
+ ,1
+ ,11268.8
+ ,1
+ ,9097.4
+ ,1
+ ,12639.8
+ ,1
+ ,13040.1
+ ,1
+ ,11687.3
+ ,1
+ ,11191.7
+ ,1
+ ,11391.9
+ ,1
+ ,11793.1
+ ,1
+ ,13933.2
+ ,1
+ ,12778.1
+ ,1
+ ,11810.3
+ ,1
+ ,13698.4
+ ,1
+ ,11956.6
+ ,1
+ ,10723.8
+ ,1
+ ,13938.9
+ ,1
+ ,13979.8
+ ,1
+ ,13807.4
+ ,1
+ ,12973.9
+ ,1
+ ,12509.8
+ ,1
+ ,12934.1
+ ,1
+ ,14908.3
+ ,1
+ ,13772.1
+ ,1
+ ,13012.6
+ ,1
+ ,14049.9
+ ,1
+ ,11816.5
+ ,1
+ ,11593.2
+ ,1
+ ,14466.2
+ ,1
+ ,13615.9
+ ,1
+ ,14733.9
+ ,1
+ ,13880.7
+ ,1
+ ,13527.5
+ ,1
+ ,13584.0
+ ,1
+ ,16170.2
+ ,1
+ ,13260.6
+ ,1
+ ,14741.9
+ ,1
+ ,15486.5
+ ,1
+ ,13154.5
+ ,1
+ ,12621.2
+ ,1
+ ,15031.6
+ ,1
+ ,15452.4
+ ,1
+ ,15428.0
+ ,1
+ ,13105.9
+ ,1
+ ,14716.8
+ ,1
+ ,14180.0
+ ,1
+ ,16202.2
+ ,1
+ ,14392.4
+ ,1
+ ,15140.6
+ ,1
+ ,15960.1
+ ,1
+ ,14351.3
+ ,1
+ ,13230.2
+ ,1
+ ,15202.1
+ ,1
+ ,17056.0
+ ,1
+ ,16077.7
+ ,1
+ ,13348.2
+ ,1
+ ,16402.4
+ ,1
+ ,16559.1
+ ,1
+ ,16579.0
+ ,1
+ ,17561.2
+ ,1
+ ,16129.6
+ ,1
+ ,18484.3
+ ,1
+ ,16402.6
+ ,1
+ ,14032.3
+ ,1
+ ,17109.1
+ ,1
+ ,17157.2
+ ,1
+ ,13879.8
+ ,1
+ ,12362.4
+ ,1)
+ ,dim=c(2
+ ,132)
+ ,dimnames=list(c('Uitvoer'
+ ,'Dummie')
+ ,1:132))
> y <- array(NA,dim=c(2,132),dimnames=list(c('Uitvoer','Dummie'),1:132))
> 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 ='')))
+ 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
Uitvoer Dummie
1 8715.1 0
2 8919.9 0
3 10085.8 0
4 9511.7 0
5 8991.3 0
6 10311.2 0
7 8895.4 0
8 7449.8 0
9 10084.0 0
10 9859.4 0
11 9100.1 0
12 8920.8 0
13 8502.7 0
14 8599.6 0
15 10394.4 0
16 9290.4 0
17 8742.2 0
18 10217.3 0
19 8639.0 0
20 8139.6 0
21 10779.1 0
22 10427.7 0
23 10349.1 0
24 10036.4 0
25 9492.1 0
26 10638.8 0
27 12054.5 0
28 10324.7 0
29 11817.3 0
30 11008.9 0
31 9996.6 0
32 9419.5 0
33 11958.8 0
34 12594.6 0
35 11890.6 0
36 10871.7 0
37 11835.7 0
38 11542.2 0
39 13093.7 0
40 11180.2 0
41 12035.7 0
42 12112.0 0
43 10875.2 0
44 9897.3 0
45 11672.1 1
46 12385.7 1
47 11405.6 1
48 9830.9 1
49 11025.1 1
50 10853.8 1
51 12252.6 1
52 11839.4 1
53 11669.1 1
54 11601.4 1
55 11178.4 1
56 9516.4 1
57 12102.8 1
58 12989.0 1
59 11610.2 1
60 10205.5 1
61 11356.2 1
62 11307.1 1
63 12648.6 1
64 11947.2 1
65 11714.1 1
66 12192.5 1
67 11268.8 1
68 9097.4 1
69 12639.8 1
70 13040.1 1
71 11687.3 1
72 11191.7 1
73 11391.9 1
74 11793.1 1
75 13933.2 1
76 12778.1 1
77 11810.3 1
78 13698.4 1
79 11956.6 1
80 10723.8 1
81 13938.9 1
82 13979.8 1
83 13807.4 1
84 12973.9 1
85 12509.8 1
86 12934.1 1
87 14908.3 1
88 13772.1 1
89 13012.6 1
90 14049.9 1
91 11816.5 1
92 11593.2 1
93 14466.2 1
94 13615.9 1
95 14733.9 1
96 13880.7 1
97 13527.5 1
98 13584.0 1
99 16170.2 1
100 13260.6 1
101 14741.9 1
102 15486.5 1
103 13154.5 1
104 12621.2 1
105 15031.6 1
106 15452.4 1
107 15428.0 1
108 13105.9 1
109 14716.8 1
110 14180.0 1
111 16202.2 1
112 14392.4 1
113 15140.6 1
114 15960.1 1
115 14351.3 1
116 13230.2 1
117 15202.1 1
118 17056.0 1
119 16077.7 1
120 13348.2 1
121 16402.4 1
122 16559.1 1
123 16579.0 1
124 17561.2 1
125 16129.6 1
126 18484.3 1
127 16402.6 1
128 14032.3 1
129 17109.1 1
130 17157.2 1
131 13879.8 1
132 12362.4 1
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Dummie
10218 3195
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-4316.1 -1459.3 -143.6 1307.6 5070.8
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 10218.2 271.9 37.580 <2e-16 ***
Dummie 3195.3 333.0 9.595 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1804 on 130 degrees of freedom
Multiple R-squared: 0.4146, Adjusted R-squared: 0.4101
F-statistic: 92.06 on 1 and 130 DF, p-value: < 2.2e-16
> if (n > n25) {
+ kp3 <- k + 3
+ nmkm3 <- n - k - 3
+ gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
+ numgqtests <- 0
+ numsignificant1 <- 0
+ numsignificant5 <- 0
+ numsignificant10 <- 0
+ for (mypoint in kp3:nmkm3) {
+ j <- 0
+ numgqtests <- numgqtests + 1
+ for (myalt in c('greater', 'two.sided', 'less')) {
+ j <- j + 1
+ gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
+ }
+ if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
+ }
+ gqarr
+ }
[,1] [,2] [,3]
[1,] 5.361434e-02 1.072287e-01 0.9463857
[2,] 4.286557e-02 8.573114e-02 0.9571344
[3,] 1.836053e-02 3.672106e-02 0.9816395
[4,] 5.416519e-02 1.083304e-01 0.9458348
[5,] 3.679185e-02 7.358371e-02 0.9632081
[6,] 2.030927e-02 4.061855e-02 0.9796907
[7,] 9.395748e-03 1.879150e-02 0.9906043
[8,] 4.403044e-03 8.806089e-03 0.9955970
[9,] 2.621486e-03 5.242972e-03 0.9973785
[10,] 1.396226e-03 2.792452e-03 0.9986038
[11,] 1.434659e-03 2.869319e-03 0.9985653
[12,] 6.280213e-04 1.256043e-03 0.9993720
[13,] 3.190784e-04 6.381567e-04 0.9996809
[14,] 2.483092e-04 4.966185e-04 0.9997517
[15,] 1.416216e-04 2.832431e-04 0.9998584
[16,] 1.394471e-04 2.788942e-04 0.9998606
[17,] 2.435298e-04 4.870596e-04 0.9997565
[18,] 2.186287e-04 4.372574e-04 0.9997814
[19,] 1.699095e-04 3.398191e-04 0.9998301
[20,] 1.003311e-04 2.006623e-04 0.9998997
[21,] 4.918381e-05 9.836761e-05 0.9999508
[22,] 4.838817e-05 9.677633e-05 0.9999516
[23,] 3.604546e-04 7.209093e-04 0.9996395
[24,] 2.350456e-04 4.700912e-04 0.9997650
[25,] 5.993420e-04 1.198684e-03 0.9994007
[26,] 5.515015e-04 1.103003e-03 0.9994485
[27,] 3.243933e-04 6.487866e-04 0.9996756
[28,] 2.007205e-04 4.014409e-04 0.9997993
[29,] 4.494103e-04 8.988205e-04 0.9995506
[30,] 1.613027e-03 3.226054e-03 0.9983870
[31,] 2.172966e-03 4.345933e-03 0.9978270
[32,] 1.594059e-03 3.188118e-03 0.9984059
[33,] 1.874136e-03 3.748273e-03 0.9981259
[34,] 1.756673e-03 3.513346e-03 0.9982433
[35,] 5.048527e-03 1.009705e-02 0.9949515
[36,] 3.856102e-03 7.712205e-03 0.9961439
[37,] 4.204794e-03 8.409588e-03 0.9957952
[38,] 4.731896e-03 9.463792e-03 0.9952681
[39,] 3.319683e-03 6.639366e-03 0.9966803
[40,] 2.171948e-03 4.343897e-03 0.9978281
[41,] 1.517902e-03 3.035804e-03 0.9984821
[42,] 1.025634e-03 2.051267e-03 0.9989744
[43,] 7.629120e-04 1.525824e-03 0.9992371
[44,] 1.177517e-03 2.355034e-03 0.9988225
[45,] 9.374048e-04 1.874810e-03 0.9990626
[46,] 7.883796e-04 1.576759e-03 0.9992116
[47,] 6.090083e-04 1.218017e-03 0.9993910
[48,] 4.409966e-04 8.819933e-04 0.9995590
[49,] 3.201280e-04 6.402560e-04 0.9996799
[50,] 2.343000e-04 4.686001e-04 0.9997657
[51,] 1.897370e-04 3.794740e-04 0.9998103
[52,] 4.543960e-04 9.087921e-04 0.9995456
[53,] 3.555520e-04 7.111039e-04 0.9996444
[54,] 3.368647e-04 6.737293e-04 0.9996631
[55,] 2.650875e-04 5.301750e-04 0.9997349
[56,] 4.090806e-04 8.181613e-04 0.9995909
[57,] 3.598049e-04 7.196098e-04 0.9996402
[58,] 3.282629e-04 6.565257e-04 0.9996717
[59,] 2.849987e-04 5.699974e-04 0.9997150
[60,] 2.332666e-04 4.665331e-04 0.9997667
[61,] 1.998227e-04 3.996453e-04 0.9998002
[62,] 1.640838e-04 3.281677e-04 0.9998359
[63,] 1.694661e-04 3.389321e-04 0.9998305
[64,] 1.307869e-03 2.615737e-03 0.9986921
[65,] 1.224027e-03 2.448053e-03 0.9987760
[66,] 1.209505e-03 2.419010e-03 0.9987905
[67,] 1.250886e-03 2.501772e-03 0.9987491
[68,] 1.660563e-03 3.321126e-03 0.9983394
[69,] 2.104807e-03 4.209615e-03 0.9978952
[70,] 2.381392e-03 4.762784e-03 0.9976186
[71,] 3.202666e-03 6.405332e-03 0.9967973
[72,] 3.128545e-03 6.257091e-03 0.9968715
[73,] 3.720711e-03 7.441422e-03 0.9962793
[74,] 4.191744e-03 8.383488e-03 0.9958083
[75,] 4.939003e-03 9.878006e-03 0.9950610
[76,] 1.280740e-02 2.561481e-02 0.9871926
[77,] 1.491553e-02 2.983106e-02 0.9850845
[78,] 1.682542e-02 3.365084e-02 0.9831746
[79,] 1.768818e-02 3.537636e-02 0.9823118
[80,] 1.783027e-02 3.566054e-02 0.9821697
[81,] 1.987797e-02 3.975594e-02 0.9801220
[82,] 2.072073e-02 4.144146e-02 0.9792793
[83,] 2.800284e-02 5.600569e-02 0.9719972
[84,] 2.753900e-02 5.507800e-02 0.9724610
[85,] 2.817569e-02 5.635139e-02 0.9718243
[86,] 2.797537e-02 5.595075e-02 0.9720246
[87,] 4.558214e-02 9.116428e-02 0.9544179
[88,] 8.872205e-02 1.774441e-01 0.9112780
[89,] 9.205077e-02 1.841015e-01 0.9079492
[90,] 9.321201e-02 1.864240e-01 0.9067880
[91,] 9.705544e-02 1.941109e-01 0.9029446
[92,] 9.525242e-02 1.905048e-01 0.9047476
[93,] 9.736595e-02 1.947319e-01 0.9026341
[94,] 9.969913e-02 1.993983e-01 0.9003009
[95,] 1.413432e-01 2.826864e-01 0.8586568
[96,] 1.525155e-01 3.050309e-01 0.8474845
[97,] 1.457383e-01 2.914766e-01 0.8542617
[98,] 1.510578e-01 3.021156e-01 0.8489422
[99,] 1.695530e-01 3.391060e-01 0.8304470
[100,] 2.359332e-01 4.718664e-01 0.7640668
[101,] 2.233941e-01 4.467883e-01 0.7766059
[102,] 2.162027e-01 4.324053e-01 0.7837973
[103,] 2.048412e-01 4.096823e-01 0.7951588
[104,] 2.482664e-01 4.965329e-01 0.7517336
[105,] 2.274574e-01 4.549147e-01 0.7725426
[106,] 2.199828e-01 4.399657e-01 0.7800172
[107,] 2.219517e-01 4.439034e-01 0.7780483
[108,] 2.056608e-01 4.113215e-01 0.7943392
[109,] 1.793224e-01 3.586448e-01 0.8206776
[110,] 1.627496e-01 3.254991e-01 0.8372504
[111,] 1.485213e-01 2.970427e-01 0.8514787
[112,] 2.020866e-01 4.041732e-01 0.7979134
[113,] 1.718022e-01 3.436044e-01 0.8281978
[114,] 1.815461e-01 3.630921e-01 0.8184539
[115,] 1.501872e-01 3.003744e-01 0.8498128
[116,] 2.063548e-01 4.127096e-01 0.7936452
[117,] 1.695620e-01 3.391239e-01 0.8304380
[118,] 1.376236e-01 2.752471e-01 0.8623764
[119,] 1.075530e-01 2.151061e-01 0.8924470
[120,] 1.166251e-01 2.332503e-01 0.8833749
[121,] 7.719746e-02 1.543949e-01 0.9228025
[122,] 1.725297e-01 3.450595e-01 0.8274703
[123,] 1.279339e-01 2.558678e-01 0.8720661
> postscript(file="/var/www/html/rcomp/tmp/15exq1260867157.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/rcomp/tmp/2rwm51260867157.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/3eow71260867157.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/4sru51260867157.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/53lbk1260867157.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 = 132
Frequency = 1
1 2 3 4 5
-1503.1295455 -1298.3295455 -132.4295455 -706.5295455 -1226.9295455
6 7 8 9 10
92.9704545 -1322.8295455 -2768.4295455 -134.2295455 -358.8295455
11 12 13 14 15
-1118.1295455 -1297.4295455 -1715.5295455 -1618.6295455 176.1704545
16 17 18 19 20
-927.8295455 -1476.0295455 -0.9295455 -1579.2295455 -2078.6295455
21 22 23 24 25
560.8704545 209.4704545 130.8704545 -181.8295455 -726.1295455
26 27 28 29 30
420.5704545 1836.2704545 106.4704545 1599.0704545 790.6704545
31 32 33 34 35
-221.6295455 -798.7295455 1740.5704545 2376.3704545 1672.3704545
36 37 38 39 40
653.4704545 1617.4704545 1323.9704545 2875.4704545 961.9704545
41 42 43 44 45
1817.4704545 1893.7704545 656.9704545 -320.9295455 -1741.4034091
46 47 48 49 50
-1027.8034091 -2007.9034091 -3582.6034091 -2388.4034091 -2559.7034091
51 52 53 54 55
-1160.9034091 -1574.1034091 -1744.4034091 -1812.1034091 -2235.1034091
56 57 58 59 60
-3897.1034091 -1310.7034091 -424.5034091 -1803.3034091 -3208.0034091
61 62 63 64 65
-2057.3034091 -2106.4034091 -764.9034091 -1466.3034091 -1699.4034091
66 67 68 69 70
-1221.0034091 -2144.7034091 -4316.1034091 -773.7034091 -373.4034091
71 72 73 74 75
-1726.2034091 -2221.8034091 -2021.6034091 -1620.4034091 519.6965909
76 77 78 79 80
-635.4034091 -1603.2034091 284.8965909 -1456.9034091 -2689.7034091
81 82 83 84 85
525.3965909 566.2965909 393.8965909 -439.6034091 -903.7034091
86 87 88 89 90
-479.4034091 1494.7965909 358.5965909 -400.9034091 636.3965909
91 92 93 94 95
-1597.0034091 -1820.3034091 1052.6965909 202.3965909 1320.3965909
96 97 98 99 100
467.1965909 113.9965909 170.4965909 2756.6965909 -152.9034091
101 102 103 104 105
1328.3965909 2072.9965909 -259.0034091 -792.3034091 1618.0965909
106 107 108 109 110
2038.8965909 2014.4965909 -307.6034091 1303.2965909 766.4965909
111 112 113 114 115
2788.6965909 978.8965909 1727.0965909 2546.5965909 937.7965909
116 117 118 119 120
-183.3034091 1788.5965909 3642.4965909 2664.1965909 -65.3034091
121 122 123 124 125
2988.8965909 3145.5965909 3165.4965909 4147.6965909 2716.0965909
126 127 128 129 130
5070.7965909 2989.0965909 618.7965909 3695.5965909 3743.6965909
131 132
466.2965909 -1051.1034091
> postscript(file="/var/www/html/rcomp/tmp/6rsp41260867157.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 = 132
Frequency = 1
lag(myerror, k = 1) myerror
0 -1503.1295455 NA
1 -1298.3295455 -1503.1295455
2 -132.4295455 -1298.3295455
3 -706.5295455 -132.4295455
4 -1226.9295455 -706.5295455
5 92.9704545 -1226.9295455
6 -1322.8295455 92.9704545
7 -2768.4295455 -1322.8295455
8 -134.2295455 -2768.4295455
9 -358.8295455 -134.2295455
10 -1118.1295455 -358.8295455
11 -1297.4295455 -1118.1295455
12 -1715.5295455 -1297.4295455
13 -1618.6295455 -1715.5295455
14 176.1704545 -1618.6295455
15 -927.8295455 176.1704545
16 -1476.0295455 -927.8295455
17 -0.9295455 -1476.0295455
18 -1579.2295455 -0.9295455
19 -2078.6295455 -1579.2295455
20 560.8704545 -2078.6295455
21 209.4704545 560.8704545
22 130.8704545 209.4704545
23 -181.8295455 130.8704545
24 -726.1295455 -181.8295455
25 420.5704545 -726.1295455
26 1836.2704545 420.5704545
27 106.4704545 1836.2704545
28 1599.0704545 106.4704545
29 790.6704545 1599.0704545
30 -221.6295455 790.6704545
31 -798.7295455 -221.6295455
32 1740.5704545 -798.7295455
33 2376.3704545 1740.5704545
34 1672.3704545 2376.3704545
35 653.4704545 1672.3704545
36 1617.4704545 653.4704545
37 1323.9704545 1617.4704545
38 2875.4704545 1323.9704545
39 961.9704545 2875.4704545
40 1817.4704545 961.9704545
41 1893.7704545 1817.4704545
42 656.9704545 1893.7704545
43 -320.9295455 656.9704545
44 -1741.4034091 -320.9295455
45 -1027.8034091 -1741.4034091
46 -2007.9034091 -1027.8034091
47 -3582.6034091 -2007.9034091
48 -2388.4034091 -3582.6034091
49 -2559.7034091 -2388.4034091
50 -1160.9034091 -2559.7034091
51 -1574.1034091 -1160.9034091
52 -1744.4034091 -1574.1034091
53 -1812.1034091 -1744.4034091
54 -2235.1034091 -1812.1034091
55 -3897.1034091 -2235.1034091
56 -1310.7034091 -3897.1034091
57 -424.5034091 -1310.7034091
58 -1803.3034091 -424.5034091
59 -3208.0034091 -1803.3034091
60 -2057.3034091 -3208.0034091
61 -2106.4034091 -2057.3034091
62 -764.9034091 -2106.4034091
63 -1466.3034091 -764.9034091
64 -1699.4034091 -1466.3034091
65 -1221.0034091 -1699.4034091
66 -2144.7034091 -1221.0034091
67 -4316.1034091 -2144.7034091
68 -773.7034091 -4316.1034091
69 -373.4034091 -773.7034091
70 -1726.2034091 -373.4034091
71 -2221.8034091 -1726.2034091
72 -2021.6034091 -2221.8034091
73 -1620.4034091 -2021.6034091
74 519.6965909 -1620.4034091
75 -635.4034091 519.6965909
76 -1603.2034091 -635.4034091
77 284.8965909 -1603.2034091
78 -1456.9034091 284.8965909
79 -2689.7034091 -1456.9034091
80 525.3965909 -2689.7034091
81 566.2965909 525.3965909
82 393.8965909 566.2965909
83 -439.6034091 393.8965909
84 -903.7034091 -439.6034091
85 -479.4034091 -903.7034091
86 1494.7965909 -479.4034091
87 358.5965909 1494.7965909
88 -400.9034091 358.5965909
89 636.3965909 -400.9034091
90 -1597.0034091 636.3965909
91 -1820.3034091 -1597.0034091
92 1052.6965909 -1820.3034091
93 202.3965909 1052.6965909
94 1320.3965909 202.3965909
95 467.1965909 1320.3965909
96 113.9965909 467.1965909
97 170.4965909 113.9965909
98 2756.6965909 170.4965909
99 -152.9034091 2756.6965909
100 1328.3965909 -152.9034091
101 2072.9965909 1328.3965909
102 -259.0034091 2072.9965909
103 -792.3034091 -259.0034091
104 1618.0965909 -792.3034091
105 2038.8965909 1618.0965909
106 2014.4965909 2038.8965909
107 -307.6034091 2014.4965909
108 1303.2965909 -307.6034091
109 766.4965909 1303.2965909
110 2788.6965909 766.4965909
111 978.8965909 2788.6965909
112 1727.0965909 978.8965909
113 2546.5965909 1727.0965909
114 937.7965909 2546.5965909
115 -183.3034091 937.7965909
116 1788.5965909 -183.3034091
117 3642.4965909 1788.5965909
118 2664.1965909 3642.4965909
119 -65.3034091 2664.1965909
120 2988.8965909 -65.3034091
121 3145.5965909 2988.8965909
122 3165.4965909 3145.5965909
123 4147.6965909 3165.4965909
124 2716.0965909 4147.6965909
125 5070.7965909 2716.0965909
126 2989.0965909 5070.7965909
127 618.7965909 2989.0965909
128 3695.5965909 618.7965909
129 3743.6965909 3695.5965909
130 466.2965909 3743.6965909
131 -1051.1034091 466.2965909
132 NA -1051.1034091
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -1298.3295455 -1503.1295455
[2,] -132.4295455 -1298.3295455
[3,] -706.5295455 -132.4295455
[4,] -1226.9295455 -706.5295455
[5,] 92.9704545 -1226.9295455
[6,] -1322.8295455 92.9704545
[7,] -2768.4295455 -1322.8295455
[8,] -134.2295455 -2768.4295455
[9,] -358.8295455 -134.2295455
[10,] -1118.1295455 -358.8295455
[11,] -1297.4295455 -1118.1295455
[12,] -1715.5295455 -1297.4295455
[13,] -1618.6295455 -1715.5295455
[14,] 176.1704545 -1618.6295455
[15,] -927.8295455 176.1704545
[16,] -1476.0295455 -927.8295455
[17,] -0.9295455 -1476.0295455
[18,] -1579.2295455 -0.9295455
[19,] -2078.6295455 -1579.2295455
[20,] 560.8704545 -2078.6295455
[21,] 209.4704545 560.8704545
[22,] 130.8704545 209.4704545
[23,] -181.8295455 130.8704545
[24,] -726.1295455 -181.8295455
[25,] 420.5704545 -726.1295455
[26,] 1836.2704545 420.5704545
[27,] 106.4704545 1836.2704545
[28,] 1599.0704545 106.4704545
[29,] 790.6704545 1599.0704545
[30,] -221.6295455 790.6704545
[31,] -798.7295455 -221.6295455
[32,] 1740.5704545 -798.7295455
[33,] 2376.3704545 1740.5704545
[34,] 1672.3704545 2376.3704545
[35,] 653.4704545 1672.3704545
[36,] 1617.4704545 653.4704545
[37,] 1323.9704545 1617.4704545
[38,] 2875.4704545 1323.9704545
[39,] 961.9704545 2875.4704545
[40,] 1817.4704545 961.9704545
[41,] 1893.7704545 1817.4704545
[42,] 656.9704545 1893.7704545
[43,] -320.9295455 656.9704545
[44,] -1741.4034091 -320.9295455
[45,] -1027.8034091 -1741.4034091
[46,] -2007.9034091 -1027.8034091
[47,] -3582.6034091 -2007.9034091
[48,] -2388.4034091 -3582.6034091
[49,] -2559.7034091 -2388.4034091
[50,] -1160.9034091 -2559.7034091
[51,] -1574.1034091 -1160.9034091
[52,] -1744.4034091 -1574.1034091
[53,] -1812.1034091 -1744.4034091
[54,] -2235.1034091 -1812.1034091
[55,] -3897.1034091 -2235.1034091
[56,] -1310.7034091 -3897.1034091
[57,] -424.5034091 -1310.7034091
[58,] -1803.3034091 -424.5034091
[59,] -3208.0034091 -1803.3034091
[60,] -2057.3034091 -3208.0034091
[61,] -2106.4034091 -2057.3034091
[62,] -764.9034091 -2106.4034091
[63,] -1466.3034091 -764.9034091
[64,] -1699.4034091 -1466.3034091
[65,] -1221.0034091 -1699.4034091
[66,] -2144.7034091 -1221.0034091
[67,] -4316.1034091 -2144.7034091
[68,] -773.7034091 -4316.1034091
[69,] -373.4034091 -773.7034091
[70,] -1726.2034091 -373.4034091
[71,] -2221.8034091 -1726.2034091
[72,] -2021.6034091 -2221.8034091
[73,] -1620.4034091 -2021.6034091
[74,] 519.6965909 -1620.4034091
[75,] -635.4034091 519.6965909
[76,] -1603.2034091 -635.4034091
[77,] 284.8965909 -1603.2034091
[78,] -1456.9034091 284.8965909
[79,] -2689.7034091 -1456.9034091
[80,] 525.3965909 -2689.7034091
[81,] 566.2965909 525.3965909
[82,] 393.8965909 566.2965909
[83,] -439.6034091 393.8965909
[84,] -903.7034091 -439.6034091
[85,] -479.4034091 -903.7034091
[86,] 1494.7965909 -479.4034091
[87,] 358.5965909 1494.7965909
[88,] -400.9034091 358.5965909
[89,] 636.3965909 -400.9034091
[90,] -1597.0034091 636.3965909
[91,] -1820.3034091 -1597.0034091
[92,] 1052.6965909 -1820.3034091
[93,] 202.3965909 1052.6965909
[94,] 1320.3965909 202.3965909
[95,] 467.1965909 1320.3965909
[96,] 113.9965909 467.1965909
[97,] 170.4965909 113.9965909
[98,] 2756.6965909 170.4965909
[99,] -152.9034091 2756.6965909
[100,] 1328.3965909 -152.9034091
[101,] 2072.9965909 1328.3965909
[102,] -259.0034091 2072.9965909
[103,] -792.3034091 -259.0034091
[104,] 1618.0965909 -792.3034091
[105,] 2038.8965909 1618.0965909
[106,] 2014.4965909 2038.8965909
[107,] -307.6034091 2014.4965909
[108,] 1303.2965909 -307.6034091
[109,] 766.4965909 1303.2965909
[110,] 2788.6965909 766.4965909
[111,] 978.8965909 2788.6965909
[112,] 1727.0965909 978.8965909
[113,] 2546.5965909 1727.0965909
[114,] 937.7965909 2546.5965909
[115,] -183.3034091 937.7965909
[116,] 1788.5965909 -183.3034091
[117,] 3642.4965909 1788.5965909
[118,] 2664.1965909 3642.4965909
[119,] -65.3034091 2664.1965909
[120,] 2988.8965909 -65.3034091
[121,] 3145.5965909 2988.8965909
[122,] 3165.4965909 3145.5965909
[123,] 4147.6965909 3165.4965909
[124,] 2716.0965909 4147.6965909
[125,] 5070.7965909 2716.0965909
[126,] 2989.0965909 5070.7965909
[127,] 618.7965909 2989.0965909
[128,] 3695.5965909 618.7965909
[129,] 3743.6965909 3695.5965909
[130,] 466.2965909 3743.6965909
[131,] -1051.1034091 466.2965909
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -1298.3295455 -1503.1295455
2 -132.4295455 -1298.3295455
3 -706.5295455 -132.4295455
4 -1226.9295455 -706.5295455
5 92.9704545 -1226.9295455
6 -1322.8295455 92.9704545
7 -2768.4295455 -1322.8295455
8 -134.2295455 -2768.4295455
9 -358.8295455 -134.2295455
10 -1118.1295455 -358.8295455
11 -1297.4295455 -1118.1295455
12 -1715.5295455 -1297.4295455
13 -1618.6295455 -1715.5295455
14 176.1704545 -1618.6295455
15 -927.8295455 176.1704545
16 -1476.0295455 -927.8295455
17 -0.9295455 -1476.0295455
18 -1579.2295455 -0.9295455
19 -2078.6295455 -1579.2295455
20 560.8704545 -2078.6295455
21 209.4704545 560.8704545
22 130.8704545 209.4704545
23 -181.8295455 130.8704545
24 -726.1295455 -181.8295455
25 420.5704545 -726.1295455
26 1836.2704545 420.5704545
27 106.4704545 1836.2704545
28 1599.0704545 106.4704545
29 790.6704545 1599.0704545
30 -221.6295455 790.6704545
31 -798.7295455 -221.6295455
32 1740.5704545 -798.7295455
33 2376.3704545 1740.5704545
34 1672.3704545 2376.3704545
35 653.4704545 1672.3704545
36 1617.4704545 653.4704545
37 1323.9704545 1617.4704545
38 2875.4704545 1323.9704545
39 961.9704545 2875.4704545
40 1817.4704545 961.9704545
41 1893.7704545 1817.4704545
42 656.9704545 1893.7704545
43 -320.9295455 656.9704545
44 -1741.4034091 -320.9295455
45 -1027.8034091 -1741.4034091
46 -2007.9034091 -1027.8034091
47 -3582.6034091 -2007.9034091
48 -2388.4034091 -3582.6034091
49 -2559.7034091 -2388.4034091
50 -1160.9034091 -2559.7034091
51 -1574.1034091 -1160.9034091
52 -1744.4034091 -1574.1034091
53 -1812.1034091 -1744.4034091
54 -2235.1034091 -1812.1034091
55 -3897.1034091 -2235.1034091
56 -1310.7034091 -3897.1034091
57 -424.5034091 -1310.7034091
58 -1803.3034091 -424.5034091
59 -3208.0034091 -1803.3034091
60 -2057.3034091 -3208.0034091
61 -2106.4034091 -2057.3034091
62 -764.9034091 -2106.4034091
63 -1466.3034091 -764.9034091
64 -1699.4034091 -1466.3034091
65 -1221.0034091 -1699.4034091
66 -2144.7034091 -1221.0034091
67 -4316.1034091 -2144.7034091
68 -773.7034091 -4316.1034091
69 -373.4034091 -773.7034091
70 -1726.2034091 -373.4034091
71 -2221.8034091 -1726.2034091
72 -2021.6034091 -2221.8034091
73 -1620.4034091 -2021.6034091
74 519.6965909 -1620.4034091
75 -635.4034091 519.6965909
76 -1603.2034091 -635.4034091
77 284.8965909 -1603.2034091
78 -1456.9034091 284.8965909
79 -2689.7034091 -1456.9034091
80 525.3965909 -2689.7034091
81 566.2965909 525.3965909
82 393.8965909 566.2965909
83 -439.6034091 393.8965909
84 -903.7034091 -439.6034091
85 -479.4034091 -903.7034091
86 1494.7965909 -479.4034091
87 358.5965909 1494.7965909
88 -400.9034091 358.5965909
89 636.3965909 -400.9034091
90 -1597.0034091 636.3965909
91 -1820.3034091 -1597.0034091
92 1052.6965909 -1820.3034091
93 202.3965909 1052.6965909
94 1320.3965909 202.3965909
95 467.1965909 1320.3965909
96 113.9965909 467.1965909
97 170.4965909 113.9965909
98 2756.6965909 170.4965909
99 -152.9034091 2756.6965909
100 1328.3965909 -152.9034091
101 2072.9965909 1328.3965909
102 -259.0034091 2072.9965909
103 -792.3034091 -259.0034091
104 1618.0965909 -792.3034091
105 2038.8965909 1618.0965909
106 2014.4965909 2038.8965909
107 -307.6034091 2014.4965909
108 1303.2965909 -307.6034091
109 766.4965909 1303.2965909
110 2788.6965909 766.4965909
111 978.8965909 2788.6965909
112 1727.0965909 978.8965909
113 2546.5965909 1727.0965909
114 937.7965909 2546.5965909
115 -183.3034091 937.7965909
116 1788.5965909 -183.3034091
117 3642.4965909 1788.5965909
118 2664.1965909 3642.4965909
119 -65.3034091 2664.1965909
120 2988.8965909 -65.3034091
121 3145.5965909 2988.8965909
122 3165.4965909 3145.5965909
123 4147.6965909 3165.4965909
124 2716.0965909 4147.6965909
125 5070.7965909 2716.0965909
126 2989.0965909 5070.7965909
127 618.7965909 2989.0965909
128 3695.5965909 618.7965909
129 3743.6965909 3695.5965909
130 466.2965909 3743.6965909
131 -1051.1034091 466.2965909
> 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/76rqc1260867157.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/8gktd1260867157.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/9iiw71260867157.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/106huo1260867157.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/11mzg91260867157.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/1262qy1260867157.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/13e0de1260867157.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/14r25n1260867157.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/15jb061260867157.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/166kpm1260867157.tab")
+ }
>
> try(system("convert tmp/15exq1260867157.ps tmp/15exq1260867157.png",intern=TRUE))
character(0)
> try(system("convert tmp/2rwm51260867157.ps tmp/2rwm51260867157.png",intern=TRUE))
character(0)
> try(system("convert tmp/3eow71260867157.ps tmp/3eow71260867157.png",intern=TRUE))
character(0)
> try(system("convert tmp/4sru51260867157.ps tmp/4sru51260867157.png",intern=TRUE))
character(0)
> try(system("convert tmp/53lbk1260867157.ps tmp/53lbk1260867157.png",intern=TRUE))
character(0)
> try(system("convert tmp/6rsp41260867157.ps tmp/6rsp41260867157.png",intern=TRUE))
character(0)
> try(system("convert tmp/76rqc1260867157.ps tmp/76rqc1260867157.png",intern=TRUE))
character(0)
> try(system("convert tmp/8gktd1260867157.ps tmp/8gktd1260867157.png",intern=TRUE))
character(0)
> try(system("convert tmp/9iiw71260867157.ps tmp/9iiw71260867157.png",intern=TRUE))
character(0)
> try(system("convert tmp/106huo1260867157.ps tmp/106huo1260867157.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.240 1.719 4.547