R version 2.12.0 (2010-10-15)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-pc-linux-gnu (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(1038.00,0,934.00,0,988.00,0,870.00,0,854.00,0,834.00,0,872.00,0,954.00,0,870.00,0,1238.00,0,1082.00,0,1053.00,0,934.00,0,787.00,0,1081.00,0,908.00,0,995.00,0,825.00,0,822.00,0,856.00,0,887.00,0,1094.00,0,990.00,0,936.00,0,1097.00,0,918.00,0,926.00,0,907.00,0,899.00,0,971.00,0,1087.00,0,1000.00,0,1071.00,0,1190.00,0,1116.00,0,1070.00,0,1314.00,0,1068.00,0,1185.00,0,1215.00,0,1145.00,0,1251.00,1,1363.00,1,1368.00,1,1535.00,1,1853.00,1,1866.00,1,2023.00,1,1373.00,1,1968.00,1,1424.00,1,1160.00,1,1243.00,1,1375.00,1,1539.00,1,1773.00,1,1906.00,1,2076.00,1,2004.00,1),dim=c(2,59),dimnames=list(c('Asielaanvragen','Verandering'),1:59))
>  y <- array(NA,dim=c(2,59),dimnames=list(c('Asielaanvragen','Verandering'),1:59))
>  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 = 'Include Monthly 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
> 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
   Asielaanvragen Verandering M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11
1            1038           0  1  0  0  0  0  0  0  0  0   0   0
2             934           0  0  1  0  0  0  0  0  0  0   0   0
3             988           0  0  0  1  0  0  0  0  0  0   0   0
4             870           0  0  0  0  1  0  0  0  0  0   0   0
5             854           0  0  0  0  0  1  0  0  0  0   0   0
6             834           0  0  0  0  0  0  1  0  0  0   0   0
7             872           0  0  0  0  0  0  0  1  0  0   0   0
8             954           0  0  0  0  0  0  0  0  1  0   0   0
9             870           0  0  0  0  0  0  0  0  0  1   0   0
10           1238           0  0  0  0  0  0  0  0  0  0   1   0
11           1082           0  0  0  0  0  0  0  0  0  0   0   1
12           1053           0  0  0  0  0  0  0  0  0  0   0   0
13            934           0  1  0  0  0  0  0  0  0  0   0   0
14            787           0  0  1  0  0  0  0  0  0  0   0   0
15           1081           0  0  0  1  0  0  0  0  0  0   0   0
16            908           0  0  0  0  1  0  0  0  0  0   0   0
17            995           0  0  0  0  0  1  0  0  0  0   0   0
18            825           0  0  0  0  0  0  1  0  0  0   0   0
19            822           0  0  0  0  0  0  0  1  0  0   0   0
20            856           0  0  0  0  0  0  0  0  1  0   0   0
21            887           0  0  0  0  0  0  0  0  0  1   0   0
22           1094           0  0  0  0  0  0  0  0  0  0   1   0
23            990           0  0  0  0  0  0  0  0  0  0   0   1
24            936           0  0  0  0  0  0  0  0  0  0   0   0
25           1097           0  1  0  0  0  0  0  0  0  0   0   0
26            918           0  0  1  0  0  0  0  0  0  0   0   0
27            926           0  0  0  1  0  0  0  0  0  0   0   0
28            907           0  0  0  0  1  0  0  0  0  0   0   0
29            899           0  0  0  0  0  1  0  0  0  0   0   0
30            971           0  0  0  0  0  0  1  0  0  0   0   0
31           1087           0  0  0  0  0  0  0  1  0  0   0   0
32           1000           0  0  0  0  0  0  0  0  1  0   0   0
33           1071           0  0  0  0  0  0  0  0  0  1   0   0
34           1190           0  0  0  0  0  0  0  0  0  0   1   0
35           1116           0  0  0  0  0  0  0  0  0  0   0   1
36           1070           0  0  0  0  0  0  0  0  0  0   0   0
37           1314           0  1  0  0  0  0  0  0  0  0   0   0
38           1068           0  0  1  0  0  0  0  0  0  0   0   0
39           1185           0  0  0  1  0  0  0  0  0  0   0   0
40           1215           0  0  0  0  1  0  0  0  0  0   0   0
41           1145           0  0  0  0  0  1  0  0  0  0   0   0
42           1251           1  0  0  0  0  0  1  0  0  0   0   0
43           1363           1  0  0  0  0  0  0  1  0  0   0   0
44           1368           1  0  0  0  0  0  0  0  1  0   0   0
45           1535           1  0  0  0  0  0  0  0  0  1   0   0
46           1853           1  0  0  0  0  0  0  0  0  0   1   0
47           1866           1  0  0  0  0  0  0  0  0  0   0   1
48           2023           1  0  0  0  0  0  0  0  0  0   0   0
49           1373           1  1  0  0  0  0  0  0  0  0   0   0
50           1968           1  0  1  0  0  0  0  0  0  0   0   0
51           1424           1  0  0  1  0  0  0  0  0  0   0   0
52           1160           1  0  0  0  1  0  0  0  0  0   0   0
53           1243           1  0  0  0  0  1  0  0  0  0   0   0
54           1375           1  0  0  0  0  0  1  0  0  0   0   0
55           1539           1  0  0  0  0  0  0  1  0  0   0   0
56           1773           1  0  0  0  0  0  0  0  1  0   0   0
57           1906           1  0  0  0  0  0  0  0  0  1   0   0
58           2076           1  0  0  0  0  0  0  0  0  0   1   0
59           2004           1  0  0  0  0  0  0  0  0  0   0   1
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept)  Verandering           M1           M2           M3           M4  
    1117.44       612.23       -88.69      -104.89      -119.09      -227.89  
         M5           M6           M7           M8           M9          M10  
    -212.69      -311.13      -225.73      -172.13      -108.53       127.87  
        M11  
      49.27  
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
    Min      1Q  Median      3Q     Max 
