R version 2.9.0 (2009-04-17) Copyright (C) 2009 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. 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(162556 + ,807 + ,213118 + ,6282154 + ,29790 + ,444 + ,81767 + ,4321023 + ,87550 + ,412 + ,153198 + ,4111912 + ,84738 + ,428 + ,-26007 + ,223193 + ,54660 + ,315 + ,126942 + ,1491348 + ,42634 + ,168 + ,157214 + ,1629616 + ,40949 + ,263 + ,129352 + ,1398893 + ,45187 + ,267 + ,234817 + ,1926517 + ,37704 + ,228 + ,60448 + ,983660 + ,16275 + ,129 + ,47818 + ,1443586 + ,25830 + ,104 + ,245546 + ,1073089 + ,12679 + ,122 + ,48020 + ,984885 + ,18014 + ,393 + ,-1710 + ,1405225 + ,43556 + ,190 + ,32648 + ,227132 + ,24811 + ,280 + ,95350 + ,929118 + ,6575 + ,63 + ,151352 + ,1071292 + ,7123 + ,102 + ,288170 + ,638830 + ,21950 + ,265 + ,114337 + ,856956 + ,37597 + ,234 + ,37884 + ,992426 + ,17821 + ,277 + ,122844 + ,444477 + ,12988 + ,73 + ,82340 + ,857217 + ,22330 + ,67 + ,79801 + ,711969 + ,13326 + ,103 + ,165548 + ,702380 + ,16189 + ,290 + ,116384 + ,358589 + ,7146 + ,83 + ,134028 + ,297978 + ,15824 + ,56 + ,63838 + ,585715 + ,27664 + ,236 + ,74996 + ,657954 + ,11920 + ,73 + ,31080 + ,209458 + ,8568 + ,34 + ,32168 + ,786690 + ,14416 + ,139 + ,49857 + ,439798 + ,3369 + ,26 + ,87161 + ,688779 + ,11819 + ,70 + ,106113 + ,574339 + ,6984 + ,40 + ,80570 + ,741409 + ,4519 + ,42 + ,102129 + ,597793 + ,2220 + ,12 + ,301670 + ,644190 + ,18562 + ,211 + ,102313 + ,377934 + ,10327 + ,74 + ,88577 + ,640273 + ,5336 + ,80 + ,112477 + ,697458 + ,2365 + ,83 + ,191778 + ,550608 + ,4069 + ,131 + ,79804 + ,207393 + ,8636 + ,203 + ,128294 + ,301607 + ,13718 + ,56 + ,96448 + ,345783 + ,4525 + ,89 + ,93811 + ,501749 + ,6869 + ,88 + ,117520 + ,379983 + ,4628 + ,39 + ,69159 + ,387475 + ,3689 + ,25 + ,101792 + ,377305 + ,4891 + ,49 + ,210568 + ,370837 + ,7489 + ,149 + ,136996 + ,430866 + ,4901 + ,58 + ,121920 + ,469107 + ,2284 + ,41 + ,76403 + ,194493 + ,3160 + ,90 + ,108094 + ,530670 + ,4150 + ,136 + ,134759 + ,518365 + ,7285 + ,97 + ,188873 + ,491303 + ,1134 + ,63 + ,146216 + ,527021 + ,4658 + ,114 + ,156608 + ,233773 + ,2384 + ,77 + ,61348 + ,405972 + ,3748 + ,6 + ,50350 + ,652925 + ,5371 + ,47 + ,87720 + ,446211 + ,1285 + ,51 + ,99489 + ,341340 + ,9327 + ,85 + ,87419 + ,387699 + ,5565 + ,43 + ,94355 + ,493408 + ,1528 + ,32 + ,60326 + ,146494 + ,3122 + ,25 + ,94670 + ,414462 + ,7561 + ,77 + ,82425 + ,364304 + ,2675 + ,54 + ,59017 + ,355178 + ,13253 + ,251 + ,90829 + ,357760 + ,880 + ,15 + ,80791 + ,261216 + ,2053 + ,44 + ,100423 + ,397144 + ,1424 + ,73 + ,131116 + ,374943 + ,4036 + ,85 + ,100269 + ,424898 + ,3045 + ,49 + ,27330 + ,202055 + ,5119 + ,38 + ,39039 + ,378525 + ,1431 + ,35 + ,106885 + ,310768 + ,554 + ,9 + ,79285 + ,325738 + ,1975 + ,34 + ,118881 + ,394510 + ,1765 + ,20 + ,77623 + ,247060 + ,1012 + ,29 + ,114768 + ,368078 + ,810 + ,11 + ,74015 + ,236761 + ,1280 + ,52 + ,69465 + ,312378 + ,666 + ,13 + ,117869 + ,339836 + ,1380 + ,29 + ,60982 + ,347385 + ,4677 + ,66 + ,90131 + ,426280 + ,876 + ,33 + ,138971 + ,352850 + ,814 + ,15 + ,39625 + ,301881 + ,514 + ,15 + ,102725 + ,377516 + ,5692 + ,68 + ,64239 + ,357312 + ,3642 + ,100 + ,90262 + ,458343 + ,540 + ,13 + ,103960 + ,354228 + ,2099 + ,45 + ,106611 + ,308636 + ,567 + ,14 + ,103345 + ,386212 + ,2001 + ,36 + ,95551 + ,393343 + ,2949 + ,40 + ,82903 + ,378509 + ,2253 + ,68 + ,63593 + ,452469 + ,6533 + ,29 + ,126910 + ,364839 + ,1889 + ,43 + ,37527 + ,358649 + ,3055 + ,30 + ,60247 + ,376641 + ,272 + ,9 + ,112995 + ,429112 + ,1414 + ,22 + ,70184 + ,330546 + ,2564 + ,19 + ,130140 + ,403560 + ,1383 + ,9 + ,73221 + ,317892 + ,1261 + ,31 + ,76114 + ,307528 + ,975 + ,19 + ,90534 + ,235133 + ,3366 + ,55 + ,108479 + ,299243 + ,576 + ,8 + ,113761 + ,314073 + ,1686 + ,28 + ,68696 + ,368186 + ,746 + ,29 + ,71561 + ,269661 + ,3192 + ,48 + ,59831 + ,125390 + ,2045 + ,16 + ,97890 + ,510834 + ,5702 + ,47 + ,101481 + ,321896 + ,1932 + ,20 + ,72954 + ,249898 + ,936 + ,22 + ,67939 + ,408881 + ,3437 + ,33 + ,48022 + ,158492 + ,5131 + ,44 + ,86111 + ,292154 + ,2397 + ,13 + ,74020 + ,289513 + ,1389 + ,6 + ,57530 + ,378049 + ,1503 + ,35 + ,56364 + ,343466 + ,402 + ,8 + ,84990 + ,332743 + ,2239 + ,17 + ,88590 + ,442882 + ,2234 + ,11 + ,77200 + ,214215 + ,837 + ,21 + ,61262 + ,315688 + ,10579 + ,92 + ,110309 + ,375195 + ,875 + ,12 + ,67000 + ,334280 + ,1585 + ,112 + ,93099 + ,355864 + ,1659 + ,25 + ,107577 + ,480382 + ,2647 + ,17 + ,62920 + ,353058 + ,3294 + ,23 + ,75832 + ,217193 + ,0 + ,0 + ,60720 + ,315380 + ,94 + ,10 + ,60793 + ,314533 + ,422 + ,23 + ,57935 + ,318056 + ,0 + ,0 + ,60720 + ,315380 + ,34 + ,7 + ,60630 + ,314353 + ,1558 + ,25 + ,55637 + ,369448 + ,0 + ,1 + ,60720 + ,315380 + ,43 + ,20 + ,60887 + ,312846 + ,645 + ,4 + ,60720 + ,312075 + ,316 + ,4 + ,60505 + ,315009 + ,115 + ,10 + ,60945 + ,318903 + ,5 + ,1 + ,60720 + ,314887 + ,897 + ,4 + ,60720 + ,314913 + ,0 + ,0 + ,60720 + ,315380 + ,389 + ,8 + ,58990 + ,325506 + ,0 + ,0 + ,60720 + ,315380 + ,1002 + ,11 + ,56750 + ,298568 + ,36 + ,4 + ,60894 + ,315834 + ,460 + ,15 + ,63346 + ,329784 + ,309 + ,9 + ,56535 + ,312878 + ,0 + ,0 + ,60720 + ,315380 + ,9 + ,7 + ,60835 + ,314987 + ,271 + ,2 + ,60720 + ,325249 + ,14 + ,0 + ,61016 + ,315877 + ,520 + ,7 + ,58650 + ,291650 + ,1766 + ,46 + ,60438 + ,305959 + ,0 + ,5 + ,60720 + ,315380 + ,458 + ,7 + ,58625 + ,297765 + ,20 + ,2 + ,60938 + ,315245 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,98 + ,2 + ,61490 + ,315236 + ,405 + ,5 + ,60845 + ,336425 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,483 + ,7 + ,60830 + ,306268 + ,454 + ,24 + ,63261 + ,302187 + ,47 + ,1 + ,60720 + ,314882 + ,0 + ,0 + ,60720 + ,315380 + ,757 + ,18 + ,45689 + ,382712 + ,4655 + ,55 + ,60720 + ,341570 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,36 + ,3 + ,61564 + ,312412 + ,0 + ,0 + ,60720 + ,315380 + ,203 + ,9 + ,61938 + ,309596 + ,0 + ,0 + ,60720 + ,315380 + ,126 + ,8 + ,60951 + ,315547 + ,400 + ,113 + ,60720 + ,313267 + ,71 + ,0 + ,60745 + ,316176 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,972 + ,19 + ,71642 + ,359335 + ,531 + ,11 + ,71641 + ,330068 + ,2461 + ,25 + ,55792 + ,314289 + ,378 + ,16 + ,71873 + ,297413 + ,23 + ,5 + ,62555 + ,314806 + ,638 + ,11 + ,60370 + ,333210 + ,2300 + ,23 + ,64873 + ,352108 + ,149 + ,6 + ,62041 + ,313332 + ,226 + ,5 + ,65745 + ,291787 + ,0 + ,0 + ,60720 + ,315380 + ,275 + ,7 + ,59500 + ,318745 + ,0 + ,0 + ,60720 + ,315380 + ,141 + ,7 + ,61630 + ,315366 + ,0 + ,0 + ,60720 + ,315380 + ,28 + ,3 + ,60890 + ,315688 + ,0 + ,0 + ,60720 + ,315380 + ,4980 + ,89 + ,113521 + ,409642 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,472 + ,19 + ,80045 + ,269587 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,203 + ,12 + ,50804 + ,300962 + ,496 + ,12 + ,87390 + ,325479 + ,10 + ,5 + ,61656 + ,316155 + ,63 + ,2 + ,65688 + ,318574 + ,0 + ,0 + ,60720 + ,315380 + ,1136 + ,26 + ,48522 + ,343613 + ,265 + ,3 + ,60720 + ,306948 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,267 + ,11 + ,57640 + ,330059 + ,474 + ,10 + ,61977 + ,288985 + ,534 + ,5 + ,62620 + ,304485 + ,0 + ,2 + ,60720 + ,315380 + ,15 + ,6 + ,60831 + ,315688 + ,397 + ,7 + ,60646 + ,317736 + ,0 + ,2 + ,60720 + ,315380 + ,1866 + ,28 + ,56225 + ,322331 + ,288 + ,3 + ,60510 + ,296656 + ,0 + ,0 + ,60720 + ,315380 + ,3 + ,1 + ,60698 + ,315354 + ,468 + ,20 + ,60720 + ,312161 + ,20 + ,1 + ,60805 + ,315576 + ,278 + ,22 + ,61404 + ,314922 + ,61 + ,9 + ,60720 + ,314551 + ,0 + ,0 + ,60720 + ,315380 + ,192 + ,2 + ,65276 + ,312339 + ,0 + ,0 + ,60720 + ,315380 + ,317 + ,7 + ,63915 + ,298700 + ,738 + ,9 + ,60720 + ,321376 + ,0 + ,0 + ,60720 + ,315380 + ,368 + ,13 + ,61686 + ,303230 + ,0 + ,0 + ,60720 + ,315380 + ,2 + ,0 + ,60743 + ,315487 + ,0 + ,0 + ,60720 + ,315380 + ,53 + ,6 + ,60349 + ,315793 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,94 + ,3 + ,61360 + ,312887 + ,0 + ,0 + ,60720 + ,315380 + ,24 + ,7 + ,59818 + ,315637 + ,2332 + ,2 + ,72680 + ,324385 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,131 + ,15 + ,61808 + ,308989 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,206 + ,9 + ,53110 + ,296702 + ,0 + ,0 + ,60720 + ,315380 + ,167 + ,1 + ,64245 + ,307322 + ,622 + ,38 + ,73007 + ,304376 + ,2328 + ,57 + ,82732 + ,253588 + ,0 + ,0 + ,60720 + ,315380 + ,365 + ,7 + ,54820 + ,309560 + ,364 + ,26 + ,47705 + ,298466 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,226 + ,13 + ,72835 + ,343929 + ,307 + ,10 + ,58856 + ,331955 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,188 + ,9 + ,77655 + ,381180 + ,0 + ,0 + ,60720 + ,315380 + ,138 + ,26 + ,69817 + ,331420 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,125 + ,19 + ,60798 + ,310201 + ,0 + ,0 + ,60720 + ,315380 + ,282 + ,12 + ,62452 + ,320016 + ,335 + ,23 + ,64175 + ,320398 + ,0 + ,0 + ,60720 + ,315380 + ,1324 + ,29 + ,67440 + ,291841 + ,176 + ,8 + ,68136 + ,310670 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,249 + ,26 + ,56726 + ,313491 + ,0 + ,0 + ,60720 + ,315380 + ,333 + ,9 + ,70811 + ,331323 + ,0 + ,0 + ,60720 + ,315380 + ,601 + ,5 + ,60720 + ,319210 + ,30 + ,3 + ,62045 + ,318098 + ,0 + ,0 + ,60720 + ,315380 + ,249 + ,13 + ,54323 + ,292754 + ,0 + ,0 + ,60720 + ,315380 + ,165 + ,12 + ,62841 + ,325176 + ,453 + ,19 + ,81125 + ,365959 + ,0 + ,0 + ,60720 + ,315380 + ,53 + ,10 + ,59506 + ,302409 + ,382 + ,9 + ,59365 + ,340968 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,9 + ,60720 + ,315380 + ,30 + ,4 + ,60798 + ,313164 + ,290 + ,1 + ,58790 + ,301164 + ,0 + ,1 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,366 + ,14 + ,61808 + ,344425 + ,2 + ,12 + ,60735 + ,315394 + ,0 + ,0 + ,60720 + ,315380 + ,209 + ,19 + ,64016 + ,316647 + ,384 + ,17 + ,54683 + ,309836 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,365 + ,32 + ,87192 + ,346611 + ,0 + ,0 + ,60720 + ,315380 + ,49 + ,14 + ,64107 + ,322031 + ,3 + ,8 + ,60761 + ,315656 + ,133 + ,4 + ,65990 + ,339445 + ,32 + ,0 + ,59988 + ,314964 + ,368 + ,20 + ,61167 + ,297141 + ,1 + ,5 + ,60719 + ,315372 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,22 + ,1 + ,60722 + ,312502 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,96 + ,4 + ,60379 + ,313729 + ,1 + ,1 + ,60727 + ,315388 + ,314 + ,4 + ,60720 + ,315371 + ,844 + ,20 + ,60925 + ,296139 + ,0 + ,0 + ,60720 + ,315380 + ,26 + ,1 + ,60896 + ,313880 + ,125 + ,10 + ,59734 + ,317698 + ,304 + ,12 + ,62969 + ,295580 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,621 + ,13 + ,60720 + ,308256 + ,0 + ,0 + ,60720 + ,315380 + ,119 + ,3 + ,59118 + ,303677 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,1595 + ,10 + ,60720 + ,319369 + ,312 + ,3 + ,58598 + ,318690 + ,60 + ,7 + ,61124 + ,314049 + ,587 + ,10 + ,59595 + ,325699 + ,135 + ,1 + ,62065 + ,314210 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,514 + ,15 + ,78780 + ,322378 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,1 + ,4 + ,60722 + ,315398 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,1763 + ,28 + ,61600 + ,308336 + ,180 + ,9 + ,59635 + ,316386 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,218 + ,7 + ,60720 + ,315553 + ,0 + ,0 + ,60720 + ,315380 + ,448 + ,7 + ,59781 + ,323361 + ,227 + ,7 + ,76644 + ,336639 + ,174 + ,3 + ,64820 + ,307424 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,121 + ,11 + ,56178 + ,295370 + ,607 + ,7 + ,60436 + ,322340 + ,2212 + ,10 + ,60720 + ,319864 + ,0 + ,0 + ,60720 + ,315380 + ,0 + ,0 + ,60720 + ,315380 + ,530 + ,18 + ,73433 + ,317291 + ,571 + ,14 + ,41477 + ,280398 + ,0 + ,0 + ,60720 + ,315380 + ,78 + ,12 + ,62700 + ,317330 + ,2489 + ,29 + ,67804 + ,238125 + ,131 + ,3 + ,59661 + ,327071 + ,923 + ,6 + ,58620 + ,309038 + ,72 + ,3 + ,60398 + ,314210 + ,572 + ,8 + ,58580 + ,307930 + ,397 + ,10 + ,62710 + ,322327 + ,450 + ,6 + ,59325 + ,292136 + ,622 + ,8 + ,60950 + ,263276 + ,694 + ,6 + ,68060 + ,367655 + ,3425 + ,9 + ,83620 + ,283910 + ,562 + ,8 + ,58456 + ,283587 + ,4917 + ,26 + ,52811 + ,243650 + ,1442 + ,239 + ,121173 + ,438493 + ,529 + ,7 + ,63870 + ,296261 + ,2126 + ,41 + ,21001 + ,230621 + ,1061 + ,3 + ,70415 + ,304252 + ,776 + ,8 + ,64230 + ,333505 + ,611 + ,6 + ,59190 + ,296919 + ,1526 + ,21 + ,69351 + ,278990 + ,592 + ,7 + ,64270 + ,276898 + ,1182 + ,11 + ,70694 + ,327007 + ,621 + ,11 + ,68005 + ,317046 + ,989 + ,12 + ,58930 + ,304555 + ,438 + ,9 + ,58320 + ,298096 + ,726 + ,3 + ,69980 + ,231861 + ,1303 + ,57 + ,69863 + ,309422 + ,7419 + ,21 + ,63255 + ,286963 + ,1164 + ,15 + ,57320 + ,269753 + ,3310 + ,32 + ,75230 + ,448243 + ,1920 + ,11 + ,79420 + ,165404 + ,965 + ,2 + ,73490 + ,204325 + ,3256 + ,23 + ,35250 + ,407159 + ,1135 + ,20 + ,62285 + ,290476 + ,1270 + ,24 + ,69206 + ,275311 + ,661 + ,1 + ,65920 + ,246541 + ,1013 + ,1 + ,69770 + ,253468 + ,2844 + ,74 + ,72683 + ,240897 + ,11528 + ,68 + ,-14545 + ,-83265 + ,6526 + ,20 + ,55830 + ,-42143 + ,2264 + ,20 + ,55174 + ,272713 + ,5109 + ,82 + ,67038 + ,215362 + ,3999 + ,21 + ,51252 + ,42754 + ,35624 + ,244 + ,157278 + ,306275 + ,9252 + ,32 + ,79510 + ,253537 + ,15236 + ,86 + ,77440 + ,372631 + ,18073 + ,69 + ,27284 + ,-7170) + ,dim=c(4 + ,431) + ,dimnames=list(c('Costs' + ,'Orders' + ,'Dividends' + ,'Wealth') + ,1:431)) > y <- array(NA,dim=c(4,431),dimnames=list(c('Costs','Orders','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 = 'none' > par1 = '1' > #'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] "Costs" > x[,par1] [1] 162556 29790 87550 84738 54660 42634 40949 45187 37704 16275 [11] 25830 12679 18014 43556 24811 6575 7123 21950 37597 17821 [21] 12988 22330 13326 16189 7146 15824 27664 11920 8568 14416 [31] 3369 11819 6984 4519 2220 18562 10327 5336 2365 4069 [41] 8636 13718 4525 6869 4628 3689 4891 7489 4901 2284 [51] 3160 4150 7285 1134 4658 2384 3748 5371 1285 9327 [61] 5565 1528 3122 7561 2675 13253 880 2053 1424 4036 [71] 3045 5119 1431 554 1975 1765 1012 810 1280 666 [81] 1380 4677 876 814 514 5692 3642 540 2099 567 [91] 2001 2949 2253 6533 1889 3055 272 1414 2564 1383 [101] 1261 975 3366 576 1686 746 3192 2045 5702 1932 [111] 936 3437 5131 2397 1389 1503 402 2239 2234 837 [121] 10579 875 1585 1659 2647 3294 0 94 422 0 [131] 34 1558 0 43 645 316 115 5 897 0 [141] 389 0 1002 36 460 309 0 9 271 14 [151] 520 1766 0 458 20 0 0 98 405 0 [161] 0 0 0 483 454 47 0 757 4655 0 [171] 0 36 0 203 0 126 400 71 0 0 [181] 972 531 2461 378 23 638 2300 149 226 0 [191] 275 0 141 0 28 0 4980 0 0 472 [201] 0 0 0 203 496 10 63 0 1136 265 [211] 0 0 267 474 534 0 15 397 0 1866 [221] 288 0 3 468 20 278 61 0 192 0 [231] 317 738 0 368 0 2 0 53 0 0 [241] 0 94 0 24 2332 0 0 131 0 0 [251] 206 0 167 622 2328 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 1324 176 [281] 0 0 249 0 333 0 601 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 314 844 0 26 125 [341] 304 0 0 0 621 0 119 0 0 1595 [351] 312 60 587 135 0 0 514 0 0 0 [361] 1 0 0 1763 180 0 0 0 0 218 [371] 0 448 227 174 0 0 121 607 2212 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 7419 1164 3310 1920 965 3256 1135 1270 661 [421] 1013 2844 11528 6526 2264 5109 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 5 9 10 14 15 20 22 117 3 2 2 1 1 1 1 1 2 1 23 24 26 28 30 32 34 36 43 47 49 1 1 1 1 2 1 1 2 1 1 1 53 60 61 63 71 72 78 94 96 98 115 2 1 1 1 1 1 1 2 1 1 1 119 121 125 126 131 133 135 138 141 149 165 1 1 2 1 2 1 1 1 1 1 1 167 174 176 180 188 192 203 206 209 218 226 1 1 1 1 1 1 2 1 1 1 2 227 249 265 267 271 272 275 278 282 288 290 1 2 1 1 1 1 1 1 1 1 1 304 307 309 312 314 316 317 333 335 364 365 1 1 1 1 1 1 1 1 1 1 2 366 368 378 382 384 389 397 400 402 405 422 1 2 1 1 1 1 2 1 1 1 1 438 448 450 453 454 458 460 468 472 474 483 1 1 1 1 1 1 1 1 1 1 1 496 514 520 529 530 531 534 540 554 562 567 1 2 1 1 1 1 1 1 1 1 1 571 572 576 587 592 601 607 611 621 622 638 1 1 1 1 1 1 1 1 2 2 1 645 661 666 694 726 738 746 757 776 810 814 1 1 1 1 1 1 1 1 1 1 1 837 844 875 876 880 897 923 936 965 972 975 1 1 1 1 1 1 1 1 1 1 1 989 1002 1012 1013 1061 1134 1135 1136 1164 1182 1261 1 1 1 1 1 1 1 1 1 1 1 1270 1280 1285 1303 1324 1380 1383 1389 1414 1424 1431 1 1 1 1 1 1 1 1 1 1 1 1442 1503 1526 1528 1558 1585 1595 1659 1686 1763 1765 1 1 1 1 1 1 1 1 1 1 1 1766 1866 1889 1920 1932 1975 2001 2045 2053 2099 2126 1 1 1 1 1 1 1 1 1 1 1 2212 2220 2234 2239 2253 2264 2284 2300 2328 2332 2365 1 1 1 1 1 1 1 1 1 1 1 2384 2397 2461 2489 2564 2647 2675 2844 2949 3045 3055 1 1 1 1 1 1 1 1 1 1 1 3122 3160 3192 3256 3294 3310 3366 3369 3425 3437 3642 1 1 1 1 1 1 1 1 1 1 1 3689 3748 3999 4036 4069 4150 4519 4525 4628 4655 4658 1 1 1 1 1 1 1 1 1 1 1 4677 4891 4901 4917 4980 5109 5119 5131 5336 5371 5565 1 1 1 1 1 1 1 1 1 1 1 5692 5702 6526 6533 6575 6869 6984 7123 7146 7285 7419 1 1 1 1 1 1 1 1 1 1 1 7489 7561 8568 8636 9252 9327 10327 10579 11528 11819 11920 1 1 1 1 1 1 1 1 1 1 1 12679 12988 13253 13326 13718 14416 15236 15824 16189 16275 17821 1 1 1 1 1 1 1 1 1 1 1 18014 18073 18562 21950 22330 24811 25830 27664 29790 35624 37597 1 1 1 1 1 1 1 1 1 1 1 37704 40949 42634 43556 45187 54660 84738 87550 162556 1 1 1 1 1 1 1 1 1 > colnames(x) [1] "Costs" "Orders" "Dividends" "Wealth" > colnames(x)[par1] [1] "Costs" > x[,par1] [1] 162556 29790 87550 84738 54660 42634 40949 45187 37704 16275 [11] 25830 12679 18014 43556 24811 6575 7123 21950 37597 17821 [21] 12988 22330 13326 16189 7146 15824 27664 11920 8568 14416 [31] 3369 11819 6984 4519 2220 18562 10327 5336 2365 4069 [41] 8636 13718 4525 6869 4628 3689 4891 7489 4901 2284 [51] 3160 4150 7285 1134 4658 2384 3748 5371 1285 9327 [61] 5565 1528 3122 7561 2675 13253 880 2053 1424 4036 [71] 3045 5119 1431 554 1975 1765 1012 810 1280 666 [81] 1380 4677 876 814 514 5692 3642 540 2099 567 [91] 2001 2949 2253 6533 1889 3055 272 1414 2564 1383 [101] 1261 975 3366 576 1686 746 3192 2045 5702 1932 [111] 936 3437 5131 2397 1389 1503 402 2239 2234 837 [121] 10579 875 1585 1659 2647 3294 0 94 422 0 [131] 34 1558 0 43 645 316 115 5 897 0 [141] 389 0 1002 36 460 309 0 9 271 14 [151] 520 1766 0 458 20 0 0 98 405 0 [161] 0 0 0 483 454 47 0 757 4655 0 [171] 0 36 0 203 0 126 400 71 0 0 [181] 972 531 2461 378 23 638 2300 149 226 0 [191] 275 0 141 0 28 0 4980 0 0 472 [201] 0 0 0 203 496 10 63 0 1136 265 [211] 0 0 267 474 534 0 15 397 0 1866 [221] 288 0 3 468 20 278 61 0 192 0 [231] 317 738 0 368 0 2 0 53 0 0 [241] 0 94 0 24 2332 0 0 131 0 0 [251] 206 0 167 622 2328 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 1324 176 [281] 0 0 249 0 333 0 601 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 314 844 0 26 125 [341] 304 0 0 0 621 0 119 0 0 1595 [351] 312 60 587 135 0 0 514 0 0 0 [361] 1 0 0 1763 180 0 0 0 0 218 [371] 0 448 227 174 0 0 121 607 2212 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 7419 1164 3310 1920 965 3256 1135 1270 661 [421] 1013 2844 11528 6526 2264 5109 3999 35624 9252 15236 [431] 18073 > if (par2 == 'none') { + m <- ctree(as.formula(paste(colnames(x)[par1],' ~ .',sep='')),data = x) + } > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/rcomp/tmp/1r03r1292937924.tab") + } + } > m Conditional inference tree with 18 terminal nodes Response: Costs Inputs: Orders, Dividends, Wealth Number of observations: 431 1) Orders <= 149; criterion = 1, statistic = 330.859 2) Orders <= 55; criterion = 1, statistic = 213.274 3) Orders <= 19; criterion = 1, statistic = 177.056 4) Orders <= 5; criterion = 1, statistic = 76.588 5) Dividends <= 65745; criterion = 1, statistic = 93.953 6) Orders <= 2; criterion = 1, statistic = 63.491 7) Orders <= 0; criterion = 1, statistic = 45.189 8)* weights = 115 7) Orders > 0 9)* weights = 19 6) Orders > 2 10)* weights = 27 5) Dividends > 65745 11)* weights = 7 4) Orders > 5 12) Wealth <= 382712; criterion = 1, statistic = 15.275 13) Wealth <= 289513; criterion = 0.955, statistic = 5.905 14)* weights = 14 13) Wealth > 289513 15) Wealth <= 317736; criterion = 0.965, statistic = 6.361 16) Wealth <= 309560; criterion = 0.99, statistic = 8.521 17)* weights = 24 16) Wealth > 309560 18) Dividends <= 61938; criterion = 0.986, statistic = 7.945 19) Dividends <= 60646; criterion = 0.966, statistic = 6.384 20)* weights = 8 19) Dividends > 60646 21)* weights = 13 18) Dividends > 61938 22)* weights = 7 15) Wealth > 317736 23)* weights = 41 12) Wealth > 382712 24)* weights = 7 3) Orders > 19 25) Orders <= 31; criterion = 0.971, statistic = 6.698 26)* weights = 45 25) Orders > 31 27) Wealth <= 394510; criterion = 0.982, statistic = 7.505 28)* weights = 28 27) Wealth > 394510 29)* weights = 7 2) Orders > 55 30) Wealth <= 697458; criterion = 0.963, statistic = 6.219 31)* weights = 40 30) Wealth > 697458 32)* weights = 7 1) Orders > 149 33) Orders <= 280; criterion = 0.999, statistic = 13.688 34)* weights = 15 33) Orders > 280 35)* weights = 7 > postscript(file="/var/www/html/rcomp/tmp/2r03r1292937924.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/rcomp/tmp/32slu1292937924.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 64785.285714 9.777071e+04 2 29790 64785.285714 -3.499529e+04 3 87550 64785.285714 2.276471e+04 4 84738 64785.285714 1.995271e+04 5 54660 64785.285714 -1.012529e+04 6 42634 27826.000000 1.480800e+04 7 40949 27826.000000 1.312300e+04 8 45187 27826.000000 1.736100e+04 9 37704 27826.000000 9.878000e+03 10 16275 15714.714286 5.602857e+02 11 25830 15714.714286 1.011529e+04 12 12679 15714.714286 -3.035714e+03 13 18014 64785.285714 -4.677129e+04 14 43556 27826.000000 1.573000e+04 15 24811 27826.000000 -3.015000e+03 16 6575 15714.714286 -9.139714e+03 17 7123 6579.875000 5.431250e+02 18 21950 27826.000000 -5.876000e+03 19 37597 27826.000000 9.771000e+03 20 17821 27826.000000 -1.000500e+04 21 12988 15714.714286 -2.726714e+03 22 22330 15714.714286 6.615286e+03 23 13326 15714.714286 -2.388714e+03 24 16189 64785.285714 -4.859629e+04 25 7146 6579.875000 5.661250e+02 26 15824 6579.875000 9.244125e+03 27 27664 27826.000000 -1.620000e+02 28 11920 6579.875000 5.340125e+03 29 8568 5195.714286 3.372286e+03 30 14416 6579.875000 7.836125e+03 31 3369 1974.711111 1.394289e+03 32 11819 6579.875000 5.239125e+03 33 6984 5195.714286 1.788286e+03 34 4519 5195.714286 -6.767143e+02 35 2220 1950.714286 2.692857e+02 36 18562 27826.000000 -9.264000e+03 37 10327 6579.875000 3.747125e+03 38 5336 6579.875000 -1.243875e+03 39 2365 6579.875000 -4.214875e+03 40 4069 6579.875000 -2.510875e+03 41 8636 27826.000000 -1.919000e+04 42 13718 6579.875000 7.138125e+03 43 4525 6579.875000 -2.054875e+03 44 6869 6579.875000 2.891250e+02 45 4628 2895.428571 1.732571e+03 46 3689 1974.711111 1.714289e+03 47 4891 2895.428571 1.995571e+03 48 7489 6579.875000 9.091250e+02 49 4901 6579.875000 -1.678875e+03 50 2284 2895.428571 -6.114286e+02 51 3160 6579.875000 -3.419875e+03 52 4150 6579.875000 -2.429875e+03 53 7285 6579.875000 7.051250e+02 54 1134 6579.875000 -5.445875e+03 55 4658 6579.875000 -1.921875e+03 56 2384 6579.875000 -4.195875e+03 57 3748 1950.714286 1.797286e+03 58 5371 5195.714286 1.752857e+02 59 1285 2895.428571 -1.610429e+03 60 9327 6579.875000 2.747125e+03 61 5565 5195.714286 3.692857e+02 62 1528 2895.428571 -1.367429e+03 63 3122 1974.711111 1.147289e+03 64 7561 6579.875000 9.811250e+02 65 2675 2895.428571 -2.204286e+02 66 13253 27826.000000 -1.457300e+04 67 880 1221.285714 -3.412857e+02 68 2053 5195.714286 -3.142714e+03 69 1424 6579.875000 -5.155875e+03 70 4036 6579.875000 -2.543875e+03 71 3045 2895.428571 1.495714e+02 72 5119 2895.428571 2.223571e+03 73 1431 2895.428571 -1.464429e+03 74 554 648.731707 -9.473171e+01 75 1975 2895.428571 -9.204286e+02 76 1765 1974.711111 -2.097111e+02 77 1012 1974.711111 -9.627111e+02 78 810 1221.285714 -4.112857e+02 79 1280 2895.428571 -1.615429e+03 80 666 648.731707 1.726829e+01 81 1380 1974.711111 -5.947111e+02 82 4677 6579.875000 -1.902875e+03 83 876 2895.428571 -2.019429e+03 84 814 462.708333 3.512917e+02 85 514 648.731707 -1.347317e+02 86 5692 6579.875000 -8.878750e+02 87 3642 6579.875000 -2.937875e+03 88 540 648.731707 -1.087317e+02 89 2099 2895.428571 -7.964286e+02 90 567 1950.714286 -1.383714e+03 91 2001 2895.428571 -8.944286e+02 92 2949 2895.428571 5.357143e+01 93 2253 6579.875000 -4.326875e+03 94 6533 1974.711111 4.558289e+03 95 1889 2895.428571 -1.006429e+03 96 3055 1974.711111 1.080289e+03 97 272 1950.714286 -1.678714e+03 98 1414 1974.711111 -5.607111e+02 99 2564 1950.714286 6.132857e+02 100 1383 648.731707 7.342683e+02 101 1261 1974.711111 -7.137111e+02 102 975 1221.285714 -2.462857e+02 103 3366 2895.428571 4.705714e+02 104 576 334.142857 2.418571e+02 105 1686 1974.711111 -2.887111e+02 106 746 1974.711111 -1.228711e+03 107 3192 2895.428571 2.965714e+02 108 2045 1950.714286 9.428571e+01 109 5702 2895.428571 2.806571e+03 110 1932 1974.711111 -4.271111e+01 111 936 1974.711111 -1.038711e+03 112 3437 2895.428571 5.415714e+02 113 5131 2895.428571 2.235571e+03 114 2397 1221.285714 1.175714e+03 115 1389 648.731707 7.402683e+02 116 1503 2895.428571 -1.392429e+03 117 402 648.731707 -2.467317e+02 118 2239 1950.714286 2.882857e+02 119 2234 1221.285714 1.012714e+03 120 837 1974.711111 -1.137711e+03 121 10579 6579.875000 3.999125e+03 122 875 648.731707 2.262683e+02 123 1585 6579.875000 -4.994875e+03 124 1659 1974.711111 -3.157111e+02 125 2647 648.731707 1.998268e+03 126 3294 1974.711111 1.319289e+03 127 0 1.034783 -1.034783e+00 128 94 81.307692 1.269231e+01 129 422 1974.711111 -1.552711e+03 130 0 1.034783 -1.034783e+00 131 34 188.250000 -1.542500e+02 132 1558 1974.711111 -4.167111e+02 133 0 71.578947 -7.157895e+01 134 43 1974.711111 -1.931711e+03 135 645 210.518519 4.344815e+02 136 316 210.518519 1.054815e+02 137 115 648.731707 -5.337317e+02 138 5 71.578947 -6.657895e+01 139 897 210.518519 6.864815e+02 140 0 1.034783 -1.034783e+00 141 389 648.731707 -2.597317e+02 142 0 1.034783 -1.034783e+00 143 1002 462.708333 5.392917e+02 144 36 210.518519 -1.745185e+02 145 460 648.731707 -1.887317e+02 146 309 188.250000 1.207500e+02 147 0 1.034783 -1.034783e+00 148 9 81.307692 -7.230769e+01 149 271 71.578947 1.994211e+02 150 14 1.034783 1.296522e+01 151 520 462.708333 5.729167e+01 152 1766 2895.428571 -1.129429e+03 153 0 210.518519 -2.105185e+02 154 458 462.708333 -4.708333e+00 155 20 71.578947 -5.157895e+01 156 0 1.034783 -1.034783e+00 157 0 1.034783 -1.034783e+00 158 98 71.578947 2.642105e+01 159 405 210.518519 1.944815e+02 160 0 1.034783 -1.034783e+00 161 0 1.034783 -1.034783e+00 162 0 1.034783 -1.034783e+00 163 0 1.034783 -1.034783e+00 164 483 462.708333 2.029167e+01 165 454 1974.711111 -1.520711e+03 166 47 71.578947 -2.457895e+01 167 0 1.034783 -1.034783e+00 168 757 648.731707 1.082683e+02 169 4655 2895.428571 1.759571e+03 170 0 1.034783 -1.034783e+00 171 0 1.034783 -1.034783e+00 172 36 210.518519 -1.745185e+02 173 0 1.034783 -1.034783e+00 174 203 81.307692 1.216923e+02 175 0 1.034783 -1.034783e+00 176 126 81.307692 4.469231e+01 177 400 6579.875000 -6.179875e+03 178 71 1.034783 6.996522e+01 179 0 1.034783 -1.034783e+00 180 0 1.034783 -1.034783e+00 181 972 648.731707 3.232683e+02 182 531 648.731707 -1.177317e+02 183 2461 1974.711111 4.862889e+02 184 378 462.708333 -8.470833e+01 185 23 210.518519 -1.875185e+02 186 638 648.731707 -1.073171e+01 187 2300 1974.711111 3.252889e+02 188 149 334.142857 -1.851429e+02 189 226 210.518519 1.548148e+01 190 0 1.034783 -1.034783e+00 191 275 648.731707 -3.737317e+02 192 0 1.034783 -1.034783e+00 193 141 81.307692 5.969231e+01 194 0 1.034783 -1.034783e+00 195 28 210.518519 -1.825185e+02 196 0 1.034783 -1.034783e+00 197 4980 6579.875000 -1.599875e+03 198 0 1.034783 -1.034783e+00 199 0 1.034783 -1.034783e+00 200 472 1221.285714 -7.492857e+02 201 0 1.034783 -1.034783e+00 202 0 1.034783 -1.034783e+00 203 0 1.034783 -1.034783e+00 204 203 462.708333 -2.597083e+02 205 496 648.731707 -1.527317e+02 206 10 210.518519 -2.005185e+02 207 63 71.578947 -8.578947e+00 208 0 1.034783 -1.034783e+00 209 1136 1974.711111 -8.387111e+02 210 265 210.518519 5.448148e+01 211 0 1.034783 -1.034783e+00 212 0 1.034783 -1.034783e+00 213 267 648.731707 -3.817317e+02 214 474 1221.285714 -7.472857e+02 215 534 210.518519 3.234815e+02 216 0 71.578947 -7.157895e+01 217 15 81.307692 -6.630769e+01 218 397 188.250000 2.087500e+02 219 0 71.578947 -7.157895e+01 220 1866 1974.711111 -1.087111e+02 221 288 210.518519 7.748148e+01 222 0 1.034783 -1.034783e+00 223 3 71.578947 -6.857895e+01 224 468 1974.711111 -1.506711e+03 225 20 71.578947 -5.157895e+01 226 278 1974.711111 -1.696711e+03 227 61 81.307692 -2.030769e+01 228 0 1.034783 -1.034783e+00 229 192 71.578947 1.204211e+02 230 0 1.034783 -1.034783e+00 231 317 462.708333 -1.457083e+02 232 738 648.731707 8.926829e+01 233 0 1.034783 -1.034783e+00 234 368 462.708333 -9.470833e+01 235 0 1.034783 -1.034783e+00 236 2 1.034783 9.652174e-01 237 0 1.034783 -1.034783e+00 238 53 188.250000 -1.352500e+02 239 0 1.034783 -1.034783e+00 240 0 1.034783 -1.034783e+00 241 0 1.034783 -1.034783e+00 242 94 210.518519 -1.165185e+02 243 0 1.034783 -1.034783e+00 244 24 188.250000 -1.642500e+02 245 2332 984.428571 1.347571e+03 246 0 1.034783 -1.034783e+00 247 0 1.034783 -1.034783e+00 248 131 462.708333 -3.317083e+02 249 0 1.034783 -1.034783e+00 250 0 1.034783 -1.034783e+00 251 206 462.708333 -2.567083e+02 252 0 1.034783 -1.034783e+00 253 167 71.578947 9.542105e+01 254 622 2895.428571 -2.273429e+03 255 2328 6579.875000 -4.251875e+03 256 0 1.034783 -1.034783e+00 257 365 462.708333 -9.770833e+01 258 364 1974.711111 -1.610711e+03 259 0 1.034783 -1.034783e+00 260 0 1.034783 -1.034783e+00 261 0 1.034783 -1.034783e+00 262 0 1.034783 -1.034783e+00 263 226 648.731707 -4.227317e+02 264 307 648.731707 -3.417317e+02 265 0 1.034783 -1.034783e+00 266 0 1.034783 -1.034783e+00 267 0 1.034783 -1.034783e+00 268 188 648.731707 -4.607317e+02 269 0 1.034783 -1.034783e+00 270 138 1974.711111 -1.836711e+03 271 0 1.034783 -1.034783e+00 272 0 1.034783 -1.034783e+00 273 0 1.034783 -1.034783e+00 274 125 81.307692 4.369231e+01 275 0 1.034783 -1.034783e+00 276 282 648.731707 -3.667317e+02 277 335 1974.711111 -1.639711e+03 278 0 1.034783 -1.034783e+00 279 1324 1974.711111 -6.507111e+02 280 176 334.142857 -1.581429e+02 281 0 1.034783 -1.034783e+00 282 0 1.034783 -1.034783e+00 283 249 1974.711111 -1.725711e+03 284 0 1.034783 -1.034783e+00 285 333 648.731707 -3.157317e+02 286 0 1.034783 -1.034783e+00 287 601 210.518519 3.904815e+02 288 30 210.518519 -1.805185e+02 289 0 1.034783 -1.034783e+00 290 249 462.708333 -2.137083e+02 291 0 1.034783 -1.034783e+00 292 165 648.731707 -4.837317e+02 293 453 648.731707 -1.957317e+02 294 0 1.034783 -1.034783e+00 295 53 462.708333 -4.097083e+02 296 382 648.731707 -2.667317e+02 297 0 1.034783 -1.034783e+00 298 0 1.034783 -1.034783e+00 299 0 1.034783 -1.034783e+00 300 0 81.307692 -8.130769e+01 301 30 210.518519 -1.805185e+02 302 290 71.578947 2.184211e+02 303 0 71.578947 -7.157895e+01 304 0 1.034783 -1.034783e+00 305 366 648.731707 -2.827317e+02 306 2 81.307692 -7.930769e+01 307 0 1.034783 -1.034783e+00 308 209 334.142857 -1.251429e+02 309 384 188.250000 1.957500e+02 310 0 1.034783 -1.034783e+00 311 0 1.034783 -1.034783e+00 312 365 2895.428571 -2.530429e+03 313 0 1.034783 -1.034783e+00 314 49 648.731707 -5.997317e+02 315 3 81.307692 -7.830769e+01 316 133 984.428571 -8.514286e+02 317 32 1.034783 3.096522e+01 318 368 1974.711111 -1.606711e+03 319 1 210.518519 -2.095185e+02 320 0 1.034783 -1.034783e+00 321 0 1.034783 -1.034783e+00 322 0 1.034783 -1.034783e+00 323 0 1.034783 -1.034783e+00 324 0 1.034783 -1.034783e+00 325 0 1.034783 -1.034783e+00 326 22 71.578947 -4.957895e+01 327 0 1.034783 -1.034783e+00 328 0 1.034783 -1.034783e+00 329 0 1.034783 -1.034783e+00 330 0 1.034783 -1.034783e+00 331 0 1.034783 -1.034783e+00 332 0 1.034783 -1.034783e+00 333 0 1.034783 -1.034783e+00 334 96 210.518519 -1.145185e+02 335 1 71.578947 -7.057895e+01 336 314 210.518519 1.034815e+02 337 844 1974.711111 -1.130711e+03 338 0 1.034783 -1.034783e+00 339 26 71.578947 -4.557895e+01 340 125 188.250000 -6.325000e+01 341 304 462.708333 -1.587083e+02 342 0 1.034783 -1.034783e+00 343 0 1.034783 -1.034783e+00 344 0 1.034783 -1.034783e+00 345 621 462.708333 1.582917e+02 346 0 1.034783 -1.034783e+00 347 119 210.518519 -9.151852e+01 348 0 1.034783 -1.034783e+00 349 0 1.034783 -1.034783e+00 350 1595 648.731707 9.462683e+02 351 312 210.518519 1.014815e+02 352 60 81.307692 -2.130769e+01 353 587 648.731707 -6.173171e+01 354 135 71.578947 6.342105e+01 355 0 1.034783 -1.034783e+00 356 0 1.034783 -1.034783e+00 357 514 648.731707 -1.347317e+02 358 0 1.034783 -1.034783e+00 359 0 1.034783 -1.034783e+00 360 0 1.034783 -1.034783e+00 361 1 210.518519 -2.095185e+02 362 0 1.034783 -1.034783e+00 363 0 1.034783 -1.034783e+00 364 1763 1974.711111 -2.117111e+02 365 180 188.250000 -8.250000e+00 366 0 1.034783 -1.034783e+00 367 0 1.034783 -1.034783e+00 368 0 1.034783 -1.034783e+00 369 0 1.034783 -1.034783e+00 370 218 81.307692 1.366923e+02 371 0 1.034783 -1.034783e+00 372 448 648.731707 -2.007317e+02 373 227 648.731707 -4.217317e+02 374 174 210.518519 -3.651852e+01 375 0 1.034783 -1.034783e+00 376 0 1.034783 -1.034783e+00 377 121 462.708333 -3.417083e+02 378 607 648.731707 -4.173171e+01 379 2212 648.731707 1.563268e+03 380 0 1.034783 -1.034783e+00 381 0 1.034783 -1.034783e+00 382 530 334.142857 1.958571e+02 383 571 1221.285714 -6.502857e+02 384 0 1.034783 -1.034783e+00 385 78 334.142857 -2.561429e+02 386 2489 1974.711111 5.142889e+02 387 131 210.518519 -7.951852e+01 388 923 462.708333 4.602917e+02 389 72 210.518519 -1.385185e+02 390 572 462.708333 1.092917e+02 391 397 648.731707 -2.517317e+02 392 450 462.708333 -1.270833e+01 393 622 1221.285714 -5.992857e+02 394 694 648.731707 4.526829e+01 395 3425 1221.285714 2.203714e+03 396 562 1221.285714 -6.592857e+02 397 4917 1974.711111 2.942289e+03 398 1442 27826.000000 -2.638400e+04 399 529 462.708333 6.629167e+01 400 2126 2895.428571 -7.694286e+02 401 1061 984.428571 7.657143e+01 402 776 648.731707 1.272683e+02 403 611 462.708333 1.482917e+02 404 1526 1974.711111 -4.487111e+02 405 592 1221.285714 -6.292857e+02 406 1182 648.731707 5.332683e+02 407 621 334.142857 2.868571e+02 408 989 462.708333 5.262917e+02 409 438 462.708333 -2.470833e+01 410 726 984.428571 -2.584286e+02 411 1303 6579.875000 -5.276875e+03 412 7419 1974.711111 5.444289e+03 413 1164 1221.285714 -5.728571e+01 414 3310 5195.714286 -1.885714e+03 415 1920 1221.285714 6.987143e+02 416 965 984.428571 -1.942857e+01 417 3256 1974.711111 1.281289e+03 418 1135 1974.711111 -8.397111e+02 419 1270 1974.711111 -7.047111e+02 420 661 984.428571 -3.234286e+02 421 1013 984.428571 2.857143e+01 422 2844 6579.875000 -3.735875e+03 423 11528 6579.875000 4.948125e+03 424 6526 1974.711111 4.551289e+03 425 2264 1974.711111 2.892889e+02 426 5109 6579.875000 -1.470875e+03 427 3999 1974.711111 2.024289e+03 428 35624 27826.000000 7.798000e+03 429 9252 2895.428571 6.356571e+03 430 15236 6579.875000 8.656125e+03 431 18073 6579.875000 1.149312e+04 > 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/rcomp/tmp/4uj2f1292937924.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/rcomp/tmp/5gji31292937924.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/rcomp/tmp/6rth61292937924.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/rcomp/tmp/7utyu1292937924.tab") + } > > try(system("convert tmp/2r03r1292937924.ps tmp/2r03r1292937924.png",intern=TRUE)) character(0) > try(system("convert tmp/32slu1292937924.ps tmp/32slu1292937924.png",intern=TRUE)) character(0) > try(system("convert tmp/4uj2f1292937924.ps tmp/4uj2f1292937924.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 8.214 0.782 16.586