R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(1 + ,476000 + ,113000 + ,363000 + ,2 + ,475000 + ,110000 + ,364000 + ,3 + ,470000 + ,107000 + ,363000 + ,4 + ,461000 + ,103000 + ,358000 + ,5 + ,455000 + ,98000 + ,357000 + ,6 + ,456000 + ,98000 + ,357000 + ,7 + ,517000 + ,137000 + ,380000 + ,8 + ,525000 + ,148000 + ,378000 + ,9 + ,523000 + ,147000 + ,376000 + ,10 + ,519000 + ,139000 + ,380000 + ,11 + ,509000 + ,130000 + ,379000 + ,12 + ,512000 + ,128000 + ,384000 + ,1 + ,519000 + ,127000 + ,392000 + ,2 + ,517000 + ,123000 + ,394000 + ,3 + ,510000 + ,118000 + ,392000 + ,4 + ,509000 + ,114000 + ,396000 + ,5 + ,501000 + ,108000 + ,392000 + ,6 + ,507000 + ,111000 + ,396000 + ,7 + ,569000 + ,151000 + ,419000 + ,8 + ,580000 + ,159000 + ,421000 + ,9 + ,578000 + ,158000 + ,420000 + ,10 + ,565000 + ,148000 + ,418000 + ,11 + ,547000 + ,138000 + ,410000 + ,12 + ,555000 + ,137000 + ,418000 + ,1 + ,562000 + ,136000 + ,426000 + ,2 + ,561000 + ,133000 + ,428000 + ,3 + ,555000 + ,126000 + ,430000 + ,4 + ,544000 + ,120000 + ,424000 + ,5 + ,537000 + ,114000 + ,423000 + ,6 + ,543000 + ,116000 + ,427000 + ,7 + ,594000 + ,153000 + ,441000 + ,8 + ,611000 + ,162000 + ,449000 + ,9 + ,613000 + ,161000 + ,452000 + ,10 + ,611000 + ,149000 + ,462000 + ,11 + ,594000 + ,139000 + ,455000 + ,12 + ,595000 + ,135000 + ,461000 + ,1 + ,591000 + ,130000 + ,461000 + ,2 + ,589000 + ,127000 + ,463000 + ,3 + ,584000 + ,122000 + ,462000 + ,4 + ,573000 + ,117000 + ,456000 + ,5 + ,567000 + ,112000 + ,455000 + ,6 + ,569000 + ,113000 + ,456000 + ,7 + ,621000 + ,149000 + ,472000 + ,8 + ,629000 + ,157000 + ,472000 + ,9 + ,628000 + ,157000 + ,471000 + ,10 + ,612000 + ,147000 + ,465000 + ,11 + ,595000 + ,137000 + ,459000 + ,12 + ,597000 + ,132000 + ,465000 + ,1 + ,593000 + ,125000 + ,468000 + ,2 + ,590000 + ,123000 + ,467000 + ,3 + ,580000 + ,117000 + ,463000 + ,4 + ,574000 + ,114000 + ,460000 + ,5 + ,573000 + ,111000 + ,462000 + ,6 + ,573000 + ,112000 + ,461000 + ,7 + ,620000 + ,144000 + ,476000 + ,8 + ,626000 + ,150000 + ,476000 + ,9 + ,620000 + ,149000 + ,471000 + ,10 + ,588000 + ,134000 + ,453000 + ,11 + ,566000 + ,123000 + ,443000 + ,12 + ,557000 + ,116000 + ,442000 + ,1 + ,561000 + ,117000 + ,444000 + ,2 + ,549000 + ,111000 + ,438000 + ,3 + ,532000 + ,105000 + ,427000 + ,4 + ,526000 + ,102000 + ,424000 + ,5 + ,511000 + ,95000 + ,416000 + ,6 + ,499000 + ,93000 + ,406000 + ,7 + ,555000 + ,124000 + ,431000 + ,8 + ,565000 + ,130000 + ,434000 + ,9 + ,542000 + ,124000 + ,418000 + ,10 + ,527000 + ,115000 + ,412000 + ,11 + ,510000 + ,106000 + ,404000 + ,12 + ,514000 + ,105000 + ,409000 + ,1 + ,517000 + ,105000 + ,412000 + ,2 + ,508000 + ,101000 + ,406000 + ,3 + ,493000 + ,95000 + ,398000 + ,4 + ,490000 + ,93000 + ,397000 + ,5 + ,469000 + ,84000 + ,385000 + ,6 + ,478000 + ,87000 + ,390000 + ,7 + ,528000 + ,116000 + ,413000 + ,8 + ,534000 + ,120000 + ,413000 + ,9 + ,518000 + ,117000 + ,401000 + ,10 + ,506000 + ,109000 + ,397000 + ,11 + ,502000 + ,105000 + ,397000 + ,12 + ,516000 + ,107000 + ,409000 + ,1 + ,528000 + ,109000 + ,419000 + ,2 + ,533000 + ,109000 + ,424000 + ,3 + ,536000 + ,108000 + ,428000 + ,4 + ,537000 + ,107000 + ,430000 + ,5 + ,524000 + ,99000 + ,424000 + ,6 + ,536000 + ,103000 + ,433000 + ,7 + ,587000 + ,131000 + ,456000 + ,8 + ,597000 + ,137000 + ,459000 + ,9 + ,581000 + ,135000 + ,446000 + ,10 + ,564000 + ,124000 + ,441000 + ,11 + ,558000 + ,118000 + ,439000 + ,12 + ,575000 + ,121000 + ,454000 + ,1 + ,580000 + ,121000 + ,460000 + ,2 + ,575000 + ,118000 + ,457000 + ,3 + ,563000 + ,113000 + ,451000 + ,4 + ,552000 + ,107000 + ,444000 + ,5 + ,537000 + ,100000 + ,437000 + ,6 + ,545000 + ,102000 + ,443000 + ,7 + ,601000 + ,130000 + ,471000 + ,8 + ,604000 + ,136000 + ,469000 + ,9 + ,586000 + ,133000 + ,454000 + ,10 + ,564000 + ,120000 + ,444000 + ,11 + ,549000 + ,112000 + ,436000 + ,12 + ,551000 + ,109000 + ,442000 + ,1 + ,556000 + ,110000 + ,446000 + ,2 + ,548000 + ,106000 + ,442000 + ,3 + ,540000 + ,102000 + ,438000 + ,4 + ,531000 + ,98000 + ,433000 + ,5 + ,521000 + ,92000 + ,428000 + ,6 + ,519000 + ,92000 + ,426000 + ,7 + ,572000 + ,120000 + ,452000 + ,8 + ,581000 + ,127000 + ,455000 + ,9 + ,563000 + ,124000 + ,439000 + ,10 + ,548000 + ,114000 + ,434000 + ,11 + ,539000 + ,108000 + ,431000 + ,12 + ,541000 + ,106000 + ,435000 + ,1 + ,562000 + ,111000 + ,450000 + ,2 + ,559000 + ,110000 + ,449000 + ,3 + ,546000 + ,104000 + ,442000 + ,4 + ,536000 + ,100000 + ,437000 + ,5 + ,528000 + ,96000 + ,431000 + ,6 + ,530000 + ,98000 + ,433000 + ,7 + ,582000 + ,122000 + ,460000 + ,8 + ,599000 + ,134000 + ,465000 + ,9 + ,584000 + ,133000 + ,451000 + ,10 + ,571000 + ,125000 + ,447000) + ,dim=c(4 + ,130) + ,dimnames=list(c('Maanden' + ,'Totaal' + ,'jongerdan25jaar' + ,'vanaf25jaar') + ,1:130)) > y <- array(NA,dim=c(4,130),dimnames=list(c('Maanden','Totaal','jongerdan25jaar','vanaf25jaar'),1:130)) > 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 = '2' > par3 <- 'No Linear Trend' > par2 <- 'Do not include Seasonal Dummies' > par1 <- '2' > #'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, 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 Totaal Maanden jongerdan25jaar vanaf25jaar 1 476000 1 113000 363000 2 475000 2 110000 364000 3 470000 3 107000 363000 4 461000 4 103000 358000 5 455000 5 98000 357000 6 456000 6 98000 357000 7 517000 7 137000 380000 8 525000 8 148000 378000 9 523000 9 147000 376000 10 519000 10 139000 380000 11 509000 11 130000 379000 12 512000 12 128000 384000 13 519000 1 127000 392000 14 517000 2 123000 394000 15 510000 3 118000 392000 16 509000 4 114000 396000 17 501000 5 108000 392000 18 507000 6 111000 396000 19 569000 7 151000 419000 20 580000 8 159000 421000 21 578000 9 158000 420000 22 565000 10 148000 418000 23 547000 11 138000 410000 24 555000 12 137000 418000 25 562000 1 136000 426000 26 561000 2 133000 428000 27 555000 3 126000 430000 28 544000 4 120000 424000 29 537000 5 114000 423000 30 543000 6 116000 427000 31 594000 7 153000 441000 32 611000 8 162000 449000 33 613000 9 161000 452000 34 611000 10 149000 462000 35 594000 11 139000 455000 36 595000 12 135000 461000 37 591000 1 130000 461000 38 589000 2 127000 463000 39 584000 3 122000 462000 40 573000 4 117000 456000 41 567000 5 112000 455000 42 569000 6 113000 456000 43 621000 7 149000 472000 44 629000 8 157000 472000 45 628000 9 157000 471000 46 612000 10 147000 465000 47 595000 11 137000 459000 48 597000 12 132000 465000 49 593000 1 125000 468000 50 590000 2 123000 467000 51 580000 3 117000 463000 52 574000 4 114000 460000 53 573000 5 111000 462000 54 573000 6 112000 461000 55 620000 7 144000 476000 56 626000 8 150000 476000 57 620000 9 149000 471000 58 588000 10 134000 453000 59 566000 11 123000 443000 60 557000 12 116000 442000 61 561000 1 117000 444000 62 549000 2 111000 438000 63 532000 3 105000 427000 64 526000 4 102000 424000 65 511000 5 95000 416000 66 499000 6 93000 406000 67 555000 7 124000 431000 68 565000 8 130000 434000 69 542000 9 124000 418000 70 527000 10 115000 412000 71 510000 11 106000 404000 72 514000 12 105000 409000 73 517000 1 105000 412000 74 508000 2 101000 406000 75 493000 3 95000 398000 76 490000 4 93000 397000 77 469000 5 84000 385000 78 478000 6 87000 390000 79 528000 7 116000 413000 80 534000 8 120000 413000 81 518000 9 117000 401000 82 506000 10 109000 397000 83 502000 11 105000 397000 84 516000 12 107000 409000 85 528000 1 109000 419000 86 533000 2 109000 424000 87 536000 3 108000 428000 88 537000 4 107000 430000 89 524000 5 99000 424000 90 536000 6 103000 433000 91 587000 7 131000 456000 92 597000 8 137000 459000 93 581000 9 135000 446000 94 564000 10 124000 441000 95 558000 11 118000 439000 96 575000 12 121000 454000 97 580000 1 121000 460000 98 575000 2 118000 457000 99 563000 3 113000 451000 100 552000 4 107000 444000 101 537000 5 100000 437000 102 545000 6 102000 443000 103 601000 7 130000 471000 104 604000 8 136000 469000 105 586000 9 133000 454000 106 564000 10 120000 444000 107 549000 11 112000 436000 108 551000 12 109000 442000 109 556000 1 110000 446000 110 548000 2 106000 442000 111 540000 3 102000 438000 112 531000 4 98000 433000 113 521000 5 92000 428000 114 519000 6 92000 426000 115 572000 7 120000 452000 116 581000 8 127000 455000 117 563000 9 124000 439000 118 548000 10 114000 434000 119 539000 11 108000 431000 120 541000 12 106000 435000 121 562000 1 111000 450000 122 559000 2 110000 449000 123 546000 3 104000 442000 124 536000 4 100000 437000 125 528000 5 96000 431000 126 530000 6 98000 433000 127 582000 7 122000 460000 128 599000 8 134000 465000 129 584000 9 133000 451000 130 571000 10 125000 447000 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Maanden jongerdan25jaar vanaf25jaar 1347.6807 -1.4324 0.9928 0.9988 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1133.62 -114.33 0.24 157.54 1180.12 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.348e+03 6.760e+02 1.994 0.0484 * Maanden -1.432e+00 1.437e+01 -0.100 0.9208 jongerdan25jaar 9.928e-01 2.972e-03 334.076 <2e-16 *** vanaf25jaar 9.988e-01 1.660e-03 601.755 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 521.3 on 126 degrees of freedom Multiple R-squared: 0.9998, Adjusted R-squared: 0.9998 F-statistic: 2.429e+05 on 3 and 126 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,] 0.762914145 0.474171710 0.2370859 [2,] 0.635156436 0.729687129 0.3648436 [3,] 0.732840187 0.534319626 0.2671598 [4,] 0.619990992 0.760018016 0.3800090 [5,] 0.521575576 0.956848849 0.4784244 [6,] 0.430402197 0.860804394 0.5695978 [7,] 0.334197066 0.668394132 0.6658029 [8,] 0.250139647 0.500279293 0.7498604 [9,] 0.183870142 0.367740284 0.8161299 [10,] 0.405254795 0.810509590 0.5947452 [11,] 0.590769745 0.818460509 0.4092303 [12,] 0.513700584 0.972598831 0.4862994 [13,] 0.479037102 0.958074204 0.5209629 [14,] 0.536197597 0.927604807 0.4638024 [15,] 0.521651257 0.956697487 0.4783487 [16,] 0.564705499 0.870589001 0.4352945 [17,] 0.622416421 0.755167158 0.3775836 [18,] 0.587138799 0.825722403 0.4128612 [19,] 0.540931536 0.918136928 0.4590685 [20,] 0.483114135 0.966228270 0.5168859 [21,] 0.579999707 0.840000585 0.4200003 [22,] 0.524227458 0.951545084 0.4757725 [23,] 0.463078174 0.926156348 0.5369218 [24,] 0.404216003 0.808432007 0.5957840 [25,] 0.400202549 0.800405098 0.5997975 [26,] 0.400837249 0.801674498 0.5991628 [27,] 0.384814701 0.769629402 0.6151853 [28,] 0.348805482 0.697610963 0.6511945 [29,] 0.301396619 0.602793239 0.6986034 [30,] 0.367933269 0.735866537 0.6320667 [31,] 0.317547211 0.635094421 0.6824528 [32,] 0.399679891 0.799359782 0.6003201 [33,] 0.353386161 0.706772322 0.6466138 [34,] 0.305449554 0.610899108 0.6945504 [35,] 0.259164079 0.518328158 0.7408359 [36,] 0.217038949 0.434077897 0.7829611 [37,] 0.195425331 0.390850662 0.8045747 [38,] 0.177552004 0.355104008 0.8224480 [39,] 0.158773722 0.317547443 0.8412263 [40,] 0.135922450 0.271844900 0.8640775 [41,] 0.176903831 0.353807662 0.8230962 [42,] 0.150610934 0.301221868 0.8493891 [43,] 0.122139154 0.244278308 0.8778608 [44,] 0.097582672 0.195165344 0.9024173 [45,] 0.076552012 0.153104025 0.9234480 [46,] 0.059120260 0.118240519 0.9408797 [47,] 0.044987175 0.089974351 0.9550128 [48,] 0.033775475 0.067550951 0.9662245 [49,] 0.026852471 0.053704942 0.9731475 [50,] 0.021668722 0.043337444 0.9783313 [51,] 0.017282537 0.034565074 0.9827175 [52,] 0.058750011 0.117500021 0.9412500 [53,] 0.045169123 0.090338246 0.9548309 [54,] 0.082407196 0.164814392 0.9175928 [55,] 0.064441016 0.128882032 0.9355590 [56,] 0.049649279 0.099298559 0.9503507 [57,] 0.037894724 0.075789448 0.9621053 [58,] 0.028642014 0.057284028 0.9713580 [59,] 0.021718386 0.043436773 0.9782816 [60,] 0.016511587 0.033023175 0.9834884 [61,] 0.011967058 0.023934116 0.9880329 [62,] 0.038587468 0.077174937 0.9614125 [63,] 0.029216459 0.058432919 0.9707835 [64,] 0.021651556 0.043303111 0.9783484 [65,] 0.016046912 0.032093824 0.9839531 [66,] 0.011821297 0.023642595 0.9881787 [67,] 0.008471621 0.016943242 0.9915284 [68,] 0.015456433 0.030912865 0.9845436 [69,] 0.011575688 0.023151376 0.9884243 [70,] 0.008746566 0.017493132 0.9912534 [71,] 0.007348525 0.014697050 0.9926515 [72,] 0.009733381 0.019466762 0.9902666 [73,] 0.023843293 0.047686586 0.9761567 [74,] 0.050724680 0.101449360 0.9492753 [75,] 0.038426788 0.076853576 0.9615732 [76,] 0.029063455 0.058126911 0.9709365 [77,] 0.022568006 0.045136012 0.9774320 [78,] 0.017635220 0.035270440 0.9823648 [79,] 0.012884529 0.025769059 0.9871155 [80,] 0.009314527 0.018629053 0.9906855 [81,] 0.006676862 0.013353724 0.9933231 [82,] 0.004755225 0.009510450 0.9952448 [83,] 0.006996436 0.013992872 0.9930036 [84,] 0.004907107 0.009814214 0.9950929 [85,] 0.003485006 0.006970013 0.9965150 [86,] 0.021267470 0.042534940 0.9787325 [87,] 0.017730980 0.035461959 0.9822690 [88,] 0.029979206 0.059958411 0.9700208 [89,] 0.064621999 0.129243997 0.9353780 [90,] 0.049297585 0.098595169 0.9507024 [91,] 0.069892848 0.139785695 0.9301072 [92,] 0.053393262 0.106786524 0.9466067 [93,] 0.098262424 0.196524848 0.9017376 [94,] 0.154738430 0.309476860 0.8452616 [95,] 0.124838572 0.249677144 0.8751614 [96,] 0.097865054 0.195730109 0.9021349 [97,] 0.087040003 0.174080007 0.9129600 [98,] 0.086800394 0.173600788 0.9131996 [99,] 0.102584266 0.205168532 0.8974157 [100,] 0.076579052 0.153158104 0.9234209 [101,] 0.149518753 0.299037506 0.8504812 [102,] 0.115109717 0.230219434 0.8848903 [103,] 0.086305603 0.172611206 0.9136944 [104,] 0.064182229 0.128364459 0.9358178 [105,] 0.047529322 0.095058644 0.9524707 [106,] 0.035559439 0.071118879 0.9644406 [107,] 0.042865486 0.085730972 0.9571345 [108,] 0.071249219 0.142498438 0.9287508 [109,] 0.048635181 0.097270361 0.9513648 [110,] 0.075986019 0.151972038 0.9240140 [111,] 0.049021302 0.098042604 0.9509787 [112,] 0.031868657 0.063737313 0.9681313 [113,] 0.023461393 0.046922786 0.9765386 [114,] 0.036926836 0.073853672 0.9630732 [115,] 0.033048641 0.066097282 0.9669514 [116,] 0.017495885 0.034991770 0.9825041 [117,] 0.007573144 0.015146288 0.9924269 > postscript(file="/var/fisher/rcomp/tmp/1c5wh1353451392.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/fisher/rcomp/tmp/2re6y1353451392.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/fisher/rcomp/tmp/382i91353451392.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/fisher/rcomp/tmp/4hxnq1353451392.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/fisher/rcomp/tmp/5xhku1353451392.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 = 130 Frequency = 1 1 2 3 4 5 -113.5322295 867.4487755 -153.8782698 -187.0232295 -222.7539029 6 7 8 9 10 778.6785190 87.5242649 -834.1314093 157.7911483 106.2251585 11 12 13 14 15 41.6872291 34.4861484 20.7598947 -4.3068893 -41.1915877 16 17 18 19 20 -1063.9503215 889.6551159 -82.6909198 -766.6433599 294.7116243 21 22 23 24 25 287.7882070 -785.1055615 -864.9234806 138.5393280 124.8130743 26 27 28 29 30 106.9481044 -939.7241217 11.5732655 -31.3592219 -10.9070716 31 32 33 34 35 273.1488203 348.6297692 346.3224523 272.8733570 194.2094630 36 37 38 39 40 -826.2412206 121.9930688 -895.8719012 68.3974255 26.8966267 41 42 43 44 45 -8.8340467 0.9542143 280.1163424 339.1632764 339.4416732 46 47 48 49 50 261.9318043 -815.5780646 156.7694378 94.0621744 79.9369432 51 52 53 54 55 33.5423805 9.9072850 -7.9576850 -0.4774742 248.7233727 56 57 58 59 60 293.3666787 281.8271610 1154.4599208 65.1321375 -985.0021639 61 62 63 64 65 8.7510599 -39.9515530 -94.4242913 -118.0593868 -176.2718639 66 67 68 69 70 -200.7833211 52.7559628 1100.8613441 40.6184802 -29.6895747 71 72 73 74 75 -102.3056797 -102.3049464 -114.5995116 851.1015036 -199.9091595 76 77 78 79 80 -214.0343907 -291.2665962 737.5413932 -1025.6310011 1004.6086768 81 82 83 84 85 -29.4126446 -90.2108353 -117.5856695 -87.9013184 -77.7140798 86 87 88 89 90 -70.5115325 -71.6648242 -75.1261661 861.7675930 -97.6065032 91 92 93 94 95 132.0192885 1180.1246698 152.1511373 -931.4065206 1024.5069670 96 97 98 99 100 64.8552075 -943.9772825 32.3876221 -1009.1131768 941.0301853 101 102 103 104 105 -116.0282667 -93.2680662 142.1278510 -815.5368932 -853.0202899 106 107 108 109 110 43.2482987 977.8340076 -35.4148620 -39.3535881 -71.3445227 111 112 113 114 115 -103.3354573 -136.4804170 815.9709953 815.0953669 48.1832339 116 117 118 119 120 -896.5095708 64.8530074 -11.5028364 -56.7433740 -65.0984797 121 122 123 124 125 972.4643264 -34.4590909 -84.3157288 -1117.4606885 848.2403266 126 127 128 129 130 -1133.6155733 71.8190628 165.4433783 143.5176347 -917.2805559 > postscript(file="/var/fisher/rcomp/tmp/6wae11353451392.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 = 130 Frequency = 1 lag(myerror, k = 1) myerror 0 -113.5322295 NA 1 867.4487755 -113.5322295 2 -153.8782698 867.4487755 3 -187.0232295 -153.8782698 4 -222.7539029 -187.0232295 5 778.6785190 -222.7539029 6 87.5242649 778.6785190 7 -834.1314093 87.5242649 8 157.7911483 -834.1314093 9 106.2251585 157.7911483 10 41.6872291 106.2251585 11 34.4861484 41.6872291 12 20.7598947 34.4861484 13 -4.3068893 20.7598947 14 -41.1915877 -4.3068893 15 -1063.9503215 -41.1915877 16 889.6551159 -1063.9503215 17 -82.6909198 889.6551159 18 -766.6433599 -82.6909198 19 294.7116243 -766.6433599 20 287.7882070 294.7116243 21 -785.1055615 287.7882070 22 -864.9234806 -785.1055615 23 138.5393280 -864.9234806 24 124.8130743 138.5393280 25 106.9481044 124.8130743 26 -939.7241217 106.9481044 27 11.5732655 -939.7241217 28 -31.3592219 11.5732655 29 -10.9070716 -31.3592219 30 273.1488203 -10.9070716 31 348.6297692 273.1488203 32 346.3224523 348.6297692 33 272.8733570 346.3224523 34 194.2094630 272.8733570 35 -826.2412206 194.2094630 36 121.9930688 -826.2412206 37 -895.8719012 121.9930688 38 68.3974255 -895.8719012 39 26.8966267 68.3974255 40 -8.8340467 26.8966267 41 0.9542143 -8.8340467 42 280.1163424 0.9542143 43 339.1632764 280.1163424 44 339.4416732 339.1632764 45 261.9318043 339.4416732 46 -815.5780646 261.9318043 47 156.7694378 -815.5780646 48 94.0621744 156.7694378 49 79.9369432 94.0621744 50 33.5423805 79.9369432 51 9.9072850 33.5423805 52 -7.9576850 9.9072850 53 -0.4774742 -7.9576850 54 248.7233727 -0.4774742 55 293.3666787 248.7233727 56 281.8271610 293.3666787 57 1154.4599208 281.8271610 58 65.1321375 1154.4599208 59 -985.0021639 65.1321375 60 8.7510599 -985.0021639 61 -39.9515530 8.7510599 62 -94.4242913 -39.9515530 63 -118.0593868 -94.4242913 64 -176.2718639 -118.0593868 65 -200.7833211 -176.2718639 66 52.7559628 -200.7833211 67 1100.8613441 52.7559628 68 40.6184802 1100.8613441 69 -29.6895747 40.6184802 70 -102.3056797 -29.6895747 71 -102.3049464 -102.3056797 72 -114.5995116 -102.3049464 73 851.1015036 -114.5995116 74 -199.9091595 851.1015036 75 -214.0343907 -199.9091595 76 -291.2665962 -214.0343907 77 737.5413932 -291.2665962 78 -1025.6310011 737.5413932 79 1004.6086768 -1025.6310011 80 -29.4126446 1004.6086768 81 -90.2108353 -29.4126446 82 -117.5856695 -90.2108353 83 -87.9013184 -117.5856695 84 -77.7140798 -87.9013184 85 -70.5115325 -77.7140798 86 -71.6648242 -70.5115325 87 -75.1261661 -71.6648242 88 861.7675930 -75.1261661 89 -97.6065032 861.7675930 90 132.0192885 -97.6065032 91 1180.1246698 132.0192885 92 152.1511373 1180.1246698 93 -931.4065206 152.1511373 94 1024.5069670 -931.4065206 95 64.8552075 1024.5069670 96 -943.9772825 64.8552075 97 32.3876221 -943.9772825 98 -1009.1131768 32.3876221 99 941.0301853 -1009.1131768 100 -116.0282667 941.0301853 101 -93.2680662 -116.0282667 102 142.1278510 -93.2680662 103 -815.5368932 142.1278510 104 -853.0202899 -815.5368932 105 43.2482987 -853.0202899 106 977.8340076 43.2482987 107 -35.4148620 977.8340076 108 -39.3535881 -35.4148620 109 -71.3445227 -39.3535881 110 -103.3354573 -71.3445227 111 -136.4804170 -103.3354573 112 815.9709953 -136.4804170 113 815.0953669 815.9709953 114 48.1832339 815.0953669 115 -896.5095708 48.1832339 116 64.8530074 -896.5095708 117 -11.5028364 64.8530074 118 -56.7433740 -11.5028364 119 -65.0984797 -56.7433740 120 972.4643264 -65.0984797 121 -34.4590909 972.4643264 122 -84.3157288 -34.4590909 123 -1117.4606885 -84.3157288 124 848.2403266 -1117.4606885 125 -1133.6155733 848.2403266 126 71.8190628 -1133.6155733 127 165.4433783 71.8190628 128 143.5176347 165.4433783 129 -917.2805559 143.5176347 130 NA -917.2805559 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 867.4487755 -113.5322295 [2,] -153.8782698 867.4487755 [3,] -187.0232295 -153.8782698 [4,] -222.7539029 -187.0232295 [5,] 778.6785190 -222.7539029 [6,] 87.5242649 778.6785190 [7,] -834.1314093 87.5242649 [8,] 157.7911483 -834.1314093 [9,] 106.2251585 157.7911483 [10,] 41.6872291 106.2251585 [11,] 34.4861484 41.6872291 [12,] 20.7598947 34.4861484 [13,] -4.3068893 20.7598947 [14,] -41.1915877 -4.3068893 [15,] -1063.9503215 -41.1915877 [16,] 889.6551159 -1063.9503215 [17,] -82.6909198 889.6551159 [18,] -766.6433599 -82.6909198 [19,] 294.7116243 -766.6433599 [20,] 287.7882070 294.7116243 [21,] -785.1055615 287.7882070 [22,] -864.9234806 -785.1055615 [23,] 138.5393280 -864.9234806 [24,] 124.8130743 138.5393280 [25,] 106.9481044 124.8130743 [26,] -939.7241217 106.9481044 [27,] 11.5732655 -939.7241217 [28,] -31.3592219 11.5732655 [29,] -10.9070716 -31.3592219 [30,] 273.1488203 -10.9070716 [31,] 348.6297692 273.1488203 [32,] 346.3224523 348.6297692 [33,] 272.8733570 346.3224523 [34,] 194.2094630 272.8733570 [35,] -826.2412206 194.2094630 [36,] 121.9930688 -826.2412206 [37,] -895.8719012 121.9930688 [38,] 68.3974255 -895.8719012 [39,] 26.8966267 68.3974255 [40,] -8.8340467 26.8966267 [41,] 0.9542143 -8.8340467 [42,] 280.1163424 0.9542143 [43,] 339.1632764 280.1163424 [44,] 339.4416732 339.1632764 [45,] 261.9318043 339.4416732 [46,] -815.5780646 261.9318043 [47,] 156.7694378 -815.5780646 [48,] 94.0621744 156.7694378 [49,] 79.9369432 94.0621744 [50,] 33.5423805 79.9369432 [51,] 9.9072850 33.5423805 [52,] -7.9576850 9.9072850 [53,] -0.4774742 -7.9576850 [54,] 248.7233727 -0.4774742 [55,] 293.3666787 248.7233727 [56,] 281.8271610 293.3666787 [57,] 1154.4599208 281.8271610 [58,] 65.1321375 1154.4599208 [59,] -985.0021639 65.1321375 [60,] 8.7510599 -985.0021639 [61,] -39.9515530 8.7510599 [62,] -94.4242913 -39.9515530 [63,] -118.0593868 -94.4242913 [64,] -176.2718639 -118.0593868 [65,] -200.7833211 -176.2718639 [66,] 52.7559628 -200.7833211 [67,] 1100.8613441 52.7559628 [68,] 40.6184802 1100.8613441 [69,] -29.6895747 40.6184802 [70,] -102.3056797 -29.6895747 [71,] -102.3049464 -102.3056797 [72,] -114.5995116 -102.3049464 [73,] 851.1015036 -114.5995116 [74,] -199.9091595 851.1015036 [75,] -214.0343907 -199.9091595 [76,] -291.2665962 -214.0343907 [77,] 737.5413932 -291.2665962 [78,] -1025.6310011 737.5413932 [79,] 1004.6086768 -1025.6310011 [80,] -29.4126446 1004.6086768 [81,] -90.2108353 -29.4126446 [82,] -117.5856695 -90.2108353 [83,] -87.9013184 -117.5856695 [84,] -77.7140798 -87.9013184 [85,] -70.5115325 -77.7140798 [86,] -71.6648242 -70.5115325 [87,] -75.1261661 -71.6648242 [88,] 861.7675930 -75.1261661 [89,] -97.6065032 861.7675930 [90,] 132.0192885 -97.6065032 [91,] 1180.1246698 132.0192885 [92,] 152.1511373 1180.1246698 [93,] -931.4065206 152.1511373 [94,] 1024.5069670 -931.4065206 [95,] 64.8552075 1024.5069670 [96,] -943.9772825 64.8552075 [97,] 32.3876221 -943.9772825 [98,] -1009.1131768 32.3876221 [99,] 941.0301853 -1009.1131768 [100,] -116.0282667 941.0301853 [101,] -93.2680662 -116.0282667 [102,] 142.1278510 -93.2680662 [103,] -815.5368932 142.1278510 [104,] -853.0202899 -815.5368932 [105,] 43.2482987 -853.0202899 [106,] 977.8340076 43.2482987 [107,] -35.4148620 977.8340076 [108,] -39.3535881 -35.4148620 [109,] -71.3445227 -39.3535881 [110,] -103.3354573 -71.3445227 [111,] -136.4804170 -103.3354573 [112,] 815.9709953 -136.4804170 [113,] 815.0953669 815.9709953 [114,] 48.1832339 815.0953669 [115,] -896.5095708 48.1832339 [116,] 64.8530074 -896.5095708 [117,] -11.5028364 64.8530074 [118,] -56.7433740 -11.5028364 [119,] -65.0984797 -56.7433740 [120,] 972.4643264 -65.0984797 [121,] -34.4590909 972.4643264 [122,] -84.3157288 -34.4590909 [123,] -1117.4606885 -84.3157288 [124,] 848.2403266 -1117.4606885 [125,] -1133.6155733 848.2403266 [126,] 71.8190628 -1133.6155733 [127,] 165.4433783 71.8190628 [128,] 143.5176347 165.4433783 [129,] -917.2805559 143.5176347 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 867.4487755 -113.5322295 2 -153.8782698 867.4487755 3 -187.0232295 -153.8782698 4 -222.7539029 -187.0232295 5 778.6785190 -222.7539029 6 87.5242649 778.6785190 7 -834.1314093 87.5242649 8 157.7911483 -834.1314093 9 106.2251585 157.7911483 10 41.6872291 106.2251585 11 34.4861484 41.6872291 12 20.7598947 34.4861484 13 -4.3068893 20.7598947 14 -41.1915877 -4.3068893 15 -1063.9503215 -41.1915877 16 889.6551159 -1063.9503215 17 -82.6909198 889.6551159 18 -766.6433599 -82.6909198 19 294.7116243 -766.6433599 20 287.7882070 294.7116243 21 -785.1055615 287.7882070 22 -864.9234806 -785.1055615 23 138.5393280 -864.9234806 24 124.8130743 138.5393280 25 106.9481044 124.8130743 26 -939.7241217 106.9481044 27 11.5732655 -939.7241217 28 -31.3592219 11.5732655 29 -10.9070716 -31.3592219 30 273.1488203 -10.9070716 31 348.6297692 273.1488203 32 346.3224523 348.6297692 33 272.8733570 346.3224523 34 194.2094630 272.8733570 35 -826.2412206 194.2094630 36 121.9930688 -826.2412206 37 -895.8719012 121.9930688 38 68.3974255 -895.8719012 39 26.8966267 68.3974255 40 -8.8340467 26.8966267 41 0.9542143 -8.8340467 42 280.1163424 0.9542143 43 339.1632764 280.1163424 44 339.4416732 339.1632764 45 261.9318043 339.4416732 46 -815.5780646 261.9318043 47 156.7694378 -815.5780646 48 94.0621744 156.7694378 49 79.9369432 94.0621744 50 33.5423805 79.9369432 51 9.9072850 33.5423805 52 -7.9576850 9.9072850 53 -0.4774742 -7.9576850 54 248.7233727 -0.4774742 55 293.3666787 248.7233727 56 281.8271610 293.3666787 57 1154.4599208 281.8271610 58 65.1321375 1154.4599208 59 -985.0021639 65.1321375 60 8.7510599 -985.0021639 61 -39.9515530 8.7510599 62 -94.4242913 -39.9515530 63 -118.0593868 -94.4242913 64 -176.2718639 -118.0593868 65 -200.7833211 -176.2718639 66 52.7559628 -200.7833211 67 1100.8613441 52.7559628 68 40.6184802 1100.8613441 69 -29.6895747 40.6184802 70 -102.3056797 -29.6895747 71 -102.3049464 -102.3056797 72 -114.5995116 -102.3049464 73 851.1015036 -114.5995116 74 -199.9091595 851.1015036 75 -214.0343907 -199.9091595 76 -291.2665962 -214.0343907 77 737.5413932 -291.2665962 78 -1025.6310011 737.5413932 79 1004.6086768 -1025.6310011 80 -29.4126446 1004.6086768 81 -90.2108353 -29.4126446 82 -117.5856695 -90.2108353 83 -87.9013184 -117.5856695 84 -77.7140798 -87.9013184 85 -70.5115325 -77.7140798 86 -71.6648242 -70.5115325 87 -75.1261661 -71.6648242 88 861.7675930 -75.1261661 89 -97.6065032 861.7675930 90 132.0192885 -97.6065032 91 1180.1246698 132.0192885 92 152.1511373 1180.1246698 93 -931.4065206 152.1511373 94 1024.5069670 -931.4065206 95 64.8552075 1024.5069670 96 -943.9772825 64.8552075 97 32.3876221 -943.9772825 98 -1009.1131768 32.3876221 99 941.0301853 -1009.1131768 100 -116.0282667 941.0301853 101 -93.2680662 -116.0282667 102 142.1278510 -93.2680662 103 -815.5368932 142.1278510 104 -853.0202899 -815.5368932 105 43.2482987 -853.0202899 106 977.8340076 43.2482987 107 -35.4148620 977.8340076 108 -39.3535881 -35.4148620 109 -71.3445227 -39.3535881 110 -103.3354573 -71.3445227 111 -136.4804170 -103.3354573 112 815.9709953 -136.4804170 113 815.0953669 815.9709953 114 48.1832339 815.0953669 115 -896.5095708 48.1832339 116 64.8530074 -896.5095708 117 -11.5028364 64.8530074 118 -56.7433740 -11.5028364 119 -65.0984797 -56.7433740 120 972.4643264 -65.0984797 121 -34.4590909 972.4643264 122 -84.3157288 -34.4590909 123 -1117.4606885 -84.3157288 124 848.2403266 -1117.4606885 125 -1133.6155733 848.2403266 126 71.8190628 -1133.6155733 127 165.4433783 71.8190628 128 143.5176347 165.4433783 129 -917.2805559 143.5176347 > 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/fisher/rcomp/tmp/7ka1l1353451392.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/fisher/rcomp/tmp/8bebu1353451392.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/fisher/rcomp/tmp/9454s1353451392.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/fisher/rcomp/tmp/10m6yq1353451392.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/11lmw61353451392.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/fisher/rcomp/tmp/121tsc1353451392.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/fisher/rcomp/tmp/138gkt1353451392.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/fisher/rcomp/tmp/14ksmx1353451392.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/fisher/rcomp/tmp/15uq9e1353451392.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/fisher/rcomp/tmp/16lp4m1353451392.tab") + } > > try(system("convert tmp/1c5wh1353451392.ps tmp/1c5wh1353451392.png",intern=TRUE)) character(0) > try(system("convert tmp/2re6y1353451392.ps tmp/2re6y1353451392.png",intern=TRUE)) character(0) > try(system("convert tmp/382i91353451392.ps tmp/382i91353451392.png",intern=TRUE)) character(0) > try(system("convert tmp/4hxnq1353451392.ps tmp/4hxnq1353451392.png",intern=TRUE)) character(0) > try(system("convert tmp/5xhku1353451392.ps tmp/5xhku1353451392.png",intern=TRUE)) character(0) > try(system("convert tmp/6wae11353451392.ps tmp/6wae11353451392.png",intern=TRUE)) character(0) > try(system("convert tmp/7ka1l1353451392.ps tmp/7ka1l1353451392.png",intern=TRUE)) character(0) > try(system("convert tmp/8bebu1353451392.ps tmp/8bebu1353451392.png",intern=TRUE)) character(0) > try(system("convert tmp/9454s1353451392.ps tmp/9454s1353451392.png",intern=TRUE)) character(0) > try(system("convert tmp/10m6yq1353451392.ps tmp/10m6yq1353451392.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.926 1.328 8.253