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 = '3' > par2 = 'none' > par1 = '2' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: > #Technical description: > library(party) Loading required package: survival Loading required package: splines Loading required package: grid Loading required package: modeltools Loading required package: stats4 Loading required package: coin Loading required package: mvtnorm Loading required package: zoo 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] "Orders" > x[,par1] [1] 807 444 412 428 315 168 263 267 228 129 104 122 393 190 280 63 102 265 [19] 234 277 73 67 103 290 83 56 236 73 34 139 26 70 40 42 12 211 [37] 74 80 83 131 203 56 89 88 39 25 49 149 58 41 90 136 97 63 [55] 114 77 6 47 51 85 43 32 25 77 54 251 15 44 73 85 49 38 [73] 35 9 34 20 29 11 52 13 29 66 33 15 15 68 100 13 45 14 [91] 36 40 68 29 43 30 9 22 19 9 31 19 55 8 28 29 48 16 [109] 47 20 22 33 44 13 6 35 8 17 11 21 92 12 112 25 17 23 [127] 0 10 23 0 7 25 1 20 4 4 10 1 4 0 8 0 11 4 [145] 15 9 0 7 2 0 7 46 5 7 2 0 0 2 5 0 0 0 [163] 0 7 24 1 0 18 55 0 0 3 0 9 0 8 113 0 0 0 [181] 19 11 25 16 5 11 23 6 5 0 7 0 7 0 3 0 89 0 [199] 0 19 0 0 0 12 12 5 2 0 26 3 0 0 11 10 5 2 [217] 6 7 2 28 3 0 1 20 1 22 9 0 2 0 7 9 0 13 [235] 0 0 0 6 0 0 0 3 0 7 2 0 0 15 0 0 9 0 [253] 1 38 57 0 7 26 0 0 0 0 13 10 0 0 0 9 0 26 [271] 0 0 0 19 0 12 23 0 29 8 0 0 26 0 9 0 5 3 [289] 0 13 0 12 19 0 10 9 0 0 0 9 4 1 1 0 14 12 [307] 0 19 17 0 0 32 0 14 8 4 0 20 5 0 0 0 0 0 [325] 0 1 0 0 0 0 0 0 0 4 1 4 20 0 1 10 12 0 [343] 0 0 13 0 3 0 0 10 3 7 10 1 0 0 15 0 0 0 [361] 4 0 0 28 9 0 0 0 0 7 0 7 7 3 0 0 11 7 [379] 10 0 0 18 14 0 12 29 3 6 3 8 10 6 8 6 9 8 [397] 26 239 7 41 3 8 6 21 7 11 11 12 9 3 57 21 15 32 [415] 11 2 23 20 24 1 1 74 68 20 20 82 21 244 32 86 69 > 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 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 115 14 9 13 9 8 9 18 10 15 10 10 10 7 4 7 2 3 2 7 20 21 22 23 24 25 26 28 29 30 31 32 33 34 35 36 38 39 40 41 9 4 3 5 2 5 6 3 6 1 1 4 2 2 2 1 2 1 2 2 42 43 44 45 46 47 48 49 51 52 54 55 56 57 58 63 66 67 68 69 1 2 2 1 1 2 1 2 1 1 1 2 2 2 1 2 1 1 3 1 70 73 74 77 80 82 83 85 86 88 89 90 92 97 100 102 103 104 112 113 1 3 2 2 1 1 2 2 1 1 2 1 1 1 1 1 1 1 1 1 114 122 129 131 136 139 149 168 190 203 211 228 234 236 239 244 251 263 265 267 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 277 280 290 315 393 412 428 444 807 1 1 1 1 1 1 1 1 1 > colnames(x) [1] "Costs" "Orders" "Dividends" "Wealth" > colnames(x)[par1] [1] "Orders" > x[,par1] [1] 807 444 412 428 315 168 263 267 228 129 104 122 393 190 280 63 102 265 [19] 234 277 73 67 103 290 83 56 236 73 34 139 26 70 40 42 12 211 [37] 74 80 83 131 203 56 89 88 39 25 49 149 58 41 90 136 97 63 [55] 114 77 6 47 51 85 43 32 25 77 54 251 15 44 73 85 49 38 [73] 35 9 34 20 29 11 52 13 29 66 33 15 15 68 100 13 45 14 [91] 36 40 68 29 43 30 9 22 19 9 31 19 55 8 28 29 48 16 [109] 47 20 22 33 44 13 6 35 8 17 11 21 92 12 112 25 17 23 [127] 0 10 23 0 7 25 1 20 4 4 10 1 4 0 8 0 11 4 [145] 15 9 0 7 2 0 7 46 5 7 2 0 0 2 5 0 0 0 [163] 0 7 24 1 0 18 55 0 0 3 0 9 0 8 113 0 0 0 [181] 19 11 25 16 5 11 23 6 5 0 7 0 7 0 3 0 89 0 [199] 0 19 0 0 0 12 12 5 2 0 26 3 0 0 11 10 5 2 [217] 6 7 2 28 3 0 1 20 1 22 9 0 2 0 7 9 0 13 [235] 0 0 0 6 0 0 0 3 0 7 2 0 0 15 0 0 9 0 [253] 1 38 57 0 7 26 0 0 0 0 13 10 0 0 0 9 0 26 [271] 0 0 0 19 0 12 23 0 29 8 0 0 26 0 9 0 5 3 [289] 0 13 0 12 19 0 10 9 0 0 0 9 4 1 1 0 14 12 [307] 0 19 17 0 0 32 0 14 8 4 0 20 5 0 0 0 0 0 [325] 0 1 0 0 0 0 0 0 0 4 1 4 20 0 1 10 12 0 [343] 0 0 13 0 3 0 0 10 3 7 10 1 0 0 15 0 0 0 [361] 4 0 0 28 9 0 0 0 0 7 0 7 7 3 0 0 11 7 [379] 10 0 0 18 14 0 12 29 3 6 3 8 10 6 8 6 9 8 [397] 26 239 7 41 3 8 6 21 7 11 11 12 9 3 57 21 15 32 [415] 11 2 23 20 24 1 1 74 68 20 20 82 21 244 32 86 69 > 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/1mvcb1292936969.tab") + } + } > m Conditional inference tree with 8 terminal nodes Response: Orders Inputs: Costs, Dividends, Wealth Number of observations: 431 1) Costs <= 15824; criterion = 1, statistic = 330.859 2) Costs <= 1270; criterion = 1, statistic = 203.71 3) Costs <= 119; criterion = 1, statistic = 85.989 4) Costs <= 0; criterion = 1, statistic = 50.403 5)* weights = 117 4) Costs > 0 6)* weights = 42 3) Costs > 119 7) Wealth <= 340968; criterion = 0.993, statistic = 9.188 8)* weights = 115 7) Wealth > 340968 9)* weights = 17 2) Costs > 1270 10) Costs <= 3999; criterion = 1, statistic = 23.855 11)* weights = 68 10) Costs > 3999 12)* weights = 49 1) Costs > 15824 13) Costs <= 40949; criterion = 0.999, statistic = 13.958 14)* weights = 16 13) Costs > 40949 15)* weights = 7 > postscript(file="/var/www/html/rcomp/tmp/2f4bw1292936969.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/3f4bw1292936969.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 807 369.5714286 437.42857143 2 444 233.3750000 210.62500000 3 412 369.5714286 42.42857143 4 428 369.5714286 58.42857143 5 315 369.5714286 -54.57142857 6 168 369.5714286 -201.57142857 7 263 233.3750000 29.62500000 8 267 369.5714286 -102.57142857 9 228 233.3750000 -5.37500000 10 129 233.3750000 -104.37500000 11 104 233.3750000 -129.37500000 12 122 77.8367347 44.16326531 13 393 233.3750000 159.62500000 14 190 369.5714286 -179.57142857 15 280 233.3750000 46.62500000 16 63 77.8367347 -14.83673469 17 102 77.8367347 24.16326531 18 265 233.3750000 31.62500000 19 234 233.3750000 0.62500000 20 277 233.3750000 43.62500000 21 73 77.8367347 -4.83673469 22 67 233.3750000 -166.37500000 23 103 77.8367347 25.16326531 24 290 233.3750000 56.62500000 25 83 77.8367347 5.16326531 26 56 77.8367347 -21.83673469 27 236 233.3750000 2.62500000 28 73 77.8367347 -4.83673469 29 34 77.8367347 -43.83673469 30 139 77.8367347 61.16326531 31 26 38.0735294 -12.07352941 32 70 77.8367347 -7.83673469 33 40 77.8367347 -37.83673469 34 42 77.8367347 -35.83673469 35 12 38.0735294 -26.07352941 36 211 233.3750000 -22.37500000 37 74 77.8367347 -3.83673469 38 80 77.8367347 2.16326531 39 83 38.0735294 44.92647059 40 131 77.8367347 53.16326531 41 203 77.8367347 125.16326531 42 56 77.8367347 -21.83673469 43 89 77.8367347 11.16326531 44 88 77.8367347 10.16326531 45 39 77.8367347 -38.83673469 46 25 38.0735294 -13.07352941 47 49 77.8367347 -28.83673469 48 149 77.8367347 71.16326531 49 58 77.8367347 -19.83673469 50 41 38.0735294 2.92647059 51 90 38.0735294 51.92647059 52 136 77.8367347 58.16326531 53 97 77.8367347 19.16326531 54 63 20.8235294 42.17647059 55 114 77.8367347 36.16326531 56 77 38.0735294 38.92647059 57 6 38.0735294 -32.07352941 58 47 77.8367347 -30.83673469 59 51 38.0735294 12.92647059 60 85 77.8367347 7.16326531 61 43 77.8367347 -34.83673469 62 32 38.0735294 -6.07352941 63 25 38.0735294 -13.07352941 64 77 77.8367347 -0.83673469 65 54 38.0735294 15.92647059 66 251 77.8367347 173.16326531 67 15 11.8086957 3.19130435 68 44 38.0735294 5.92647059 69 73 38.0735294 34.92647059 70 85 77.8367347 7.16326531 71 49 38.0735294 10.92647059 72 38 77.8367347 -39.83673469 73 35 38.0735294 -3.07352941 74 9 11.8086957 -2.80869565 75 34 38.0735294 -4.07352941 76 20 38.0735294 -18.07352941 77 29 20.8235294 8.17647059 78 11 11.8086957 -0.80869565 79 52 38.0735294 13.92647059 80 13 11.8086957 1.19130435 81 29 38.0735294 -9.07352941 82 66 77.8367347 -11.83673469 83 33 20.8235294 12.17647059 84 15 11.8086957 3.19130435 85 15 20.8235294 -5.82352941 86 68 77.8367347 -9.83673469 87 100 38.0735294 61.92647059 88 13 20.8235294 -7.82352941 89 45 38.0735294 6.92647059 90 14 20.8235294 -6.82352941 91 36 38.0735294 -2.07352941 92 40 38.0735294 1.92647059 93 68 38.0735294 29.92647059 94 29 77.8367347 -48.83673469 95 43 38.0735294 4.92647059 96 30 38.0735294 -8.07352941 97 9 20.8235294 -11.82352941 98 22 38.0735294 -16.07352941 99 19 38.0735294 -19.07352941 100 9 38.0735294 -29.07352941 101 31 11.8086957 19.19130435 102 19 11.8086957 7.19130435 103 55 38.0735294 16.92647059 104 8 11.8086957 -3.80869565 105 28 38.0735294 -10.07352941 106 29 11.8086957 17.19130435 107 48 38.0735294 9.92647059 108 16 38.0735294 -22.07352941 109 47 77.8367347 -30.83673469 110 20 38.0735294 -18.07352941 111 22 20.8235294 1.17647059 112 33 38.0735294 -5.07352941 113 44 77.8367347 -33.83673469 114 13 38.0735294 -25.07352941 115 6 38.0735294 -32.07352941 116 35 38.0735294 -3.07352941 117 8 11.8086957 -3.80869565 118 17 38.0735294 -21.07352941 119 11 38.0735294 -27.07352941 120 21 11.8086957 9.19130435 121 92 77.8367347 14.16326531 122 12 11.8086957 0.19130435 123 112 38.0735294 73.92647059 124 25 38.0735294 -13.07352941 125 17 38.0735294 -21.07352941 126 23 38.0735294 -15.07352941 127 0 0.1709402 -0.17094017 128 10 4.9285714 5.07142857 129 23 11.8086957 11.19130435 130 0 0.1709402 -0.17094017 131 7 4.9285714 2.07142857 132 25 38.0735294 -13.07352941 133 1 0.1709402 0.82905983 134 20 4.9285714 15.07142857 135 4 11.8086957 -7.80869565 136 4 11.8086957 -7.80869565 137 10 4.9285714 5.07142857 138 1 4.9285714 -3.92857143 139 4 11.8086957 -7.80869565 140 0 0.1709402 -0.17094017 141 8 11.8086957 -3.80869565 142 0 0.1709402 -0.17094017 143 11 11.8086957 -0.80869565 144 4 4.9285714 -0.92857143 145 15 11.8086957 3.19130435 146 9 11.8086957 -2.80869565 147 0 0.1709402 -0.17094017 148 7 4.9285714 2.07142857 149 2 11.8086957 -9.80869565 150 0 4.9285714 -4.92857143 151 7 11.8086957 -4.80869565 152 46 38.0735294 7.92647059 153 5 0.1709402 4.82905983 154 7 11.8086957 -4.80869565 155 2 4.9285714 -2.92857143 156 0 0.1709402 -0.17094017 157 0 0.1709402 -0.17094017 158 2 4.9285714 -2.92857143 159 5 11.8086957 -6.80869565 160 0 0.1709402 -0.17094017 161 0 0.1709402 -0.17094017 162 0 0.1709402 -0.17094017 163 0 0.1709402 -0.17094017 164 7 11.8086957 -4.80869565 165 24 11.8086957 12.19130435 166 1 4.9285714 -3.92857143 167 0 0.1709402 -0.17094017 168 18 20.8235294 -2.82352941 169 55 77.8367347 -22.83673469 170 0 0.1709402 -0.17094017 171 0 0.1709402 -0.17094017 172 3 4.9285714 -1.92857143 173 0 0.1709402 -0.17094017 174 9 11.8086957 -2.80869565 175 0 0.1709402 -0.17094017 176 8 11.8086957 -3.80869565 177 113 11.8086957 101.19130435 178 0 4.9285714 -4.92857143 179 0 0.1709402 -0.17094017 180 0 0.1709402 -0.17094017 181 19 20.8235294 -1.82352941 182 11 11.8086957 -0.80869565 183 25 38.0735294 -13.07352941 184 16 11.8086957 4.19130435 185 5 4.9285714 0.07142857 186 11 11.8086957 -0.80869565 187 23 38.0735294 -15.07352941 188 6 11.8086957 -5.80869565 189 5 11.8086957 -6.80869565 190 0 0.1709402 -0.17094017 191 7 11.8086957 -4.80869565 192 0 0.1709402 -0.17094017 193 7 11.8086957 -4.80869565 194 0 0.1709402 -0.17094017 195 3 4.9285714 -1.92857143 196 0 0.1709402 -0.17094017 197 89 77.8367347 11.16326531 198 0 0.1709402 -0.17094017 199 0 0.1709402 -0.17094017 200 19 11.8086957 7.19130435 201 0 0.1709402 -0.17094017 202 0 0.1709402 -0.17094017 203 0 0.1709402 -0.17094017 204 12 11.8086957 0.19130435 205 12 11.8086957 0.19130435 206 5 4.9285714 0.07142857 207 2 4.9285714 -2.92857143 208 0 0.1709402 -0.17094017 209 26 20.8235294 5.17647059 210 3 11.8086957 -8.80869565 211 0 0.1709402 -0.17094017 212 0 0.1709402 -0.17094017 213 11 11.8086957 -0.80869565 214 10 11.8086957 -1.80869565 215 5 11.8086957 -6.80869565 216 2 0.1709402 1.82905983 217 6 4.9285714 1.07142857 218 7 11.8086957 -4.80869565 219 2 0.1709402 1.82905983 220 28 38.0735294 -10.07352941 221 3 11.8086957 -8.80869565 222 0 0.1709402 -0.17094017 223 1 4.9285714 -3.92857143 224 20 11.8086957 8.19130435 225 1 4.9285714 -3.92857143 226 22 11.8086957 10.19130435 227 9 4.9285714 4.07142857 228 0 0.1709402 -0.17094017 229 2 11.8086957 -9.80869565 230 0 0.1709402 -0.17094017 231 7 11.8086957 -4.80869565 232 9 11.8086957 -2.80869565 233 0 0.1709402 -0.17094017 234 13 11.8086957 1.19130435 235 0 0.1709402 -0.17094017 236 0 4.9285714 -4.92857143 237 0 0.1709402 -0.17094017 238 6 4.9285714 1.07142857 239 0 0.1709402 -0.17094017 240 0 0.1709402 -0.17094017 241 0 0.1709402 -0.17094017 242 3 4.9285714 -1.92857143 243 0 0.1709402 -0.17094017 244 7 4.9285714 2.07142857 245 2 38.0735294 -36.07352941 246 0 0.1709402 -0.17094017 247 0 0.1709402 -0.17094017 248 15 11.8086957 3.19130435 249 0 0.1709402 -0.17094017 250 0 0.1709402 -0.17094017 251 9 11.8086957 -2.80869565 252 0 0.1709402 -0.17094017 253 1 11.8086957 -10.80869565 254 38 11.8086957 26.19130435 255 57 38.0735294 18.92647059 256 0 0.1709402 -0.17094017 257 7 11.8086957 -4.80869565 258 26 11.8086957 14.19130435 259 0 0.1709402 -0.17094017 260 0 0.1709402 -0.17094017 261 0 0.1709402 -0.17094017 262 0 0.1709402 -0.17094017 263 13 20.8235294 -7.82352941 264 10 11.8086957 -1.80869565 265 0 0.1709402 -0.17094017 266 0 0.1709402 -0.17094017 267 0 0.1709402 -0.17094017 268 9 20.8235294 -11.82352941 269 0 0.1709402 -0.17094017 270 26 11.8086957 14.19130435 271 0 0.1709402 -0.17094017 272 0 0.1709402 -0.17094017 273 0 0.1709402 -0.17094017 274 19 11.8086957 7.19130435 275 0 0.1709402 -0.17094017 276 12 11.8086957 0.19130435 277 23 11.8086957 11.19130435 278 0 0.1709402 -0.17094017 279 29 38.0735294 -9.07352941 280 8 11.8086957 -3.80869565 281 0 0.1709402 -0.17094017 282 0 0.1709402 -0.17094017 283 26 11.8086957 14.19130435 284 0 0.1709402 -0.17094017 285 9 11.8086957 -2.80869565 286 0 0.1709402 -0.17094017 287 5 11.8086957 -6.80869565 288 3 4.9285714 -1.92857143 289 0 0.1709402 -0.17094017 290 13 11.8086957 1.19130435 291 0 0.1709402 -0.17094017 292 12 11.8086957 0.19130435 293 19 20.8235294 -1.82352941 294 0 0.1709402 -0.17094017 295 10 4.9285714 5.07142857 296 9 11.8086957 -2.80869565 297 0 0.1709402 -0.17094017 298 0 0.1709402 -0.17094017 299 0 0.1709402 -0.17094017 300 9 0.1709402 8.82905983 301 4 4.9285714 -0.92857143 302 1 11.8086957 -10.80869565 303 1 0.1709402 0.82905983 304 0 0.1709402 -0.17094017 305 14 20.8235294 -6.82352941 306 12 4.9285714 7.07142857 307 0 0.1709402 -0.17094017 308 19 11.8086957 7.19130435 309 17 11.8086957 5.19130435 310 0 0.1709402 -0.17094017 311 0 0.1709402 -0.17094017 312 32 20.8235294 11.17647059 313 0 0.1709402 -0.17094017 314 14 4.9285714 9.07142857 315 8 4.9285714 3.07142857 316 4 11.8086957 -7.80869565 317 0 4.9285714 -4.92857143 318 20 11.8086957 8.19130435 319 5 4.9285714 0.07142857 320 0 0.1709402 -0.17094017 321 0 0.1709402 -0.17094017 322 0 0.1709402 -0.17094017 323 0 0.1709402 -0.17094017 324 0 0.1709402 -0.17094017 325 0 0.1709402 -0.17094017 326 1 4.9285714 -3.92857143 327 0 0.1709402 -0.17094017 328 0 0.1709402 -0.17094017 329 0 0.1709402 -0.17094017 330 0 0.1709402 -0.17094017 331 0 0.1709402 -0.17094017 332 0 0.1709402 -0.17094017 333 0 0.1709402 -0.17094017 334 4 4.9285714 -0.92857143 335 1 4.9285714 -3.92857143 336 4 11.8086957 -7.80869565 337 20 11.8086957 8.19130435 338 0 0.1709402 -0.17094017 339 1 4.9285714 -3.92857143 340 10 11.8086957 -1.80869565 341 12 11.8086957 0.19130435 342 0 0.1709402 -0.17094017 343 0 0.1709402 -0.17094017 344 0 0.1709402 -0.17094017 345 13 11.8086957 1.19130435 346 0 0.1709402 -0.17094017 347 3 4.9285714 -1.92857143 348 0 0.1709402 -0.17094017 349 0 0.1709402 -0.17094017 350 10 38.0735294 -28.07352941 351 3 11.8086957 -8.80869565 352 7 4.9285714 2.07142857 353 10 11.8086957 -1.80869565 354 1 11.8086957 -10.80869565 355 0 0.1709402 -0.17094017 356 0 0.1709402 -0.17094017 357 15 11.8086957 3.19130435 358 0 0.1709402 -0.17094017 359 0 0.1709402 -0.17094017 360 0 0.1709402 -0.17094017 361 4 4.9285714 -0.92857143 362 0 0.1709402 -0.17094017 363 0 0.1709402 -0.17094017 364 28 38.0735294 -10.07352941 365 9 11.8086957 -2.80869565 366 0 0.1709402 -0.17094017 367 0 0.1709402 -0.17094017 368 0 0.1709402 -0.17094017 369 0 0.1709402 -0.17094017 370 7 11.8086957 -4.80869565 371 0 0.1709402 -0.17094017 372 7 11.8086957 -4.80869565 373 7 11.8086957 -4.80869565 374 3 11.8086957 -8.80869565 375 0 0.1709402 -0.17094017 376 0 0.1709402 -0.17094017 377 11 11.8086957 -0.80869565 378 7 11.8086957 -4.80869565 379 10 38.0735294 -28.07352941 380 0 0.1709402 -0.17094017 381 0 0.1709402 -0.17094017 382 18 11.8086957 6.19130435 383 14 11.8086957 2.19130435 384 0 0.1709402 -0.17094017 385 12 4.9285714 7.07142857 386 29 38.0735294 -9.07352941 387 3 11.8086957 -8.80869565 388 6 11.8086957 -5.80869565 389 3 4.9285714 -1.92857143 390 8 11.8086957 -3.80869565 391 10 11.8086957 -1.80869565 392 6 11.8086957 -5.80869565 393 8 11.8086957 -3.80869565 394 6 20.8235294 -14.82352941 395 9 38.0735294 -29.07352941 396 8 11.8086957 -3.80869565 397 26 77.8367347 -51.83673469 398 239 38.0735294 200.92647059 399 7 11.8086957 -4.80869565 400 41 38.0735294 2.92647059 401 3 11.8086957 -8.80869565 402 8 11.8086957 -3.80869565 403 6 11.8086957 -5.80869565 404 21 38.0735294 -17.07352941 405 7 11.8086957 -4.80869565 406 11 11.8086957 -0.80869565 407 11 11.8086957 -0.80869565 408 12 11.8086957 0.19130435 409 9 11.8086957 -2.80869565 410 3 11.8086957 -8.80869565 411 57 38.0735294 18.92647059 412 21 77.8367347 -56.83673469 413 15 11.8086957 3.19130435 414 32 38.0735294 -6.07352941 415 11 38.0735294 -27.07352941 416 2 11.8086957 -9.80869565 417 23 38.0735294 -15.07352941 418 20 11.8086957 8.19130435 419 24 11.8086957 12.19130435 420 1 11.8086957 -10.80869565 421 1 11.8086957 -10.80869565 422 74 38.0735294 35.92647059 423 68 77.8367347 -9.83673469 424 20 77.8367347 -57.83673469 425 20 38.0735294 -18.07352941 426 82 77.8367347 4.16326531 427 21 38.0735294 -17.07352941 428 244 233.3750000 10.62500000 429 32 77.8367347 -45.83673469 430 86 77.8367347 8.16326531 431 69 233.3750000 -164.37500000 > 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/4qdsz1292936969.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/5be951292936969.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/6ew7b1292936969.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/7ixoh1292936969.tab") + } > > try(system("convert tmp/2f4bw1292936969.ps tmp/2f4bw1292936969.png",intern=TRUE)) character(0) > try(system("convert tmp/3f4bw1292936969.ps tmp/3f4bw1292936969.png",intern=TRUE)) character(0) > try(system("convert tmp/4qdsz1292936969.ps tmp/4qdsz1292936969.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 8.255 0.747 20.766