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(1925 + ,358 + ,155 + ,175 + ,65 + ,93 + ,17 + ,3198 + ,472 + ,906 + ,18 + ,72 + ,49 + ,1681 + ,324 + ,228 + ,65 + ,31 + ,1580 + ,375 + ,172 + ,357 + ,160 + ,175 + ,21 + ,1993 + ,643 + ,173 + ,6 + ,254 + ,829 + ,88 + ,337 + ,300 + ,19 + ,18 + ,1961 + ,761 + ,467 + ,107 + ,62 + ,29 + ,16 + ,5442 + ,1932 + ,1547 + ,106 + ,25 + ,323 + ,1508 + ,1125 + ,150 + ,91 + ,883 + ,1807 + ,477 + ,241 + ,310 + ,68 + ,223 + ,20 + ,2245 + ,815 + ,176 + ,5 + ,165 + ,64 + ,1020 + ,2121 + ,1584 + ,137 + ,400 + ,1526 + ,547 + ,294 + ,116 + ,58 + ,20 + ,37 + ,1239 + ,478 + ,374 + ,4 + ,97 + ,56 + ,229 + ,7910 + ,118 + ,7426 + ,365 + ,1802 + ,879 + ,567 + ,376 + ,70 + ,280 + ,25 + ,6388 + ,1083 + ,1629 + ,1255 + ,907 + ,1298 + ,215 + ,3551 + ,1899 + ,369 + ,1283 + ,1822 + ,450 + ,280 + ,230 + ,115 + ,90 + ,25 + ,1679 + ,185 + ,1040 + ,9 + ,20 + ,16 + ,409 + ,1842 + ,745 + ,87 + ,1011 + ,1125 + ,462 + ,225 + ,54 + ,33 + ,7 + ,14 + ,830 + ,224 + ,130 + ,7 + ,6 + ,54 + ,408 + ,175 + ,100 + ,50 + ,25 + ,1569 + ,1613 + ,558 + ,194 + ,44 + ,135 + ,15 + ,2505 + ,1148 + ,346 + ,2 + ,804 + ,53 + ,152 + ,2846 + ,1844 + ,97 + ,905 + ,1829 + ,854 + ,342 + ,171 + ,73 + ,78 + ,21 + ,4387 + ,501 + ,2614 + ,1 + ,381 + ,296 + ,593 + ,5934 + ,160 + ,52 + ,5722 + ,1575 + ,761 + ,309 + ,311 + ,46 + ,248 + ,17 + ,2162 + ,882 + ,1051 + ,3 + ,13 + ,42 + ,170 + ,2214 + ,925 + ,232 + ,1056 + ,2339 + ,1521 + ,1437 + ,290 + ,81 + ,186 + ,22 + ,11993 + ,4115 + ,7092 + ,7 + ,152 + ,239 + ,389 + ,11672 + ,1864 + ,427 + ,9381 + ,2355 + ,666 + ,241 + ,4435 + ,2053 + ,687 + ,1695 + ,18864 + ,11544 + ,1324 + ,433 + ,23 + ,293 + ,5246 + ,1012 + ,183 + ,63 + ,765 + ,1960 + ,557 + ,241 + ,440 + ,101 + ,307 + ,32 + ,1979 + ,1533 + ,290 + ,19 + ,10 + ,76 + ,51 + ,222 + ,72 + ,100 + ,50 + ,2103 + ,999 + ,612 + ,1430 + ,341 + ,1048 + ,41 + ,19220 + ,16061 + ,422 + ,204 + ,41 + ,759 + ,1733 + ,1494 + ,1107 + ,204 + ,183 + ,1836 + ,461 + ,213 + ,820 + ,314 + ,477 + ,29 + ,4410 + ,3057 + ,565 + ,33 + ,37 + ,55 + ,664 + ,1022 + ,845 + ,111 + ,65 + ,1864 + ,561 + ,264 + ,223 + ,141 + ,43 + ,39 + ,6942 + ,4858 + ,760 + ,11 + ,182 + ,220 + ,911 + ,881 + ,587 + ,54 + ,240 + ,1944 + ,925 + ,702 + ,426 + ,270 + ,122 + ,34 + ,7762 + ,3417 + ,3497 + ,118 + ,111 + ,242 + ,376 + ,11267 + ,9242 + ,611 + ,1414 + ,1935 + ,471 + ,297 + ,1693 + ,320 + ,566 + ,807 + ,17814 + ,4783 + ,9768 + ,11 + ,82 + ,114 + ,3057 + ,1248 + ,246 + ,701 + ,301 + ,1278 + ,366 + ,187 + ,2068 + ,44 + ,2010 + ,13 + ,2523 + ,1631 + ,458 + ,32 + ,47 + ,219 + ,136 + ,924 + ,256 + ,571 + ,97 + ,1744 + ,660 + ,292 + ,832 + ,589 + ,222 + ,20 + ,12586 + ,4622 + ,6225 + ,49 + ,254 + ,237 + ,1199 + ,8451 + ,4807 + ,131 + ,3512 + ,2191 + ,518 + ,262 + ,416 + ,149 + ,236 + ,30 + ,2244 + ,1292 + ,449 + ,151 + ,106 + ,58 + ,188 + ,2274 + ,1993 + ,164 + ,117 + ,1893 + ,598 + ,274 + ,372 + ,79 + ,262 + ,31 + ,7931 + ,3167 + ,2963 + ,56 + ,94 + ,1467 + ,185 + ,1504 + ,228 + ,62 + ,1214 + ,2674 + ,1526 + ,1000 + ,5266 + ,751 + ,3929 + ,586 + ,15720 + ,4019 + ,6676 + ,122 + ,152 + ,578 + ,4173 + ,8090 + ,7235 + ,294 + ,561 + ,2617 + ,307 + ,203 + ,633 + ,155 + ,456 + ,22 + ,3029 + ,1432 + ,354 + ,677 + ,14 + ,25 + ,527 + ,2221 + ,2089 + ,21 + ,111 + ,2028 + ,361 + ,192 + ,191 + ,107 + ,35 + ,48 + ,8217 + ,2339 + ,358 + ,54 + ,55 + ,88 + ,5323 + ,305 + ,144 + ,7 + ,154 + ,2412 + ,745 + ,465 + ,337 + ,172 + ,138 + ,26 + ,14346 + ,8323 + ,1902 + ,37 + ,489 + ,484 + ,3110 + ,971 + ,465 + ,296 + ,210 + ,2163 + ,403 + ,224 + ,280 + ,106 + ,122 + ,52 + ,7944 + ,6085 + ,761 + ,77 + ,408 + ,48 + ,565 + ,850 + ,326 + ,45 + ,479 + ,1920 + ,404 + ,316 + ,619 + ,149 + ,270 + ,200 + ,6745 + ,2291 + ,3466 + ,209 + ,119 + ,491 + ,170 + ,1986 + ,1314 + ,208 + ,464 + ,2212 + ,767 + ,732 + ,2423 + ,2125 + ,243 + ,55 + ,10650 + ,3023 + ,3415 + ,43 + ,1195 + ,202 + ,2774 + ,3128 + ,1238 + ,1247 + ,643 + ,2319 + ,565 + ,347 + ,538 + ,297 + ,189 + ,52 + ,17682 + ,6288 + ,2152 + ,3709 + ,1979 + ,1270 + ,2284 + ,3571 + ,2417 + ,148 + ,1006 + ,1619 + ,344 + ,197 + ,294 + ,93 + ,180 + ,20 + ,6789 + ,6005 + ,307 + ,9 + ,127 + ,160 + ,182 + ,2842 + ,2435 + ,249 + ,159 + ,1746 + ,571 + ,344 + ,430 + ,293 + ,116 + ,21 + ,10109 + ,5006 + ,2237 + ,49 + ,1162 + ,296 + ,1360 + ,1352 + ,951 + ,211 + ,191 + ,2485 + ,525 + ,345 + ,737 + ,325 + ,321 + ,92 + ,11981 + ,6187 + ,1628 + ,168 + ,523 + ,335 + ,3139 + ,5806 + ,4695 + ,763 + ,348 + ,2079 + ,557 + ,361 + ,541 + ,169 + ,346 + ,26 + ,24259 + ,2127 + ,19327 + ,1578 + ,89 + ,233 + ,906 + ,4049 + ,1991 + ,308 + ,1749 + ,2854 + ,1604 + ,1058 + ,1214 + ,209 + ,878 + ,126 + ,68744 + ,17503 + ,31561 + ,830 + ,725 + ,571 + ,17553 + ,19550 + ,11173 + ,561 + ,7816 + ,2651 + ,374 + ,236 + ,929 + ,130 + ,760 + ,39 + ,85056 + ,3661 + ,76825 + ,11 + ,62 + ,60 + ,4436 + ,58941 + ,22003 + ,92 + ,36845 + ,2127 + ,387 + ,259 + ,1288 + ,67 + ,1201 + ,20 + ,3134 + ,2026 + ,101 + ,120 + ,440 + ,412 + ,35 + ,1621 + ,1312 + ,210 + ,99 + ,2154 + ,644 + ,404 + ,321 + ,152 + ,148 + ,21 + ,6751 + ,3231 + ,1096 + ,24 + ,62 + ,186 + ,2151 + ,1067 + ,302 + ,83 + ,683 + ,2549 + ,516 + ,317 + ,1912 + ,388 + ,1498 + ,25 + ,7098 + ,3226 + ,906 + ,86 + ,60 + ,195 + ,2625 + ,393 + ,86 + ,33 + ,274 + ,1912 + ,443 + ,287 + ,146 + ,62 + ,59 + ,25 + ,6142 + ,1805 + ,3666 + ,343 + ,74 + ,185 + ,69 + ,7059 + ,6891 + ,38 + ,130 + ,2274 + ,810 + ,666 + ,357 + ,97 + ,225 + ,35 + ,3974 + ,1290 + ,447 + ,179 + ,323 + ,422 + ,1313 + ,7278 + ,1673 + ,5195 + ,410 + ,2197 + ,533 + ,434 + ,473 + ,158 + ,280 + ,35 + ,14614 + ,6500 + ,5219 + ,35 + ,236 + ,427 + ,2198 + ,1433 + ,592 + ,160 + ,682 + ,1340 + ,312 + ,244 + ,153 + ,55 + ,87 + ,11 + ,13438 + ,2539 + ,643 + ,4 + ,9 + ,9159 + ,1084 + ,2410 + ,2285 + ,35 + ,90 + ,1952 + ,560 + ,404 + ,681 + ,521 + ,142 + ,19 + ,9746 + ,6710 + ,529 + ,881 + ,105 + ,863 + ,658 + ,902 + ,420 + ,177 + ,305 + ,2287 + ,497 + ,361 + ,337 + ,109 + ,208 + ,20 + ,23024 + ,10028 + ,2608 + ,76 + ,1095 + ,4707 + ,4509 + ,3679 + ,3542 + ,39 + ,98 + ,1667 + ,475 + ,342 + ,433 + ,70 + ,332 + ,31 + ,12102 + ,5223 + ,1402 + ,147 + ,40 + ,507 + ,4782 + ,607 + ,211 + ,17 + ,380 + ,2761 + ,1445 + ,1252 + ,751 + ,116 + ,610 + ,26 + ,41056 + ,20553 + ,3504 + ,2593 + ,142 + ,958 + ,13306 + ,4527 + ,1552 + ,278 + ,2697 + ,2092 + ,332 + ,254 + ,655 + ,126 + ,475 + ,55 + ,2495 + ,746 + ,188 + ,5 + ,608 + ,13 + ,935 + ,2352 + ,1653 + ,13 + ,686 + ,1814 + ,334 + ,267 + ,233 + ,150 + ,36 + ,46 + ,7056 + ,3947 + ,1383 + ,36 + ,19 + ,70 + ,1601 + ,524 + ,111 + ,339 + ,74 + ,1919 + ,750 + ,552 + ,118 + ,73 + ,20 + ,25 + ,7708 + ,2218 + ,649 + ,58 + ,1833 + ,474 + ,2475 + ,5784 + ,5569 + ,63 + ,153 + ,1888 + ,396 + ,317 + ,146 + ,83 + ,42 + ,21 + ,8229 + ,4053 + ,470 + ,44 + ,217 + ,179 + ,3266 + ,11475 + ,969 + ,10056 + ,450 + ,1514 + ,413 + ,352 + ,365 + ,197 + ,153 + ,16 + ,4714 + ,1548 + ,896 + ,8 + ,207 + ,247 + ,1807 + ,2940 + ,499 + ,1367 + ,1074 + ,1905 + ,759 + ,654 + ,653 + ,112 + ,519 + ,22 + ,14317 + ,6280 + ,986 + ,369 + ,4304 + ,1989 + ,389 + ,36980 + ,473 + ,35687 + ,820 + ,1870 + ,493 + ,455 + ,434 + ,168 + ,168 + ,97 + ,5267 + ,1674 + ,1315 + ,777 + ,14 + ,321 + ,1165 + ,1576 + ,489 + ,86 + ,1002 + ,1218 + ,318 + ,301 + ,231 + ,62 + ,156 + ,12 + ,4087 + ,3700 + ,126 + ,11 + ,74 + ,158 + ,18 + ,607 + ,353 + ,21 + ,232 + ,1830 + ,612 + ,439 + ,123 + ,50 + ,57 + ,16 + ,3823 + ,843 + ,932 + ,13 + ,161 + ,340 + ,1532 + ,1190 + ,432 + ,296 + ,463 + ,2208 + ,465 + ,378 + ,259 + ,113 + ,104 + ,42 + ,2137 + ,1449 + ,310 + ,45 + ,60 + ,154 + ,118 + ,1731 + ,681 + ,247 + ,804 + ,1759 + ,455 + ,404 + ,98 + ,46 + ,28 + ,23 + ,4241 + ,2098 + ,548 + ,73 + ,174 + ,963 + ,384 + ,617 + ,120 + ,306 + ,191 + ,2751 + ,1485 + ,1428 + ,2107 + ,222 + ,1839 + ,46 + ,13654 + ,4027 + ,4649 + ,1876 + ,584 + ,1770 + ,748 + ,6107 + ,3067 + ,1179 + ,1860 + ,2455 + ,327 + ,326 + ,715 + ,61 + ,622 + ,31 + ,1913 + ,1343 + ,70 + ,10 + ,307 + ,112 + ,70 + ,3524 + ,2863 + ,66 + ,595 + ,1977 + ,346 + ,287 + ,136 + ,73 + ,31 + ,32 + ,2380 + ,1763 + ,314 + ,17 + ,22 + ,102 + ,162 + ,1432 + ,94 + ,52 + ,1286 + ,2512 + ,705 + ,662 + ,180 + ,111 + ,45 + ,25 + ,5223 + ,731 + ,4038 + ,24 + ,188 + ,99 + ,142 + ,1150 + ,560 + ,184 + ,406 + ,2171 + ,376 + ,334 + ,172 + ,63 + ,79 + ,31 + ,2337 + ,1923 + ,127 + ,125 + ,24 + ,129 + ,10 + ,879 + ,585 + ,84 + ,210 + ,1772 + ,390 + ,316 + ,170 + ,58 + ,79 + ,33 + ,10031 + ,2334 + ,276 + ,89 + ,467 + ,4178 + ,2687 + ,7430 + ,117 + ,7171 + ,143 + ,2167 + ,757 + ,753 + ,380 + ,131 + ,205 + ,45 + ,4588 + ,2647 + ,624 + ,51 + ,49 + ,315 + ,900 + ,3404 + ,169 + ,478 + ,2756 + ,2237 + ,469 + ,443 + ,813 + ,110 + ,674 + ,29 + ,9479 + ,3400 + ,4929 + ,782 + ,123 + ,182 + ,62 + ,4945 + ,642 + ,115 + ,4188 + ,1519 + ,317 + ,241 + ,708 + ,399 + ,295 + ,14 + ,18171 + ,2434 + ,14635 + ,7 + ,237 + ,852 + ,6 + ,602 + ,420 + ,81 + ,101 + ,2023 + ,580 + ,442 + ,193 + ,79 + ,93 + ,22 + ,14015 + ,2237 + ,9832 + ,14 + ,755 + ,1122 + ,55 + ,3590 + ,2114 + ,437 + ,1039 + ,2491 + ,485 + ,383 + ,248 + ,76 + ,149 + ,23 + ,4919 + ,1700 + ,1148 + ,244 + ,539 + ,177 + ,1112 + ,5262 + ,4200 + ,145 + ,917 + ,1881 + ,456 + ,445 + ,725 + ,184 + ,524 + ,17 + ,4573 + ,513 + ,2482 + ,22 + ,107 + ,114 + ,1334 + ,3349 + ,2550 + ,106 + ,694 + ,3055 + ,1566 + ,1443 + ,13007 + ,326 + ,12645 + ,36 + ,82257 + ,22476 + ,47568 + ,6098 + ,186 + ,974 + ,4954 + ,44336 + ,38503 + ,1757 + ,4075 + ,2653 + ,328 + ,272 + ,976 + ,129 + ,824 + ,22 + ,2375 + ,385 + ,728 + ,5 + ,284 + ,92 + ,880 + ,947 + ,385 + ,13 + ,548 + ,2225 + ,321 + ,315 + ,185 + ,63 + ,98 + ,24 + ,3772 + ,1961 + ,512 + ,431 + ,99 + ,61 + ,707 + ,1311 + ,263 + ,117 + ,932 + ,2462 + ,682 + ,687 + ,234 + ,92 + ,68 + ,75 + ,3954 + ,1135 + ,574 + ,24 + ,123 + ,779 + ,1318 + ,1006 + ,588 + ,331 + ,87 + ,2307 + ,431 + ,368 + ,185 + ,72 + ,89 + ,24 + ,4861 + ,698 + ,834 + ,18 + ,2869 + ,254 + ,189 + ,6224 + ,5858 + ,79 + ,287 + ,2186 + ,430 + ,451 + ,217 + ,64 + ,130 + ,23 + ,2652 + ,308 + ,918 + ,19 + ,483 + ,161 + ,764 + ,6890 + ,786 + ,5853 + ,251 + ,2072 + ,811 + ,752 + ,802 + ,358 + ,404 + ,40 + ,13527 + ,2432 + ,7258 + ,115 + ,912 + ,306 + ,2504 + ,3014 + ,1114 + ,391 + ,1510 + ,2151 + ,455 + ,462 + ,705 + ,76 + ,571 + ,57 + ,28039 + ,810 + ,23428 + ,3 + ,730 + ,282 + ,2786 + ,3288 + ,1782 + ,82 + ,1423 + ,1585 + ,339 + ,271 + ,304 + ,117 + ,156 + ,30 + ,2874 + ,456 + ,418 + ,311 + ,1126 + ,350 + ,212 + ,1787 + ,551 + ,1076 + ,160 + ,2092 + ,592 + ,553 + ,395 + ,230 + ,129 + ,37 + ,11152 + ,765 + ,9300 + ,156 + ,36 + ,605 + ,290 + ,12518 + ,993 + ,2264 + ,9261 + ,2399 + ,473 + ,504 + ,439 + ,161 + ,254 + ,24 + ,2727 + ,1018 + ,363 + ,40 + ,30 + ,71 + ,1204 + ,5500 + ,4486 + ,709 + ,305 + ,1882 + ,458 + ,497 + ,321 + ,73 + ,228 + ,20 + ,3056 + ,1682 + ,290 + ,6 + ,199 + ,225 + ,655 + ,27519 + ,27188 + ,215 + ,116 + ,2819 + ,1891 + ,1734 + ,1015 + ,231 + ,736 + ,48 + ,47201 + ,4177 + ,33868 + ,639 + ,998 + ,4298 + ,3221 + ,14607 + ,4179 + ,2663 + ,7766 + ,2267 + ,278 + ,292 + ,340 + ,57 + ,256 + ,27 + ,2370 + ,1137 + ,205 + ,22 + ,145 + ,302 + ,560 + ,815 + ,594 + ,52 + ,169 + ,1910 + ,347 + ,387 + ,372 + ,133 + ,49 + ,190 + ,2439 + ,1870 + ,218 + ,6 + ,24 + ,88 + ,233 + ,851 + ,427 + ,95 + ,330 + ,1975 + ,652 + ,727 + ,1772 + ,80 + ,1666 + ,26 + ,10484 + ,6845 + ,1048 + ,1750 + ,30 + ,220 + ,591 + ,1152 + ,869 + ,123 + ,160 + ,1795 + ,294 + ,321 + ,163 + ,101 + ,38 + ,24 + ,3107 + ,636 + ,1742 + ,7 + ,335 + ,58 + ,329 + ,3179 + ,949 + ,88 + ,2141 + ,1549 + ,393 + ,429 + ,197 + ,118 + ,44 + ,35 + ,14931 + ,1375 + ,377 + ,51 + ,11986 + ,379 + ,762 + ,25090 + ,2163 + ,22199 + ,728 + ,1815 + ,726 + ,777 + ,610 + ,79 + ,508 + ,23 + ,8929 + ,1418 + ,401 + ,23 + ,857 + ,2859 + ,3371 + ,3373 + ,1551 + ,703 + ,1119 + ,1742 + ,472 + ,549 + ,313 + ,86 + ,198 + ,29 + ,3814 + ,1479 + ,959 + ,15 + ,173 + ,311 + ,878 + ,10931 + ,8889 + ,652 + ,1390) + ,dim=c(18 + ,91) + ,dimnames=list(c('AantalOprichtingenVanVennootschappen' + ,'AantalKapitaalverhogingen' + ,'AantalKapitaalverminderingen' + ,'O-Totaal' + ,'O-InbrengInContanten' + ,'O-InbrengInNatura' + ,'O-TeStortenBedrag' + ,'KH-Totaal' + ,'KH-InbrengInContanten' + ,'KH-InbrengInNatura' + ,'KH-TeStortenBedrag' + ,'KH-ConversieVanEigenMiddelen' + ,'KH-Schuldconversie' + ,'KH-Uitgiftepremies' + ,'KV-Totaal' + ,'KV-TerugbetalingAanDeAandeelhouders' + ,'KV-AanzuiveringVanVerliezen' + ,'KV-Andere') + ,1:91)) > y <- array(NA,dim=c(18,91),dimnames=list(c('AantalOprichtingenVanVennootschappen','AantalKapitaalverhogingen','AantalKapitaalverminderingen','O-Totaal','O-InbrengInContanten','O-InbrengInNatura','O-TeStortenBedrag','KH-Totaal','KH-InbrengInContanten','KH-InbrengInNatura','KH-TeStortenBedrag','KH-ConversieVanEigenMiddelen','KH-Schuldconversie','KH-Uitgiftepremies','KV-Totaal','KV-TerugbetalingAanDeAandeelhouders','KV-AanzuiveringVanVerliezen','KV-Andere'),1:91)) > 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' > 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, 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 AantalOprichtingenVanVennootschappen AantalKapitaalverhogingen 1 1925 358 2 1580 375 3 1961 761 4 1807 477 5 1526 547 6 1802 879 7 1822 450 8 1125 462 9 1569 1613 10 1829 854 11 1575 761 12 2339 1521 13 2355 666 14 1960 557 15 2103 999 16 1836 461 17 1864 561 18 1944 925 19 1935 471 20 1278 366 21 1744 660 22 2191 518 23 1893 598 24 2674 1526 25 2617 307 26 2028 361 27 2412 745 28 2163 403 29 1920 404 30 2212 767 31 2319 565 32 1619 344 33 1746 571 34 2485 525 35 2079 557 36 2854 1604 37 2651 374 38 2127 387 39 2154 644 40 2549 516 41 1912 443 42 2274 810 43 2197 533 44 1340 312 45 1952 560 46 2287 497 47 1667 475 48 2761 1445 49 2092 332 50 1814 334 51 1919 750 52 1888 396 53 1514 413 54 1905 759 55 1870 493 56 1218 318 57 1830 612 58 2208 465 59 1759 455 60 2751 1485 61 2455 327 62 1977 346 63 2512 705 64 2171 376 65 1772 390 66 2167 757 67 2237 469 68 1519 317 69 2023 580 70 2491 485 71 1881 456 72 3055 1566 73 2653 328 74 2225 321 75 2462 682 76 2307 431 77 2186 430 78 2072 811 79 2151 455 80 1585 339 81 2092 592 82 2399 473 83 1882 458 84 2819 1891 85 2267 278 86 1910 347 87 1975 652 88 1795 294 89 1549 393 90 1815 726 91 1742 472 AantalKapitaalverminderingen O-Totaal O-InbrengInContanten O-InbrengInNatura 1 155 175 65 93 2 172 357 160 175 3 467 107 62 29 4 241 310 68 223 5 294 116 58 20 6 567 376 70 280 7 280 230 115 90 8 225 54 33 7 9 558 194 44 135 10 342 171 73 78 11 309 311 46 248 12 1437 290 81 186 13 241 4435 2053 687 14 241 440 101 307 15 612 1430 341 1048 16 213 820 314 477 17 264 223 141 43 18 702 426 270 122 19 297 1693 320 566 20 187 2068 44 2010 21 292 832 589 222 22 262 416 149 236 23 274 372 79 262 24 1000 5266 751 3929 25 203 633 155 456 26 192 191 107 35 27 465 337 172 138 28 224 280 106 122 29 316 619 149 270 30 732 2423 2125 243 31 347 538 297 189 32 197 294 93 180 33 344 430 293 116 34 345 737 325 321 35 361 541 169 346 36 1058 1214 209 878 37 236 929 130 760 38 259 1288 67 1201 39 404 321 152 148 40 317 1912 388 1498 41 287 146 62 59 42 666 357 97 225 43 434 473 158 280 44 244 153 55 87 45 404 681 521 142 46 361 337 109 208 47 342 433 70 332 48 1252 751 116 610 49 254 655 126 475 50 267 233 150 36 51 552 118 73 20 52 317 146 83 42 53 352 365 197 153 54 654 653 112 519 55 455 434 168 168 56 301 231 62 156 57 439 123 50 57 58 378 259 113 104 59 404 98 46 28 60 1428 2107 222 1839 61 326 715 61 622 62 287 136 73 31 63 662 180 111 45 64 334 172 63 79 65 316 170 58 79 66 753 380 131 205 67 443 813 110 674 68 241 708 399 295 69 442 193 79 93 70 383 248 76 149 71 445 725 184 524 72 1443 13007 326 12645 73 272 976 129 824 74 315 185 63 98 75 687 234 92 68 76 368 185 72 89 77 451 217 64 130 78 752 802 358 404 79 462 705 76 571 80 271 304 117 156 81 553 395 230 129 82 504 439 161 254 83 497 321 73 228 84 1734 1015 231 736 85 292 340 57 256 86 387 372 133 49 87 727 1772 80 1666 88 321 163 101 38 89 429 197 118 44 90 777 610 79 508 91 549 313 86 198 O-TeStortenBedrag KH-Totaal KH-InbrengInContanten KH-InbrengInNatura 1 17 3198 472 906 2 21 1993 643 173 3 16 5442 1932 1547 4 20 2245 815 176 5 37 1239 478 374 6 25 6388 1083 1629 7 25 1679 185 1040 8 14 830 224 130 9 15 2505 1148 346 10 21 4387 501 2614 11 17 2162 882 1051 12 22 11993 4115 7092 13 1695 18864 11544 1324 14 32 1979 1533 290 15 41 19220 16061 422 16 29 4410 3057 565 17 39 6942 4858 760 18 34 7762 3417 3497 19 807 17814 4783 9768 20 13 2523 1631 458 21 20 12586 4622 6225 22 30 2244 1292 449 23 31 7931 3167 2963 24 586 15720 4019 6676 25 22 3029 1432 354 26 48 8217 2339 358 27 26 14346 8323 1902 28 52 7944 6085 761 29 200 6745 2291 3466 30 55 10650 3023 3415 31 52 17682 6288 2152 32 20 6789 6005 307 33 21 10109 5006 2237 34 92 11981 6187 1628 35 26 24259 2127 19327 36 126 68744 17503 31561 37 39 85056 3661 76825 38 20 3134 2026 101 39 21 6751 3231 1096 40 25 7098 3226 906 41 25 6142 1805 3666 42 35 3974 1290 447 43 35 14614 6500 5219 44 11 13438 2539 643 45 19 9746 6710 529 46 20 23024 10028 2608 47 31 12102 5223 1402 48 26 41056 20553 3504 49 55 2495 746 188 50 46 7056 3947 1383 51 25 7708 2218 649 52 21 8229 4053 470 53 16 4714 1548 896 54 22 14317 6280 986 55 97 5267 1674 1315 56 12 4087 3700 126 57 16 3823 843 932 58 42 2137 1449 310 59 23 4241 2098 548 60 46 13654 4027 4649 61 31 1913 1343 70 62 32 2380 1763 314 63 25 5223 731 4038 64 31 2337 1923 127 65 33 10031 2334 276 66 45 4588 2647 624 67 29 9479 3400 4929 68 14 18171 2434 14635 69 22 14015 2237 9832 70 23 4919 1700 1148 71 17 4573 513 2482 72 36 82257 22476 47568 73 22 2375 385 728 74 24 3772 1961 512 75 75 3954 1135 574 76 24 4861 698 834 77 23 2652 308 918 78 40 13527 2432 7258 79 57 28039 810 23428 80 30 2874 456 418 81 37 11152 765 9300 82 24 2727 1018 363 83 20 3056 1682 290 84 48 47201 4177 33868 85 27 2370 1137 205 86 190 2439 1870 218 87 26 10484 6845 1048 88 24 3107 636 1742 89 35 14931 1375 377 90 23 8929 1418 401 91 29 3814 1479 959 KH-TeStortenBedrag KH-ConversieVanEigenMiddelen KH-Schuldconversie 1 18 72 49 2 6 254 829 3 106 25 323 4 5 165 64 5 4 97 56 6 1255 907 1298 7 9 20 16 8 7 6 54 9 2 804 53 10 1 381 296 11 3 13 42 12 7 152 239 13 433 23 293 14 19 10 76 15 204 41 759 16 33 37 55 17 11 182 220 18 118 111 242 19 11 82 114 20 32 47 219 21 49 254 237 22 151 106 58 23 56 94 1467 24 122 152 578 25 677 14 25 26 54 55 88 27 37 489 484 28 77 408 48 29 209 119 491 30 43 1195 202 31 3709 1979 1270 32 9 127 160 33 49 1162 296 34 168 523 335 35 1578 89 233 36 830 725 571 37 11 62 60 38 120 440 412 39 24 62 186 40 86 60 195 41 343 74 185 42 179 323 422 43 35 236 427 44 4 9 9159 45 881 105 863 46 76 1095 4707 47 147 40 507 48 2593 142 958 49 5 608 13 50 36 19 70 51 58 1833 474 52 44 217 179 53 8 207 247 54 369 4304 1989 55 777 14 321 56 11 74 158 57 13 161 340 58 45 60 154 59 73 174 963 60 1876 584 1770 61 10 307 112 62 17 22 102 63 24 188 99 64 125 24 129 65 89 467 4178 66 51 49 315 67 782 123 182 68 7 237 852 69 14 755 1122 70 244 539 177 71 22 107 114 72 6098 186 974 73 5 284 92 74 431 99 61 75 24 123 779 76 18 2869 254 77 19 483 161 78 115 912 306 79 3 730 282 80 311 1126 350 81 156 36 605 82 40 30 71 83 6 199 225 84 639 998 4298 85 22 145 302 86 6 24 88 87 1750 30 220 88 7 335 58 89 51 11986 379 90 23 857 2859 91 15 173 311 KH-Uitgiftepremies KV-Totaal KV-TerugbetalingAanDeAandeelhouders 1 1681 324 228 2 88 337 300 3 1508 1125 150 4 1020 2121 1584 5 229 7910 118 6 215 3551 1899 7 409 1842 745 8 408 175 100 9 152 2846 1844 10 593 5934 160 11 170 2214 925 12 389 11672 1864 13 5246 1012 183 14 51 222 72 15 1733 1494 1107 16 664 1022 845 17 911 881 587 18 376 11267 9242 19 3057 1248 246 20 136 924 256 21 1199 8451 4807 22 188 2274 1993 23 185 1504 228 24 4173 8090 7235 25 527 2221 2089 26 5323 305 144 27 3110 971 465 28 565 850 326 29 170 1986 1314 30 2774 3128 1238 31 2284 3571 2417 32 182 2842 2435 33 1360 1352 951 34 3139 5806 4695 35 906 4049 1991 36 17553 19550 11173 37 4436 58941 22003 38 35 1621 1312 39 2151 1067 302 40 2625 393 86 41 69 7059 6891 42 1313 7278 1673 43 2198 1433 592 44 1084 2410 2285 45 658 902 420 46 4509 3679 3542 47 4782 607 211 48 13306 4527 1552 49 935 2352 1653 50 1601 524 111 51 2475 5784 5569 52 3266 11475 969 53 1807 2940 499 54 389 36980 473 55 1165 1576 489 56 18 607 353 57 1532 1190 432 58 118 1731 681 59 384 617 120 60 748 6107 3067 61 70 3524 2863 62 162 1432 94 63 142 1150 560 64 10 879 585 65 2687 7430 117 66 900 3404 169 67 62 4945 642 68 6 602 420 69 55 3590 2114 70 1112 5262 4200 71 1334 3349 2550 72 4954 44336 38503 73 880 947 385 74 707 1311 263 75 1318 1006 588 76 189 6224 5858 77 764 6890 786 78 2504 3014 1114 79 2786 3288 1782 80 212 1787 551 81 290 12518 993 82 1204 5500 4486 83 655 27519 27188 84 3221 14607 4179 85 560 815 594 86 233 851 427 87 591 1152 869 88 329 3179 949 89 762 25090 2163 90 3371 3373 1551 91 878 10931 8889 KV-AanzuiveringVanVerliezen KV-Andere 1 65 31 2 19 18 3 91 883 4 137 400 5 7426 365 6 369 1283 7 87 1011 8 50 25 9 97 905 10 52 5722 11 232 1056 12 427 9381 13 63 765 14 100 50 15 204 183 16 111 65 17 54 240 18 611 1414 19 701 301 20 571 97 21 131 3512 22 164 117 23 62 1214 24 294 561 25 21 111 26 7 154 27 296 210 28 45 479 29 208 464 30 1247 643 31 148 1006 32 249 159 33 211 191 34 763 348 35 308 1749 36 561 7816 37 92 36845 38 210 99 39 83 683 40 33 274 41 38 130 42 5195 410 43 160 682 44 35 90 45 177 305 46 39 98 47 17 380 48 278 2697 49 13 686 50 339 74 51 63 153 52 10056 450 53 1367 1074 54 35687 820 55 86 1002 56 21 232 57 296 463 58 247 804 59 306 191 60 1179 1860 61 66 595 62 52 1286 63 184 406 64 84 210 65 7171 143 66 478 2756 67 115 4188 68 81 101 69 437 1039 70 145 917 71 106 694 72 1757 4075 73 13 548 74 117 932 75 331 87 76 79 287 77 5853 251 78 391 1510 79 82 1423 80 1076 160 81 2264 9261 82 709 305 83 215 116 84 2663 7766 85 52 169 86 95 330 87 123 160 88 88 2141 89 22199 728 90 703 1119 91 652 1390 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) AantalKapitaalverhogingen 1815.8064 -0.3468 AantalKapitaalverminderingen `O-Totaal` 0.7903 -60.9201 `O-InbrengInContanten` `O-InbrengInNatura` 60.9633 60.9472 `O-TeStortenBedrag` `KH-Totaal` 61.0750 -6.1182 `KH-InbrengInContanten` `KH-InbrengInNatura` 6.1185 6.1203 `KH-TeStortenBedrag` `KH-ConversieVanEigenMiddelen` 6.1592 6.1097 `KH-Schuldconversie` `KH-Uitgiftepremies` 6.0728 6.1545 `KV-Totaal` `KV-TerugbetalingAanDeAandeelhouders` 9.9075 -9.9102 `KV-AanzuiveringVanVerliezen` `KV-Andere` -9.9156 -9.8969 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -718.61 -154.06 -26.11 193.10 729.90 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1815.8064 72.8585 24.922 < 2e-16 *** AantalKapitaalverhogingen -0.3468 0.2117 -1.638 0.10566 AantalKapitaalverminderingen 0.7903 0.2472 3.197 0.00206 ** `O-Totaal` -60.9201 55.5183 -1.097 0.27612 `O-InbrengInContanten` 60.9633 55.5147 1.098 0.27575 `O-InbrengInNatura` 60.9472 55.5222 1.098 0.27594 `O-TeStortenBedrag` 61.0750 55.5080 1.100 0.27482 `KH-Totaal` -6.1182 44.1711 -0.139 0.89022 `KH-InbrengInContanten` 6.1185 44.1696 0.139 0.89021 `KH-InbrengInNatura` 6.1203 44.1701 0.139 0.89018 `KH-TeStortenBedrag` 6.1592 44.1734 0.139 0.88949 `KH-ConversieVanEigenMiddelen` 6.1097 44.1739 0.138 0.89038 `KH-Schuldconversie` 6.0728 44.1714 0.137 0.89103 `KH-Uitgiftepremies` 6.1545 44.1750 0.139 0.88958 `KV-Totaal` 9.9075 60.0750 0.165 0.86946 `KV-TerugbetalingAanDeAandeelhouders` -9.9102 60.0752 -0.165 0.86943 `KV-AanzuiveringVanVerliezen` -9.9156 60.0758 -0.165 0.86936 `KV-Andere` -9.8969 60.0764 -0.165 0.86961 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 307.4 on 73 degrees of freedom Multiple R-squared: 0.4726, Adjusted R-squared: 0.3498 F-statistic: 3.849 on 17 and 73 DF, p-value: 2.785e-05 > 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.4744014 0.9488028 0.5255986 [2,] 0.3565424 0.7130848 0.6434576 [3,] 0.3907988 0.7815975 0.6092012 [4,] 0.4790186 0.9580373 0.5209814 [5,] 0.4193240 0.8386481 0.5806760 [6,] 0.5329692 0.9340616 0.4670308 [7,] 0.8566793 0.2866414 0.1433207 [8,] 0.8393491 0.3213019 0.1606509 [9,] 0.7869607 0.4260787 0.2130393 [10,] 0.7412183 0.5175634 0.2587817 [11,] 0.7587089 0.4825822 0.2412911 [12,] 0.7358124 0.5283752 0.2641876 [13,] 0.6883052 0.6233897 0.3116948 [14,] 0.6692813 0.6614374 0.3307187 [15,] 0.5923280 0.8153439 0.4076720 [16,] 0.5683284 0.8633432 0.4316716 [17,] 0.5539558 0.8920884 0.4460442 [18,] 0.4947858 0.9895717 0.5052142 [19,] 0.4357867 0.8715733 0.5642133 [20,] 0.5047465 0.9905071 0.4952535 [21,] 0.4317578 0.8635156 0.5682422 [22,] 0.3952981 0.7905963 0.6047019 [23,] 0.3284124 0.6568249 0.6715876 [24,] 0.2833883 0.5667766 0.7166117 [25,] 0.2508594 0.5017189 0.7491406 [26,] 0.3622326 0.7244652 0.6377674 [27,] 0.4184813 0.8369627 0.5815187 [28,] 0.5623087 0.8753825 0.4376913 [29,] 0.4897486 0.9794972 0.5102514 [30,] 0.4488599 0.8977198 0.5511401 [31,] 0.4084093 0.8168186 0.5915907 [32,] 0.3647852 0.7295704 0.6352148 [33,] 0.4200507 0.8401014 0.5799493 [34,] 0.3552436 0.7104872 0.6447564 [35,] 0.2869214 0.5738428 0.7130786 [36,] 0.4564493 0.9128986 0.5435507 [37,] 0.6200008 0.7599985 0.3799992 [38,] 0.5663532 0.8672936 0.4336468 [39,] 0.5916973 0.8166054 0.4083027 [40,] 0.5172880 0.9654240 0.4827120 [41,] 0.5256548 0.9486904 0.4743452 [42,] 0.4776844 0.9553689 0.5223156 [43,] 0.4226375 0.8452750 0.5773625 [44,] 0.3316336 0.6632671 0.6683664 [45,] 0.2481256 0.4962512 0.7518744 [46,] 0.2498255 0.4996509 0.7501745 [47,] 0.1692838 0.3385676 0.8307162 [48,] 0.3546249 0.7092498 0.6453751 [49,] 0.4078553 0.8157106 0.5921447 [50,] 0.3435961 0.6871922 0.6564039 > postscript(file="/var/wessaorg/rcomp/tmp/121pd1353057136.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/wessaorg/rcomp/tmp/2vdev1353057136.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/wessaorg/rcomp/tmp/3057m1353057136.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/wessaorg/rcomp/tmp/4cjhr1353057136.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/wessaorg/rcomp/tmp/5nytg1353057136.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 = 91 Frequency = 1 1 2 3 4 5 6 42.709962 -159.205020 -26.113277 -139.400163 -233.726633 -106.753691 7 8 9 10 11 12 -85.050743 -718.605799 -137.782006 -94.933776 -249.915553 -152.283673 13 14 15 16 17 18 -2.645065 129.506915 60.042854 -57.719135 -5.082323 -120.753891 19 20 21 22 23 24 -236.926807 -549.201339 -128.157835 385.687121 85.782725 238.830173 25 26 27 28 29 30 682.392836 39.773952 445.014189 268.301455 -55.578840 -120.319357 31 32 33 34 35 36 228.196828 -175.166094 -191.326854 394.827550 -3.833845 12.515823 37 38 39 40 41 42 88.930725 221.619381 165.097165 566.469078 16.122546 204.549468 43 44 45 46 47 48 129.537249 -187.986132 -103.313763 406.345769 -419.594501 -211.485055 49 50 51 52 53 54 70.932696 -108.953157 -108.356921 -82.806615 -561.177497 187.088287 55 56 57 58 59 60 -155.832336 -679.423150 -147.559696 251.968926 -130.508759 213.017777 61 62 63 64 65 66 543.571291 29.329571 342.734966 144.524444 -10.661934 -105.528637 67 68 69 70 71 72 133.845485 -395.214714 20.211142 485.378954 -185.496340 -142.513684 73 74 75 76 77 78 729.897012 228.694091 256.761298 373.629269 174.464803 -179.558379 79 80 81 82 83 84 10.163569 -261.973529 -122.246389 308.805902 -127.451950 199.115341 85 86 87 88 89 90 290.184133 -125.166988 -327.854215 -221.790287 -210.599240 -373.794499 91 -369.242631 > postscript(file="/var/wessaorg/rcomp/tmp/6zoz01353057136.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 = 91 Frequency = 1 lag(myerror, k = 1) myerror 0 42.709962 NA 1 -159.205020 42.709962 2 -26.113277 -159.205020 3 -139.400163 -26.113277 4 -233.726633 -139.400163 5 -106.753691 -233.726633 6 -85.050743 -106.753691 7 -718.605799 -85.050743 8 -137.782006 -718.605799 9 -94.933776 -137.782006 10 -249.915553 -94.933776 11 -152.283673 -249.915553 12 -2.645065 -152.283673 13 129.506915 -2.645065 14 60.042854 129.506915 15 -57.719135 60.042854 16 -5.082323 -57.719135 17 -120.753891 -5.082323 18 -236.926807 -120.753891 19 -549.201339 -236.926807 20 -128.157835 -549.201339 21 385.687121 -128.157835 22 85.782725 385.687121 23 238.830173 85.782725 24 682.392836 238.830173 25 39.773952 682.392836 26 445.014189 39.773952 27 268.301455 445.014189 28 -55.578840 268.301455 29 -120.319357 -55.578840 30 228.196828 -120.319357 31 -175.166094 228.196828 32 -191.326854 -175.166094 33 394.827550 -191.326854 34 -3.833845 394.827550 35 12.515823 -3.833845 36 88.930725 12.515823 37 221.619381 88.930725 38 165.097165 221.619381 39 566.469078 165.097165 40 16.122546 566.469078 41 204.549468 16.122546 42 129.537249 204.549468 43 -187.986132 129.537249 44 -103.313763 -187.986132 45 406.345769 -103.313763 46 -419.594501 406.345769 47 -211.485055 -419.594501 48 70.932696 -211.485055 49 -108.953157 70.932696 50 -108.356921 -108.953157 51 -82.806615 -108.356921 52 -561.177497 -82.806615 53 187.088287 -561.177497 54 -155.832336 187.088287 55 -679.423150 -155.832336 56 -147.559696 -679.423150 57 251.968926 -147.559696 58 -130.508759 251.968926 59 213.017777 -130.508759 60 543.571291 213.017777 61 29.329571 543.571291 62 342.734966 29.329571 63 144.524444 342.734966 64 -10.661934 144.524444 65 -105.528637 -10.661934 66 133.845485 -105.528637 67 -395.214714 133.845485 68 20.211142 -395.214714 69 485.378954 20.211142 70 -185.496340 485.378954 71 -142.513684 -185.496340 72 729.897012 -142.513684 73 228.694091 729.897012 74 256.761298 228.694091 75 373.629269 256.761298 76 174.464803 373.629269 77 -179.558379 174.464803 78 10.163569 -179.558379 79 -261.973529 10.163569 80 -122.246389 -261.973529 81 308.805902 -122.246389 82 -127.451950 308.805902 83 199.115341 -127.451950 84 290.184133 199.115341 85 -125.166988 290.184133 86 -327.854215 -125.166988 87 -221.790287 -327.854215 88 -210.599240 -221.790287 89 -373.794499 -210.599240 90 -369.242631 -373.794499 91 NA -369.242631 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -159.205020 42.709962 [2,] -26.113277 -159.205020 [3,] -139.400163 -26.113277 [4,] -233.726633 -139.400163 [5,] -106.753691 -233.726633 [6,] -85.050743 -106.753691 [7,] -718.605799 -85.050743 [8,] -137.782006 -718.605799 [9,] -94.933776 -137.782006 [10,] -249.915553 -94.933776 [11,] -152.283673 -249.915553 [12,] -2.645065 -152.283673 [13,] 129.506915 -2.645065 [14,] 60.042854 129.506915 [15,] -57.719135 60.042854 [16,] -5.082323 -57.719135 [17,] -120.753891 -5.082323 [18,] -236.926807 -120.753891 [19,] -549.201339 -236.926807 [20,] -128.157835 -549.201339 [21,] 385.687121 -128.157835 [22,] 85.782725 385.687121 [23,] 238.830173 85.782725 [24,] 682.392836 238.830173 [25,] 39.773952 682.392836 [26,] 445.014189 39.773952 [27,] 268.301455 445.014189 [28,] -55.578840 268.301455 [29,] -120.319357 -55.578840 [30,] 228.196828 -120.319357 [31,] -175.166094 228.196828 [32,] -191.326854 -175.166094 [33,] 394.827550 -191.326854 [34,] -3.833845 394.827550 [35,] 12.515823 -3.833845 [36,] 88.930725 12.515823 [37,] 221.619381 88.930725 [38,] 165.097165 221.619381 [39,] 566.469078 165.097165 [40,] 16.122546 566.469078 [41,] 204.549468 16.122546 [42,] 129.537249 204.549468 [43,] -187.986132 129.537249 [44,] -103.313763 -187.986132 [45,] 406.345769 -103.313763 [46,] -419.594501 406.345769 [47,] -211.485055 -419.594501 [48,] 70.932696 -211.485055 [49,] -108.953157 70.932696 [50,] -108.356921 -108.953157 [51,] -82.806615 -108.356921 [52,] -561.177497 -82.806615 [53,] 187.088287 -561.177497 [54,] -155.832336 187.088287 [55,] -679.423150 -155.832336 [56,] -147.559696 -679.423150 [57,] 251.968926 -147.559696 [58,] -130.508759 251.968926 [59,] 213.017777 -130.508759 [60,] 543.571291 213.017777 [61,] 29.329571 543.571291 [62,] 342.734966 29.329571 [63,] 144.524444 342.734966 [64,] -10.661934 144.524444 [65,] -105.528637 -10.661934 [66,] 133.845485 -105.528637 [67,] -395.214714 133.845485 [68,] 20.211142 -395.214714 [69,] 485.378954 20.211142 [70,] -185.496340 485.378954 [71,] -142.513684 -185.496340 [72,] 729.897012 -142.513684 [73,] 228.694091 729.897012 [74,] 256.761298 228.694091 [75,] 373.629269 256.761298 [76,] 174.464803 373.629269 [77,] -179.558379 174.464803 [78,] 10.163569 -179.558379 [79,] -261.973529 10.163569 [80,] -122.246389 -261.973529 [81,] 308.805902 -122.246389 [82,] -127.451950 308.805902 [83,] 199.115341 -127.451950 [84,] 290.184133 199.115341 [85,] -125.166988 290.184133 [86,] -327.854215 -125.166988 [87,] -221.790287 -327.854215 [88,] -210.599240 -221.790287 [89,] -373.794499 -210.599240 [90,] -369.242631 -373.794499 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -159.205020 42.709962 2 -26.113277 -159.205020 3 -139.400163 -26.113277 4 -233.726633 -139.400163 5 -106.753691 -233.726633 6 -85.050743 -106.753691 7 -718.605799 -85.050743 8 -137.782006 -718.605799 9 -94.933776 -137.782006 10 -249.915553 -94.933776 11 -152.283673 -249.915553 12 -2.645065 -152.283673 13 129.506915 -2.645065 14 60.042854 129.506915 15 -57.719135 60.042854 16 -5.082323 -57.719135 17 -120.753891 -5.082323 18 -236.926807 -120.753891 19 -549.201339 -236.926807 20 -128.157835 -549.201339 21 385.687121 -128.157835 22 85.782725 385.687121 23 238.830173 85.782725 24 682.392836 238.830173 25 39.773952 682.392836 26 445.014189 39.773952 27 268.301455 445.014189 28 -55.578840 268.301455 29 -120.319357 -55.578840 30 228.196828 -120.319357 31 -175.166094 228.196828 32 -191.326854 -175.166094 33 394.827550 -191.326854 34 -3.833845 394.827550 35 12.515823 -3.833845 36 88.930725 12.515823 37 221.619381 88.930725 38 165.097165 221.619381 39 566.469078 165.097165 40 16.122546 566.469078 41 204.549468 16.122546 42 129.537249 204.549468 43 -187.986132 129.537249 44 -103.313763 -187.986132 45 406.345769 -103.313763 46 -419.594501 406.345769 47 -211.485055 -419.594501 48 70.932696 -211.485055 49 -108.953157 70.932696 50 -108.356921 -108.953157 51 -82.806615 -108.356921 52 -561.177497 -82.806615 53 187.088287 -561.177497 54 -155.832336 187.088287 55 -679.423150 -155.832336 56 -147.559696 -679.423150 57 251.968926 -147.559696 58 -130.508759 251.968926 59 213.017777 -130.508759 60 543.571291 213.017777 61 29.329571 543.571291 62 342.734966 29.329571 63 144.524444 342.734966 64 -10.661934 144.524444 65 -105.528637 -10.661934 66 133.845485 -105.528637 67 -395.214714 133.845485 68 20.211142 -395.214714 69 485.378954 20.211142 70 -185.496340 485.378954 71 -142.513684 -185.496340 72 729.897012 -142.513684 73 228.694091 729.897012 74 256.761298 228.694091 75 373.629269 256.761298 76 174.464803 373.629269 77 -179.558379 174.464803 78 10.163569 -179.558379 79 -261.973529 10.163569 80 -122.246389 -261.973529 81 308.805902 -122.246389 82 -127.451950 308.805902 83 199.115341 -127.451950 84 290.184133 199.115341 85 -125.166988 290.184133 86 -327.854215 -125.166988 87 -221.790287 -327.854215 88 -210.599240 -221.790287 89 -373.794499 -210.599240 90 -369.242631 -373.794499 > 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/wessaorg/rcomp/tmp/7yc2t1353057136.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/wessaorg/rcomp/tmp/8hpgp1353057136.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/wessaorg/rcomp/tmp/9sglg1353057136.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/wessaorg/rcomp/tmp/103b2r1353057136.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/116k9t1353057136.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/wessaorg/rcomp/tmp/12d8d41353057136.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/wessaorg/rcomp/tmp/13bex11353057136.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/wessaorg/rcomp/tmp/14lttq1353057136.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/wessaorg/rcomp/tmp/15dkki1353057136.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/wessaorg/rcomp/tmp/16wdt91353057136.tab") + } > > try(system("convert tmp/121pd1353057136.ps tmp/121pd1353057136.png",intern=TRUE)) character(0) > try(system("convert tmp/2vdev1353057136.ps tmp/2vdev1353057136.png",intern=TRUE)) character(0) > try(system("convert tmp/3057m1353057136.ps tmp/3057m1353057136.png",intern=TRUE)) character(0) > try(system("convert tmp/4cjhr1353057136.ps tmp/4cjhr1353057136.png",intern=TRUE)) character(0) > try(system("convert tmp/5nytg1353057136.ps tmp/5nytg1353057136.png",intern=TRUE)) character(0) > try(system("convert tmp/6zoz01353057136.ps tmp/6zoz01353057136.png",intern=TRUE)) character(0) > try(system("convert tmp/7yc2t1353057136.ps tmp/7yc2t1353057136.png",intern=TRUE)) character(0) > try(system("convert tmp/8hpgp1353057136.ps tmp/8hpgp1353057136.png",intern=TRUE)) character(0) > try(system("convert tmp/9sglg1353057136.ps tmp/9sglg1353057136.png",intern=TRUE)) character(0) > try(system("convert tmp/103b2r1353057136.ps tmp/103b2r1353057136.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.827 1.253 9.080