-341.78  -91.93  -10.35   75.45  343.22 
Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  1117.44      89.51  12.485 2.23e-16 ***
Verandering   612.23      51.25  11.946 1.06e-15 ***
M1            -88.69     118.87  -0.746   0.4594    
M2           -104.89     118.87  -0.882   0.3822    
M3           -119.09     118.87  -1.002   0.3217    
M4           -227.89     118.87  -1.917   0.0615 .  
M5           -212.69     118.87  -1.789   0.0802 .  
M6           -311.13     119.10  -2.612   0.0121 *  
M7           -225.73     119.10  -1.895   0.0643 .  
M8           -172.13     119.10  -1.445   0.1551    
M9           -108.53     119.10  -0.911   0.3669    
M10           127.87     119.10   1.074   0.2886    
M11            49.27     119.10   0.414   0.6810    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
Residual standard error: 177.2 on 46 degrees of freedom
Multiple R-squared: 0.797,	Adjusted R-squared: 0.744 
F-statistic: 15.05 on 12 and 46 DF,  p-value: 3.94e-12 
> 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,] 8.113603e-02 1.622721e-01 0.9188640
 [2,] 5.150542e-02 1.030108e-01 0.9484946
 [3,] 1.766426e-02 3.532853e-02 0.9823357
 [4,] 6.230862e-03 1.246172e-02 0.9937691
 [5,] 2.905960e-03 5.811919e-03 0.9970940
 [6,] 9.638371e-04 1.927674e-03 0.9990362
 [7,] 8.208605e-04 1.641721e-03 0.9991791
 [8,] 4.650920e-04 9.301841e-04 0.9995349
 [9,] 3.594790e-04 7.189579e-04 0.9996405
