R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale 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 + ,1595 + ,17 + ,60720 + ,319369 + ,0 + ,5565 + ,47 + ,94355 + ,493408 + ,0 + ,601 + ,6 + ,60720 + ,319210 + ,1 + ,188 + ,11 + ,77655 + ,381180 + ,1 + ,7146 + ,105 + ,134028 + ,297978 + ,0 + ,1135 + ,17 + ,62285 + ,290476 + ,1 + ,450 + ,8 + ,59325 + ,292136 + ,1 + ,34 + ,8 + ,60630 + ,314353 + ,1 + ,133 + ,14 + ,65990 + ,339445 + ,1 + ,119 + ,6 + ,59118 + ,303677 + ,0 + ,2053 + ,53 + ,100423 + ,397144 + ,0 + ,4036 + ,63 + ,100269 + ,424898 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,4655 + ,393 + ,60720 + ,341570 + ,1 + ,131 + ,11 + ,61808 + ,308989 + ,1 + ,1766 + ,73 + ,60438 + ,305959 + ,1 + ,312 + ,14 + ,58598 + ,318690 + ,1 + ,448 + ,40 + ,59781 + ,323361 + ,1 + ,115 + ,13 + ,60945 + ,318903 + ,1 + ,60 + ,10 + ,61124 + ,314049 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,364 + ,35 + ,47705 + ,298466 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,1442 + ,118 + ,121173 + ,438493 + ,0 + ,1389 + ,9 + ,57530 + ,378049 + ,1 + ,149 + ,5 + ,62041 + ,313332 + ,1 + ,2212 + ,14 + ,60720 + ,319864 + ,0 + ,7489 + ,322 + ,136996 + ,430866 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,402 + ,26 + ,84990 + ,332743 + ,0 + ,7419 + ,29 + ,63255 + ,286963 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,307 + ,15 + ,58856 + ,331955 + ,0 + ,1134 + ,162 + ,146216 + ,527021 + ,0 + ,7561 + ,87 + ,82425 + ,364304 + ,1 + ,5131 + ,71 + ,86111 + ,292154 + ,1 + ,9 + ,6 + ,60835 + ,314987 + ,1 + ,2264 + ,24 + ,55174 + ,272713 + ,1 + ,40949 + ,481 + ,129352 + ,1398893 + ,0 + ,4980 + ,91 + ,113521 + ,409642 + ,1 + ,272 + ,8 + ,112995 + ,429112 + ,1 + ,757 + ,19 + ,45689 + ,382712 + ,1 + ,1424 + ,94 + ,131116 + ,374943 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,378 + ,52 + ,71873 + ,297413 + ,1 + ,1061 + ,5 + ,70415 + ,304252 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,203 + ,9 + ,61938 + ,309596 + ,0 + ,3689 + ,25 + ,101792 + ,377305 + ,1 + ,567 + ,11 + ,103345 + ,386212 + ,0 + ,27664 + ,282 + ,74996 + ,657954 + ,1 + ,1686 + ,40 + ,68696 + ,368186 + ,0 + ,1164 + ,17 + ,57320 + ,269753 + ,1 + ,15824 + ,64 + ,63838 + ,585715 + ,1 + ,6575 + ,159 + ,151352 + ,1071292 + ,0 + ,37597 + ,248 + ,37884 + ,992426 + ,1 + ,314 + ,5 + ,60720 + ,315371 + ,0 + ,1932 + ,36 + ,72954 + ,249898 + ,0 + ,5692 + ,72 + ,64239 + ,357312 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,6533 + ,75 + ,126910 + ,364839 + ,0 + ,2126 + ,138 + ,21001 + ,230621 + ,1 + ,14 + ,1 + ,61016 + ,315877 + ,0 + ,3192 + ,60 + ,59831 + ,125390 + ,1 + ,47 + ,3 + ,60720 + ,314882 + ,0 + ,4891 + ,217 + ,210568 + ,370837 + ,0 + ,531 + ,10 + ,71641 + ,330068 + ,1 + ,2332 + ,4 + ,72680 + ,324385 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,16275 + ,109 + ,47818 + ,1443586 + ,1 + ,9252 + ,48 + ,79510 + ,253537 + ,0 + ,29790 + ,309 + ,81767 + ,4321023 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,2300 + ,29 + ,64873 + ,352108 + ,1 + ,267 + ,32 + ,57640 + ,330059 + ,0 + ,382 + ,21 + ,59365 + ,340968 + ,1 + ,397 + ,28 + ,60646 + ,317736 + ,1 + ,11920 + ,182 + ,31080 + ,209458 + ,0 + ,54660 + ,302 + ,126942 + ,1491348 + ,1 + ,5 + ,2 + ,60720 + ,314887 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,2647 + ,37 + ,62920 + ,353058 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,94 + ,7 + ,60793 + ,314533 + ,1 + ,3 + ,2 + ,60698 + ,315354 + ,1 + ,454 + ,51 + ,63261 + ,302187 + ,1 + ,227 + ,9 + ,76644 + ,336639 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,206 + ,9 + ,53110 + ,296702 + ,1 + ,25830 + ,115 + ,245546 + ,1073089 + ,1 + ,1528 + ,38 + ,60326 + ,146494 + ,1 + ,271 + ,2 + ,60720 + ,325249 + ,1 + ,138 + ,6 + ,69817 + ,331420 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,278 + ,26 + ,61404 + ,314922 + ,1 + ,282 + ,30 + ,62452 + ,320016 + ,1 + ,571 + ,80 + ,41477 + ,280398 + ,1 + ,2253 + ,99 + ,63593 + ,452469 + ,1 + ,290 + ,2 + ,58790 + ,301164 + ,1 + ,78 + ,16 + ,62700 + ,317330 + ,1 + ,20 + ,2 + ,60805 + ,315576 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,18073 + ,180 + ,27284 + ,-7170 + ,1 + ,1866 + ,29 + ,56225 + ,322331 + ,0 + ,42634 + ,156 + ,157214 + ,1629616 + ,1 + ,249 + ,62 + ,54323 + ,292754 + ,1 + ,422 + ,28 + ,57935 + ,318056 + ,1 + ,2675 + ,79 + ,59017 + ,355178 + ,1 + ,965 + ,3 + ,73490 + ,204325 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,621 + ,16 + ,68005 + ,317046 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,365 + ,8 + ,54820 + ,309560 + ,0 + ,3122 + ,34 + ,94670 + ,414462 + ,0 + ,12988 + ,119 + ,82340 + ,857217 + ,0 + ,5336 + ,81 + ,112477 + ,697458 + ,0 + ,3160 + ,108 + ,108094 + ,530670 + ,1 + ,2489 + ,40 + ,67804 + ,238125 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,6984 + ,45 + ,80570 + ,741409 + ,1 + ,2001 + ,52 + ,95551 + ,393343 + ,1 + ,15236 + ,90 + ,77440 + ,372631 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,530 + ,60 + ,73433 + ,317291 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,35624 + ,223 + ,157278 + ,306275 + ,0 + ,1383 + ,11 + ,73221 + ,317892 + ,1 + ,875 + ,14 + ,67000 + ,334280 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,72 + ,3 + ,60398 + ,314210 + ,0 + ,265 + ,31 + ,60720 + ,306948 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,335 + ,33 + ,64175 + ,320398 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,4525 + ,226 + ,93811 + ,501749 + ,0 + ,3045 + ,58 + ,27330 + ,202055 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,638 + ,14 + ,60370 + ,333210 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,607 + ,11 + ,60436 + ,322340 + ,1 + ,1558 + ,63 + ,55637 + ,369448 + ,0 + ,1324 + ,117 + ,67440 + ,291841 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,611 + ,8 + ,59190 + ,296919 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,923 + ,8 + ,58620 + ,309038 + ,1 + ,661 + ,3 + ,65920 + ,246541 + ,0 + ,2397 + ,14 + ,74020 + ,289513 + ,1 + ,366 + ,53 + ,61808 + ,344425 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,135 + ,2 + ,62065 + ,314210 + ,0 + ,1659 + ,29 + ,107577 + ,480382 + ,1 + ,316 + ,9 + ,60505 + ,315009 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,309 + ,11 + ,56535 + ,312878 + ,0 + ,49 + ,8 + ,64107 + ,322031 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,4519 + ,49 + ,102129 + ,597793 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,837 + ,69 + ,61262 + ,315688 + ,1 + ,5119 + ,49 + ,39039 + ,378525 + ,1 + ,1280 + ,117 + ,69465 + ,312378 + ,1 + ,2564 + ,22 + ,130140 + ,403560 + ,0 + ,2045 + ,20 + ,97890 + ,510834 + ,0 + ,2234 + ,16 + ,77200 + ,214215 + ,1 + ,975 + ,23 + ,90534 + ,235133 + ,0 + ,1136 + ,32 + ,48522 + ,343613 + ,1 + ,453 + ,21 + ,81125 + ,365959 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,61 + ,14 + ,60720 + ,314551 + ,1 + ,368 + ,17 + ,61686 + ,303230 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,4901 + ,84 + ,121920 + ,469107 + ,1 + ,540 + ,14 + ,103960 + ,354228 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,2 + ,9 + ,60735 + ,315394 + ,1 + ,36 + ,4 + ,61564 + ,312412 + ,1 + ,776 + ,9 + ,64230 + ,333505 + ,1 + ,84738 + ,588 + ,-26007 + ,223193 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,3 + ,4 + ,60761 + ,315656 + ,1 + ,529 + ,9 + ,63870 + ,296261 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,405 + ,7 + ,60845 + ,336425 + ,1 + ,972 + ,34 + ,71642 + ,359335 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,2099 + ,64 + ,106611 + ,308636 + ,0 + ,3437 + ,47 + ,48022 + ,158492 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,22330 + ,84 + ,79801 + ,711969 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,483 + ,27 + ,60830 + ,306268 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,2239 + ,21 + ,88590 + ,442882 + ,0 + ,2949 + ,41 + ,82903 + ,378509 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,365 + ,83 + ,87192 + ,346611 + ,1 + ,2461 + ,57 + ,55792 + ,314289 + ,0 + ,21950 + ,519 + ,114337 + ,856956 + ,0 + ,3294 + ,23 + ,75832 + ,217193 + ,1 + ,141 + ,6 + ,61630 + ,315366 + ,1 + ,572 + ,16 + ,58580 + ,307930 + ,1 + ,13326 + ,102 + ,165548 + ,702380 + ,1 + ,2284 + ,33 + ,76403 + ,194493 + ,0 + ,10 + ,2 + ,61656 + ,316155 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,1414 + ,198 + ,70184 + ,330546 + ,1 + ,1975 + ,35 + ,118881 + ,394510 + ,1 + ,43 + ,3 + ,60887 + ,312846 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,844 + ,78 + ,60925 + ,296139 + ,1 + ,304 + ,15 + ,62969 + ,295580 + ,1 + ,458 + ,11 + ,58625 + ,297765 + ,1 + ,18562 + ,155 + ,102313 + ,377934 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,7123 + ,109 + ,288170 + ,638830 + ,1 + ,622 + ,73 + ,73007 + ,304376 + ,1 + ,174 + ,1 + ,64820 + ,307424 + ,1 + ,2220 + ,22 + ,301670 + ,644190 + ,1 + ,121 + ,24 + ,56178 + ,295370 + ,0 + ,11819 + ,85 + ,106113 + ,574339 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,125 + ,12 + ,60798 + ,310201 + ,1 + ,1182 + ,13 + ,70694 + ,327007 + ,1 + ,1503 + ,39 + ,56364 + ,343466 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,30 + ,4 + ,62045 + ,318098 + ,0 + ,3310 + ,33 + ,75230 + ,448243 + ,1 + ,554 + ,11 + ,79285 + ,325738 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,468 + ,21 + ,60720 + ,312161 + ,1 + ,4917 + ,42 + ,52811 + ,243650 + ,1 + ,3256 + ,66 + ,35250 + ,407159 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,125 + ,13 + ,59734 + ,317698 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,22 + ,2 + ,60722 + ,312502 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,514 + ,52 + ,78780 + ,322378 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,10327 + ,91 + ,88577 + ,640273 + ,1 + ,13718 + ,61 + ,96448 + ,345783 + ,1 + ,3748 + ,9 + ,50350 + ,652925 + ,1 + ,14416 + ,361 + ,49857 + ,439798 + ,0 + ,1526 + ,25 + ,69351 + ,278990 + ,0 + ,666 + ,171 + ,117869 + ,339836 + ,1 + ,2844 + ,67 + ,72683 + ,240897 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,368 + ,17 + ,61167 + ,297141 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,333 + ,13 + ,70811 + ,331323 + ,1 + ,26 + ,1 + ,60896 + ,313880 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,1303 + ,61 + ,69863 + ,309422 + ,1 + ,20 + ,3 + ,60938 + ,315245 + ,1 + ,2384 + ,97 + ,61348 + ,405972 + ,0 + ,203 + ,27 + ,50804 + ,300962 + ,0 + ,71 + ,1 + ,60745 + ,316176 + ,1 + ,53 + ,14 + ,59506 + ,302409 + ,1 + ,562 + ,13 + ,58456 + ,283587 + ,1 + ,622 + ,7 + ,60950 + ,263276 + ,1 + ,645 + ,5 + ,60720 + ,312075 + ,0 + ,1763 + ,24 + ,61600 + ,308336 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,317 + ,9 + ,63915 + ,298700 + ,1 + ,1 + ,6 + ,60719 + ,315372 + ,1 + ,275 + ,4 + ,59500 + ,318745 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,936 + ,30 + ,67939 + ,408881 + ,1 + ,8568 + ,37 + ,32168 + ,786690 + ,0 + ,11528 + ,70 + ,-14545 + ,-83265 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,738 + ,10 + ,60720 + ,321376 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,592 + ,7 + ,64270 + ,276898 + ,1 + ,126 + ,10 + ,60951 + ,315547 + ,1 + ,2 + ,1 + ,60743 + ,315487 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,18014 + ,239 + ,-1710 + ,1405225 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,37704 + ,452 + ,60448 + ,983660 + ,0 + ,63 + ,4 + ,65688 + ,318574 + ,1 + ,1431 + ,34 + ,106885 + ,310768 + ,1 + ,94 + ,3 + ,61360 + ,312887 + ,1 + ,192 + ,4 + ,65276 + ,312339 + ,1 + ,32 + ,1 + ,59988 + ,314964 + ,1 + ,6869 + ,105 + ,117520 + ,379983 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,1 + ,4 + ,60722 + ,315398 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,2328 + ,94 + ,82732 + ,253588 + ,0 + ,209 + ,13 + ,64016 + ,316647 + ,1 + ,28 + ,2 + ,60890 + ,315688 + ,1 + ,176 + ,28 + ,68136 + ,310670 + ,1 + ,1920 + ,15 + ,79420 + ,165404 + ,0 + ,87550 + ,458 + ,153198 + ,4111912 + ,1 + ,520 + ,10 + ,58650 + ,291650 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,1013 + ,2 + ,69770 + ,253468 + ,1 + ,15 + ,8 + ,60831 + ,315688 + ,1 + ,587 + ,12 + ,59595 + ,325699 + ,1 + ,5371 + ,66 + ,87720 + ,446211 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,1012 + ,47 + ,114768 + ,368078 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,876 + ,59 + ,138971 + ,352850 + ,0 + ,162556 + ,1081 + ,213118 + ,6282154 + ,1 + ,43556 + ,247 + ,32648 + ,227132 + ,0 + ,3425 + ,12 + ,83620 + ,283910 + ,1 + ,810 + ,43 + ,74015 + ,236761 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,2365 + ,79 + ,191778 + ,550608 + ,0 + ,1261 + ,33 + ,76114 + ,307528 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,1585 + ,107 + ,93099 + ,355864 + ,1 + ,16189 + ,295 + ,116384 + ,358589 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,10579 + ,92 + ,110309 + ,375195 + ,1 + ,474 + ,20 + ,61977 + ,288985 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,3642 + ,86 + ,90262 + ,458343 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,472 + ,20 + ,80045 + ,269587 + ,1 + ,98 + ,2 + ,61490 + ,315236 + ,1 + ,3999 + ,30 + ,51252 + ,42754 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,621 + ,48 + ,60720 + ,308256 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,30 + ,4 + ,60798 + ,313164 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,746 + ,23 + ,71561 + ,269661 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,4150 + ,150 + ,134759 + ,518365 + ,0 + ,4658 + ,158 + ,156608 + ,233773 + ,1 + ,814 + ,18 + ,39625 + ,301881 + ,1 + ,1002 + ,15 + ,56750 + ,298568 + ,0 + ,496 + ,17 + ,87390 + ,325479 + ,1 + ,389 + ,14 + ,58990 + ,325506 + ,1 + ,12679 + ,110 + ,48020 + ,984885 + ,1 + ,400 + ,152 + ,60720 + ,313267 + ,1 + ,53 + ,6 + ,60349 + ,315793 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,5109 + ,97 + ,67038 + ,215362 + ,1 + ,576 + ,18 + ,113761 + ,314073 + ,1 + ,438 + ,11 + ,58320 + ,298096 + ,1 + ,165 + ,24 + ,62841 + ,325176 + ,1 + ,4069 + ,145 + ,79804 + ,207393 + ,0 + ,23 + ,5 + ,62555 + ,314806 + ,1 + ,1285 + ,107 + ,99489 + ,341340 + ,0 + ,4677 + ,75 + ,90131 + ,426280 + ,0 + ,24811 + ,505 + ,95350 + ,929118 + ,1 + ,167 + ,2 + ,64245 + ,307322 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,4628 + ,62 + ,69159 + ,387475 + ,1 + ,226 + ,5 + ,65745 + ,291787 + ,0 + ,1765 + ,20 + ,77623 + ,247060 + ,1 + ,460 + ,15 + ,63346 + ,329784 + ,1 + ,36 + ,3 + ,60894 + ,315834 + ,1 + ,989 + ,11 + ,58930 + ,304555 + ,0 + ,3055 + ,43 + ,60247 + ,376641 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,13253 + ,947 + ,90829 + ,357760 + ,1 + ,24 + ,8 + ,59818 + ,315637 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,131 + ,6 + ,59661 + ,327071 + ,1 + ,514 + ,15 + ,102725 + ,377516 + ,1 + ,3366 + ,80 + ,108479 + ,299243 + ,0 + ,9327 + ,101 + ,87419 + ,387699 + ,1 + ,384 + ,22 + ,54683 + ,309836 + ,1 + ,17821 + ,373 + ,122844 + ,444477 + ,1 + ,397 + ,10 + ,62710 + ,322327 + ,1 + ,897 + ,5 + ,60720 + ,314913 + ,1 + ,218 + ,21 + ,60720 + ,315553 + ,0 + ,3369 + ,28 + ,87161 + ,688779 + ,1 + ,5702 + ,61 + ,101481 + ,321896 + ,1 + ,8636 + ,855 + ,128294 + ,301607 + ,1 + ,534 + ,7 + ,62620 + ,304485 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,726 + ,3 + ,69980 + ,231861 + ,1 + ,1380 + ,26 + ,60982 + ,347385 + ,1 + ,180 + ,11 + ,59635 + ,316386 + ,0 + ,7285 + ,115 + ,188873 + ,491303 + ,1 + ,880 + ,74 + ,80791 + ,261216 + ,1 + ,1 + ,2 + ,60727 + ,315388 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,96 + ,5 + ,60379 + ,313729 + ,1 + ,1889 + ,45 + ,37527 + ,358649 + ,0 + ,45187 + ,353 + ,234817 + ,1926517 + ,1 + ,288 + ,4 + ,60510 + ,296656 + ,1 + ,1270 + ,26 + ,69206 + ,275311 + ,1 + ,6526 + ,26 + ,55830 + ,-42143 + ,0 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,226 + ,12 + ,72835 + ,343929 + ,1 + ,694 + ,8 + ,68060 + ,367655 + ,1 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,249 + ,72 + ,56726 + ,313491) + ,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 = '2' > par2 = 'quantiles' > par1 = '4' > #'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 Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric 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] "dividends" > x[,par1] [1] 60720 94355 60720 77655 134028 62285 59325 60630 65990 59118 [11] 100423 100269 60720 60720 61808 60438 58598 59781 60945 61124 [21] 60720 47705 60720 121173 57530 62041 60720 136996 60720 84990 [31] 63255 60720 58856 146216 82425 86111 60835 55174 129352 113521 [41] 112995 45689 131116 60720 71873 70415 60720 61938 101792 103345 [51] 74996 68696 57320 63838 151352 37884 60720 72954 64239 60720 [61] 60720 126910 21001 61016 59831 60720 210568 71641 72680 60720 [71] 47818 79510 81767 60720 64873 57640 59365 60646 31080 126942 [81] 60720 60720 60720 62920 60720 60720 60793 60698 63261 76644 [91] 60720 53110 245546 60326 60720 69817 60720 61404 62452 41477 [101] 63593 58790 62700 60805 60720 27284 56225 157214 54323 57935 [111] 59017 73490 60720 68005 60720 54820 94670 82340 112477 108094 [121] 67804 60720 80570 95551 77440 60720 73433 60720 157278 73221 [131] 67000 60720 60720 60720 60398 60720 60720 64175 60720 60720 [141] 93811 27330 60720 60720 60370 60720 60436 55637 67440 60720 [151] 60720 59190 60720 58620 65920 74020 61808 60720 62065 107577 [161] 60505 60720 56535 64107 60720 102129 60720 61262 39039 69465 [171] 130140 97890 77200 90534 48522 81125 60720 60720 61686 60720 [181] 121920 103960 60720 60720 60720 60735 61564 64230 -26007 60720 [191] 60761 63870 60720 60845 71642 60720 106611 48022 60720 60720 [201] 79801 60720 60720 60830 60720 88590 82903 60720 87192 55792 [211] 114337 75832 61630 58580 165548 76403 61656 60720 70184 118881 [221] 60887 60720 60925 62969 58625 102313 60720 288170 73007 64820 [231] 301670 56178 106113 60720 60798 70694 56364 60720 60720 62045 [241] 75230 79285 60720 60720 52811 35250 60720 59734 60720 60722 [251] 60720 78780 60720 60720 60720 60720 60720 60720 88577 96448 [261] 50350 49857 69351 117869 72683 60720 61167 60720 70811 60896 [271] 60720 60720 69863 60938 61348 50804 60745 59506 58456 60950 [281] 60720 61600 60720 63915 60719 59500 60720 67939 32168 -14545 [291] 60720 60720 60720 64270 60951 60743 60720 -1710 60720 60720 [301] 60448 65688 106885 61360 65276 59988 117520 60720 60720 60722 [311] 60720 82732 64016 60890 68136 79420 153198 58650 60720 69770 [321] 60831 59595 87720 60720 114768 60720 138971 213118 32648 83620 [331] 74015 60720 60720 191778 76114 60720 93099 116384 60720 60720 [341] 110309 61977 60720 90262 60720 80045 61490 51252 60720 60720 [351] 60720 60720 60798 60720 71561 60720 60720 60720 60720 134759 [361] 156608 39625 56750 87390 58990 48020 60720 60349 60720 67038 [371] 113761 58320 62841 79804 62555 99489 90131 95350 64245 60720 [381] 69159 65745 77623 63346 60894 58930 60247 60720 60720 60720 [391] 60720 60720 90829 59818 60720 60720 60720 60720 59661 102725 [401] 108479 87419 54683 122844 62710 60720 60720 87161 101481 128294 [411] 62620 60720 60720 69980 60982 59635 188873 80791 60727 60720 [421] 60379 37527 234817 60510 69206 55830 60720 72835 68060 60720 [431] 56726 > 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]) [-26007, 60722) [ 60722,301670] 219 212 > colnames(x) [1] "group" "costs" "trades" "dividends" "wealth" > colnames(x)[par1] [1] "dividends" > x[,par1] [1] [-26007, 60722) [ 60722,301670] [-26007, 60722) [ 60722,301670] [5] [ 60722,301670] [ 60722,301670] [-26007, 60722) [-26007, 60722) [9] [ 60722,301670] [-26007, 60722) [ 60722,301670] [ 60722,301670] [13] [-26007, 60722) [-26007, 60722) [ 60722,301670] [-26007, 60722) [17] [-26007, 60722) [-26007, 60722) [ 60722,301670] [ 60722,301670] [21] [-26007, 60722) [-26007, 60722) [-26007, 60722) [ 60722,301670] [25] [-26007, 60722) [ 60722,301670] [-26007, 60722) [ 60722,301670] [29] [-26007, 60722) [ 60722,301670] [ 60722,301670] [-26007, 60722) [33] [-26007, 60722) [ 60722,301670] [ 60722,301670] [ 60722,301670] [37] [ 60722,301670] [-26007, 60722) [ 60722,301670] [ 60722,301670] [41] [ 60722,301670] [-26007, 60722) [ 60722,301670] [-26007, 60722) [45] [ 60722,301670] [ 60722,301670] [-26007, 60722) [ 60722,301670] [49] [ 60722,301670] [ 60722,301670] [ 60722,301670] [ 60722,301670] [53] [-26007, 60722) [ 60722,301670] [ 60722,301670] [-26007, 60722) [57] [-26007, 60722) [ 60722,301670] [ 60722,301670] [-26007, 60722) [61] [-26007, 60722) [ 60722,301670] [-26007, 60722) [ 60722,301670] [65] [-26007, 60722) [-26007, 60722) [ 60722,301670] [ 60722,301670] [69] [ 60722,301670] [-26007, 60722) [-26007, 60722) [ 60722,301670] [73] [ 60722,301670] [-26007, 60722) [ 60722,301670] [-26007, 60722) [77] [-26007, 60722) [-26007, 60722) [-26007, 60722) [ 60722,301670] [81] [-26007, 60722) [-26007, 60722) [-26007, 60722) [ 60722,301670] [85] [-26007, 60722) [-26007, 60722) [ 60722,301670] [-26007, 60722) [89] [ 60722,301670] [ 60722,301670] [-26007, 60722) [-26007, 60722) [93] [ 60722,301670] [-26007, 60722) [-26007, 60722) [ 60722,301670] [97] [-26007, 60722) [ 60722,301670] [ 60722,301670] [-26007, 60722) [101] [ 60722,301670] [-26007, 60722) [ 60722,301670] [ 60722,301670] [105] [-26007, 60722) [-26007, 60722) [-26007, 60722) [ 60722,301670] [109] [-26007, 60722) [-26007, 60722) [-26007, 60722) [ 60722,301670] [113] [-26007, 60722) [ 60722,301670] [-26007, 60722) [-26007, 60722) [117] [ 60722,301670] [ 60722,301670] [ 60722,301670] [ 60722,301670] [121] [ 60722,301670] [-26007, 60722) [ 60722,301670] [ 60722,301670] [125] [ 60722,301670] [-26007, 60722) [ 60722,301670] [-26007, 60722) [129] [ 60722,301670] [ 60722,301670] [ 60722,301670] [-26007, 60722) [133] [-26007, 60722) [-26007, 60722) [-26007, 60722) [-26007, 60722) [137] [-26007, 60722) [ 60722,301670] [-26007, 60722) [-26007, 60722) [141] [ 60722,301670] [-26007, 60722) [-26007, 60722) [-26007, 60722) [145] [-26007, 60722) [-26007, 60722) [-26007, 60722) [-26007, 60722) [149] [ 60722,301670] [-26007, 60722) [-26007, 60722) [-26007, 60722) [153] [-26007, 60722) [-26007, 60722) [ 60722,301670] [ 60722,301670] [157] [ 60722,301670] [-26007, 60722) [ 60722,301670] [ 60722,301670] [161] [-26007, 60722) [-26007, 60722) [-26007, 60722) [ 60722,301670] [165] [-26007, 60722) [ 60722,301670] [-26007, 60722) [ 60722,301670] [169] [-26007, 60722) [ 60722,301670] [ 60722,301670] [ 60722,301670] [173] [ 60722,301670] [ 60722,301670] [-26007, 60722) [ 60722,301670] [177] [-26007, 60722) [-26007, 60722) [ 60722,301670] [-26007, 60722) [181] [ 60722,301670] [ 60722,301670] [-26007, 60722) [-26007, 60722) [185] [-26007, 60722) [ 60722,301670] [ 60722,301670] [ 60722,301670] [189] [-26007, 60722) [-26007, 60722) [ 60722,301670] [ 60722,301670] [193] [-26007, 60722) [ 60722,301670] [ 60722,301670] [-26007, 60722) [197] [ 60722,301670] [-26007, 60722) [-26007, 60722) [-26007, 60722) [201] [ 60722,301670] [-26007, 60722) [-26007, 60722) [ 60722,301670] [205] [-26007, 60722) [ 60722,301670] [ 60722,301670] [-26007, 60722) [209] [ 60722,301670] [-26007, 60722) [ 60722,301670] [ 60722,301670] [213] [ 60722,301670] [-26007, 60722) [ 60722,301670] [ 60722,301670] [217] [ 60722,301670] [-26007, 60722) [ 60722,301670] [ 60722,301670] [221] [ 60722,301670] [-26007, 60722) [ 60722,301670] [ 60722,301670] [225] [-26007, 60722) [ 60722,301670] [-26007, 60722) [ 60722,301670] [229] [ 60722,301670] [ 60722,301670] [ 60722,301670] [-26007, 60722) [233] [ 60722,301670] [-26007, 60722) [ 60722,301670] [ 60722,301670] [237] [-26007, 60722) [-26007, 60722) [-26007, 60722) [ 60722,301670] [241] [ 60722,301670] [ 60722,301670] [-26007, 60722) [-26007, 60722) [245] [-26007, 60722) [-26007, 60722) [-26007, 60722) [-26007, 60722) [249] [-26007, 60722) [ 60722,301670] [-26007, 60722) [ 60722,301670] [253] [-26007, 60722) [-26007, 60722) [-26007, 60722) [-26007, 60722) [257] [-26007, 60722) [-26007, 60722) [ 60722,301670] [ 60722,301670] [261] [-26007, 60722) [-26007, 60722) [ 60722,301670] [ 60722,301670] [265] [ 60722,301670] [-26007, 60722) [ 60722,301670] [-26007, 60722) [269] [ 60722,301670] [ 60722,301670] [-26007, 60722) [-26007, 60722) [273] [ 60722,301670] [ 60722,301670] [ 60722,301670] [-26007, 60722) [277] [ 60722,301670] [-26007, 60722) [-26007, 60722) [ 60722,301670] [281] [-26007, 60722) [ 60722,301670] [-26007, 60722) [ 60722,301670] [285] [-26007, 60722) [-26007, 60722) [-26007, 60722) [ 60722,301670] [289] [-26007, 60722) [-26007, 60722) [-26007, 60722) [-26007, 60722) [293] [-26007, 60722) [ 60722,301670] [ 60722,301670] [ 60722,301670] [297] [-26007, 60722) [-26007, 60722) [-26007, 60722) [-26007, 60722) [301] [-26007, 60722) [ 60722,301670] [ 60722,301670] [ 60722,301670] [305] [ 60722,301670] [-26007, 60722) [ 60722,301670] [-26007, 60722) [309] [-26007, 60722) [ 60722,301670] [-26007, 60722) [ 60722,301670] [313] [ 60722,301670] [ 60722,301670] [ 60722,301670] [ 60722,301670] [317] [ 60722,301670] [-26007, 60722) [-26007, 60722) [ 60722,301670] [321] [ 60722,301670] [-26007, 60722) [ 60722,301670] [-26007, 60722) [325] [ 60722,301670] [-26007, 60722) [ 60722,301670] [ 60722,301670] [329] [-26007, 60722) [ 60722,301670] [ 60722,301670] [-26007, 60722) [333] [-26007, 60722) [ 60722,301670] [ 60722,301670] [-26007, 60722) [337] [ 60722,301670] [ 60722,301670] [-26007, 60722) [-26007, 60722) [341] [ 60722,301670] [ 60722,301670] [-26007, 60722) [ 60722,301670] [345] [-26007, 60722) [ 60722,301670] [ 60722,301670] [-26007, 60722) [349] [-26007, 60722) [-26007, 60722) [-26007, 60722) [-26007, 60722) [353] [ 60722,301670] [-26007, 60722) [ 60722,301670] [-26007, 60722) [357] [-26007, 60722) [-26007, 60722) [-26007, 60722) [ 60722,301670] [361] [ 60722,301670] [-26007, 60722) [-26007, 60722) [ 60722,301670] [365] [-26007, 60722) [-26007, 60722) [-26007, 60722) [-26007, 60722) [369] [-26007, 60722) [ 60722,301670] [ 60722,301670] [-26007, 60722) [373] [ 60722,301670] [ 60722,301670] [ 60722,301670] [ 60722,301670] [377] [ 60722,301670] [ 60722,301670] [ 60722,301670] [-26007, 60722) [381] [ 60722,301670] [ 60722,301670] [ 60722,301670] [ 60722,301670] [385] [ 60722,301670] [-26007, 60722) [-26007, 60722) [-26007, 60722) [389] [-26007, 60722) [-26007, 60722) [-26007, 60722) [-26007, 60722) [393] [ 60722,301670] [-26007, 60722) [-26007, 60722) [-26007, 60722) [397] [-26007, 60722) [-26007, 60722) [-26007, 60722) [ 60722,301670] [401] [ 60722,301670] [ 60722,301670] [-26007, 60722) [ 60722,301670] [405] [ 60722,301670] [-26007, 60722) [-26007, 60722) [ 60722,301670] [409] [ 60722,301670] [ 60722,301670] [ 60722,301670] [-26007, 60722) [413] [-26007, 60722) [ 60722,301670] [ 60722,301670] [-26007, 60722) [417] [ 60722,301670] [ 60722,301670] [ 60722,301670] [-26007, 60722) [421] [-26007, 60722) [-26007, 60722) [ 60722,301670] [-26007, 60722) [425] [ 60722,301670] [-26007, 60722) [-26007, 60722) [ 60722,301670] [429] [ 60722,301670] [-26007, 60722) [-26007, 60722) Levels: [-26007, 60722) [ 60722,301670] > if (par2 == 'none') { + m <- ctree(as.formula(paste(colnames(x)[par1],' ~ .',sep='')),data = x) + } > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/html/freestat/rcomp/tmp/16w3o1293198423.tab") + } + } > m Conditional inference tree with 3 terminal nodes Response: as.factor(dividends) Inputs: group, costs, trades, wealth Number of observations: 431 1) trades <= 0; criterion = 1, statistic = 21.467 2)* weights = 117 1) trades > 0 3) group <= 0; criterion = 0.977, statistic = 7.609 4)* weights = 87 3) group > 0 5)* weights = 227 > postscript(file="/var/www/html/freestat/rcomp/tmp/26w3o1293198423.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/html/freestat/rcomp/tmp/36w3o1293198423.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) + } > if (par2 != 'none') { + print(cbind(as.factor(x[,par1]),predict(m))) + myt <- table(as.factor(x[,par1]),predict(m)) + print(myt) + } [,1] [,2] [1,] 1 2 [2,] 2 2 [3,] 1 2 [4,] 2 2 [5,] 2 2 [6,] 2 2 [7,] 1 2 [8,] 1 2 [9,] 2 2 [10,] 1 2 [11,] 2 2 [12,] 2 2 [13,] 1 1 [14,] 1 2 [15,] 2 2 [16,] 1 2 [17,] 1 2 [18,] 1 2 [19,] 2 2 [20,] 2 2 [21,] 1 1 [22,] 1 2 [23,] 1 1 [24,] 2 2 [25,] 1 2 [26,] 2 2 [27,] 1 2 [28,] 2 2 [29,] 1 1 [30,] 2 2 [31,] 2 2 [32,] 1 1 [33,] 1 2 [34,] 2 2 [35,] 2 2 [36,] 2 2 [37,] 2 2 [38,] 1 2 [39,] 2 2 [40,] 2 2 [41,] 2 2 [42,] 1 2 [43,] 2 2 [44,] 1 1 [45,] 2 2 [46,] 2 2 [47,] 1 1 [48,] 2 2 [49,] 2 2 [50,] 2 2 [51,] 2 2 [52,] 2 2 [53,] 1 2 [54,] 2 2 [55,] 2 2 [56,] 1 2 [57,] 1 2 [58,] 2 2 [59,] 2 2 [60,] 1 1 [61,] 1 1 [62,] 2 2 [63,] 1 2 [64,] 2 2 [65,] 1 2 [66,] 1 2 [67,] 2 2 [68,] 2 2 [69,] 2 2 [70,] 1 1 [71,] 1 2 [72,] 2 2 [73,] 2 2 [74,] 1 1 [75,] 2 2 [76,] 1 2 [77,] 1 2 [78,] 1 2 [79,] 1 2 [80,] 2 2 [81,] 1 2 [82,] 1 1 [83,] 1 1 [84,] 2 2 [85,] 1 1 [86,] 1 1 [87,] 2 2 [88,] 1 2 [89,] 2 2 [90,] 2 2 [91,] 1 1 [92,] 1 2 [93,] 2 2 [94,] 1 2 [95,] 1 2 [96,] 2 2 [97,] 1 1 [98,] 2 2 [99,] 2 2 [100,] 1 2 [101,] 2 2 [102,] 1 2 [103,] 2 2 [104,] 2 2 [105,] 1 1 [106,] 1 2 [107,] 1 2 [108,] 2 2 [109,] 1 2 [110,] 1 2 [111,] 1 2 [112,] 2 2 [113,] 1 1 [114,] 2 2 [115,] 1 1 [116,] 1 2 [117,] 2 2 [118,] 2 2 [119,] 2 2 [120,] 2 2 [121,] 2 2 [122,] 1 1 [123,] 2 2 [124,] 2 2 [125,] 2 2 [126,] 1 1 [127,] 2 2 [128,] 1 1 [129,] 2 2 [130,] 2 2 [131,] 2 2 [132,] 1 1 [133,] 1 1 [134,] 1 1 [135,] 1 2 [136,] 1 2 [137,] 1 1 [138,] 2 2 [139,] 1 1 [140,] 1 1 [141,] 2 2 [142,] 1 2 [143,] 1 1 [144,] 1 1 [145,] 1 2 [146,] 1 1 [147,] 1 2 [148,] 1 2 [149,] 2 2 [150,] 1 1 [151,] 1 1 [152,] 1 2 [153,] 1 1 [154,] 1 2 [155,] 2 2 [156,] 2 2 [157,] 2 2 [158,] 1 1 [159,] 2 2 [160,] 2 2 [161,] 1 2 [162,] 1 1 [163,] 1 2 [164,] 2 2 [165,] 1 1 [166,] 2 2 [167,] 1 1 [168,] 2 2 [169,] 1 2 [170,] 2 2 [171,] 2 2 [172,] 2 2 [173,] 2 2 [174,] 2 2 [175,] 1 2 [176,] 2 2 [177,] 1 1 [178,] 1 2 [179,] 2 2 [180,] 1 1 [181,] 2 2 [182,] 2 2 [183,] 1 1 [184,] 1 1 [185,] 1 1 [186,] 2 2 [187,] 2 2 [188,] 2 2 [189,] 1 2 [190,] 1 1 [191,] 2 2 [192,] 2 2 [193,] 1 1 [194,] 2 2 [195,] 2 2 [196,] 1 1 [197,] 2 2 [198,] 1 2 [199,] 1 1 [200,] 1 1 [201,] 2 2 [202,] 1 1 [203,] 1 1 [204,] 2 2 [205,] 1 1 [206,] 2 2 [207,] 2 2 [208,] 1 1 [209,] 2 2 [210,] 1 2 [211,] 2 2 [212,] 2 2 [213,] 2 2 [214,] 1 2 [215,] 2 2 [216,] 2 2 [217,] 2 2 [218,] 1 1 [219,] 2 2 [220,] 2 2 [221,] 2 2 [222,] 1 1 [223,] 2 2 [224,] 2 2 [225,] 1 2 [226,] 2 2 [227,] 1 1 [228,] 2 2 [229,] 2 2 [230,] 2 2 [231,] 2 2 [232,] 1 2 [233,] 2 2 [234,] 1 1 [235,] 2 2 [236,] 2 2 [237,] 1 2 [238,] 1 1 [239,] 1 1 [240,] 2 2 [241,] 2 2 [242,] 2 2 [243,] 1 1 [244,] 1 2 [245,] 1 2 [246,] 1 2 [247,] 1 1 [248,] 1 2 [249,] 1 1 [250,] 2 2 [251,] 1 1 [252,] 2 2 [253,] 1 1 [254,] 1 1 [255,] 1 1 [256,] 1 1 [257,] 1 1 [258,] 1 1 [259,] 2 2 [260,] 2 2 [261,] 1 2 [262,] 1 2 [263,] 2 2 [264,] 2 2 [265,] 2 2 [266,] 1 1 [267,] 2 2 [268,] 1 1 [269,] 2 2 [270,] 2 2 [271,] 1 1 [272,] 1 1 [273,] 2 2 [274,] 2 2 [275,] 2 2 [276,] 1 2 [277,] 2 2 [278,] 1 2 [279,] 1 2 [280,] 2 2 [281,] 1 2 [282,] 2 2 [283,] 1 1 [284,] 2 2 [285,] 1 2 [286,] 1 2 [287,] 1 1 [288,] 2 2 [289,] 1 2 [290,] 1 2 [291,] 1 1 [292,] 1 2 [293,] 1 1 [294,] 2 2 [295,] 2 2 [296,] 2 2 [297,] 1 1 [298,] 1 2 [299,] 1 1 [300,] 1 1 [301,] 1 2 [302,] 2 2 [303,] 2 2 [304,] 2 2 [305,] 2 2 [306,] 1 2 [307,] 2 2 [308,] 1 1 [309,] 1 1 [310,] 2 2 [311,] 1 1 [312,] 2 2 [313,] 2 2 [314,] 2 2 [315,] 2 2 [316,] 2 2 [317,] 2 2 [318,] 1 2 [319,] 1 1 [320,] 2 2 [321,] 2 2 [322,] 1 2 [323,] 2 2 [324,] 1 1 [325,] 2 2 [326,] 1 1 [327,] 2 2 [328,] 2 2 [329,] 1 2 [330,] 2 2 [331,] 2 2 [332,] 1 1 [333,] 1 1 [334,] 2 2 [335,] 2 2 [336,] 1 1 [337,] 2 2 [338,] 2 2 [339,] 1 1 [340,] 1 1 [341,] 2 2 [342,] 2 2 [343,] 1 1 [344,] 2 2 [345,] 1 1 [346,] 2 2 [347,] 2 2 [348,] 1 2 [349,] 1 1 [350,] 1 2 [351,] 1 1 [352,] 1 1 [353,] 2 2 [354,] 1 1 [355,] 2 2 [356,] 1 1 [357,] 1 1 [358,] 1 1 [359,] 1 1 [360,] 2 2 [361,] 2 2 [362,] 1 2 [363,] 1 2 [364,] 2 2 [365,] 1 2 [366,] 1 2 [367,] 1 2 [368,] 1 2 [369,] 1 1 [370,] 2 2 [371,] 2 2 [372,] 1 2 [373,] 2 2 [374,] 2 2 [375,] 2 2 [376,] 2 2 [377,] 2 2 [378,] 2 2 [379,] 2 2 [380,] 1 1 [381,] 2 2 [382,] 2 2 [383,] 2 2 [384,] 2 2 [385,] 2 2 [386,] 1 2 [387,] 1 2 [388,] 1 1 [389,] 1 1 [390,] 1 1 [391,] 1 1 [392,] 1 1 [393,] 2 2 [394,] 1 2 [395,] 1 1 [396,] 1 1 [397,] 1 1 [398,] 1 1 [399,] 1 2 [400,] 2 2 [401,] 2 2 [402,] 2 2 [403,] 1 2 [404,] 2 2 [405,] 2 2 [406,] 1 2 [407,] 1 2 [408,] 2 2 [409,] 2 2 [410,] 2 2 [411,] 2 2 [412,] 1 1 [413,] 1 1 [414,] 2 2 [415,] 2 2 [416,] 1 2 [417,] 2 2 [418,] 2 2 [419,] 2 2 [420,] 1 1 [421,] 1 2 [422,] 1 2 [423,] 2 2 [424,] 1 2 [425,] 2 2 [426,] 1 2 [427,] 1 1 [428,] 2 2 [429,] 2 2 [430,] 1 1 [431,] 1 2 [-26007, 60722) [ 60722,301670] [-26007, 60722) 117 102 [ 60722,301670] 0 212 > postscript(file="/var/www/html/freestat/rcomp/tmp/4znk91293198423.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/html/freestat/rcomp/tmp/5vx0h1293198423.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/html/freestat/rcomp/tmp/66ohl1293198423.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/html/freestat/rcomp/tmp/7rpgq1293198423.tab") + } > > try(system("convert tmp/26w3o1293198423.ps tmp/26w3o1293198423.png",intern=TRUE)) character(0) > try(system("convert tmp/36w3o1293198423.ps tmp/36w3o1293198423.png",intern=TRUE)) character(0) > try(system("convert tmp/4znk91293198423.ps tmp/4znk91293198423.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.093 0.684 5.361