R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(1 + ,162556 + ,1081 + ,213118 + ,6282929 + ,1 + ,29790 + ,309 + ,81767 + ,4324047 + ,1 + ,87550 + ,458 + ,153198 + ,4108272 + ,0 + ,84738 + ,588 + ,-26007 + ,-1212617 + ,1 + ,54660 + ,299 + ,126942 + ,1485329 + ,1 + ,42634 + ,156 + ,157214 + ,1779876 + ,0 + ,40949 + ,481 + ,129352 + ,1367203 + ,1 + ,42312 + ,323 + ,234817 + ,2519076 + ,1 + ,37704 + ,452 + ,60448 + ,912684 + ,1 + ,16275 + ,109 + ,47818 + ,1443586 + ,0 + ,25830 + ,115 + ,245546 + ,1220017 + ,0 + ,12679 + ,110 + ,48020 + ,984885 + ,1 + ,18014 + ,239 + ,-1710 + ,1457425 + ,0 + ,43556 + ,247 + ,32648 + ,-572920 + ,1 + ,24524 + ,497 + ,95350 + ,929144 + ,0 + ,6532 + ,103 + ,151352 + ,1151176 + ,0 + ,7123 + ,109 + ,288170 + ,790090 + ,1 + ,20813 + ,502 + ,114337 + ,774497 + ,1 + ,37597 + ,248 + ,37884 + ,990576 + ,0 + ,17821 + ,373 + ,122844 + ,454195 + ,1 + ,12988 + ,119 + ,82340 + ,876607 + ,1 + ,22330 + ,84 + ,79801 + ,711969 + ,0 + ,13326 + ,102 + ,165548 + ,702380 + ,0 + ,16189 + ,295 + ,116384 + ,264449 + ,0 + ,7146 + ,105 + ,134028 + ,450033 + ,0 + ,15824 + ,64 + ,63838 + ,541063 + ,1 + ,26088 + ,267 + ,74996 + ,588864 + ,0 + ,11326 + ,129 + ,31080 + ,-37216 + ,0 + ,8568 + ,37 + ,32168 + ,783310 + ,0 + ,14416 + ,361 + ,49857 + ,467359 + ,1 + ,3369 + ,28 + ,87161 + ,688779 + ,1 + ,11819 + ,85 + ,106113 + ,608419 + ,1 + ,6620 + ,44 + ,80570 + ,696348 + ,1 + ,4519 + ,49 + ,102129 + ,597793 + ,0 + ,2220 + ,22 + ,301670 + ,821730 + ,0 + ,18562 + ,155 + ,102313 + ,377934 + ,0 + ,10327 + ,91 + ,88577 + ,651939 + ,1 + ,5336 + ,81 + ,112477 + ,697458 + ,1 + ,2365 + ,79 + ,191778 + ,700368 + ,0 + ,4069 + ,145 + ,79804 + ,225986 + ,0 + ,7710 + ,816 + ,128294 + ,348695 + ,0 + ,13718 + ,61 + ,96448 + ,373683 + ,0 + ,4525 + ,226 + ,93811 + ,501709 + ,0 + ,6869 + ,105 + ,117520 + ,413743 + ,0 + ,4628 + ,62 + ,69159 + ,379825 + ,1 + ,3653 + ,24 + ,101792 + ,336260 + ,1 + ,1265 + ,26 + ,210568 + ,636765 + ,1 + ,7489 + ,322 + ,136996 + ,481231 + ,0 + ,4901 + ,84 + ,121920 + ,469107 + ,0 + ,2284 + ,33 + ,76403 + ,211928 + ,1 + ,3160 + ,108 + ,108094 + ,563925 + ,1 + ,4150 + ,150 + ,134759 + ,511939 + ,1 + ,7285 + ,115 + ,188873 + ,521016 + ,1 + ,1134 + ,162 + ,146216 + ,543856 + ,1 + ,4658 + ,158 + ,156608 + ,329304 + ,0 + ,2384 + ,97 + ,61348 + ,423262 + ,0 + ,3748 + ,9 + ,50350 + ,509665 + ,0 + ,5371 + ,66 + ,87720 + ,455881 + ,0 + ,1285 + ,107 + ,99489 + ,367772 + ,1 + ,9327 + ,101 + ,87419 + ,406339 + ,1 + ,5565 + ,47 + ,94355 + ,493408 + ,0 + ,1528 + ,38 + ,60326 + ,232942 + ,1 + ,3122 + ,34 + ,94670 + ,416002 + ,1 + ,7317 + ,84 + ,82425 + ,337430 + ,0 + ,2675 + ,79 + ,59017 + ,361517 + ,0 + ,13253 + ,947 + ,90829 + ,360962 + ,0 + ,880 + ,74 + ,80791 + ,235561 + ,1 + ,2053 + ,53 + ,100423 + ,408247 + ,0 + ,1424 + ,94 + ,131116 + ,450296 + ,1 + ,4036 + ,63 + ,100269 + ,418799 + ,1 + ,3045 + ,58 + ,27330 + ,247405 + ,0 + ,5119 + ,49 + ,39039 + ,378519 + ,0 + ,1431 + ,34 + ,106885 + ,326638 + ,0 + ,554 + ,11 + ,79285 + ,328233 + ,0 + ,1975 + ,35 + ,118881 + ,386225 + ,1 + ,1286 + ,17 + ,77623 + ,283662 + ,0 + ,1012 + ,47 + ,114768 + ,370225 + ,0 + ,810 + ,43 + ,74015 + ,269236 + ,0 + ,1280 + ,117 + ,69465 + ,365732 + ,1 + ,666 + ,171 + ,117869 + ,420383 + ,0 + ,1380 + ,26 + ,60982 + ,345811 + ,1 + ,4608 + ,73 + ,90131 + ,431809 + ,0 + ,876 + ,59 + ,138971 + ,418876 + ,0 + ,814 + ,18 + ,39625 + ,297476 + ,0 + ,514 + ,15 + ,102725 + ,416776 + ,1 + ,5692 + ,72 + ,64239 + ,357257 + ,0 + ,3642 + ,86 + ,90262 + ,458343 + ,0 + ,540 + ,14 + ,103960 + ,388386 + ,0 + ,2099 + ,64 + ,106611 + ,358934 + ,0 + ,567 + ,11 + ,103345 + ,407560 + ,0 + ,2001 + ,52 + ,95551 + ,392558 + ,1 + ,2949 + ,41 + ,82903 + ,373177 + ,0 + ,2253 + ,99 + ,63593 + ,428370 + ,1 + ,6533 + ,75 + ,126910 + ,369419 + ,0 + ,1889 + ,45 + ,37527 + ,358649 + ,1 + ,3055 + ,43 + ,60247 + ,376641 + ,0 + ,272 + ,8 + ,112995 + ,467427 + ,1 + ,1414 + ,198 + ,70184 + ,364885 + ,0 + ,2564 + ,22 + ,130140 + ,436230 + ,1 + ,1383 + ,11 + ,73221 + ,329118 + ,1 + ,1261 + ,33 + ,76114 + ,317365 + ,0 + ,975 + ,23 + ,90534 + ,286849 + ,0 + ,3366 + ,80 + ,108479 + ,376685 + ,0 + ,576 + ,18 + ,113761 + ,407198 + ,0 + ,1306 + ,28 + ,68696 + ,377772 + ,0 + ,746 + ,23 + ,71561 + ,271483 + ,1 + ,3192 + ,60 + ,59831 + ,153661 + ,1 + ,2045 + ,20 + ,97890 + ,513294 + ,0 + ,5477 + ,59 + ,101481 + ,324881 + ,1 + ,1932 + ,36 + ,72954 + ,264512 + ,0 + ,936 + ,30 + ,67939 + ,420968 + ,1 + ,3437 + ,47 + ,48022 + ,129302 + ,0 + ,5131 + ,71 + ,86111 + ,191521 + ,1 + ,2397 + ,14 + ,74020 + ,268673 + ,1 + ,1389 + ,9 + ,57530 + ,353179 + ,0 + ,1503 + ,39 + ,56364 + ,354624 + ,0 + ,402 + ,26 + ,84990 + ,363713 + ,0 + ,2239 + ,21 + ,88590 + ,456657 + ,1 + ,2234 + ,16 + ,77200 + ,211742 + ,0 + ,837 + ,69 + ,61262 + ,338381 + ,0 + ,10579 + ,92 + ,110309 + ,418530 + ,0 + ,875 + ,14 + ,67000 + ,351483 + ,0 + ,1395 + ,103 + ,93099 + ,372928 + ,1 + ,1659 + ,29 + ,107577 + ,485538 + ,1 + ,2647 + ,37 + ,62920 + ,279268 + ,1 + ,3294 + ,23 + ,75832 + ,219060 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,94 + ,7 + ,60793 + ,325314 + ,0 + ,422 + ,28 + ,57935 + ,322046 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,34 + ,8 + ,60630 + ,325599 + ,0 + ,1558 + ,63 + ,55637 + ,377028 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,43 + ,3 + ,60887 + ,323850 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,316 + ,9 + ,60505 + ,331514 + ,0 + ,115 + ,13 + ,60945 + ,325632 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,389 + ,14 + ,58990 + ,322265 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,1002 + ,15 + ,56750 + ,325906 + ,0 + ,36 + ,3 + ,60894 + ,325985 + ,0 + ,460 + ,15 + ,63346 + ,346145 + ,0 + ,309 + ,11 + ,56535 + ,325898 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,9 + ,6 + ,60835 + ,325356 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,14 + ,1 + ,61016 + ,325930 + ,0 + ,520 + ,10 + ,58650 + ,318020 + ,0 + ,1766 + ,73 + ,60438 + ,326389 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,458 + ,11 + ,58625 + ,302925 + ,0 + ,20 + ,3 + ,60938 + ,325540 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,98 + ,2 + ,61490 + ,326736 + ,0 + ,405 + ,7 + ,60845 + ,340580 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,483 + ,27 + ,60830 + ,331828 + ,0 + ,454 + ,51 + ,63261 + ,323299 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,757 + ,19 + ,45689 + ,387722 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,36 + ,4 + ,61564 + ,324598 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,203 + ,9 + ,61938 + ,328726 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,90 + ,8 + ,60951 + ,325043 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,71 + ,1 + ,60745 + ,325806 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,972 + ,34 + ,71642 + ,387732 + ,1 + ,531 + ,10 + ,71641 + ,349729 + ,0 + ,604 + ,38 + ,55792 + ,332202 + ,1 + ,283 + ,10 + ,71873 + ,305442 + ,1 + ,23 + ,5 + ,62555 + ,329537 + ,1 + ,638 + ,14 + ,60370 + ,327055 + ,1 + ,699 + ,16 + ,64873 + ,356245 + ,0 + ,149 + ,5 + ,62041 + ,328451 + ,0 + ,226 + ,5 + ,65745 + ,307062 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,275 + ,4 + ,59500 + ,331345 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,141 + ,6 + ,61630 + ,331824 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,28 + ,2 + ,60890 + ,325685 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,2566 + ,80 + ,113521 + ,404480 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,472 + ,20 + ,80045 + ,318314 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,203 + ,27 + ,50804 + ,311807 + ,1 + ,496 + ,17 + ,87390 + ,337724 + ,1 + ,10 + ,2 + ,61656 + ,326431 + ,1 + ,63 + ,4 + ,65688 + ,327556 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,1136 + ,32 + ,48522 + ,356850 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,267 + ,32 + ,57640 + ,322741 + ,0 + ,474 + ,20 + ,61977 + ,310902 + ,0 + ,534 + ,7 + ,62620 + ,324295 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,15 + ,8 + ,60831 + ,326156 + ,0 + ,397 + ,28 + ,60646 + ,326960 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,1061 + ,20 + ,56225 + ,333411 + ,0 + ,288 + ,4 + ,60510 + ,297761 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,3 + ,2 + ,60698 + ,325536 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,20 + ,2 + ,60805 + ,325762 + ,0 + ,278 + ,26 + ,61404 + ,327957 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,192 + ,4 + ,65276 + ,318521 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,317 + ,9 + ,63915 + ,319775 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,368 + ,17 + ,61686 + ,332128 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,2 + ,1 + ,60743 + ,325486 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,53 + ,6 + ,60349 + ,325838 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,94 + ,3 + ,61360 + ,331767 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,24 + ,8 + ,59818 + ,324523 + ,0 + ,2332 + ,4 + ,72680 + ,339995 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,131 + ,11 + ,61808 + ,319582 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,206 + ,9 + ,53110 + ,307245 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,167 + ,2 + ,64245 + ,317967 + ,0 + ,622 + ,73 + ,73007 + ,331488 + ,0 + ,885 + ,85 + ,82732 + ,335452 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,365 + ,8 + ,54820 + ,334184 + ,0 + ,364 + ,35 + ,47705 + ,313213 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,226 + ,12 + ,72835 + ,348678 + ,0 + ,307 + ,15 + ,58856 + ,328727 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,188 + ,11 + ,77655 + ,387978 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,138 + ,6 + ,69817 + ,336704 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,125 + ,12 + ,60798 + ,322076 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,282 + ,30 + ,62452 + ,334272 + ,0 + ,335 + ,33 + ,64175 + ,338197 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,813 + ,82 + ,67440 + ,321024 + ,0 + ,176 + ,28 + ,68136 + ,322145 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,249 + ,72 + ,56726 + ,323351 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,333 + ,13 + ,70811 + ,327748 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,30 + ,4 + ,62045 + ,328157 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,249 + ,62 + ,54323 + ,311594 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,165 + ,24 + ,62841 + ,335962 + ,0 + ,453 + ,21 + ,81125 + ,372426 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,53 + ,14 + ,59506 + ,319844 + ,1 + ,382 + ,21 + ,59365 + ,355822 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,30 + ,4 + ,60798 + ,324047 + ,0 + ,290 + ,2 + ,58790 + ,311464 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,366 + ,53 + ,61808 + ,353417 + ,0 + ,2 + ,9 + ,60735 + ,325590 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,209 + ,13 + ,64016 + ,328576 + ,0 + ,384 + ,22 + ,54683 + ,326126 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,365 + ,83 + ,87192 + ,369376 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,49 + ,8 + ,64107 + ,332013 + ,0 + ,3 + ,4 + ,60761 + ,325871 + ,0 + ,133 + ,14 + ,65990 + ,342165 + ,0 + ,32 + ,1 + ,59988 + ,324967 + ,0 + ,368 + ,17 + ,61167 + ,314832 + ,0 + ,1 + ,6 + ,60719 + ,325557 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,22 + ,2 + ,60722 + ,322649 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,96 + ,5 + ,60379 + ,324598 + ,0 + ,1 + ,2 + ,60727 + ,325567 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,81 + ,7 + ,60925 + ,324005 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,26 + ,1 + ,60896 + ,325748 + ,0 + ,125 + ,13 + ,59734 + ,323385 + ,0 + ,304 + ,15 + ,62969 + ,315409 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,119 + ,6 + ,59118 + ,312275 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,312 + ,14 + ,58598 + ,320576 + ,0 + ,60 + ,10 + ,61124 + ,325246 + ,0 + ,587 + ,12 + ,59595 + ,332961 + ,0 + ,135 + ,2 + ,62065 + ,323010 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,514 + ,52 + ,78780 + ,345253 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,1 + ,4 + ,60722 + ,325559 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,58 + ,3 + ,61600 + ,319634 + ,0 + ,180 + ,11 + ,59635 + ,319951 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,448 + ,40 + ,59781 + ,318519 + ,0 + ,227 + ,9 + ,76644 + ,343222 + ,0 + ,174 + ,1 + ,64820 + ,317234 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,121 + ,24 + ,56178 + ,314025 + ,0 + ,607 + ,11 + ,60436 + ,320249 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,530 + ,60 + ,73433 + ,349365 + ,0 + ,571 + ,80 + ,41477 + ,289197 + ,0 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,78 + ,16 + ,62700 + ,329245 + ,0 + ,2489 + ,40 + ,67804 + ,240869 + ,0 + ,131 + ,6 + ,59661 + ,327182 + ,0 + ,923 + ,8 + ,58620 + ,322876 + ,0 + ,72 + ,3 + ,60398 + ,323117 + ,0 + ,572 + ,16 + ,58580 + ,306351 + ,0 + ,397 + ,10 + ,62710 + ,335137 + ,0 + ,450 + ,8 + ,59325 + ,308271 + ,0 + ,622 + ,7 + ,60950 + ,301731 + ,0 + ,694 + ,8 + ,68060 + ,382409 + ,1 + ,3425 + ,12 + ,83620 + ,279230 + ,0 + ,562 + ,13 + ,58456 + ,298731 + ,0 + ,4917 + ,42 + ,52811 + ,243650 + ,1 + ,1442 + ,118 + ,121173 + ,532682 + ,0 + ,529 + ,9 + ,63870 + ,319771 + ,1 + ,2126 + ,138 + ,21001 + ,171493 + ,0 + ,1061 + ,5 + ,70415 + ,347262 + ,0 + ,776 + ,9 + ,64230 + ,343945 + ,0 + ,611 + ,8 + ,59190 + ,311874 + ,1 + ,1526 + ,25 + ,69351 + ,302211 + ,0 + ,592 + ,7 + ,64270 + ,316708 + ,0 + ,1182 + ,13 + ,70694 + ,333463 + ,0 + ,621 + ,16 + ,68005 + ,344282 + ,0 + ,989 + ,11 + ,58930 + ,319635 + ,0 + ,438 + ,11 + ,58320 + ,301186 + ,0 + ,726 + ,3 + ,69980 + ,300381 + ,0 + ,1303 + ,61 + ,69863 + ,318765 + ,1 + ,6341 + ,24 + ,63255 + ,286146 + ,1 + ,1164 + ,17 + ,57320 + ,306844 + ,1 + ,3310 + ,33 + ,75230 + ,307705 + ,0 + ,1366 + ,7 + ,79420 + ,312448 + ,0 + ,965 + ,3 + ,73490 + ,299715 + ,0 + ,3256 + ,66 + ,35250 + ,373399 + ,1 + ,1135 + ,17 + ,62285 + ,299446 + ,0 + ,1270 + ,26 + ,69206 + ,325586 + ,0 + ,661 + ,3 + ,65920 + ,291221 + ,0 + ,1013 + ,2 + ,69770 + ,261173 + ,0 + ,2844 + ,67 + ,72683 + ,255027 + ,1 + ,11528 + ,70 + ,-14545 + ,-78375 + ,0 + ,6526 + ,26 + ,55830 + ,-58143 + ,0 + ,2264 + ,24 + ,55174 + ,227033 + ,1 + ,4461 + ,94 + ,67038 + ,235098 + ,0 + ,3999 + ,30 + ,51252 + ,21267 + ,0 + ,35624 + ,223 + ,157278 + ,238675 + ,0 + ,9252 + ,48 + ,79510 + ,197687 + ,0 + ,15236 + ,90 + ,77440 + ,418341 + ,0 + ,18073 + ,180 + ,27284 + ,-297706) + ,dim=c(5 + ,431) + ,dimnames=list(c('Group' + ,'Costs' + ,'Trades' + ,'Dividends' + ,'Wealth ') + ,1:431)) > y <- array(NA,dim=c(5,431),dimnames=list(c('Group','Costs','Trades','Dividends','Wealth '),1:431)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par4 = 'no' > par3 = '3' > par2 = 'none' > par1 = '2' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, 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: > #Technical description: > library(party) Loading required package: survival Loading required package: splines Loading required package: grid Loading required package: modeltools Loading required package: stats4 Loading required package: coin Loading required package: mvtnorm Loading required package: zoo Loading required package: sandwich Loading required package: strucchange Loading required package: vcd Loading required package: MASS Loading required package: colorspace > library(Hmisc) Attaching package: 'Hmisc' The following object(s) are masked from 'package:survival': untangle.specials The following object(s) are masked from 'package:base': format.pval, round.POSIXt, trunc.POSIXt, units > par1 <- as.numeric(par1) > par3 <- as.numeric(par3) > x <- data.frame(t(y)) > is.data.frame(x) [1] TRUE > x <- x[!is.na(x[,par1]),] > k <- length(x[1,]) > n <- length(x[,1]) > colnames(x)[par1] [1] "Costs" > x[,par1] [1] 162556 29790 87550 84738 54660 42634 40949 42312 37704 16275 [11] 25830 12679 18014 43556 24524 6532 7123 20813 37597 17821 [21] 12988 22330 13326 16189 7146 15824 26088 11326 8568 14416 [31] 3369 11819 6620 4519 2220 18562 10327 5336 2365 4069 [41] 7710 13718 4525 6869 4628 3653 1265 7489 4901 2284 [51] 3160 4150 7285 1134 4658 2384 3748 5371 1285 9327 [61] 5565 1528 3122 7317 2675 13253 880 2053 1424 4036 [71] 3045 5119 1431 554 1975 1286 1012 810 1280 666 [81] 1380 4608 876 814 514 5692 3642 540 2099 567 [91] 2001 2949 2253 6533 1889 3055 272 1414 2564 1383 [101] 1261 975 3366 576 1306 746 3192 2045 5477 1932 [111] 936 3437 5131 2397 1389 1503 402 2239 2234 837 [121] 10579 875 1395 1659 2647 3294 0 94 422 0 [131] 34 1558 0 43 0 316 115 0 0 0 [141] 389 0 1002 36 460 309 0 9 0 14 [151] 520 1766 0 458 20 0 0 98 405 0 [161] 0 0 0 483 454 0 0 757 0 0 [171] 0 36 0 203 0 90 0 71 0 0 [181] 972 531 604 283 23 638 699 149 226 0 [191] 275 0 141 0 28 0 2566 0 0 472 [201] 0 0 0 203 496 10 63 0 1136 0 [211] 0 0 267 474 534 0 15 397 0 1061 [221] 288 0 3 0 20 278 0 0 192 0 [231] 317 0 0 368 0 2 0 53 0 0 [241] 0 94 0 24 2332 0 0 131 0 0 [251] 206 0 167 622 885 0 365 364 0 0 [261] 0 0 226 307 0 0 0 188 0 138 [271] 0 0 0 125 0 282 335 0 813 176 [281] 0 0 249 0 333 0 0 30 0 249 [291] 0 165 453 0 53 382 0 0 0 0 [301] 30 290 0 0 366 2 0 209 384 0 [311] 0 365 0 49 3 133 32 368 1 0 [321] 0 0 0 0 0 22 0 0 0 0 [331] 0 0 0 96 1 0 81 0 26 125 [341] 304 0 0 0 0 0 119 0 0 0 [351] 312 60 587 135 0 0 514 0 0 0 [361] 1 0 0 58 180 0 0 0 0 0 [371] 0 448 227 174 0 0 121 607 0 0 [381] 0 530 571 0 78 2489 131 923 72 572 [391] 397 450 622 694 3425 562 4917 1442 529 2126 [401] 1061 776 611 1526 592 1182 621 989 438 726 [411] 1303 6341 1164 3310 1366 965 3256 1135 1270 661 [421] 1013 2844 11528 6526 2264 4461 3999 35624 9252 15236 [431] 18073 > if (par2 == 'kmeans') { + cl <- kmeans(x[,par1], par3) + print(cl) + clm <- matrix(cbind(cl$centers,1:par3),ncol=2) + clm <- clm[sort.list(clm[,1]),] + for (i in 1:par3) { + cl$cluster[cl$cluster==clm[i,2]] <- paste('C',i,sep='') + } + cl$cluster <- as.factor(cl$cluster) + print(cl$cluster) + x[,par1] <- cl$cluster + } > if (par2 == 'quantiles') { + x[,par1] <- cut2(x[,par1],g=par3) + } > if (par2 == 'hclust') { + hc <- hclust(dist(x[,par1])^2, 'cen') + print(hc) + memb <- cutree(hc, k = par3) + dum <- c(mean(x[memb==1,par1])) + for (i in 2:par3) { + dum <- c(dum, mean(x[memb==i,par1])) + } + hcm <- matrix(cbind(dum,1:par3),ncol=2) + hcm <- hcm[sort.list(hcm[,1]),] + for (i in 1:par3) { + memb[memb==hcm[i,2]] <- paste('C',i,sep='') + } + memb <- as.factor(memb) + print(memb) + x[,par1] <- memb + } > if (par2=='equal') { + ed <- cut(as.numeric(x[,par1]),par3,labels=paste('C',1:par3,sep='')) + x[,par1] <- as.factor(ed) + } > table(x[,par1]) 0 1 2 3 9 10 14 15 20 22 23 134 3 2 2 1 1 1 1 2 1 1 24 26 28 30 32 34 36 43 49 53 58 1 1 1 2 1 1 2 1 1 2 1 60 63 71 72 78 81 90 94 96 98 115 1 1 1 1 1 1 1 2 1 1 1 119 121 125 131 133 135 138 141 149 165 167 1 1 2 2 1 1 1 1 1 1 1 174 176 180 188 192 203 206 209 226 227 249 1 1 1 1 1 2 1 1 2 1 2 267 272 275 278 282 283 288 290 304 307 309 1 1 1 1 1 1 1 1 1 1 1 312 316 317 333 335 364 365 366 368 382 384 1 1 1 1 1 1 2 1 2 1 1 389 397 402 405 422 438 448 450 453 454 458 1 2 1 1 1 1 1 1 1 1 1 460 472 474 483 496 514 520 529 530 531 534 1 1 1 1 1 2 1 1 1 1 1 540 554 562 567 571 572 576 587 592 604 607 1 1 1 1 1 1 1 1 1 1 1 611 621 622 638 661 666 694 699 726 746 757 1 1 2 1 1 1 1 1 1 1 1 776 810 813 814 837 875 876 880 885 923 936 1 1 1 1 1 1 1 1 1 1 1 965 972 975 989 1002 1012 1013 1061 1134 1135 1136 1 1 1 1 1 1 1 2 1 1 1 1164 1182 1261 1265 1270 1280 1285 1286 1303 1306 1366 1 1 1 1 1 1 1 1 1 1 1 1380 1383 1389 1395 1414 1424 1431 1442 1503 1526 1528 1 1 1 1 1 1 1 1 1 1 1 1558 1659 1766 1889 1932 1975 2001 2045 2053 2099 2126 1 1 1 1 1 1 1 1 1 1 1 2220 2234 2239 2253 2264 2284 2332 2365 2384 2397 2489 1 1 1 1 1 1 1 1 1 1 1 2564 2566 2647 2675 2844 2949 3045 3055 3122 3160 3192 1 1 1 1 1 1 1 1 1 1 1 3256 3294 3310 3366 3369 3425 3437 3642 3653 3748 3999 1 1 1 1 1 1 1 1 1 1 1 4036 4069 4150 4461 4519 4525 4608 4628 4658 4901 4917 1 1 1 1 1 1 1 1 1 1 1 5119 5131 5336 5371 5477 5565 5692 6341 6526 6532 6533 1 1 1 1 1 1 1 1 1 1 1 6620 6869 7123 7146 7285 7317 7489 7710 8568 9252 9327 1 1 1 1 1 1 1 1 1 1 1 10327 10579 11326 11528 11819 12679 12988 13253 13326 13718 14416 1 1 1 1 1 1 1 1 1 1 1 15236 15824 16189 16275 17821 18014 18073 18562 20813 22330 24524 1 1 1 1 1 1 1 1 1 1 1 25830 26088 29790 35624 37597 37704 40949 42312 42634 43556 54660 1 1 1 1 1 1 1 1 1 1 1 84738 87550 162556 1 1 1 > colnames(x) [1] "Group" "Costs" "Trades" "Dividends" "Wealth." > colnames(x)[par1] [1] "Costs" > x[,par1] [1] 162556 29790 87550 84738 54660 42634 40949 42312 37704 16275 [11] 25830 12679 18014 43556 24524 6532 7123 20813 37597 17821 [21] 12988 22330 13326 16189 7146 15824 26088 11326 8568 14416 [31] 3369 11819 6620 4519 2220 18562 10327 5336 2365 4069 [41] 7710 13718 4525 6869 4628 3653 1265 7489 4901 2284 [51] 3160 4150 7285 1134 4658 2384 3748 5371 1285 9327 [61] 5565 1528 3122 7317 2675 13253 880 2053 1424 4036 [71] 3045 5119 1431 554 1975 1286 1012 810 1280 666 [81] 1380 4608 876 814 514 5692 3642 540 2099 567 [91] 2001 2949 2253 6533 1889 3055 272 1414 2564 1383 [101] 1261 975 3366 576 1306 746 3192 2045 5477 1932 [111] 936 3437 5131 2397 1389 1503 402 2239 2234 837 [121] 10579 875 1395 1659 2647 3294 0 94 422 0 [131] 34 1558 0 43 0 316 115 0 0 0 [141] 389 0 1002 36 460 309 0 9 0 14 [151] 520 1766 0 458 20 0 0 98 405 0 [161] 0 0 0 483 454 0 0 757 0 0 [171] 0 36 0 203 0 90 0 71 0 0 [181] 972 531 604 283 23 638 699 149 226 0 [191] 275 0 141 0 28 0 2566 0 0 472 [201] 0 0 0 203 496 10 63 0 1136 0 [211] 0 0 267 474 534 0 15 397 0 1061 [221] 288 0 3 0 20 278 0 0 192 0 [231] 317 0 0 368 0 2 0 53 0 0 [241] 0 94 0 24 2332 0 0 131 0 0 [251] 206 0 167 622 885 0 365 364 0 0 [261] 0 0 226 307 0 0 0 188 0 138 [271] 0 0 0 125 0 282 335 0 813 176 [281] 0 0 249 0 333 0 0 30 0 249 [291] 0 165 453 0 53 382 0 0 0 0 [301] 30 290 0 0 366 2 0 209 384 0 [311] 0 365 0 49 3 133 32 368 1 0 [321] 0 0 0 0 0 22 0 0 0 0 [331] 0 0 0 96 1 0 81 0 26 125 [341] 304 0 0 0 0 0 119 0 0 0 [351] 312 60 587 135 0 0 514 0 0 0 [361] 1 0 0 58 180 0 0 0 0 0 [371] 0 448 227 174 0 0 121 607 0 0 [381] 0 530 571 0 78 2489 131 923 72 572 [391] 397 450 622 694 3425 562 4917 1442 529 2126 [401] 1061 776 611 1526 592 1182 621 989 438 726 [411] 1303 6341 1164 3310 1366 965 3256 1135 1270 661 [421] 1013 2844 11528 6526 2264 4461 3999 35624 9252 15236 [431] 18073 > if (par2 == 'none') { + m <- ctree(as.formula(paste(colnames(x)[par1],' ~ .',sep='')),data = x) + } > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/rcomp/createtable") > > if (par2 != 'none') { + m <- ctree(as.formula(paste('as.factor(',colnames(x)[par1],') ~ .',sep='')),data = x) + if (par4=='yes') { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'10-Fold Cross Validation',3+2*par3,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'',1,TRUE) + a<-table.element(a,'Prediction (training)',par3+1,TRUE) + a<-table.element(a,'Prediction (testing)',par3+1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Actual',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,paste('C',jjj,sep=''),1,TRUE) + a<-table.element(a,'CV',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,paste('C',jjj,sep=''),1,TRUE) + a<-table.element(a,'CV',1,TRUE) + a<-table.row.end(a) + for (i in 1:10) { + ind <- sample(2, nrow(x), replace=T, prob=c(0.9,0.1)) + m.ct <- ctree(as.formula(paste('as.factor(',colnames(x)[par1],') ~ .',sep='')),data =x[ind==1,]) + if (i==1) { + m.ct.i.pred <- predict(m.ct, newdata=x[ind==1,]) + m.ct.i.actu <- x[ind==1,par1] + m.ct.x.pred <- predict(m.ct, newdata=x[ind==2,]) + m.ct.x.actu <- x[ind==2,par1] + } else { + m.ct.i.pred <- c(m.ct.i.pred,predict(m.ct, newdata=x[ind==1,])) + m.ct.i.actu <- c(m.ct.i.actu,x[ind==1,par1]) + m.ct.x.pred <- c(m.ct.x.pred,predict(m.ct, newdata=x[ind==2,])) + m.ct.x.actu <- c(m.ct.x.actu,x[ind==2,par1]) + } + } + print(m.ct.i.tab <- table(m.ct.i.actu,m.ct.i.pred)) + numer <- 0 + for (i in 1:par3) { + print(m.ct.i.tab[i,i] / sum(m.ct.i.tab[i,])) + numer <- numer + m.ct.i.tab[i,i] + } + print(m.ct.i.cp <- numer / sum(m.ct.i.tab)) + print(m.ct.x.tab <- table(m.ct.x.actu,m.ct.x.pred)) + numer <- 0 + for (i in 1:par3) { + print(m.ct.x.tab[i,i] / sum(m.ct.x.tab[i,])) + numer <- numer + m.ct.x.tab[i,i] + } + print(m.ct.x.cp <- numer / sum(m.ct.x.tab)) + for (i in 1:par3) { + a<-table.row.start(a) + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + for (jjj in 1:par3) a<-table.element(a,m.ct.i.tab[i,jjj]) + a<-table.element(a,round(m.ct.i.tab[i,i]/sum(m.ct.i.tab[i,]),4)) + for (jjj in 1:par3) a<-table.element(a,m.ct.x.tab[i,jjj]) + a<-table.element(a,round(m.ct.x.tab[i,i]/sum(m.ct.x.tab[i,]),4)) + a<-table.row.end(a) + } + a<-table.row.start(a) + a<-table.element(a,'Overall',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,'-') + a<-table.element(a,round(m.ct.i.cp,4)) + for (jjj in 1:par3) a<-table.element(a,'-') + a<-table.element(a,round(m.ct.x.cp,4)) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/1gb8p1293202109.tab") + } + } > m Conditional inference tree with 13 terminal nodes Response: Costs Inputs: Group, Trades, Dividends, Wealth. Number of observations: 431 1) Trades <= 239; criterion = 1, statistic = 251.222 2) Trades <= 83; criterion = 1, statistic = 181.319 3) Trades <= 35; criterion = 1, statistic = 139.277 4) Trades <= 19; criterion = 1, statistic = 111.43 5) Trades <= 6; criterion = 1, statistic = 79.007 6) Dividends <= 65745; criterion = 1, statistic = 120.692 7) Trades <= 0; criterion = 1, statistic = 67.13 8)* weights = 134 7) Trades > 0 9) Wealth. <= 318521; criterion = 0.999, statistic = 13.016 10)* weights = 7 9) Wealth. > 318521 11) Wealth. <= 326431; criterion = 0.956, statistic = 6.441 12)* weights = 25 11) Wealth. > 326431 13)* weights = 9 6) Dividends > 65745 14)* weights = 7 5) Trades > 6 15) Group <= 0; criterion = 0.999, statistic = 13.231 16) Wealth. <= 348678; criterion = 1, statistic = 15.333 17)* weights = 56 16) Wealth. > 348678 18)* weights = 10 15) Group > 0 19)* weights = 15 4) Trades > 19 20)* weights = 47 3) Trades > 35 21)* weights = 59 2) Trades > 83 22) Wealth. <= 651939; criterion = 0.991, statistic = 9.26 23)* weights = 33 22) Wealth. > 651939 24)* weights = 10 1) Trades > 239 25)* weights = 19 > postscript(file="/var/www/rcomp/tmp/2gb8p1293202109.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(m) > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/3gb8p1293202109.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,par1] ~ as.factor(where(m)),main='Response by Terminal Node',xlab='Terminal Node',ylab='Response') > dev.off() null device 1 > if (par2 == 'none') { + forec <- predict(m) + result <- as.data.frame(cbind(x[,par1],forec,x[,par1]-forec)) + colnames(result) <- c('Actuals','Forecasts','Residuals') + print(result) + } Actuals Forecasts Residuals 1 162556 40511.3158 122044.684211 2 29790 40511.3158 -10721.315789 3 87550 40511.3158 47038.684211 4 84738 40511.3158 44226.684211 5 54660 40511.3158 14148.684211 6 42634 17773.1000 24860.900000 7 40949 40511.3158 437.684211 8 42312 40511.3158 1800.684211 9 37704 40511.3158 -2807.315789 10 16275 17773.1000 -1498.100000 11 25830 17773.1000 8056.900000 12 12679 17773.1000 -5094.100000 13 18014 17773.1000 240.900000 14 43556 40511.3158 3044.684211 15 24524 40511.3158 -15987.315789 16 6532 17773.1000 -11241.100000 17 7123 17773.1000 -10650.100000 18 20813 40511.3158 -19698.315789 19 37597 40511.3158 -2914.315789 20 17821 40511.3158 -22690.315789 21 12988 17773.1000 -4785.100000 22 22330 17773.1000 4556.900000 23 13326 17773.1000 -4447.100000 24 16189 40511.3158 -24322.315789 25 7146 6689.2121 456.787879 26 15824 3358.6441 12465.355932 27 26088 40511.3158 -14423.315789 28 11326 6689.2121 4636.787879 29 8568 3358.6441 5209.355932 30 14416 40511.3158 -26095.315789 31 3369 1535.9362 1833.063830 32 11819 6689.2121 5129.787879 33 6620 3358.6441 3261.355932 34 4519 3358.6441 1160.355932 35 2220 1535.9362 684.063830 36 18562 6689.2121 11872.787879 37 10327 6689.2121 3637.787879 38 5336 3358.6441 1977.355932 39 2365 3358.6441 -993.644068 40 4069 6689.2121 -2620.212121 41 7710 40511.3158 -32801.315789 42 13718 3358.6441 10359.355932 43 4525 6689.2121 -2164.212121 44 6869 6689.2121 179.787879 45 4628 3358.6441 1269.355932 46 3653 1535.9362 2117.063830 47 1265 1535.9362 -270.936170 48 7489 40511.3158 -33022.315789 49 4901 6689.2121 -1788.212121 50 2284 1535.9362 748.063830 51 3160 6689.2121 -3529.212121 52 4150 6689.2121 -2539.212121 53 7285 6689.2121 595.787879 54 1134 6689.2121 -5555.212121 55 4658 6689.2121 -2031.212121 56 2384 6689.2121 -4305.212121 57 3748 873.1000 2874.900000 58 5371 3358.6441 2012.355932 59 1285 6689.2121 -5404.212121 60 9327 6689.2121 2637.787879 61 5565 3358.6441 2206.355932 62 1528 3358.6441 -1830.644068 63 3122 1535.9362 1586.063830 64 7317 6689.2121 627.787879 65 2675 3358.6441 -683.644068 66 13253 40511.3158 -27258.315789 67 880 3358.6441 -2478.644068 68 2053 3358.6441 -1305.644068 69 1424 6689.2121 -5265.212121 70 4036 3358.6441 677.355932 71 3045 3358.6441 -313.644068 72 5119 3358.6441 1760.355932 73 1431 1535.9362 -104.936170 74 554 401.0893 152.910714 75 1975 1535.9362 439.063830 76 1286 1154.5333 131.466667 77 1012 3358.6441 -2346.644068 78 810 3358.6441 -2548.644068 79 1280 6689.2121 -5409.212121 80 666 6689.2121 -6023.212121 81 1380 1535.9362 -155.936170 82 4608 3358.6441 1249.355932 83 876 3358.6441 -2482.644068 84 814 401.0893 412.910714 85 514 873.1000 -359.100000 86 5692 3358.6441 2333.355932 87 3642 6689.2121 -3047.212121 88 540 873.1000 -333.100000 89 2099 3358.6441 -1259.644068 90 567 873.1000 -306.100000 91 2001 3358.6441 -1357.644068 92 2949 3358.6441 -409.644068 93 2253 6689.2121 -4436.212121 94 6533 3358.6441 3174.355932 95 1889 3358.6441 -1469.644068 96 3055 3358.6441 -303.644068 97 272 873.1000 -601.100000 98 1414 6689.2121 -5275.212121 99 2564 1535.9362 1028.063830 100 1383 1154.5333 228.466667 101 1261 1535.9362 -274.936170 102 975 1535.9362 -560.936170 103 3366 3358.6441 7.355932 104 576 873.1000 -297.100000 105 1306 1535.9362 -229.936170 106 746 1535.9362 -789.936170 107 3192 3358.6441 -166.644068 108 2045 1535.9362 509.063830 109 5477 3358.6441 2118.355932 110 1932 3358.6441 -1426.644068 111 936 1535.9362 -599.936170 112 3437 3358.6441 78.355932 113 5131 3358.6441 1772.355932 114 2397 1154.5333 1242.466667 115 1389 1154.5333 234.466667 116 1503 3358.6441 -1855.644068 117 402 1535.9362 -1133.936170 118 2239 1535.9362 703.063830 119 2234 1154.5333 1079.466667 120 837 3358.6441 -2521.644068 121 10579 6689.2121 3889.787879 122 875 873.1000 1.900000 123 1395 6689.2121 -5294.212121 124 1659 1535.9362 123.063830 125 2647 3358.6441 -711.644068 126 3294 1535.9362 1758.063830 127 0 0.0000 0.000000 128 94 401.0893 -307.089286 129 422 1535.9362 -1113.936170 130 0 0.0000 0.000000 131 34 401.0893 -367.089286 132 1558 3358.6441 -1800.644068 133 0 0.0000 0.000000 134 43 32.8800 10.120000 135 0 0.0000 0.000000 136 316 401.0893 -85.089286 137 115 401.0893 -286.089286 138 0 0.0000 0.000000 139 0 0.0000 0.000000 140 0 0.0000 0.000000 141 389 401.0893 -12.089286 142 0 0.0000 0.000000 143 1002 401.0893 600.910714 144 36 32.8800 3.120000 145 460 401.0893 58.910714 146 309 401.0893 -92.089286 147 0 0.0000 0.000000 148 9 32.8800 -23.880000 149 0 0.0000 0.000000 150 14 32.8800 -18.880000 151 520 401.0893 118.910714 152 1766 3358.6441 -1592.644068 153 0 0.0000 0.000000 154 458 401.0893 56.910714 155 20 32.8800 -12.880000 156 0 0.0000 0.000000 157 0 0.0000 0.000000 158 98 111.5556 -13.555556 159 405 401.0893 3.910714 160 0 0.0000 0.000000 161 0 0.0000 0.000000 162 0 0.0000 0.000000 163 0 0.0000 0.000000 164 483 1535.9362 -1052.936170 165 454 3358.6441 -2904.644068 166 0 0.0000 0.000000 167 0 0.0000 0.000000 168 757 873.1000 -116.100000 169 0 0.0000 0.000000 170 0 0.0000 0.000000 171 0 0.0000 0.000000 172 36 32.8800 3.120000 173 0 0.0000 0.000000 174 203 401.0893 -198.089286 175 0 0.0000 0.000000 176 90 401.0893 -311.089286 177 0 0.0000 0.000000 178 71 32.8800 38.120000 179 0 0.0000 0.000000 180 0 0.0000 0.000000 181 972 1535.9362 -563.936170 182 531 1154.5333 -623.533333 183 604 3358.6441 -2754.644068 184 283 1154.5333 -871.533333 185 23 111.5556 -88.555556 186 638 1154.5333 -516.533333 187 699 1154.5333 -455.533333 188 149 111.5556 37.444444 189 226 208.0000 18.000000 190 0 0.0000 0.000000 191 275 111.5556 163.444444 192 0 0.0000 0.000000 193 141 111.5556 29.444444 194 0 0.0000 0.000000 195 28 32.8800 -4.880000 196 0 0.0000 0.000000 197 2566 3358.6441 -792.644068 198 0 0.0000 0.000000 199 0 0.0000 0.000000 200 472 1535.9362 -1063.936170 201 0 0.0000 0.000000 202 0 0.0000 0.000000 203 0 0.0000 0.000000 204 203 1535.9362 -1332.936170 205 496 1154.5333 -658.533333 206 10 32.8800 -22.880000 207 63 111.5556 -48.555556 208 0 0.0000 0.000000 209 1136 1535.9362 -399.936170 210 0 0.0000 0.000000 211 0 0.0000 0.000000 212 0 0.0000 0.000000 213 267 1535.9362 -1268.936170 214 474 1535.9362 -1061.936170 215 534 401.0893 132.910714 216 0 0.0000 0.000000 217 15 401.0893 -386.089286 218 397 1535.9362 -1138.936170 219 0 0.0000 0.000000 220 1061 1535.9362 -474.936170 221 288 208.0000 80.000000 222 0 0.0000 0.000000 223 3 32.8800 -29.880000 224 0 0.0000 0.000000 225 20 32.8800 -12.880000 226 278 1535.9362 -1257.936170 227 0 0.0000 0.000000 228 0 0.0000 0.000000 229 192 208.0000 -16.000000 230 0 0.0000 0.000000 231 317 401.0893 -84.089286 232 0 0.0000 0.000000 233 0 0.0000 0.000000 234 368 401.0893 -33.089286 235 0 0.0000 0.000000 236 2 32.8800 -30.880000 237 0 0.0000 0.000000 238 53 32.8800 20.120000 239 0 0.0000 0.000000 240 0 0.0000 0.000000 241 0 0.0000 0.000000 242 94 111.5556 -17.555556 243 0 0.0000 0.000000 244 24 401.0893 -377.089286 245 2332 985.1429 1346.857143 246 0 0.0000 0.000000 247 0 0.0000 0.000000 248 131 401.0893 -270.089286 249 0 0.0000 0.000000 250 0 0.0000 0.000000 251 206 401.0893 -195.089286 252 0 0.0000 0.000000 253 167 208.0000 -41.000000 254 622 3358.6441 -2736.644068 255 885 6689.2121 -5804.212121 256 0 0.0000 0.000000 257 365 401.0893 -36.089286 258 364 1535.9362 -1171.936170 259 0 0.0000 0.000000 260 0 0.0000 0.000000 261 0 0.0000 0.000000 262 0 0.0000 0.000000 263 226 401.0893 -175.089286 264 307 401.0893 -94.089286 265 0 0.0000 0.000000 266 0 0.0000 0.000000 267 0 0.0000 0.000000 268 188 873.1000 -685.100000 269 0 0.0000 0.000000 270 138 985.1429 -847.142857 271 0 0.0000 0.000000 272 0 0.0000 0.000000 273 0 0.0000 0.000000 274 125 401.0893 -276.089286 275 0 0.0000 0.000000 276 282 1535.9362 -1253.936170 277 335 1535.9362 -1200.936170 278 0 0.0000 0.000000 279 813 3358.6441 -2545.644068 280 176 1535.9362 -1359.936170 281 0 0.0000 0.000000 282 0 0.0000 0.000000 283 249 3358.6441 -3109.644068 284 0 0.0000 0.000000 285 333 401.0893 -68.089286 286 0 0.0000 0.000000 287 0 0.0000 0.000000 288 30 111.5556 -81.555556 289 0 0.0000 0.000000 290 249 3358.6441 -3109.644068 291 0 0.0000 0.000000 292 165 1535.9362 -1370.936170 293 453 1535.9362 -1082.936170 294 0 0.0000 0.000000 295 53 401.0893 -348.089286 296 382 1535.9362 -1153.936170 297 0 0.0000 0.000000 298 0 0.0000 0.000000 299 0 0.0000 0.000000 300 0 0.0000 0.000000 301 30 32.8800 -2.880000 302 290 208.0000 82.000000 303 0 0.0000 0.000000 304 0 0.0000 0.000000 305 366 3358.6441 -2992.644068 306 2 401.0893 -399.089286 307 0 0.0000 0.000000 308 209 1154.5333 -945.533333 309 384 1535.9362 -1151.936170 310 0 0.0000 0.000000 311 0 0.0000 0.000000 312 365 3358.6441 -2993.644068 313 0 0.0000 0.000000 314 49 1154.5333 -1105.533333 315 3 32.8800 -29.880000 316 133 401.0893 -268.089286 317 32 32.8800 -0.880000 318 368 401.0893 -33.089286 319 1 32.8800 -31.880000 320 0 0.0000 0.000000 321 0 0.0000 0.000000 322 0 0.0000 0.000000 323 0 0.0000 0.000000 324 0 0.0000 0.000000 325 0 0.0000 0.000000 326 22 32.8800 -10.880000 327 0 0.0000 0.000000 328 0 0.0000 0.000000 329 0 0.0000 0.000000 330 0 0.0000 0.000000 331 0 0.0000 0.000000 332 0 0.0000 0.000000 333 0 0.0000 0.000000 334 96 32.8800 63.120000 335 1 32.8800 -31.880000 336 0 0.0000 0.000000 337 81 401.0893 -320.089286 338 0 0.0000 0.000000 339 26 32.8800 -6.880000 340 125 401.0893 -276.089286 341 304 401.0893 -97.089286 342 0 0.0000 0.000000 343 0 0.0000 0.000000 344 0 0.0000 0.000000 345 0 0.0000 0.000000 346 0 0.0000 0.000000 347 119 208.0000 -89.000000 348 0 0.0000 0.000000 349 0 0.0000 0.000000 350 0 0.0000 0.000000 351 312 401.0893 -89.089286 352 60 401.0893 -341.089286 353 587 401.0893 185.910714 354 135 32.8800 102.120000 355 0 0.0000 0.000000 356 0 0.0000 0.000000 357 514 3358.6441 -2844.644068 358 0 0.0000 0.000000 359 0 0.0000 0.000000 360 0 0.0000 0.000000 361 1 32.8800 -31.880000 362 0 0.0000 0.000000 363 0 0.0000 0.000000 364 58 32.8800 25.120000 365 180 401.0893 -221.089286 366 0 0.0000 0.000000 367 0 0.0000 0.000000 368 0 0.0000 0.000000 369 0 0.0000 0.000000 370 0 0.0000 0.000000 371 0 0.0000 0.000000 372 448 3358.6441 -2910.644068 373 227 401.0893 -174.089286 374 174 208.0000 -34.000000 375 0 0.0000 0.000000 376 0 0.0000 0.000000 377 121 1535.9362 -1414.936170 378 607 401.0893 205.910714 379 0 0.0000 0.000000 380 0 0.0000 0.000000 381 0 0.0000 0.000000 382 530 3358.6441 -2828.644068 383 571 3358.6441 -2787.644068 384 0 0.0000 0.000000 385 78 401.0893 -323.089286 386 2489 3358.6441 -869.644068 387 131 111.5556 19.444444 388 923 401.0893 521.910714 389 72 32.8800 39.120000 390 572 401.0893 170.910714 391 397 401.0893 -4.089286 392 450 401.0893 48.910714 393 622 401.0893 220.910714 394 694 873.1000 -179.100000 395 3425 1154.5333 2270.466667 396 562 401.0893 160.910714 397 4917 3358.6441 1558.355932 398 1442 6689.2121 -5247.212121 399 529 401.0893 127.910714 400 2126 6689.2121 -4563.212121 401 1061 985.1429 75.857143 402 776 401.0893 374.910714 403 611 401.0893 209.910714 404 1526 1535.9362 -9.936170 405 592 401.0893 190.910714 406 1182 401.0893 780.910714 407 621 401.0893 219.910714 408 989 401.0893 587.910714 409 438 401.0893 36.910714 410 726 985.1429 -259.142857 411 1303 3358.6441 -2055.644068 412 6341 1535.9362 4805.063830 413 1164 1154.5333 9.466667 414 3310 1535.9362 1774.063830 415 1366 401.0893 964.910714 416 965 985.1429 -20.142857 417 3256 3358.6441 -102.644068 418 1135 1154.5333 -19.533333 419 1270 1535.9362 -265.936170 420 661 985.1429 -324.142857 421 1013 985.1429 27.857143 422 2844 3358.6441 -514.644068 423 11528 3358.6441 8169.355932 424 6526 1535.9362 4990.063830 425 2264 1535.9362 728.063830 426 4461 6689.2121 -2228.212121 427 3999 1535.9362 2463.063830 428 35624 6689.2121 28934.787879 429 9252 3358.6441 5893.355932 430 15236 6689.2121 8546.787879 431 18073 6689.2121 11383.787879 > if (par2 != 'none') { + print(cbind(as.factor(x[,par1]),predict(m))) + myt <- table(as.factor(x[,par1]),predict(m)) + print(myt) + } > postscript(file="/var/www/rcomp/tmp/4r27s1293202109.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > if(par2=='none') { + op <- par(mfrow=c(2,2)) + plot(density(result$Actuals),main='Kernel Density Plot of Actuals') + plot(density(result$Residuals),main='Kernel Density Plot of Residuals') + plot(result$Forecasts,result$Actuals,main='Actuals versus Predictions',xlab='Predictions',ylab='Actuals') + plot(density(result$Forecasts),main='Kernel Density Plot of Predictions') + par(op) + } > if(par2!='none') { + plot(myt,main='Confusion Matrix',xlab='Actual',ylab='Predicted') + } > dev.off() null device 1 > if (par2 == 'none') { + detcoef <- cor(result$Forecasts,result$Actuals) + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goodness of Fit',2,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Correlation',1,TRUE) + a<-table.element(a,round(detcoef,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'R-squared',1,TRUE) + a<-table.element(a,round(detcoef*detcoef,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'RMSE',1,TRUE) + a<-table.element(a,round(sqrt(mean((result$Residuals)^2)),4)) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/55u5j1293202109.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Actuals, Predictions, and Residuals',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'#',header=TRUE) + a<-table.element(a,'Actuals',header=TRUE) + a<-table.element(a,'Forecasts',header=TRUE) + a<-table.element(a,'Residuals',header=TRUE) + a<-table.row.end(a) + for (i in 1:length(result$Actuals)) { + a<-table.row.start(a) + a<-table.element(a,i,header=TRUE) + a<-table.element(a,result$Actuals[i]) + a<-table.element(a,result$Forecasts[i]) + a<-table.element(a,result$Residuals[i]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/6y3441293202109.tab") + } > if (par2 != 'none') { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Confusion Matrix (predicted in columns / actuals in rows)',par3+1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'',1,TRUE) + for (i in 1:par3) { + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + } + a<-table.row.end(a) + for (i in 1:par3) { + a<-table.row.start(a) + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + for (j in 1:par3) { + a<-table.element(a,myt[i,j]) + } + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/7143s1293202109.tab") + } > > try(system("convert tmp/2gb8p1293202109.ps tmp/2gb8p1293202109.png",intern=TRUE)) character(0) > try(system("convert tmp/3gb8p1293202109.ps tmp/3gb8p1293202109.png",intern=TRUE)) character(0) > try(system("convert tmp/4r27s1293202109.ps tmp/4r27s1293202109.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.590 0.610 8.222