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(2.172,286602,2.150,283042,2.533,276687,2.058,277915,2.160,277128,2.260,277103,2.498,275037,2.695,270150,2.799,267140,2.947,264993,2.930,287259,2.318,291186,2.540,292300,2.570,288186,2.669,281477,2.450,282656,2.842,280190,3.440,280408,2.678,276836,2.981,275216,2.260,274352,2.844,271311,2.546,289802,2.456,290726,2.295,292300,2.379,278506,2.479,269826,2.057,265861,2.280,269034,2.351,264176,2.276,255198,2.548,253353,2.311,246057,2.201,235372,2.725,258556,2.408,260993,2.139,254663,1.898,250643,2.539,243422,2.069,247105,2.063,248541,2.565,245039,2.442,237080,2.194,237085,2.798,225554,2.074,226839,2.628,247934,2.289,248333,2.154,246969,2.466,245098,2.137,246263,1.846,255765,2.072,264319,1.786,268347,1.754,273046,2.226,273963,1.947,267430,1.823,271993,2.521,292710,2.072,295881,2.368,294563),dim=c(2,61),dimnames=list(c('Bouw','NWWM'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('Bouw','NWWM'),1:61)) > 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 Bouw NWWM 1 2.172 286602 2 2.150 283042 3 2.533 276687 4 2.058 277915 5 2.160 277128 6 2.260 277103 7 2.498 275037 8 2.695 270150 9 2.799 267140 10 2.947 264993 11 2.930 287259 12 2.318 291186 13 2.540 292300 14 2.570 288186 15 2.669 281477 16 2.450 282656 17 2.842 280190 18 3.440 280408 19 2.678 276836 20 2.981 275216 21 2.260 274352 22 2.844 271311 23 2.546 289802 24 2.456 290726 25 2.295 292300 26 2.379 278506 27 2.479 269826 28 2.057 265861 29 2.280 269034 30 2.351 264176 31 2.276 255198 32 2.548 253353 33 2.311 246057 34 2.201 235372 35 2.725 258556 36 2.408 260993 37 2.139 254663 38 1.898 250643 39 2.539 243422 40 2.069 247105 41 2.063 248541 42 2.565 245039 43 2.442 237080 44 2.194 237085 45 2.798 225554 46 2.074 226839 47 2.628 247934 48 2.289 248333 49 2.154 246969 50 2.466 245098 51 2.137 246263 52 1.846 255765 53 2.072 264319 54 1.786 268347 55 1.754 273046 56 2.226 273963 57 1.947 267430 58 1.823 271993 59 2.521 292710 60 2.072 295881 61 2.368 294563 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) NWWM 1.600e+00 2.911e-06 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.6408 -0.2023 -0.0317 0.2105 1.0238 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.600e+00 6.233e-01 2.567 0.0128 * NWWM 2.911e-06 2.331e-06 1.249 0.2166 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.3284 on 59 degrees of freedom Multiple R-squared: 0.02576, Adjusted R-squared: 0.009246 F-statistic: 1.56 on 1 and 59 DF, p-value: 0.2166 > 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.21924465 0.43848930 0.78075535 [2,] 0.10260959 0.20521917 0.89739041 [3,] 0.06960714 0.13921428 0.93039286 [4,] 0.04783618 0.09567236 0.95216382 [5,] 0.02624023 0.05248046 0.97375977 [6,] 0.01657599 0.03315199 0.98342401 [7,] 0.47096950 0.94193901 0.52903050 [8,] 0.38309588 0.76619176 0.61690412 [9,] 0.35685516 0.71371032 0.64314484 [10,] 0.30285400 0.60570799 0.69714600 [11,] 0.26160466 0.52320932 0.73839534 [12,] 0.19207157 0.38414314 0.80792843 [13,] 0.22149310 0.44298621 0.77850690 [14,] 0.83124004 0.33751993 0.16875996 [15,] 0.80610668 0.38778664 0.19389332 [16,] 0.88666720 0.22666560 0.11333280 [17,] 0.87965597 0.24068807 0.12034403 [18,] 0.90928916 0.18142167 0.09071084 [19,] 0.89688131 0.20623739 0.10311869 [20,] 0.87532147 0.24935705 0.12467853 [21,] 0.84186748 0.31626504 0.15813252 [22,] 0.81659118 0.36681764 0.18340882 [23,] 0.80131824 0.39736352 0.19868176 [24,] 0.85221747 0.29556505 0.14778253 [25,] 0.82882673 0.34234655 0.17117327 [26,] 0.79633736 0.40732528 0.20366264 [27,] 0.75899604 0.48200792 0.24100396 [28,] 0.73553956 0.52892089 0.26446044 [29,] 0.68080767 0.63838465 0.31919233 [30,] 0.62899919 0.74200161 0.37100081 [31,] 0.70971373 0.58057254 0.29028627 [32,] 0.66837133 0.66325733 0.33162867 [33,] 0.62502685 0.74994630 0.37497315 [34,] 0.67856456 0.64287088 0.32143544 [35,] 0.65878257 0.68243487 0.34121743 [36,] 0.62193654 0.75612691 0.37806346 [37,] 0.58286513 0.83426974 0.41713487 [38,] 0.57754976 0.84490048 0.42245024 [39,] 0.51944443 0.96111113 0.48055557 [40,] 0.43976613 0.87953225 0.56023387 [41,] 0.64154598 0.71690804 0.35845402 [42,] 0.57274215 0.85451569 0.42725785 [43,] 0.70532315 0.58935370 0.29467685 [44,] 0.66301818 0.67396364 0.33698182 [45,] 0.59001100 0.81997799 0.40998900 [46,] 0.79836544 0.40326912 0.20163456 [47,] 0.87468125 0.25063750 0.12531875 [48,] 0.83253210 0.33493580 0.16746790 [49,] 0.82312433 0.35375134 0.17687567 [50,] 0.76266646 0.47466707 0.23733354 [51,] 0.76346161 0.47307677 0.23653839 [52,] 0.69988145 0.60023710 0.30011855 > postscript(file="/var/www/html/rcomp/tmp/1dpp21291331112.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2ny651291331112.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3ny651291331112.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4ny651291331112.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5yq5q1291331112.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 = 61 Frequency = 1 1 2 3 4 5 6 -0.262270627 -0.273906463 0.127594733 -0.350980321 -0.246689142 -0.146616360 7 8 9 10 11 12 0.097398348 0.308625783 0.421388741 0.575639264 0.493816661 -0.129615943 13 14 15 16 17 18 0.089140889 0.131117903 0.249649693 0.027217292 0.426396513 1.023761853 19 20 21 22 23 24 0.272160952 0.579877229 -0.138607424 0.454245785 0.102413271 0.009723247 25 26 27 28 29 30 -0.155859111 -0.031700889 0.093569038 -0.316887729 -0.103125226 -0.017982219 31 32 33 34 35 36 -0.066844730 0.210526585 -0.005232703 -0.084125656 0.372379185 0.048284391 37 38 39 40 41 42 -0.202287194 -0.431583841 0.230438525 -0.250283726 -0.260464327 0.251730982 43 44 45 46 47 48 0.151901875 -0.096112681 0.541457310 -0.186283687 0.306302821 -0.033858780 49 50 51 52 53 54 -0.164887792 0.152559217 -0.179832427 -0.498495427 -0.297398532 -0.595125176 55 56 57 58 59 60 -0.640805289 -0.171474935 -0.431455530 -0.568739710 0.068947264 -0.389284411 61 -0.089447342 > postscript(file="/var/www/html/rcomp/tmp/6yq5q1291331112.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 = 61 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.262270627 NA 1 -0.273906463 -0.262270627 2 0.127594733 -0.273906463 3 -0.350980321 0.127594733 4 -0.246689142 -0.350980321 5 -0.146616360 -0.246689142 6 0.097398348 -0.146616360 7 0.308625783 0.097398348 8 0.421388741 0.308625783 9 0.575639264 0.421388741 10 0.493816661 0.575639264 11 -0.129615943 0.493816661 12 0.089140889 -0.129615943 13 0.131117903 0.089140889 14 0.249649693 0.131117903 15 0.027217292 0.249649693 16 0.426396513 0.027217292 17 1.023761853 0.426396513 18 0.272160952 1.023761853 19 0.579877229 0.272160952 20 -0.138607424 0.579877229 21 0.454245785 -0.138607424 22 0.102413271 0.454245785 23 0.009723247 0.102413271 24 -0.155859111 0.009723247 25 -0.031700889 -0.155859111 26 0.093569038 -0.031700889 27 -0.316887729 0.093569038 28 -0.103125226 -0.316887729 29 -0.017982219 -0.103125226 30 -0.066844730 -0.017982219 31 0.210526585 -0.066844730 32 -0.005232703 0.210526585 33 -0.084125656 -0.005232703 34 0.372379185 -0.084125656 35 0.048284391 0.372379185 36 -0.202287194 0.048284391 37 -0.431583841 -0.202287194 38 0.230438525 -0.431583841 39 -0.250283726 0.230438525 40 -0.260464327 -0.250283726 41 0.251730982 -0.260464327 42 0.151901875 0.251730982 43 -0.096112681 0.151901875 44 0.541457310 -0.096112681 45 -0.186283687 0.541457310 46 0.306302821 -0.186283687 47 -0.033858780 0.306302821 48 -0.164887792 -0.033858780 49 0.152559217 -0.164887792 50 -0.179832427 0.152559217 51 -0.498495427 -0.179832427 52 -0.297398532 -0.498495427 53 -0.595125176 -0.297398532 54 -0.640805289 -0.595125176 55 -0.171474935 -0.640805289 56 -0.431455530 -0.171474935 57 -0.568739710 -0.431455530 58 0.068947264 -0.568739710 59 -0.389284411 0.068947264 60 -0.089447342 -0.389284411 61 NA -0.089447342 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.273906463 -0.262270627 [2,] 0.127594733 -0.273906463 [3,] -0.350980321 0.127594733 [4,] -0.246689142 -0.350980321 [5,] -0.146616360 -0.246689142 [6,] 0.097398348 -0.146616360 [7,] 0.308625783 0.097398348 [8,] 0.421388741 0.308625783 [9,] 0.575639264 0.421388741 [10,] 0.493816661 0.575639264 [11,] -0.129615943 0.493816661 [12,] 0.089140889 -0.129615943 [13,] 0.131117903 0.089140889 [14,] 0.249649693 0.131117903 [15,] 0.027217292 0.249649693 [16,] 0.426396513 0.027217292 [17,] 1.023761853 0.426396513 [18,] 0.272160952 1.023761853 [19,] 0.579877229 0.272160952 [20,] -0.138607424 0.579877229 [21,] 0.454245785 -0.138607424 [22,] 0.102413271 0.454245785 [23,] 0.009723247 0.102413271 [24,] -0.155859111 0.009723247 [25,] -0.031700889 -0.155859111 [26,] 0.093569038 -0.031700889 [27,] -0.316887729 0.093569038 [28,] -0.103125226 -0.316887729 [29,] -0.017982219 -0.103125226 [30,] -0.066844730 -0.017982219 [31,] 0.210526585 -0.066844730 [32,] -0.005232703 0.210526585 [33,] -0.084125656 -0.005232703 [34,] 0.372379185 -0.084125656 [35,] 0.048284391 0.372379185 [36,] -0.202287194 0.048284391 [37,] -0.431583841 -0.202287194 [38,] 0.230438525 -0.431583841 [39,] -0.250283726 0.230438525 [40,] -0.260464327 -0.250283726 [41,] 0.251730982 -0.260464327 [42,] 0.151901875 0.251730982 [43,] -0.096112681 0.151901875 [44,] 0.541457310 -0.096112681 [45,] -0.186283687 0.541457310 [46,] 0.306302821 -0.186283687 [47,] -0.033858780 0.306302821 [48,] -0.164887792 -0.033858780 [49,] 0.152559217 -0.164887792 [50,] -0.179832427 0.152559217 [51,] -0.498495427 -0.179832427 [52,] -0.297398532 -0.498495427 [53,] -0.595125176 -0.297398532 [54,] -0.640805289 -0.595125176 [55,] -0.171474935 -0.640805289 [56,] -0.431455530 -0.171474935 [57,] -0.568739710 -0.431455530 [58,] 0.068947264 -0.568739710 [59,] -0.389284411 0.068947264 [60,] -0.089447342 -0.389284411 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.273906463 -0.262270627 2 0.127594733 -0.273906463 3 -0.350980321 0.127594733 4 -0.246689142 -0.350980321 5 -0.146616360 -0.246689142 6 0.097398348 -0.146616360 7 0.308625783 0.097398348 8 0.421388741 0.308625783 9 0.575639264 0.421388741 10 0.493816661 0.575639264 11 -0.129615943 0.493816661 12 0.089140889 -0.129615943 13 0.131117903 0.089140889 14 0.249649693 0.131117903 15 0.027217292 0.249649693 16 0.426396513 0.027217292 17 1.023761853 0.426396513 18 0.272160952 1.023761853 19 0.579877229 0.272160952 20 -0.138607424 0.579877229 21 0.454245785 -0.138607424 22 0.102413271 0.454245785 23 0.009723247 0.102413271 24 -0.155859111 0.009723247 25 -0.031700889 -0.155859111 26 0.093569038 -0.031700889 27 -0.316887729 0.093569038 28 -0.103125226 -0.316887729 29 -0.017982219 -0.103125226 30 -0.066844730 -0.017982219 31 0.210526585 -0.066844730 32 -0.005232703 0.210526585 33 -0.084125656 -0.005232703 34 0.372379185 -0.084125656 35 0.048284391 0.372379185 36 -0.202287194 0.048284391 37 -0.431583841 -0.202287194 38 0.230438525 -0.431583841 39 -0.250283726 0.230438525 40 -0.260464327 -0.250283726 41 0.251730982 -0.260464327 42 0.151901875 0.251730982 43 -0.096112681 0.151901875 44 0.541457310 -0.096112681 45 -0.186283687 0.541457310 46 0.306302821 -0.186283687 47 -0.033858780 0.306302821 48 -0.164887792 -0.033858780 49 0.152559217 -0.164887792 50 -0.179832427 0.152559217 51 -0.498495427 -0.179832427 52 -0.297398532 -0.498495427 53 -0.595125176 -0.297398532 54 -0.640805289 -0.595125176 55 -0.171474935 -0.640805289 56 -0.431455530 -0.171474935 57 -0.568739710 -0.431455530 58 0.068947264 -0.568739710 59 -0.389284411 0.068947264 60 -0.089447342 -0.389284411 > 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/79zmb1291331112.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/89zmb1291331112.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/99zmb1291331112.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/1018mw1291331112.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/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/11nrk21291331112.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/12qrj81291331112.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/13fax11291331112.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/14q1xm1291331112.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/15t2ds1291331112.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/16pubj1291331112.tab") + } > > try(system("convert tmp/1dpp21291331112.ps tmp/1dpp21291331112.png",intern=TRUE)) character(0) > try(system("convert tmp/2ny651291331112.ps tmp/2ny651291331112.png",intern=TRUE)) character(0) > try(system("convert tmp/3ny651291331112.ps tmp/3ny651291331112.png",intern=TRUE)) character(0) > try(system("convert tmp/4ny651291331112.ps tmp/4ny651291331112.png",intern=TRUE)) character(0) > try(system("convert tmp/5yq5q1291331112.ps tmp/5yq5q1291331112.png",intern=TRUE)) character(0) > try(system("convert tmp/6yq5q1291331112.ps tmp/6yq5q1291331112.png",intern=TRUE)) character(0) > try(system("convert tmp/79zmb1291331112.ps tmp/79zmb1291331112.png",intern=TRUE)) character(0) > try(system("convert tmp/89zmb1291331112.ps tmp/89zmb1291331112.png",intern=TRUE)) character(0) > try(system("convert tmp/99zmb1291331112.ps tmp/99zmb1291331112.png",intern=TRUE)) character(0) > try(system("convert tmp/1018mw1291331112.ps tmp/1018mw1291331112.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.532 1.713 6.302