[10,] 2.158567e-04 4.317134e-04 0.9997841
[11,] 1.245015e-04 2.490030e-04 0.9998755
[12,] 7.705183e-05 1.541037e-04 0.9999229
[13,] 2.394471e-05 4.788942e-05 0.9999761
[14,] 7.217799e-06 1.443560e-05 0.9999928
[15,] 7.047686e-06 1.409537e-05 0.9999930
[16,] 3.006141e-05 6.012282e-05 0.9999699
[17,] 1.348457e-05 2.696914e-05 0.9999865
[18,] 1.707400e-05 3.414800e-05 0.9999829
[19,] 9.584583e-06 1.916917e-05 0.9999904
[20,] 1.227382e-05 2.454764e-05 0.9999877
[21,] 7.768302e-05 1.553660e-04 0.9999223
[22,] 4.241812e-04 8.483624e-04 0.9995758
[23,] 2.403377e-02 4.806754e-02 0.9759662
[24,] 2.626511e-02 5.253021e-02 0.9737349
[25,] 4.090361e-02 8.180722e-02 0.9590964
[26,] 3.078646e-02 6.157291e-02 0.9692135
[27,] 1.625937e-02 3.251875e-02 0.9837406
[28,] 9.150203e-03 1.830041e-02 0.9908498
> postscript(file="/var/www/rcomp/tmp/14e6r1292950630.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device 
          1 
> postscript(file="/var/www/rcomp/tmp/24e6r1292950630.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device 
          1 
> postscript(file="/var/www/rcomp/tmp/3x55c1292950630.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device 
          1 
> postscript(file="/var/www/rcomp/tmp/4x55c1292950630.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device 
          1 
> postscript(file="/var/www/rcomp/tmp/5x55c1292950630.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
> qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
> qqline(mysum$resid)
> grid()
> dev.off()
null device 
          1 
> (myerror <- as.ts(mysum$resid))
Time Series:
Start = 1 
End = 59 
Frequency = 1 
          1           2           3           4           5           6 
   9.245188  -78.554812  -10.354812  -19.554812  -50.754812   27.690377 
          7           8           9          10          11          12 
 -19.709623    8.690377 -138.909623   -7.309623  -84.709623  -64.443515 
         13          14          15          16          17          18 
 -94.754812 -225.554812   82.645188   18.445188   90.245188   18.690377 
         19          20          21          22          23          24 
 -69.709623  -89.309623 -121.909623 -151.309623 -176.709623 -181.443515 
         25          26          27          28          29          30 
  68.245188  -94.554812  -72.354812   17.445188   -5.754812  164.690377 
         31          32          33          34          35          36 
 195.290377   54.690377   62.090377  -55.309623  -50.709623  -47.443515 
         37          38          39          40          41          42 
 285.245188   55.445188  186.645188  325.445188  240.245188 -167.535565 
         43          44          45          46          47          48 
-140.935565 -189.535565  -86.135565   -4.535565   87.064435  293.330544 
         49          50          51          52          53          54 
-267.980753  343.219247 -186.580753 -341.780753 -273.980753  -43.535565 
         55          56          57          58          59 
  35.064435  215.464435  284.864435  218.464435  225.064435 
> postscript(file="/var/www/rcomp/tmp/6qemf1292950630.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0 
End = 59 
Frequency = 1 
   lag(myerror, k = 1)     myerror
 0            9.245188          NA
 1          -78.554812    9.245188
 2          -10.354812  -78.554812
 3          -19.554812  -10.354812
 4          -50.754812  -19.554812
 5           27.690377  -50.754812
 6          -19.709623   27.690377
 7            8.690377  -19.709623
 8         -138.909623    8.690377
 9           -7.309623 -138.909623
10          -84.709623   -7.309623
11          -64.443515  -84.709623
12          -94.754812  -64.443515
13         -225.554812  -94.754812
14           82.645188 -225.554812
15           18.445188   82.645188
16           90.245188   18.445188
17           18.690377   90.245188
18          -69.709623   18.690377
19          -89.309623  -69.709623
20         -121.909623  -89.309623
21         -151.309623 -121.909623
22         -176.709623 -151.309623
23         -181.443515 -176.709623
24           68.245188 -181.443515
25          -94.554812   68.245188
26          -72.354812  -94.554812
27           17.445188  -72.354812
28           -5.754812   17.445188
29          164.690377   -5.754812
30          195.290377  164.690377
31           54.690377  195.290377
32           62.090377   54.690377
33          -55.309623   62.090377
34          -50.709623  -55.309623
35          -47.443515  -50.709623
36          285.245188  -47.443515
37           55.445188  285.245188
38          186.645188   55.445188
39          325.445188  186.645188
40          240.245188  325.445188
41         -167.535565  240.245188
42         -140.935565 -167.535565
43         -189.535565 -140.935565
44          -86.135565 -189.535565
45           -4.535565  -86.135565
46           87.064435   -4.535565
47          293.330544   87.064435
48         -267.980753  293.330544
49          343.219247 -267.980753
50         -186.580753  343.219247
51         -341.780753 -186.580753
52         -273.980753 -341.780753
53          -43.535565 -273.980753
54           35.064435  -43.535565
55          215.464435   35.064435
56          284.864435  215.464435
57          218.464435  284.864435
58          225.064435  218.464435
59                  NA  225.064435
> dum1 <- dum[2:length(myerror),]
> dum1
      lag(myerror, k = 1)     myerror
 [1,]          -78.554812    9.245188
 [2,]          -10.354812  -78.554812
 [3,]          -19.554812  -10.354812
 [4,]          -50.754812  -19.554812
 [5,]           27.690377  -50.754812
 [6,]          -19.709623   27.690377
 [7,]            8.690377  -19.709623
 [8,]         -138.909623    8.690377
 [9,]           -7.309623 -138.909623
[10,]          -84.709623   -7.309623
[11,]          -64.443515  -84.709623
[12,]          -94.754812  -64.443515
[13,]         -225.554812  -94.754812
[14,]           82.645188 -225.554812
[15,]           18.445188   82.645188
[16,]           90.245188   18.445188
[17,]           18.690377   90.245188
[18,]          -69.709623   18.690377
[19,]          -89.309623  -69.709623
[20,]         -121.909623  -89.309623
[21,]         -151.309623 -121.909623
[22,]         -176.709623 -151.309623
[23,]         -181.443515 -176.709623
[24,]           68.245188 -181.443515
[25,]          -94.554812   68.245188
[26,]          -72.354812  -94.554812
[27,]           17.445188  -72.354812
[28,]           -5.754812   17.445188
[29,]          164.690377   -5.754812
[30,]          195.290377  164.690377
[31,]           54.690377  195.290377
[32,]           62.090377   54.690377
[33,]          -55.309623   62.090377
[34,]          -50.709623  -55.309623
[35,]          -47.443515  -50.709623
[36,]          285.245188  -47.443515
[37,]           55.445188  285.245188
[38,]          186.645188   55.445188
[39,]          325.445188  186.645188
[40,]          240.245188  325.445188
[41,]         -167.535565  240.245188
[42,]         -140.935565 -167.535565
[43,]         -189.535565 -140.935565
[44,]          -86.135565 -189.535565
[45,]           -4.535565  -86.135565
[46,]           87.064435   -4.535565
[47,]          293.330544   87.064435
[48,]         -267.980753  293.330544
[49,]          343.219247 -267.980753
[50,]         -186.580753  343.219247
[51,]         -341.780753 -186.580753
[52,]         -273.980753 -341.780753
[53,]          -43.535565 -273.980753
[54,]           35.064435  -43.535565
[55,]          215.464435   35.064435
[56,]          284.864435  215.464435
[57,]          218.464435  284.864435
[58,]          225.064435  218.464435
> z <- as.data.frame(dum1)
> z
   lag(myerror, k = 1)     myerror
1           -78.554812    9.245188
2           -10.354812  -78.554812
3           -19.554812  -10.354812
4           -50.754812  -19.554812
5            27.690377  -50.754812
6           -19.709623   27.690377
7             8.690377  -19.709623
8          -138.909623    8.690377
9            -7.309623 -138.909623
10          -84.709623   -7.309623
11          -64.443515  -84.709623
12          -94.754812  -64.443515
13         -225.554812  -94.754812
14           82.645188 -225.554812
15           18.445188   82.645188
16           90.245188   18.445188
17           18.690377   90.245188
18          -69.709623   18.690377
19          -89.309623  -69.709623
20         -121.909623  -89.309623
21         -151.309623 -121.909623
22         -176.709623 -151.309623
23         -181.443515 -176.709623
24           68.245188 -181.443515
25          -94.554812   68.245188
26          -72.354812  -94.554812
27           17.445188  -72.354812
28           -5.754812   17.445188
29          164.690377   -5.754812
30          195.290377  164.690377
31           54.690377  195.290377
32           62.090377   54.690377
33          -55.309623   62.090377
34          -50.709623  -55.309623
35          -47.443515  -50.709623
36          285.245188  -47.443515
37           55.445188  285.245188
38          186.645188   55.445188
39          325.445188  186.645188
40          240.245188  325.445188
41         -167.535565  240.245188
42         -140.935565 -167.535565
43         -189.535565 -140.935565
44          -86.135565 -189.535565
45           -4.535565  -86.135565
46           87.064435   -4.535565
47          293.330544   87.064435
48         -267.980753  293.330544
49          343.219247 -267.980753
50         -186.580753  343.219247
51         -341.780753 -186.580753
52         -273.980753 -341.780753
53          -43.535565 -273.980753
54           35.064435  -43.535565
55          215.464435   35.064435
56          284.864435  215.464435
57          218.464435  284.864435
58          225.064435  218.464435
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device 
          1 
> postscript(file="/var/www/rcomp/tmp/7qemf1292950630.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device 
          1 
> postscript(file="/var/www/rcomp/tmp/8in3i1292950630.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device 
          1 
> postscript(file="/var/www/rcomp/tmp/9in3i1292950630.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device 
          1 
> if (n > n25) {
+ postscript(file="/var/www/rcomp/tmp/10bxll1292950630.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device 
          1 
> 
> #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/rcomp/createtable")
> 
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/11fx191292950630.tab") 
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/12iyzx1292950630.tab") 
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/13w7fn1292950630.tab") 
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/14iqwc1292950630.tab") 
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/www/rcomp/tmp/1539uh1292950630.tab") 
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/www/rcomp/tmp/16orb51292950630.tab") 
+ }
> 
> try(system("convert tmp/14e6r1292950630.ps tmp/14e6r1292950630.png",intern=TRUE))
character(0)
> try(system("convert tmp/24e6r1292950630.ps tmp/24e6r1292950630.png",intern=TRUE))
character(0)
> try(system("convert tmp/3x55c1292950630.ps tmp/3x55c1292950630.png",intern=TRUE))
character(0)
> try(system("convert tmp/4x55c1292950630.ps tmp/4x55c1292950630.png",intern=TRUE))
character(0)
> try(system("convert tmp/5x55c1292950630.ps tmp/5x55c1292950630.png",intern=TRUE))
character(0)
> try(system("convert tmp/6qemf1292950630.ps tmp/6qemf1292950630.png",intern=TRUE))
character(0)
> try(system("convert tmp/7qemf1292950630.ps tmp/7qemf1292950630.png",intern=TRUE))
character(0)
> try(system("convert tmp/8in3i1292950630.ps tmp/8in3i1292950630.png",intern=TRUE))
character(0)
> try(system("convert tmp/9in3i1292950630.ps tmp/9in3i1292950630.png",intern=TRUE))
character(0)
> try(system("convert tmp/10bxll1292950630.ps tmp/10bxll1292950630.png",intern=TRUE))
character(0)
> 
> 
> proc.time()
   user  system elapsed 
  3.260   1.450   4.742