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]) + } + } > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = 'no' > par3 = '' > par2 = 'none' > par1 = '5' > ylab = '' > xlab = '' > main = '' > #'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] "wealth" > x[,par1] [1] 319369 493408 319210 381180 297978 290476 292136 314353 339445 [10] 303677 397144 424898 315380 341570 308989 305959 318690 323361 [19] 318903 314049 315380 298466 315380 438493 378049 313332 319864 [28] 430866 315380 332743 286963 315380 331955 527021 364304 292154 [37] 314987 272713 1398893 409642 429112 382712 374943 315380 297413 [46] 304252 315380 309596 377305 386212 657954 368186 269753 585715 [55] 1071292 992426 315371 249898 357312 315380 315380 364839 230621 [64] 315877 125390 314882 370837 330068 324385 315380 1443586 253537 [73] 4321023 315380 352108 330059 340968 317736 209458 1491348 314887 [82] 315380 315380 353058 315380 315380 314533 315354 302187 336639 [91] 315380 296702 1073089 146494 325249 331420 315380 314922 320016 [100] 280398 452469 301164 317330 315576 315380 -7170 322331 1629616 [109] 292754 318056 355178 204325 315380 317046 315380 309560 414462 [118] 857217 697458 530670 238125 315380 741409 393343 372631 315380 [127] 317291 315380 306275 317892 334280 315380 315380 315380 314210 [136] 306948 315380 320398 315380 315380 501749 202055 315380 315380 [145] 333210 315380 322340 369448 291841 315380 315380 296919 315380 [154] 309038 246541 289513 344425 315380 314210 480382 315009 315380 [163] 312878 322031 315380 597793 315380 315688 378525 312378 403560 [172] 510834 214215 235133 343613 365959 315380 314551 303230 315380 [181] 469107 354228 315380 315380 315380 315394 312412 333505 223193 [190] 315380 315656 296261 315380 336425 359335 315380 308636 158492 [199] 315380 315380 711969 315380 315380 306268 315380 442882 378509 [208] 315380 346611 314289 856956 217193 315366 307930 702380 194493 [217] 316155 315380 330546 394510 312846 315380 296139 295580 297765 [226] 377934 315380 638830 304376 307424 644190 295370 574339 315380 [235] 310201 327007 343466 315380 315380 318098 448243 325738 315380 [244] 312161 243650 407159 315380 317698 315380 312502 315380 322378 [253] 315380 315380 315380 315380 315380 315380 640273 345783 652925 [262] 439798 278990 339836 240897 315380 297141 315380 331323 313880 [271] 315380 315380 309422 315245 405972 300962 316176 302409 283587 [280] 263276 312075 308336 315380 298700 315372 318745 315380 408881 [289] 786690 -83265 315380 321376 315380 276898 315547 315487 315380 [298] 1405225 315380 315380 983660 318574 310768 312887 312339 314964 [307] 379983 315380 315380 315398 315380 253588 316647 315688 310670 [316] 165404 4111912 291650 315380 253468 315688 325699 446211 315380 [325] 368078 315380 352850 6282154 227132 283910 236761 315380 315380 [334] 550608 307528 315380 355864 358589 315380 315380 375195 288985 [343] 315380 458343 315380 269587 315236 42754 315380 308256 315380 [352] 315380 313164 315380 269661 315380 315380 315380 315380 518365 [361] 233773 301881 298568 325479 325506 984885 313267 315793 315380 [370] 215362 314073 298096 325176 207393 314806 341340 426280 929118 [379] 307322 315380 387475 291787 247060 329784 315834 304555 376641 [388] 315380 315380 315380 315380 315380 357760 315637 315380 315380 [397] 315380 315380 327071 377516 299243 387699 309836 444477 322327 [406] 314913 315553 688779 321896 301607 304485 315380 315380 231861 [415] 347385 316386 491303 261216 315388 315380 313729 358649 1926517 [424] 296656 275311 -42143 315380 343929 367655 315380 313491 > 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]) -83265 -42143 -7170 42754 125390 146494 158492 165404 194493 202055 1 1 1 1 1 1 1 1 1 1 204325 207393 209458 214215 215362 217193 223193 227132 230621 231861 1 1 1 1 1 1 1 1 1 1 233773 235133 236761 238125 240897 243650 246541 247060 249898 253468 1 1 1 1 1 1 1 1 1 1 253537 253588 261216 263276 269587 269661 269753 272713 275311 276898 1 1 1 1 1 1 1 1 1 1 278990 280398 283587 283910 286963 288985 289513 290476 291650 291787 1 1 1 1 1 1 1 1 1 1 291841 292136 292154 292754 295370 295580 296139 296261 296656 296702 1 1 1 1 1 1 1 1 1 1 296919 297141 297413 297765 297978 298096 298466 298568 298700 299243 1 1 1 1 1 1 1 1 1 1 300962 301164 301607 301881 302187 302409 303230 303677 304252 304376 1 1 1 1 1 1 1 1 1 1 304485 304555 305959 306268 306275 306948 307322 307424 307528 307930 1 1 1 1 1 1 1 1 1 1 308256 308336 308636 308989 309038 309422 309560 309596 309836 310201 1 1 1 1 1 1 1 1 1 1 310670 310768 312075 312161 312339 312378 312412 312502 312846 312878 1 1 1 1 1 1 1 1 1 1 312887 313164 313267 313332 313491 313729 313880 314049 314073 314210 1 1 1 1 1 1 1 1 1 2 314289 314353 314533 314551 314806 314882 314887 314913 314922 314964 1 1 1 1 1 1 1 1 1 1 314987 315009 315236 315245 315354 315366 315371 315372 315380 315388 1 1 1 1 1 1 1 1 117 1 315394 315398 315487 315547 315553 315576 315637 315656 315688 315793 1 1 1 1 1 1 1 1 3 1 315834 315877 316155 316176 316386 316647 317046 317291 317330 317698 1 1 1 1 1 1 1 1 1 1 317736 317892 318056 318098 318574 318690 318745 318903 319210 319369 1 1 1 1 1 1 1 1 1 1 319864 320016 320398 321376 321896 322031 322327 322331 322340 322378 1 1 1 1 1 1 1 1 1 1 323361 324385 325176 325249 325479 325506 325699 325738 327007 327071 1 1 1 1 1 1 1 1 1 1 329784 330059 330068 330546 331323 331420 331955 332743 333210 333505 1 1 1 1 1 1 1 1 1 1 334280 336425 336639 339445 339836 340968 341340 341570 343466 343613 1 1 1 1 1 1 1 1 1 1 343929 344425 345783 346611 347385 352108 352850 353058 354228 355178 1 1 1 1 1 1 1 1 1 1 355864 357312 357760 358589 358649 359335 364304 364839 365959 367655 1 1 1 1 1 1 1 1 1 1 368078 368186 369448 370837 372631 374943 375195 376641 377305 377516 1 1 1 1 1 1 1 1 1 1 377934 378049 378509 378525 379983 381180 382712 386212 387475 387699 1 1 1 1 1 1 1 1 1 1 393343 394510 397144 403560 405972 407159 408881 409642 414462 424898 1 1 1 1 1 1 1 1 1 1 426280 429112 430866 438493 439798 442882 444477 446211 448243 452469 1 1 1 1 1 1 1 1 1 1 458343 469107 480382 491303 493408 501749 510834 518365 527021 530670 1 1 1 1 1 1 1 1 1 1 550608 574339 585715 597793 638830 640273 644190 652925 657954 688779 1 1 1 1 1 1 1 1 1 1 697458 702380 711969 741409 786690 856956 857217 929118 983660 984885 1 1 1 1 1 1 1 1 1 1 992426 1071292 1073089 1398893 1405225 1443586 1491348 1629616 1926517 4111912 1 1 1 1 1 1 1 1 1 1 4321023 6282154 1 1 > colnames(x) [1] "group" "costs" "trades" "dividends" "wealth" > colnames(x)[par1] [1] "wealth" > x[,par1] [1] 319369 493408 319210 381180 297978 290476 292136 314353 339445 [10] 303677 397144 424898 315380 341570 308989 305959 318690 323361 [19] 318903 314049 315380 298466 315380 438493 378049 313332 319864 [28] 430866 315380 332743 286963 315380 331955 527021 364304 292154 [37] 314987 272713 1398893 409642 429112 382712 374943 315380 297413 [46] 304252 315380 309596 377305 386212 657954 368186 269753 585715 [55] 1071292 992426 315371 249898 357312 315380 315380 364839 230621 [64] 315877 125390 314882 370837 330068 324385 315380 1443586 253537 [73] 4321023 315380 352108 330059 340968 317736 209458 1491348 314887 [82] 315380 315380 353058 315380 315380 314533 315354 302187 336639 [91] 315380 296702 1073089 146494 325249 331420 315380 314922 320016 [100] 280398 452469 301164 317330 315576 315380 -7170 322331 1629616 [109] 292754 318056 355178 204325 315380 317046 315380 309560 414462 [118] 857217 697458 530670 238125 315380 741409 393343 372631 315380 [127] 317291 315380 306275 317892 334280 315380 315380 315380 314210 [136] 306948 315380 320398 315380 315380 501749 202055 315380 315380 [145] 333210 315380 322340 369448 291841 315380 315380 296919 315380 [154] 309038 246541 289513 344425 315380 314210 480382 315009 315380 [163] 312878 322031 315380 597793 315380 315688 378525 312378 403560 [172] 510834 214215 235133 343613 365959 315380 314551 303230 315380 [181] 469107 354228 315380 315380 315380 315394 312412 333505 223193 [190] 315380 315656 296261 315380 336425 359335 315380 308636 158492 [199] 315380 315380 711969 315380 315380 306268 315380 442882 378509 [208] 315380 346611 314289 856956 217193 315366 307930 702380 194493 [217] 316155 315380 330546 394510 312846 315380 296139 295580 297765 [226] 377934 315380 638830 304376 307424 644190 295370 574339 315380 [235] 310201 327007 343466 315380 315380 318098 448243 325738 315380 [244] 312161 243650 407159 315380 317698 315380 312502 315380 322378 [253] 315380 315380 315380 315380 315380 315380 640273 345783 652925 [262] 439798 278990 339836 240897 315380 297141 315380 331323 313880 [271] 315380 315380 309422 315245 405972 300962 316176 302409 283587 [280] 263276 312075 308336 315380 298700 315372 318745 315380 408881 [289] 786690 -83265 315380 321376 315380 276898 315547 315487 315380 [298] 1405225 315380 315380 983660 318574 310768 312887 312339 314964 [307] 379983 315380 315380 315398 315380 253588 316647 315688 310670 [316] 165404 4111912 291650 315380 253468 315688 325699 446211 315380 [325] 368078 315380 352850 6282154 227132 283910 236761 315380 315380 [334] 550608 307528 315380 355864 358589 315380 315380 375195 288985 [343] 315380 458343 315380 269587 315236 42754 315380 308256 315380 [352] 315380 313164 315380 269661 315380 315380 315380 315380 518365 [361] 233773 301881 298568 325479 325506 984885 313267 315793 315380 [370] 215362 314073 298096 325176 207393 314806 341340 426280 929118 [379] 307322 315380 387475 291787 247060 329784 315834 304555 376641 [388] 315380 315380 315380 315380 315380 357760 315637 315380 315380 [397] 315380 315380 327071 377516 299243 387699 309836 444477 322327 [406] 314913 315553 688779 321896 301607 304485 315380 315380 231861 [415] 347385 316386 491303 261216 315388 315380 313729 358649 1926517 [424] 296656 275311 -42143 315380 343929 367655 315380 313491 > 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/1znk91293198800.tab") + } + } > m Conditional inference tree with 4 terminal nodes Response: wealth Inputs: group, costs, trades, dividends Number of observations: 431 1) costs <= 27664; criterion = 1, statistic = 271.943 2) costs <= 11920; criterion = 1, statistic = 130.808 3) dividends <= 86111; criterion = 1, statistic = 97.872 4)* weights = 342 3) dividends > 86111 5)* weights = 58 2) costs > 11920 6)* weights = 19 1) costs > 27664 7)* weights = 12 > postscript(file="/var/www/html/freestat/rcomp/tmp/2znk91293198800.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/3znk91293198800.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 319369 311459.0 7909.9912 2 493408 436863.3 56544.7414 3 319210 311459.0 7750.9912 4 381180 311459.0 69720.9912 5 297978 436863.3 -138885.2586 6 290476 311459.0 -20983.0088 7 292136 311459.0 -19323.0088 8 314353 311459.0 2893.9912 9 339445 311459.0 27985.9912 10 303677 311459.0 -7782.0088 11 397144 436863.3 -39719.2586 12 424898 436863.3 -11965.2586 13 315380 311459.0 3920.9912 14 341570 311459.0 30110.9912 15 308989 311459.0 -2470.0088 16 305959 311459.0 -5500.0088 17 318690 311459.0 7230.9912 18 323361 311459.0 11901.9912 19 318903 311459.0 7443.9912 20 314049 311459.0 2589.9912 21 315380 311459.0 3920.9912 22 298466 311459.0 -12993.0088 23 315380 311459.0 3920.9912 24 438493 436863.3 1629.7414 25 378049 311459.0 66589.9912 26 313332 311459.0 1872.9912 27 319864 311459.0 8404.9912 28 430866 436863.3 -5997.2586 29 315380 311459.0 3920.9912 30 332743 311459.0 21283.9912 31 286963 311459.0 -24496.0088 32 315380 311459.0 3920.9912 33 331955 311459.0 20495.9912 34 527021 436863.3 90157.7414 35 364304 311459.0 52844.9912 36 292154 311459.0 -19305.0088 37 314987 311459.0 3527.9912 38 272713 311459.0 -38746.0088 39 1398893 1991179.1 -592286.0833 40 409642 436863.3 -27221.2586 41 429112 436863.3 -7751.2586 42 382712 311459.0 71252.9912 43 374943 436863.3 -61920.2586 44 315380 311459.0 3920.9912 45 297413 311459.0 -14046.0088 46 304252 311459.0 -7207.0088 47 315380 311459.0 3920.9912 48 309596 311459.0 -1863.0088 49 377305 436863.3 -59558.2586 50 386212 436863.3 -50651.2586 51 657954 678836.6 -20882.6316 52 368186 311459.0 56726.9912 53 269753 311459.0 -41706.0088 54 585715 678836.6 -93121.6316 55 1071292 436863.3 634428.7414 56 992426 1991179.1 -998753.0833 57 315371 311459.0 3911.9912 58 249898 311459.0 -61561.0088 59 357312 311459.0 45852.9912 60 315380 311459.0 3920.9912 61 315380 311459.0 3920.9912 62 364839 436863.3 -72024.2586 63 230621 311459.0 -80838.0088 64 315877 311459.0 4417.9912 65 125390 311459.0 -186069.0088 66 314882 311459.0 3422.9912 67 370837 436863.3 -66026.2586 68 330068 311459.0 18608.9912 69 324385 311459.0 12925.9912 70 315380 311459.0 3920.9912 71 1443586 678836.6 764749.3684 72 253537 311459.0 -57922.0088 73 4321023 1991179.1 2329843.9167 74 315380 311459.0 3920.9912 75 352108 311459.0 40648.9912 76 330059 311459.0 18599.9912 77 340968 311459.0 29508.9912 78 317736 311459.0 6276.9912 79 209458 311459.0 -102001.0088 80 1491348 1991179.1 -499831.0833 81 314887 311459.0 3427.9912 82 315380 311459.0 3920.9912 83 315380 311459.0 3920.9912 84 353058 311459.0 41598.9912 85 315380 311459.0 3920.9912 86 315380 311459.0 3920.9912 87 314533 311459.0 3073.9912 88 315354 311459.0 3894.9912 89 302187 311459.0 -9272.0088 90 336639 311459.0 25179.9912 91 315380 311459.0 3920.9912 92 296702 311459.0 -14757.0088 93 1073089 678836.6 394252.3684 94 146494 311459.0 -164965.0088 95 325249 311459.0 13789.9912 96 331420 311459.0 19960.9912 97 315380 311459.0 3920.9912 98 314922 311459.0 3462.9912 99 320016 311459.0 8556.9912 100 280398 311459.0 -31061.0088 101 452469 311459.0 141009.9912 102 301164 311459.0 -10295.0088 103 317330 311459.0 5870.9912 104 315576 311459.0 4116.9912 105 315380 311459.0 3920.9912 106 -7170 678836.6 -686006.6316 107 322331 311459.0 10871.9912 108 1629616 1991179.1 -361563.0833 109 292754 311459.0 -18705.0088 110 318056 311459.0 6596.9912 111 355178 311459.0 43718.9912 112 204325 311459.0 -107134.0088 113 315380 311459.0 3920.9912 114 317046 311459.0 5586.9912 115 315380 311459.0 3920.9912 116 309560 311459.0 -1899.0088 117 414462 436863.3 -22401.2586 118 857217 678836.6 178380.3684 119 697458 436863.3 260594.7414 120 530670 436863.3 93806.7414 121 238125 311459.0 -73334.0088 122 315380 311459.0 3920.9912 123 741409 311459.0 429949.9912 124 393343 436863.3 -43520.2586 125 372631 678836.6 -306205.6316 126 315380 311459.0 3920.9912 127 317291 311459.0 5831.9912 128 315380 311459.0 3920.9912 129 306275 1991179.1 -1684904.0833 130 317892 311459.0 6432.9912 131 334280 311459.0 22820.9912 132 315380 311459.0 3920.9912 133 315380 311459.0 3920.9912 134 315380 311459.0 3920.9912 135 314210 311459.0 2750.9912 136 306948 311459.0 -4511.0088 137 315380 311459.0 3920.9912 138 320398 311459.0 8938.9912 139 315380 311459.0 3920.9912 140 315380 311459.0 3920.9912 141 501749 436863.3 64885.7414 142 202055 311459.0 -109404.0088 143 315380 311459.0 3920.9912 144 315380 311459.0 3920.9912 145 333210 311459.0 21750.9912 146 315380 311459.0 3920.9912 147 322340 311459.0 10880.9912 148 369448 311459.0 57988.9912 149 291841 311459.0 -19618.0088 150 315380 311459.0 3920.9912 151 315380 311459.0 3920.9912 152 296919 311459.0 -14540.0088 153 315380 311459.0 3920.9912 154 309038 311459.0 -2421.0088 155 246541 311459.0 -64918.0088 156 289513 311459.0 -21946.0088 157 344425 311459.0 32965.9912 158 315380 311459.0 3920.9912 159 314210 311459.0 2750.9912 160 480382 436863.3 43518.7414 161 315009 311459.0 3549.9912 162 315380 311459.0 3920.9912 163 312878 311459.0 1418.9912 164 322031 311459.0 10571.9912 165 315380 311459.0 3920.9912 166 597793 436863.3 160929.7414 167 315380 311459.0 3920.9912 168 315688 311459.0 4228.9912 169 378525 311459.0 67065.9912 170 312378 311459.0 918.9912 171 403560 436863.3 -33303.2586 172 510834 436863.3 73970.7414 173 214215 311459.0 -97244.0088 174 235133 436863.3 -201730.2586 175 343613 311459.0 32153.9912 176 365959 311459.0 54499.9912 177 315380 311459.0 3920.9912 178 314551 311459.0 3091.9912 179 303230 311459.0 -8229.0088 180 315380 311459.0 3920.9912 181 469107 436863.3 32243.7414 182 354228 436863.3 -82635.2586 183 315380 311459.0 3920.9912 184 315380 311459.0 3920.9912 185 315380 311459.0 3920.9912 186 315394 311459.0 3934.9912 187 312412 311459.0 952.9912 188 333505 311459.0 22045.9912 189 223193 1991179.1 -1767986.0833 190 315380 311459.0 3920.9912 191 315656 311459.0 4196.9912 192 296261 311459.0 -15198.0088 193 315380 311459.0 3920.9912 194 336425 311459.0 24965.9912 195 359335 311459.0 47875.9912 196 315380 311459.0 3920.9912 197 308636 436863.3 -128227.2586 198 158492 311459.0 -152967.0088 199 315380 311459.0 3920.9912 200 315380 311459.0 3920.9912 201 711969 678836.6 33132.3684 202 315380 311459.0 3920.9912 203 315380 311459.0 3920.9912 204 306268 311459.0 -5191.0088 205 315380 311459.0 3920.9912 206 442882 436863.3 6018.7414 207 378509 311459.0 67049.9912 208 315380 311459.0 3920.9912 209 346611 436863.3 -90252.2586 210 314289 311459.0 2829.9912 211 856956 678836.6 178119.3684 212 217193 311459.0 -94266.0088 213 315366 311459.0 3906.9912 214 307930 311459.0 -3529.0088 215 702380 678836.6 23543.3684 216 194493 311459.0 -116966.0088 217 316155 311459.0 4695.9912 218 315380 311459.0 3920.9912 219 330546 311459.0 19086.9912 220 394510 436863.3 -42353.2586 221 312846 311459.0 1386.9912 222 315380 311459.0 3920.9912 223 296139 311459.0 -15320.0088 224 295580 311459.0 -15879.0088 225 297765 311459.0 -13694.0088 226 377934 678836.6 -300902.6316 227 315380 311459.0 3920.9912 228 638830 436863.3 201966.7414 229 304376 311459.0 -7083.0088 230 307424 311459.0 -4035.0088 231 644190 436863.3 207326.7414 232 295370 311459.0 -16089.0088 233 574339 436863.3 137475.7414 234 315380 311459.0 3920.9912 235 310201 311459.0 -1258.0088 236 327007 311459.0 15547.9912 237 343466 311459.0 32006.9912 238 315380 311459.0 3920.9912 239 315380 311459.0 3920.9912 240 318098 311459.0 6638.9912 241 448243 311459.0 136783.9912 242 325738 311459.0 14278.9912 243 315380 311459.0 3920.9912 244 312161 311459.0 701.9912 245 243650 311459.0 -67809.0088 246 407159 311459.0 95699.9912 247 315380 311459.0 3920.9912 248 317698 311459.0 6238.9912 249 315380 311459.0 3920.9912 250 312502 311459.0 1042.9912 251 315380 311459.0 3920.9912 252 322378 311459.0 10918.9912 253 315380 311459.0 3920.9912 254 315380 311459.0 3920.9912 255 315380 311459.0 3920.9912 256 315380 311459.0 3920.9912 257 315380 311459.0 3920.9912 258 315380 311459.0 3920.9912 259 640273 436863.3 203409.7414 260 345783 678836.6 -333053.6316 261 652925 311459.0 341465.9912 262 439798 678836.6 -239038.6316 263 278990 311459.0 -32469.0088 264 339836 436863.3 -97027.2586 265 240897 311459.0 -70562.0088 266 315380 311459.0 3920.9912 267 297141 311459.0 -14318.0088 268 315380 311459.0 3920.9912 269 331323 311459.0 19863.9912 270 313880 311459.0 2420.9912 271 315380 311459.0 3920.9912 272 315380 311459.0 3920.9912 273 309422 311459.0 -2037.0088 274 315245 311459.0 3785.9912 275 405972 311459.0 94512.9912 276 300962 311459.0 -10497.0088 277 316176 311459.0 4716.9912 278 302409 311459.0 -9050.0088 279 283587 311459.0 -27872.0088 280 263276 311459.0 -48183.0088 281 312075 311459.0 615.9912 282 308336 311459.0 -3123.0088 283 315380 311459.0 3920.9912 284 298700 311459.0 -12759.0088 285 315372 311459.0 3912.9912 286 318745 311459.0 7285.9912 287 315380 311459.0 3920.9912 288 408881 311459.0 97421.9912 289 786690 311459.0 475230.9912 290 -83265 311459.0 -394724.0088 291 315380 311459.0 3920.9912 292 321376 311459.0 9916.9912 293 315380 311459.0 3920.9912 294 276898 311459.0 -34561.0088 295 315547 311459.0 4087.9912 296 315487 311459.0 4027.9912 297 315380 311459.0 3920.9912 298 1405225 678836.6 726388.3684 299 315380 311459.0 3920.9912 300 315380 311459.0 3920.9912 301 983660 1991179.1 -1007519.0833 302 318574 311459.0 7114.9912 303 310768 436863.3 -126095.2586 304 312887 311459.0 1427.9912 305 312339 311459.0 879.9912 306 314964 311459.0 3504.9912 307 379983 436863.3 -56880.2586 308 315380 311459.0 3920.9912 309 315380 311459.0 3920.9912 310 315398 311459.0 3938.9912 311 315380 311459.0 3920.9912 312 253588 311459.0 -57871.0088 313 316647 311459.0 5187.9912 314 315688 311459.0 4228.9912 315 310670 311459.0 -789.0088 316 165404 311459.0 -146055.0088 317 4111912 1991179.1 2120732.9167 318 291650 311459.0 -19809.0088 319 315380 311459.0 3920.9912 320 253468 311459.0 -57991.0088 321 315688 311459.0 4228.9912 322 325699 311459.0 14239.9912 323 446211 436863.3 9347.7414 324 315380 311459.0 3920.9912 325 368078 436863.3 -68785.2586 326 315380 311459.0 3920.9912 327 352850 436863.3 -84013.2586 328 6282154 1991179.1 4290974.9167 329 227132 1991179.1 -1764047.0833 330 283910 311459.0 -27549.0088 331 236761 311459.0 -74698.0088 332 315380 311459.0 3920.9912 333 315380 311459.0 3920.9912 334 550608 436863.3 113744.7414 335 307528 311459.0 -3931.0088 336 315380 311459.0 3920.9912 337 355864 436863.3 -80999.2586 338 358589 678836.6 -320247.6316 339 315380 311459.0 3920.9912 340 315380 311459.0 3920.9912 341 375195 436863.3 -61668.2586 342 288985 311459.0 -22474.0088 343 315380 311459.0 3920.9912 344 458343 436863.3 21479.7414 345 315380 311459.0 3920.9912 346 269587 311459.0 -41872.0088 347 315236 311459.0 3776.9912 348 42754 311459.0 -268705.0088 349 315380 311459.0 3920.9912 350 308256 311459.0 -3203.0088 351 315380 311459.0 3920.9912 352 315380 311459.0 3920.9912 353 313164 311459.0 1704.9912 354 315380 311459.0 3920.9912 355 269661 311459.0 -41798.0088 356 315380 311459.0 3920.9912 357 315380 311459.0 3920.9912 358 315380 311459.0 3920.9912 359 315380 311459.0 3920.9912 360 518365 436863.3 81501.7414 361 233773 436863.3 -203090.2586 362 301881 311459.0 -9578.0088 363 298568 311459.0 -12891.0088 364 325479 436863.3 -111384.2586 365 325506 311459.0 14046.9912 366 984885 678836.6 306048.3684 367 313267 311459.0 1807.9912 368 315793 311459.0 4333.9912 369 315380 311459.0 3920.9912 370 215362 311459.0 -96097.0088 371 314073 436863.3 -122790.2586 372 298096 311459.0 -13363.0088 373 325176 311459.0 13716.9912 374 207393 311459.0 -104066.0088 375 314806 311459.0 3346.9912 376 341340 436863.3 -95523.2586 377 426280 436863.3 -10583.2586 378 929118 678836.6 250281.3684 379 307322 311459.0 -4137.0088 380 315380 311459.0 3920.9912 381 387475 311459.0 76015.9912 382 291787 311459.0 -19672.0088 383 247060 311459.0 -64399.0088 384 329784 311459.0 18324.9912 385 315834 311459.0 4374.9912 386 304555 311459.0 -6904.0088 387 376641 311459.0 65181.9912 388 315380 311459.0 3920.9912 389 315380 311459.0 3920.9912 390 315380 311459.0 3920.9912 391 315380 311459.0 3920.9912 392 315380 311459.0 3920.9912 393 357760 678836.6 -321076.6316 394 315637 311459.0 4177.9912 395 315380 311459.0 3920.9912 396 315380 311459.0 3920.9912 397 315380 311459.0 3920.9912 398 315380 311459.0 3920.9912 399 327071 311459.0 15611.9912 400 377516 436863.3 -59347.2586 401 299243 436863.3 -137620.2586 402 387699 436863.3 -49164.2586 403 309836 311459.0 -1623.0088 404 444477 678836.6 -234359.6316 405 322327 311459.0 10867.9912 406 314913 311459.0 3453.9912 407 315553 311459.0 4093.9912 408 688779 436863.3 251915.7414 409 321896 436863.3 -114967.2586 410 301607 436863.3 -135256.2586 411 304485 311459.0 -6974.0088 412 315380 311459.0 3920.9912 413 315380 311459.0 3920.9912 414 231861 311459.0 -79598.0088 415 347385 311459.0 35925.9912 416 316386 311459.0 4926.9912 417 491303 436863.3 54439.7414 418 261216 311459.0 -50243.0088 419 315388 311459.0 3928.9912 420 315380 311459.0 3920.9912 421 313729 311459.0 2269.9912 422 358649 311459.0 47189.9912 423 1926517 1991179.1 -64662.0833 424 296656 311459.0 -14803.0088 425 275311 311459.0 -36148.0088 426 -42143 311459.0 -353602.0088 427 315380 311459.0 3920.9912 428 343929 311459.0 32469.9912 429 367655 311459.0 56195.9912 430 315380 311459.0 3920.9912 431 313491 311459.0 2031.9912 > 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/html/freestat/rcomp/tmp/4rw1u1293198800.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/56ohl1293198800.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/6gxy51293198800.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/7kgxb1293198800.tab") + } > > try(system("convert tmp/2znk91293198800.ps tmp/2znk91293198800.png",intern=TRUE)) character(0) > try(system("convert tmp/3znk91293198800.ps tmp/3znk91293198800.png",intern=TRUE)) character(0) > try(system("convert tmp/4rw1u1293198800.ps tmp/4rw1u1293198800.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 9.974 0.896 10.163