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(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 + ,0 + ,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 = '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/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/1net51292962104.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.856 2) Orders <= 55; criterion = 1, statistic = 213.274 3) Orders <= 19; criterion = 1, statistic = 177.058 4) Orders <= 5; criterion = 1, statistic = 76.613 5) Dividends <= 65745; criterion = 1, statistic = 93.953 6) Orders <= 2; criterion = 1, statistic = 63.677 7) Orders <= 0; criterion = 1, statistic = 46.597 8)* weights = 116 7) Orders > 0 9)* weights = 18 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/freestat/rcomp/tmp/2yob81292962104.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/3yob81292962104.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 97770.714286 2 29790 64785.285714 -34995.285714 3 87550 64785.285714 22764.714286 4 84738 64785.285714 19952.714286 5 54660 64785.285714 -10125.285714 6 42634 27826.000000 14808.000000 7 40949 27826.000000 13123.000000 8 45187 27826.000000 17361.000000 9 37704 27826.000000 9878.000000 10 16275 15714.714286 560.285714 11 25830 15714.714286 10115.285714 12 12679 15714.714286 -3035.714286 13 18014 64785.285714 -46771.285714 14 43556 27826.000000 15730.000000 15 24811 27826.000000 -3015.000000 16 6575 15714.714286 -9139.714286 17 7123 6579.875000 543.125000 18 21950 27826.000000 -5876.000000 19 37597 27826.000000 9771.000000 20 17821 27826.000000 -10005.000000 21 12988 15714.714286 -2726.714286 22 22330 15714.714286 6615.285714 23 13326 15714.714286 -2388.714286 24 16189 64785.285714 -48596.285714 25 7146 6579.875000 566.125000 26 15824 6579.875000 9244.125000 27 27664 27826.000000 -162.000000 28 11920 6579.875000 5340.125000 29 8568 5195.714286 3372.285714 30 14416 6579.875000 7836.125000 31 3369 1974.711111 1394.288889 32 11819 6579.875000 5239.125000 33 6984 5195.714286 1788.285714 34 4519 5195.714286 -676.714286 35 2220 1950.714286 269.285714 36 18562 27826.000000 -9264.000000 37 10327 6579.875000 3747.125000 38 5336 6579.875000 -1243.875000 39 2365 6579.875000 -4214.875000 40 4069 6579.875000 -2510.875000 41 8636 27826.000000 -19190.000000 42 13718 6579.875000 7138.125000 43 4525 6579.875000 -2054.875000 44 6869 6579.875000 289.125000 45 4628 2895.428571 1732.571429 46 3689 1974.711111 1714.288889 47 4891 2895.428571 1995.571429 48 7489 6579.875000 909.125000 49 4901 6579.875000 -1678.875000 50 2284 2895.428571 -611.428571 51 3160 6579.875000 -3419.875000 52 4150 6579.875000 -2429.875000 53 7285 6579.875000 705.125000 54 1134 6579.875000 -5445.875000 55 4658 6579.875000 -1921.875000 56 2384 6579.875000 -4195.875000 57 3748 1950.714286 1797.285714 58 5371 5195.714286 175.285714 59 1285 2895.428571 -1610.428571 60 9327 6579.875000 2747.125000 61 5565 5195.714286 369.285714 62 1528 2895.428571 -1367.428571 63 3122 1974.711111 1147.288889 64 7561 6579.875000 981.125000 65 2675 2895.428571 -220.428571 66 13253 27826.000000 -14573.000000 67 880 1221.285714 -341.285714 68 2053 5195.714286 -3142.714286 69 1424 6579.875000 -5155.875000 70 4036 6579.875000 -2543.875000 71 3045 2895.428571 149.571429 72 5119 2895.428571 2223.571429 73 1431 2895.428571 -1464.428571 74 554 648.731707 -94.731707 75 1975 2895.428571 -920.428571 76 1765 1974.711111 -209.711111 77 1012 1974.711111 -962.711111 78 810 1221.285714 -411.285714 79 1280 2895.428571 -1615.428571 80 666 648.731707 17.268293 81 1380 1974.711111 -594.711111 82 4677 6579.875000 -1902.875000 83 876 2895.428571 -2019.428571 84 814 462.708333 351.291667 85 514 648.731707 -134.731707 86 5692 6579.875000 -887.875000 87 3642 6579.875000 -2937.875000 88 540 648.731707 -108.731707 89 2099 2895.428571 -796.428571 90 567 1950.714286 -1383.714286 91 2001 2895.428571 -894.428571 92 2949 2895.428571 53.571429 93 2253 6579.875000 -4326.875000 94 6533 1974.711111 4558.288889 95 1889 2895.428571 -1006.428571 96 3055 1974.711111 1080.288889 97 272 1950.714286 -1678.714286 98 1414 1974.711111 -560.711111 99 2564 1950.714286 613.285714 100 1383 648.731707 734.268293 101 1261 1974.711111 -713.711111 102 975 1221.285714 -246.285714 103 3366 2895.428571 470.571429 104 576 334.142857 241.857143 105 1686 1974.711111 -288.711111 106 746 1974.711111 -1228.711111 107 3192 2895.428571 296.571429 108 2045 1950.714286 94.285714 109 5702 2895.428571 2806.571429 110 1932 1974.711111 -42.711111 111 936 1974.711111 -1038.711111 112 3437 2895.428571 541.571429 113 5131 2895.428571 2235.571429 114 2397 1221.285714 1175.714286 115 1389 648.731707 740.268293 116 1503 2895.428571 -1392.428571 117 402 648.731707 -246.731707 118 2239 1950.714286 288.285714 119 2234 1221.285714 1012.714286 120 837 1974.711111 -1137.711111 121 10579 6579.875000 3999.125000 122 875 648.731707 226.268293 123 1585 6579.875000 -4994.875000 124 1659 1974.711111 -315.711111 125 2647 648.731707 1998.268293 126 3294 1974.711111 1319.288889 127 0 1.025862 -1.025862 128 94 81.307692 12.692308 129 422 1974.711111 -1552.711111 130 0 1.025862 -1.025862 131 34 188.250000 -154.250000 132 1558 1974.711111 -416.711111 133 0 1.025862 -1.025862 134 43 1974.711111 -1931.711111 135 645 210.518519 434.481481 136 316 210.518519 105.481481 137 115 648.731707 -533.731707 138 5 75.555556 -70.555556 139 897 210.518519 686.481481 140 0 1.025862 -1.025862 141 389 648.731707 -259.731707 142 0 1.025862 -1.025862 143 1002 462.708333 539.291667 144 36 210.518519 -174.518519 145 460 648.731707 -188.731707 146 309 188.250000 120.750000 147 0 1.025862 -1.025862 148 9 81.307692 -72.307692 149 271 75.555556 195.444444 150 14 1.025862 12.974138 151 520 462.708333 57.291667 152 1766 2895.428571 -1129.428571 153 0 210.518519 -210.518519 154 458 462.708333 -4.708333 155 20 75.555556 -55.555556 156 0 1.025862 -1.025862 157 0 1.025862 -1.025862 158 98 75.555556 22.444444 159 405 210.518519 194.481481 160 0 1.025862 -1.025862 161 0 1.025862 -1.025862 162 0 1.025862 -1.025862 163 0 1.025862 -1.025862 164 483 462.708333 20.291667 165 454 1974.711111 -1520.711111 166 47 75.555556 -28.555556 167 0 1.025862 -1.025862 168 757 648.731707 108.268293 169 4655 2895.428571 1759.571429 170 0 1.025862 -1.025862 171 0 1.025862 -1.025862 172 36 210.518519 -174.518519 173 0 1.025862 -1.025862 174 203 81.307692 121.692308 175 0 1.025862 -1.025862 176 126 81.307692 44.692308 177 400 6579.875000 -6179.875000 178 71 1.025862 69.974138 179 0 1.025862 -1.025862 180 0 1.025862 -1.025862 181 972 648.731707 323.268293 182 531 648.731707 -117.731707 183 2461 1974.711111 486.288889 184 378 462.708333 -84.708333 185 23 210.518519 -187.518519 186 638 648.731707 -10.731707 187 2300 1974.711111 325.288889 188 149 334.142857 -185.142857 189 226 210.518519 15.481481 190 0 1.025862 -1.025862 191 275 648.731707 -373.731707 192 0 1.025862 -1.025862 193 141 81.307692 59.692308 194 0 1.025862 -1.025862 195 28 210.518519 -182.518519 196 0 1.025862 -1.025862 197 4980 6579.875000 -1599.875000 198 0 1.025862 -1.025862 199 0 1.025862 -1.025862 200 472 1221.285714 -749.285714 201 0 1.025862 -1.025862 202 0 1.025862 -1.025862 203 0 1.025862 -1.025862 204 203 462.708333 -259.708333 205 496 648.731707 -152.731707 206 10 210.518519 -200.518519 207 63 75.555556 -12.555556 208 0 1.025862 -1.025862 209 1136 1974.711111 -838.711111 210 265 210.518519 54.481481 211 0 1.025862 -1.025862 212 0 1.025862 -1.025862 213 267 648.731707 -381.731707 214 474 1221.285714 -747.285714 215 534 210.518519 323.481481 216 0 75.555556 -75.555556 217 15 81.307692 -66.307692 218 397 188.250000 208.750000 219 0 75.555556 -75.555556 220 1866 1974.711111 -108.711111 221 288 210.518519 77.481481 222 0 1.025862 -1.025862 223 3 75.555556 -72.555556 224 468 1974.711111 -1506.711111 225 20 75.555556 -55.555556 226 278 1974.711111 -1696.711111 227 61 81.307692 -20.307692 228 0 1.025862 -1.025862 229 192 75.555556 116.444444 230 0 1.025862 -1.025862 231 317 462.708333 -145.708333 232 738 648.731707 89.268293 233 0 1.025862 -1.025862 234 368 462.708333 -94.708333 235 0 1.025862 -1.025862 236 2 1.025862 0.974138 237 0 1.025862 -1.025862 238 53 188.250000 -135.250000 239 0 1.025862 -1.025862 240 0 1.025862 -1.025862 241 0 1.025862 -1.025862 242 94 210.518519 -116.518519 243 0 1.025862 -1.025862 244 24 188.250000 -164.250000 245 2332 984.428571 1347.571429 246 0 1.025862 -1.025862 247 0 1.025862 -1.025862 248 131 462.708333 -331.708333 249 0 1.025862 -1.025862 250 0 1.025862 -1.025862 251 206 462.708333 -256.708333 252 0 1.025862 -1.025862 253 167 75.555556 91.444444 254 622 2895.428571 -2273.428571 255 2328 6579.875000 -4251.875000 256 0 1.025862 -1.025862 257 365 462.708333 -97.708333 258 364 1974.711111 -1610.711111 259 0 1.025862 -1.025862 260 0 1.025862 -1.025862 261 0 1.025862 -1.025862 262 0 1.025862 -1.025862 263 226 648.731707 -422.731707 264 307 648.731707 -341.731707 265 0 1.025862 -1.025862 266 0 1.025862 -1.025862 267 0 1.025862 -1.025862 268 188 648.731707 -460.731707 269 0 1.025862 -1.025862 270 138 1974.711111 -1836.711111 271 0 1.025862 -1.025862 272 0 1.025862 -1.025862 273 0 1.025862 -1.025862 274 125 81.307692 43.692308 275 0 1.025862 -1.025862 276 282 648.731707 -366.731707 277 335 1974.711111 -1639.711111 278 0 1.025862 -1.025862 279 1324 1974.711111 -650.711111 280 176 334.142857 -158.142857 281 0 1.025862 -1.025862 282 0 1.025862 -1.025862 283 249 1974.711111 -1725.711111 284 0 1.025862 -1.025862 285 333 648.731707 -315.731707 286 0 1.025862 -1.025862 287 601 210.518519 390.481481 288 30 210.518519 -180.518519 289 0 1.025862 -1.025862 290 249 462.708333 -213.708333 291 0 1.025862 -1.025862 292 165 648.731707 -483.731707 293 453 648.731707 -195.731707 294 0 1.025862 -1.025862 295 53 462.708333 -409.708333 296 382 648.731707 -266.731707 297 0 1.025862 -1.025862 298 0 1.025862 -1.025862 299 0 1.025862 -1.025862 300 0 81.307692 -81.307692 301 30 210.518519 -180.518519 302 290 75.555556 214.444444 303 0 75.555556 -75.555556 304 0 1.025862 -1.025862 305 366 648.731707 -282.731707 306 2 81.307692 -79.307692 307 0 1.025862 -1.025862 308 209 334.142857 -125.142857 309 384 188.250000 195.750000 310 0 1.025862 -1.025862 311 0 1.025862 -1.025862 312 365 2895.428571 -2530.428571 313 0 1.025862 -1.025862 314 49 648.731707 -599.731707 315 3 81.307692 -78.307692 316 133 984.428571 -851.428571 317 32 1.025862 30.974138 318 368 1974.711111 -1606.711111 319 1 210.518519 -209.518519 320 0 1.025862 -1.025862 321 0 1.025862 -1.025862 322 0 1.025862 -1.025862 323 0 1.025862 -1.025862 324 0 1.025862 -1.025862 325 0 1.025862 -1.025862 326 22 75.555556 -53.555556 327 0 1.025862 -1.025862 328 0 1.025862 -1.025862 329 0 1.025862 -1.025862 330 0 1.025862 -1.025862 331 0 1.025862 -1.025862 332 0 1.025862 -1.025862 333 0 1.025862 -1.025862 334 96 210.518519 -114.518519 335 1 75.555556 -74.555556 336 314 210.518519 103.481481 337 844 1974.711111 -1130.711111 338 0 1.025862 -1.025862 339 26 75.555556 -49.555556 340 125 188.250000 -63.250000 341 304 462.708333 -158.708333 342 0 1.025862 -1.025862 343 0 1.025862 -1.025862 344 0 1.025862 -1.025862 345 621 462.708333 158.291667 346 0 1.025862 -1.025862 347 119 210.518519 -91.518519 348 0 1.025862 -1.025862 349 0 1.025862 -1.025862 350 1595 648.731707 946.268293 351 312 210.518519 101.481481 352 60 81.307692 -21.307692 353 587 648.731707 -61.731707 354 135 75.555556 59.444444 355 0 1.025862 -1.025862 356 0 1.025862 -1.025862 357 514 648.731707 -134.731707 358 0 1.025862 -1.025862 359 0 1.025862 -1.025862 360 0 1.025862 -1.025862 361 1 210.518519 -209.518519 362 0 1.025862 -1.025862 363 0 1.025862 -1.025862 364 1763 1974.711111 -211.711111 365 180 188.250000 -8.250000 366 0 1.025862 -1.025862 367 0 1.025862 -1.025862 368 0 1.025862 -1.025862 369 0 1.025862 -1.025862 370 218 81.307692 136.692308 371 0 1.025862 -1.025862 372 448 648.731707 -200.731707 373 227 648.731707 -421.731707 374 174 210.518519 -36.518519 375 0 1.025862 -1.025862 376 0 1.025862 -1.025862 377 121 462.708333 -341.708333 378 607 648.731707 -41.731707 379 2212 648.731707 1563.268293 380 0 1.025862 -1.025862 381 0 1.025862 -1.025862 382 530 334.142857 195.857143 383 571 1221.285714 -650.285714 384 0 1.025862 -1.025862 385 78 334.142857 -256.142857 386 2489 1974.711111 514.288889 387 131 210.518519 -79.518519 388 923 462.708333 460.291667 389 72 210.518519 -138.518519 390 572 462.708333 109.291667 391 397 648.731707 -251.731707 392 450 462.708333 -12.708333 393 622 1221.285714 -599.285714 394 694 648.731707 45.268293 395 3425 1221.285714 2203.714286 396 562 1221.285714 -659.285714 397 4917 1974.711111 2942.288889 398 1442 27826.000000 -26384.000000 399 529 462.708333 66.291667 400 2126 2895.428571 -769.428571 401 1061 984.428571 76.571429 402 776 648.731707 127.268293 403 611 462.708333 148.291667 404 1526 1974.711111 -448.711111 405 592 1221.285714 -629.285714 406 1182 648.731707 533.268293 407 621 334.142857 286.857143 408 989 462.708333 526.291667 409 438 462.708333 -24.708333 410 726 984.428571 -258.428571 411 1303 6579.875000 -5276.875000 412 7419 1974.711111 5444.288889 413 1164 1221.285714 -57.285714 414 3310 5195.714286 -1885.714286 415 1920 1221.285714 698.714286 416 965 984.428571 -19.428571 417 3256 1974.711111 1281.288889 418 1135 1974.711111 -839.711111 419 1270 1974.711111 -704.711111 420 661 984.428571 -323.428571 421 1013 984.428571 28.571429 422 2844 6579.875000 -3735.875000 423 11528 6579.875000 4948.125000 424 6526 1974.711111 4551.288889 425 2264 1974.711111 289.288889 426 5109 6579.875000 -1470.875000 427 3999 1974.711111 2024.288889 428 35624 27826.000000 7798.000000 429 9252 2895.428571 6356.571429 430 15236 6579.875000 8656.125000 431 18073 6579.875000 11493.125000 > 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/4qfsa1292962104.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/5uxqg1292962104.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/6xg741292962104.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/7iy5a1292962104.tab") + } > > try(system("convert tmp/2yob81292962104.ps tmp/2yob81292962104.png",intern=TRUE)) character(0) > try(system("convert tmp/3yob81292962104.ps tmp/3yob81292962104.png",intern=TRUE)) character(0) > try(system("convert tmp/4qfsa1292962104.ps tmp/4qfsa1292962104.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 11.036 0.973 12.064