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(1 + ,1081 + ,213118 + ,6282929 + ,1 + ,309 + ,81767 + ,4324047 + ,1 + ,458 + ,153198 + ,4108272 + ,0 + ,588 + ,-26007 + ,-1212617 + ,1 + ,299 + ,126942 + ,1485329 + ,1 + ,156 + ,157214 + ,1779876 + ,0 + ,481 + ,129352 + ,1367203 + ,1 + ,323 + ,234817 + ,2519076 + ,1 + ,452 + ,60448 + ,912684 + ,1 + ,109 + ,47818 + ,1443586 + ,0 + ,115 + ,245546 + ,1220017 + ,0 + ,110 + ,48020 + ,984885 + ,1 + ,239 + ,-1710 + ,1457425 + ,0 + ,247 + ,32648 + ,-572920 + ,1 + ,497 + ,95350 + ,929144 + ,0 + ,103 + ,151352 + ,1151176 + ,0 + ,109 + ,288170 + ,790090 + ,1 + ,502 + ,114337 + ,774497 + ,1 + ,248 + ,37884 + ,990576 + ,0 + ,373 + ,122844 + ,454195 + ,1 + ,119 + ,82340 + ,876607 + ,1 + ,84 + ,79801 + ,711969 + ,0 + ,102 + ,165548 + ,702380 + ,0 + ,295 + ,116384 + ,264449 + ,0 + ,105 + ,134028 + ,450033 + ,0 + ,64 + ,63838 + ,541063 + ,1 + ,267 + ,74996 + ,588864 + ,0 + ,129 + ,31080 + ,-37216 + ,0 + ,37 + ,32168 + ,783310 + ,0 + ,361 + ,49857 + ,467359 + ,1 + ,28 + ,87161 + ,688779 + ,1 + ,85 + ,106113 + ,608419 + ,1 + ,44 + ,80570 + ,696348 + ,1 + ,49 + ,102129 + ,597793 + ,0 + ,22 + ,301670 + ,821730 + ,0 + ,155 + ,102313 + ,377934 + ,0 + ,91 + ,88577 + ,651939 + ,1 + ,81 + ,112477 + ,697458 + ,1 + ,79 + ,191778 + ,700368 + ,0 + ,145 + ,79804 + ,225986 + ,0 + ,816 + ,128294 + ,348695 + ,0 + ,61 + ,96448 + ,373683 + ,0 + ,226 + ,93811 + ,501709 + ,0 + ,105 + ,117520 + ,413743 + ,0 + ,62 + ,69159 + ,379825 + ,1 + ,24 + ,101792 + ,336260 + ,1 + ,26 + ,210568 + ,636765 + ,1 + ,322 + ,136996 + ,481231 + ,0 + ,84 + ,121920 + ,469107 + ,0 + ,33 + ,76403 + ,211928 + ,1 + ,108 + ,108094 + ,563925 + ,1 + ,150 + ,134759 + ,511939 + ,1 + ,115 + ,188873 + ,521016 + ,1 + ,162 + ,146216 + ,543856 + ,1 + ,158 + ,156608 + ,329304 + ,0 + ,97 + ,61348 + ,423262 + ,0 + ,9 + ,50350 + ,509665 + ,0 + ,66 + ,87720 + ,455881 + ,0 + ,107 + ,99489 + ,367772 + ,1 + ,101 + ,87419 + ,406339 + ,1 + ,47 + ,94355 + ,493408 + ,0 + ,38 + ,60326 + ,232942 + ,1 + ,34 + ,94670 + ,416002 + ,1 + ,84 + ,82425 + ,337430 + ,0 + ,79 + ,59017 + ,361517 + ,0 + ,947 + ,90829 + ,360962 + ,0 + ,74 + ,80791 + ,235561 + ,1 + ,53 + ,100423 + ,408247 + ,0 + ,94 + ,131116 + ,450296 + ,1 + ,63 + ,100269 + ,418799 + ,1 + ,58 + ,27330 + ,247405 + ,0 + ,49 + ,39039 + ,378519 + ,0 + ,34 + ,106885 + ,326638 + ,0 + ,11 + ,79285 + ,328233 + ,0 + ,35 + ,118881 + ,386225 + ,1 + ,17 + ,77623 + ,283662 + ,0 + ,47 + ,114768 + ,370225 + ,0 + ,43 + ,74015 + ,269236 + ,0 + ,117 + ,69465 + ,365732 + ,1 + ,171 + ,117869 + ,420383 + ,0 + ,26 + ,60982 + ,345811 + ,1 + ,73 + ,90131 + ,431809 + ,0 + ,59 + ,138971 + ,418876 + ,0 + ,18 + ,39625 + ,297476 + ,0 + ,15 + ,102725 + ,416776 + ,1 + ,72 + ,64239 + ,357257 + ,0 + ,86 + ,90262 + ,458343 + ,0 + ,14 + ,103960 + ,388386 + ,0 + ,64 + ,106611 + ,358934 + ,0 + ,11 + ,103345 + ,407560 + ,0 + ,52 + ,95551 + ,392558 + ,1 + ,41 + ,82903 + ,373177 + ,0 + ,99 + ,63593 + ,428370 + ,1 + ,75 + ,126910 + ,369419 + ,0 + ,45 + ,37527 + ,358649 + ,1 + ,43 + ,60247 + ,376641 + ,0 + ,8 + ,112995 + ,467427 + ,1 + ,198 + ,70184 + ,364885 + ,0 + ,22 + ,130140 + ,436230 + ,1 + ,11 + ,73221 + ,329118 + ,1 + ,33 + ,76114 + ,317365 + ,0 + ,23 + ,90534 + ,286849 + ,0 + ,80 + ,108479 + ,376685 + ,0 + ,18 + ,113761 + ,407198 + ,0 + ,28 + ,68696 + ,377772 + ,0 + ,23 + ,71561 + ,271483 + ,1 + ,60 + ,59831 + ,153661 + ,1 + ,20 + ,97890 + ,513294 + ,0 + ,59 + ,101481 + ,324881 + ,1 + ,36 + ,72954 + ,264512 + ,0 + ,30 + ,67939 + ,420968 + ,1 + ,47 + ,48022 + ,129302 + ,0 + ,71 + ,86111 + ,191521 + ,1 + ,14 + ,74020 + ,268673 + ,1 + ,9 + ,57530 + ,353179 + ,0 + ,39 + ,56364 + ,354624 + ,0 + ,26 + ,84990 + ,363713 + ,0 + ,21 + ,88590 + ,456657 + ,1 + ,16 + ,77200 + ,211742 + ,0 + ,69 + ,61262 + ,338381 + ,0 + ,92 + ,110309 + ,418530 + ,0 + ,14 + ,67000 + ,351483 + ,0 + ,103 + ,93099 + ,372928 + ,1 + ,29 + ,107577 + ,485538 + ,1 + ,37 + ,62920 + ,279268 + ,1 + ,23 + ,75832 + ,219060 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,7 + ,60793 + ,325314 + ,0 + ,28 + ,57935 + ,322046 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,8 + ,60630 + ,325599 + ,0 + ,63 + ,55637 + ,377028 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,3 + ,60887 + ,323850 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,9 + ,60505 + ,331514 + ,0 + ,13 + ,60945 + ,325632 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,14 + ,58990 + ,322265 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,15 + ,56750 + ,325906 + ,0 + ,3 + ,60894 + ,325985 + ,0 + ,15 + ,63346 + ,346145 + ,0 + ,11 + ,56535 + ,325898 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,6 + ,60835 + ,325356 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,1 + ,61016 + ,325930 + ,0 + ,10 + ,58650 + ,318020 + ,0 + ,73 + ,60438 + ,326389 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,11 + ,58625 + ,302925 + ,0 + ,3 + ,60938 + ,325540 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,2 + ,61490 + ,326736 + ,0 + ,7 + ,60845 + ,340580 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,27 + ,60830 + ,331828 + ,0 + ,51 + ,63261 + ,323299 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,19 + ,45689 + ,387722 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,4 + ,61564 + ,324598 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,9 + ,61938 + ,328726 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,8 + ,60951 + ,325043 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,1 + ,60745 + ,325806 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,34 + ,71642 + ,387732 + ,1 + ,10 + ,71641 + ,349729 + ,0 + ,38 + ,55792 + ,332202 + ,1 + ,10 + ,71873 + ,305442 + ,1 + ,5 + ,62555 + ,329537 + ,1 + ,14 + ,60370 + ,327055 + ,1 + ,16 + ,64873 + ,356245 + ,0 + ,5 + ,62041 + ,328451 + ,0 + ,5 + ,65745 + ,307062 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,4 + ,59500 + ,331345 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,6 + ,61630 + ,331824 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,2 + ,60890 + ,325685 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,80 + ,113521 + ,404480 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,20 + ,80045 + ,318314 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,27 + ,50804 + ,311807 + ,1 + ,17 + ,87390 + ,337724 + ,1 + ,2 + ,61656 + ,326431 + ,1 + ,4 + ,65688 + ,327556 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,32 + ,48522 + ,356850 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,32 + ,57640 + ,322741 + ,0 + ,20 + ,61977 + ,310902 + ,0 + ,7 + ,62620 + ,324295 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,8 + ,60831 + ,326156 + ,0 + ,28 + ,60646 + ,326960 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,20 + ,56225 + ,333411 + ,0 + ,4 + ,60510 + ,297761 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,2 + ,60698 + ,325536 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,2 + ,60805 + ,325762 + ,0 + ,26 + ,61404 + ,327957 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,4 + ,65276 + ,318521 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,9 + ,63915 + ,319775 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,17 + ,61686 + ,332128 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,1 + ,60743 + ,325486 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,6 + ,60349 + ,325838 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,3 + ,61360 + ,331767 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,8 + ,59818 + ,324523 + ,0 + ,4 + ,72680 + ,339995 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,11 + ,61808 + ,319582 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,9 + ,53110 + ,307245 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,2 + ,64245 + ,317967 + ,0 + ,73 + ,73007 + ,331488 + ,0 + ,85 + ,82732 + ,335452 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,8 + ,54820 + ,334184 + ,0 + ,35 + ,47705 + ,313213 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,12 + ,72835 + ,348678 + ,0 + ,15 + ,58856 + ,328727 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,11 + ,77655 + ,387978 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,6 + ,69817 + ,336704 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,12 + ,60798 + ,322076 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,30 + ,62452 + ,334272 + ,0 + ,33 + ,64175 + ,338197 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,82 + ,67440 + ,321024 + ,0 + ,28 + ,68136 + ,322145 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,72 + ,56726 + ,323351 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,13 + ,70811 + ,327748 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,4 + ,62045 + ,328157 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,62 + ,54323 + ,311594 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,24 + ,62841 + ,335962 + ,0 + ,21 + ,81125 + ,372426 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,14 + ,59506 + ,319844 + ,1 + ,21 + ,59365 + ,355822 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,4 + ,60798 + ,324047 + ,0 + ,2 + ,58790 + ,311464 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,53 + ,61808 + ,353417 + ,0 + ,9 + ,60735 + ,325590 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,13 + ,64016 + ,328576 + ,0 + ,22 + ,54683 + ,326126 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,83 + ,87192 + ,369376 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,8 + ,64107 + ,332013 + ,0 + ,4 + ,60761 + ,325871 + ,0 + ,14 + ,65990 + ,342165 + ,0 + ,1 + ,59988 + ,324967 + ,0 + ,17 + ,61167 + ,314832 + ,0 + ,6 + ,60719 + ,325557 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,2 + ,60722 + ,322649 + ,1 + ,0 + ,60720 + ,325560 + ,1 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,5 + ,60379 + ,324598 + ,0 + ,2 + ,60727 + ,325567 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,7 + ,60925 + ,324005 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,1 + ,60896 + ,325748 + ,0 + ,13 + ,59734 + ,323385 + ,0 + ,15 + ,62969 + ,315409 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,6 + ,59118 + ,312275 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,14 + ,58598 + ,320576 + ,0 + ,10 + ,61124 + ,325246 + ,0 + ,12 + ,59595 + ,332961 + ,0 + ,2 + ,62065 + ,323010 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,52 + ,78780 + ,345253 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,4 + ,60722 + ,325559 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,1 + ,3 + ,61600 + ,319634 + ,0 + ,11 + ,59635 + ,319951 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,40 + ,59781 + ,318519 + ,0 + ,9 + ,76644 + ,343222 + ,0 + ,1 + ,64820 + ,317234 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,24 + ,56178 + ,314025 + ,0 + ,11 + ,60436 + ,320249 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,60 + ,73433 + ,349365 + ,0 + ,80 + ,41477 + ,289197 + ,0 + ,0 + ,60720 + ,325560 + ,0 + ,16 + ,62700 + ,329245 + ,0 + ,40 + ,67804 + ,240869 + ,0 + ,6 + ,59661 + ,327182 + ,0 + ,8 + ,58620 + ,322876 + ,0 + ,3 + ,60398 + ,323117 + ,0 + ,16 + ,58580 + ,306351 + ,0 + ,10 + ,62710 + ,335137 + ,0 + ,8 + ,59325 + ,308271 + ,0 + ,7 + ,60950 + ,301731 + ,0 + ,8 + ,68060 + ,382409 + ,1 + ,12 + ,83620 + ,279230 + ,0 + ,13 + ,58456 + ,298731 + ,0 + ,42 + ,52811 + ,243650 + ,1 + ,118 + ,121173 + ,532682 + ,0 + ,9 + ,63870 + ,319771 + ,1 + ,138 + ,21001 + ,171493 + ,0 + ,5 + ,70415 + ,347262 + ,0 + ,9 + ,64230 + ,343945 + ,0 + ,8 + ,59190 + ,311874 + ,1 + ,25 + ,69351 + ,302211 + ,0 + ,7 + ,64270 + ,316708 + ,0 + ,13 + ,70694 + ,333463 + ,0 + ,16 + ,68005 + ,344282 + ,0 + ,11 + ,58930 + ,319635 + ,0 + ,11 + ,58320 + ,301186 + ,0 + ,3 + ,69980 + ,300381 + ,0 + ,61 + ,69863 + ,318765 + ,1 + ,24 + ,63255 + ,286146 + ,1 + ,17 + ,57320 + ,306844 + ,1 + ,33 + ,75230 + ,307705 + ,0 + ,7 + ,79420 + ,312448 + ,0 + ,3 + ,73490 + ,299715 + ,0 + ,66 + ,35250 + ,373399 + ,1 + ,17 + ,62285 + ,299446 + ,0 + ,26 + ,69206 + ,325586 + ,0 + ,3 + ,65920 + ,291221 + ,0 + ,2 + ,69770 + ,261173 + ,0 + ,67 + ,72683 + ,255027 + ,1 + ,70 + ,-14545 + ,-78375 + ,0 + ,26 + ,55830 + ,-58143 + ,0 + ,24 + ,55174 + ,227033 + ,1 + ,94 + ,67038 + ,235098 + ,0 + ,30 + ,51252 + ,21267 + ,0 + ,223 + ,157278 + ,238675 + ,0 + ,48 + ,79510 + ,197687 + ,0 + ,90 + ,77440 + ,418341 + ,0 + ,180 + ,27284 + ,-297706) + ,dim=c(4 + ,431) + ,dimnames=list(c('Group' + ,'Trades' + ,'Dividends' + ,'Wealth ') + ,1:431)) > y <- array(NA,dim=c(4,431),dimnames=list(c('Group','Trades','Dividends','Wealth '),1:431)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par4 = 'no' > par3 = '3' > par2 = 'none' > par1 = '4' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: > #Technical description: > library(party) Loading required package: survival Loading required package: splines Loading required package: grid Loading required package: modeltools Loading required package: stats4 Loading required package: coin Loading required package: mvtnorm Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric Loading required package: sandwich Loading required package: strucchange Loading required package: vcd Loading required package: MASS Loading required package: colorspace > library(Hmisc) Attaching package: 'Hmisc' The following object(s) are masked from package:survival : untangle.specials The following object(s) are masked from package:base : format.pval, round.POSIXt, trunc.POSIXt, units > par1 <- as.numeric(par1) > par3 <- as.numeric(par3) > x <- data.frame(t(y)) > is.data.frame(x) [1] TRUE > x <- x[!is.na(x[,par1]),] > k <- length(x[1,]) > n <- length(x[,1]) > colnames(x)[par1] [1] "Wealth." > x[,par1] [1] 6282929 4324047 4108272 -1212617 1485329 1779876 1367203 2519076 [9] 912684 1443586 1220017 984885 1457425 -572920 929144 1151176 [17] 790090 774497 990576 454195 876607 711969 702380 264449 [25] 450033 541063 588864 -37216 783310 467359 688779 608419 [33] 696348 597793 821730 377934 651939 697458 700368 225986 [41] 348695 373683 501709 413743 379825 336260 636765 481231 [49] 469107 211928 563925 511939 521016 543856 329304 423262 [57] 509665 455881 367772 406339 493408 232942 416002 337430 [65] 361517 360962 235561 408247 450296 418799 247405 378519 [73] 326638 328233 386225 283662 370225 269236 365732 420383 [81] 345811 431809 418876 297476 416776 357257 458343 388386 [89] 358934 407560 392558 373177 428370 369419 358649 376641 [97] 467427 364885 436230 329118 317365 286849 376685 407198 [105] 377772 271483 153661 513294 324881 264512 420968 129302 [113] 191521 268673 353179 354624 363713 456657 211742 338381 [121] 418530 351483 372928 485538 279268 219060 325560 325314 [129] 322046 325560 325599 377028 325560 323850 325560 331514 [137] 325632 325560 325560 325560 322265 325560 325906 325985 [145] 346145 325898 325560 325356 325560 325930 318020 326389 [153] 325560 302925 325540 325560 325560 326736 340580 325560 [161] 325560 325560 325560 331828 323299 325560 325560 387722 [169] 325560 325560 325560 324598 325560 328726 325560 325043 [177] 325560 325806 325560 325560 387732 349729 332202 305442 [185] 329537 327055 356245 328451 307062 325560 331345 325560 [193] 331824 325560 325685 325560 404480 325560 325560 318314 [201] 325560 325560 325560 311807 337724 326431 327556 325560 [209] 356850 325560 325560 325560 322741 310902 324295 325560 [217] 326156 326960 325560 333411 297761 325560 325536 325560 [225] 325762 327957 325560 325560 318521 325560 319775 325560 [233] 325560 332128 325560 325486 325560 325838 325560 325560 [241] 325560 331767 325560 324523 339995 325560 325560 319582 [249] 325560 325560 307245 325560 317967 331488 335452 325560 [257] 334184 313213 325560 325560 325560 325560 348678 328727 [265] 325560 325560 325560 387978 325560 336704 325560 325560 [273] 325560 322076 325560 334272 338197 325560 321024 322145 [281] 325560 325560 323351 325560 327748 325560 325560 328157 [289] 325560 311594 325560 335962 372426 325560 319844 355822 [297] 325560 325560 325560 325560 324047 311464 325560 325560 [305] 353417 325590 325560 328576 326126 325560 325560 369376 [313] 325560 332013 325871 342165 324967 314832 325557 325560 [321] 325560 325560 325560 325560 325560 322649 325560 325560 [329] 325560 325560 325560 325560 325560 324598 325567 325560 [337] 324005 325560 325748 323385 315409 325560 325560 325560 [345] 325560 325560 312275 325560 325560 325560 320576 325246 [353] 332961 323010 325560 325560 345253 325560 325560 325560 [361] 325559 325560 325560 319634 319951 325560 325560 325560 [369] 325560 325560 325560 318519 343222 317234 325560 325560 [377] 314025 320249 325560 325560 325560 349365 289197 325560 [385] 329245 240869 327182 322876 323117 306351 335137 308271 [393] 301731 382409 279230 298731 243650 532682 319771 171493 [401] 347262 343945 311874 302211 316708 333463 344282 319635 [409] 301186 300381 318765 286146 306844 307705 312448 299715 [417] 373399 299446 325586 291221 261173 255027 -78375 -58143 [425] 227033 235098 21267 238675 197687 418341 -297706 > 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]) -1212617 -572920 -297706 -78375 -58143 -37216 21267 129302 1 1 1 1 1 1 1 1 153661 171493 191521 197687 211742 211928 219060 225986 1 1 1 1 1 1 1 1 227033 232942 235098 235561 238675 240869 243650 247405 1 1 1 1 1 1 1 1 255027 261173 264449 264512 268673 269236 271483 279230 1 1 1 1 1 1 1 1 279268 283662 286146 286849 289197 291221 297476 297761 1 1 1 1 1 1 1 1 298731 299446 299715 300381 301186 301731 302211 302925 1 1 1 1 1 1 1 1 305442 306351 306844 307062 307245 307705 308271 310902 1 1 1 1 1 1 1 1 311464 311594 311807 311874 312275 312448 313213 314025 1 1 1 1 1 1 1 1 314832 315409 316708 317234 317365 317967 318020 318314 1 1 1 1 1 1 1 1 318519 318521 318765 319582 319634 319635 319771 319775 1 1 1 1 1 1 1 1 319844 319951 320249 320576 321024 322046 322076 322145 1 1 1 1 1 1 1 1 322265 322649 322741 322876 323010 323117 323299 323351 1 1 1 1 1 1 1 1 323385 323850 324005 324047 324295 324523 324598 324881 1 1 1 1 1 1 2 1 324967 325043 325246 325314 325356 325486 325536 325540 1 1 1 1 1 1 1 1 325557 325559 325560 325567 325586 325590 325599 325632 1 1 134 1 1 1 1 1 325685 325748 325762 325806 325838 325871 325898 325906 1 1 1 1 1 1 1 1 325930 325985 326126 326156 326389 326431 326638 326736 1 1 1 1 1 1 1 1 326960 327055 327182 327556 327748 327957 328157 328233 1 1 1 1 1 1 1 1 328451 328576 328726 328727 329118 329245 329304 329537 1 1 1 1 1 1 1 1 331345 331488 331514 331767 331824 331828 332013 332128 1 1 1 1 1 1 1 1 332202 332961 333411 333463 334184 334272 335137 335452 1 1 1 1 1 1 1 1 335962 336260 336704 337430 337724 338197 338381 339995 1 1 1 1 1 1 1 1 340580 342165 343222 343945 344282 345253 345811 346145 1 1 1 1 1 1 1 1 347262 348678 348695 349365 349729 351483 353179 353417 1 1 1 1 1 1 1 1 354624 355822 356245 356850 357257 358649 358934 360962 1 1 1 1 1 1 1 1 361517 363713 364885 365732 367772 369376 369419 370225 1 1 1 1 1 1 1 1 372426 372928 373177 373399 373683 376641 376685 377028 1 1 1 1 1 1 1 1 377772 377934 378519 379825 382409 386225 387722 387732 1 1 1 1 1 1 1 1 387978 388386 392558 404480 406339 407198 407560 408247 1 1 1 1 1 1 1 1 413743 416002 416776 418341 418530 418799 418876 420383 1 1 1 1 1 1 1 1 420968 423262 428370 431809 436230 450033 450296 454195 1 1 1 1 1 1 1 1 455881 456657 458343 467359 467427 469107 481231 485538 1 1 1 1 1 1 1 1 493408 501709 509665 511939 513294 521016 532682 541063 1 1 1 1 1 1 1 1 543856 563925 588864 597793 608419 636765 651939 688779 1 1 1 1 1 1 1 1 696348 697458 700368 702380 711969 774497 783310 790090 1 1 1 1 1 1 1 1 821730 876607 912684 929144 984885 990576 1151176 1220017 1 1 1 1 1 1 1 1 1367203 1443586 1457425 1485329 1779876 2519076 4108272 4324047 1 1 1 1 1 1 1 1 6282929 1 > colnames(x) [1] "Group" "Trades" "Dividends" "Wealth." > colnames(x)[par1] [1] "Wealth." > x[,par1] [1] 6282929 4324047 4108272 -1212617 1485329 1779876 1367203 2519076 [9] 912684 1443586 1220017 984885 1457425 -572920 929144 1151176 [17] 790090 774497 990576 454195 876607 711969 702380 264449 [25] 450033 541063 588864 -37216 783310 467359 688779 608419 [33] 696348 597793 821730 377934 651939 697458 700368 225986 [41] 348695 373683 501709 413743 379825 336260 636765 481231 [49] 469107 211928 563925 511939 521016 543856 329304 423262 [57] 509665 455881 367772 406339 493408 232942 416002 337430 [65] 361517 360962 235561 408247 450296 418799 247405 378519 [73] 326638 328233 386225 283662 370225 269236 365732 420383 [81] 345811 431809 418876 297476 416776 357257 458343 388386 [89] 358934 407560 392558 373177 428370 369419 358649 376641 [97] 467427 364885 436230 329118 317365 286849 376685 407198 [105] 377772 271483 153661 513294 324881 264512 420968 129302 [113] 191521 268673 353179 354624 363713 456657 211742 338381 [121] 418530 351483 372928 485538 279268 219060 325560 325314 [129] 322046 325560 325599 377028 325560 323850 325560 331514 [137] 325632 325560 325560 325560 322265 325560 325906 325985 [145] 346145 325898 325560 325356 325560 325930 318020 326389 [153] 325560 302925 325540 325560 325560 326736 340580 325560 [161] 325560 325560 325560 331828 323299 325560 325560 387722 [169] 325560 325560 325560 324598 325560 328726 325560 325043 [177] 325560 325806 325560 325560 387732 349729 332202 305442 [185] 329537 327055 356245 328451 307062 325560 331345 325560 [193] 331824 325560 325685 325560 404480 325560 325560 318314 [201] 325560 325560 325560 311807 337724 326431 327556 325560 [209] 356850 325560 325560 325560 322741 310902 324295 325560 [217] 326156 326960 325560 333411 297761 325560 325536 325560 [225] 325762 327957 325560 325560 318521 325560 319775 325560 [233] 325560 332128 325560 325486 325560 325838 325560 325560 [241] 325560 331767 325560 324523 339995 325560 325560 319582 [249] 325560 325560 307245 325560 317967 331488 335452 325560 [257] 334184 313213 325560 325560 325560 325560 348678 328727 [265] 325560 325560 325560 387978 325560 336704 325560 325560 [273] 325560 322076 325560 334272 338197 325560 321024 322145 [281] 325560 325560 323351 325560 327748 325560 325560 328157 [289] 325560 311594 325560 335962 372426 325560 319844 355822 [297] 325560 325560 325560 325560 324047 311464 325560 325560 [305] 353417 325590 325560 328576 326126 325560 325560 369376 [313] 325560 332013 325871 342165 324967 314832 325557 325560 [321] 325560 325560 325560 325560 325560 322649 325560 325560 [329] 325560 325560 325560 325560 325560 324598 325567 325560 [337] 324005 325560 325748 323385 315409 325560 325560 325560 [345] 325560 325560 312275 325560 325560 325560 320576 325246 [353] 332961 323010 325560 325560 345253 325560 325560 325560 [361] 325559 325560 325560 319634 319951 325560 325560 325560 [369] 325560 325560 325560 318519 343222 317234 325560 325560 [377] 314025 320249 325560 325560 325560 349365 289197 325560 [385] 329245 240869 327182 322876 323117 306351 335137 308271 [393] 301731 382409 279230 298731 243650 532682 319771 171493 [401] 347262 343945 311874 302211 316708 333463 344282 319635 [409] 301186 300381 318765 286146 306844 307705 312448 299715 [417] 373399 299446 325586 291221 261173 255027 -78375 -58143 [425] 227033 235098 21267 238675 197687 418341 -297706 > 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/1h43n1292943568.tab") + } + } > m Conditional inference tree with 7 terminal nodes Response: Wealth. Inputs: Group, Trades, Dividends Number of observations: 431 1) Trades <= 295; criterion = 1, statistic = 114.425 2) Dividends <= 146216; criterion = 1, statistic = 79.663 3) Trades <= 80; criterion = 1, statistic = 24.321 4) Dividends <= 86111; criterion = 1, statistic = 50.246 5) Dividends <= 55830; criterion = 0.951, statistic = 5.735 6)* weights = 24 5) Dividends > 55830 7)* weights = 308 4) Dividends > 86111 8)* weights = 31 3) Trades > 80 9) Group <= 0; criterion = 0.968, statistic = 6.475 10)* weights = 23 9) Group > 0 11)* weights = 19 2) Dividends > 146216 12)* weights = 11 1) Trades > 295 13)* weights = 15 > postscript(file="/var/www/html/rcomp/tmp/2h43n1292943568.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/3h43n1292943568.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 6282929 1573533.7 4.709395e+06 2 4324047 1573533.7 2.750513e+06 3 4108272 1573533.7 2.534738e+06 4 -1212617 1573533.7 -2.786151e+06 5 1485329 1573533.7 -8.820473e+04 6 1779876 808308.8 9.715672e+05 7 1367203 1573533.7 -2.063307e+05 8 2519076 1573533.7 9.455423e+05 9 912684 1573533.7 -6.608497e+05 10 1443586 620208.3 8.233777e+05 11 1220017 808308.8 4.117082e+05 12 984885 340884.6 6.440004e+05 13 1457425 620208.3 8.372167e+05 14 -572920 340884.6 -9.138046e+05 15 929144 1573533.7 -6.443897e+05 16 1151176 808308.8 3.428672e+05 17 790090 808308.8 -1.821882e+04 18 774497 1573533.7 -7.990367e+05 19 990576 620208.3 3.703677e+05 20 454195 1573533.7 -1.119339e+06 21 876607 620208.3 2.563987e+05 22 711969 620208.3 9.176068e+04 23 702380 808308.8 -1.059288e+05 24 264449 340884.6 -7.643557e+04 25 450033 340884.6 1.091484e+05 26 541063 324328.9 2.167341e+05 27 588864 620208.3 -3.134432e+04 28 -37216 340884.6 -3.781006e+05 29 783310 295013.5 4.882965e+05 30 467359 1573533.7 -1.106175e+06 31 688779 417845.8 2.709332e+05 32 608419 620208.3 -1.178932e+04 33 696348 324328.9 3.720191e+05 34 597793 417845.8 1.799472e+05 35 821730 808308.8 1.342118e+04 36 377934 340884.6 3.704943e+04 37 651939 340884.6 3.110544e+05 38 697458 620208.3 7.724968e+04 39 700368 808308.8 -1.079408e+05 40 225986 340884.6 -1.148986e+05 41 348695 1573533.7 -1.224839e+06 42 373683 417845.8 -4.416284e+04 43 501709 340884.6 1.608244e+05 44 413743 340884.6 7.285843e+04 45 379825 324328.9 5.549607e+04 46 336260 417845.8 -8.158584e+04 47 636765 808308.8 -1.715438e+05 48 481231 1573533.7 -1.092303e+06 49 469107 340884.6 1.282224e+05 50 211928 324328.9 -1.124009e+05 51 563925 620208.3 -5.628332e+04 52 511939 620208.3 -1.082693e+05 53 521016 808308.8 -2.872928e+05 54 543856 620208.3 -7.635232e+04 55 329304 808308.8 -4.790048e+05 56 423262 340884.6 8.237743e+04 57 509665 295013.5 2.146515e+05 58 455881 417845.8 3.803516e+04 59 367772 340884.6 2.688743e+04 60 406339 620208.3 -2.138693e+05 61 493408 417845.8 7.556216e+04 62 232942 324328.9 -9.138693e+04 63 416002 417845.8 -1.843839e+03 64 337430 620208.3 -2.827783e+05 65 361517 324328.9 3.718807e+04 66 360962 1573533.7 -1.212572e+06 67 235561 324328.9 -8.876793e+04 68 408247 417845.8 -9.598839e+03 69 450296 340884.6 1.094114e+05 70 418799 417845.8 9.531613e+02 71 247405 295013.5 -4.760854e+04 72 378519 295013.5 8.350546e+04 73 326638 417845.8 -9.120784e+04 74 328233 324328.9 3.904075e+03 75 386225 417845.8 -3.162084e+04 76 283662 324328.9 -4.066693e+04 77 370225 417845.8 -4.762084e+04 78 269236 324328.9 -5.509293e+04 79 365732 340884.6 2.484743e+04 80 420383 620208.3 -1.998253e+05 81 345811 324328.9 2.148207e+04 82 431809 417845.8 1.396316e+04 83 418876 417845.8 1.030161e+03 84 297476 295013.5 2.462458e+03 85 416776 417845.8 -1.069839e+03 86 357257 324328.9 3.292807e+04 87 458343 340884.6 1.174584e+05 88 388386 417845.8 -2.945984e+04 89 358934 417845.8 -5.891184e+04 90 407560 417845.8 -1.028584e+04 91 392558 417845.8 -2.528784e+04 92 373177 324328.9 4.884807e+04 93 428370 340884.6 8.748543e+04 94 369419 417845.8 -4.842684e+04 95 358649 295013.5 6.363546e+04 96 376641 324328.9 5.231207e+04 97 467427 417845.8 4.958116e+04 98 364885 620208.3 -2.553233e+05 99 436230 417845.8 1.838416e+04 100 329118 324328.9 4.789075e+03 101 317365 324328.9 -6.963925e+03 102 286849 417845.8 -1.309968e+05 103 376685 417845.8 -4.116084e+04 104 407198 417845.8 -1.064784e+04 105 377772 324328.9 5.344307e+04 106 271483 324328.9 -5.284593e+04 107 153661 324328.9 -1.706679e+05 108 513294 417845.8 9.544816e+04 109 324881 417845.8 -9.296484e+04 110 264512 324328.9 -5.981693e+04 111 420968 324328.9 9.663907e+04 112 129302 295013.5 -1.657115e+05 113 191521 324328.9 -1.328079e+05 114 268673 324328.9 -5.565593e+04 115 353179 324328.9 2.885007e+04 116 354624 324328.9 3.029507e+04 117 363713 324328.9 3.938407e+04 118 456657 417845.8 3.881116e+04 119 211742 324328.9 -1.125869e+05 120 338381 324328.9 1.405207e+04 121 418530 340884.6 7.764543e+04 122 351483 324328.9 2.715407e+04 123 372928 340884.6 3.204343e+04 124 485538 417845.8 6.769216e+04 125 279268 324328.9 -4.506093e+04 126 219060 324328.9 -1.052689e+05 127 325560 324328.9 1.231075e+03 128 325314 324328.9 9.850747e+02 129 322046 324328.9 -2.282925e+03 130 325560 324328.9 1.231075e+03 131 325599 324328.9 1.270075e+03 132 377028 295013.5 8.201446e+04 133 325560 324328.9 1.231075e+03 134 323850 324328.9 -4.789253e+02 135 325560 324328.9 1.231075e+03 136 331514 324328.9 7.185075e+03 137 325632 324328.9 1.303075e+03 138 325560 324328.9 1.231075e+03 139 325560 324328.9 1.231075e+03 140 325560 324328.9 1.231075e+03 141 322265 324328.9 -2.063925e+03 142 325560 324328.9 1.231075e+03 143 325906 324328.9 1.577075e+03 144 325985 324328.9 1.656075e+03 145 346145 324328.9 2.181607e+04 146 325898 324328.9 1.569075e+03 147 325560 324328.9 1.231075e+03 148 325356 324328.9 1.027075e+03 149 325560 324328.9 1.231075e+03 150 325930 324328.9 1.601075e+03 151 318020 324328.9 -6.308925e+03 152 326389 324328.9 2.060075e+03 153 325560 324328.9 1.231075e+03 154 302925 324328.9 -2.140393e+04 155 325540 324328.9 1.211075e+03 156 325560 324328.9 1.231075e+03 157 325560 324328.9 1.231075e+03 158 326736 324328.9 2.407075e+03 159 340580 324328.9 1.625107e+04 160 325560 324328.9 1.231075e+03 161 325560 324328.9 1.231075e+03 162 325560 324328.9 1.231075e+03 163 325560 324328.9 1.231075e+03 164 331828 324328.9 7.499075e+03 165 323299 324328.9 -1.029925e+03 166 325560 324328.9 1.231075e+03 167 325560 324328.9 1.231075e+03 168 387722 295013.5 9.270846e+04 169 325560 324328.9 1.231075e+03 170 325560 324328.9 1.231075e+03 171 325560 324328.9 1.231075e+03 172 324598 324328.9 2.690747e+02 173 325560 324328.9 1.231075e+03 174 328726 324328.9 4.397075e+03 175 325560 324328.9 1.231075e+03 176 325043 324328.9 7.140747e+02 177 325560 324328.9 1.231075e+03 178 325806 324328.9 1.477075e+03 179 325560 324328.9 1.231075e+03 180 325560 324328.9 1.231075e+03 181 387732 324328.9 6.340307e+04 182 349729 324328.9 2.540007e+04 183 332202 295013.5 3.718846e+04 184 305442 324328.9 -1.888693e+04 185 329537 324328.9 5.208075e+03 186 327055 324328.9 2.726075e+03 187 356245 324328.9 3.191607e+04 188 328451 324328.9 4.122075e+03 189 307062 324328.9 -1.726693e+04 190 325560 324328.9 1.231075e+03 191 331345 324328.9 7.016075e+03 192 325560 324328.9 1.231075e+03 193 331824 324328.9 7.495075e+03 194 325560 324328.9 1.231075e+03 195 325685 324328.9 1.356075e+03 196 325560 324328.9 1.231075e+03 197 404480 417845.8 -1.336584e+04 198 325560 324328.9 1.231075e+03 199 325560 324328.9 1.231075e+03 200 318314 324328.9 -6.014925e+03 201 325560 324328.9 1.231075e+03 202 325560 324328.9 1.231075e+03 203 325560 324328.9 1.231075e+03 204 311807 295013.5 1.679346e+04 205 337724 417845.8 -8.012184e+04 206 326431 324328.9 2.102075e+03 207 327556 324328.9 3.227075e+03 208 325560 324328.9 1.231075e+03 209 356850 295013.5 6.183646e+04 210 325560 324328.9 1.231075e+03 211 325560 324328.9 1.231075e+03 212 325560 324328.9 1.231075e+03 213 322741 324328.9 -1.587925e+03 214 310902 324328.9 -1.342693e+04 215 324295 324328.9 -3.392532e+01 216 325560 324328.9 1.231075e+03 217 326156 324328.9 1.827075e+03 218 326960 324328.9 2.631075e+03 219 325560 324328.9 1.231075e+03 220 333411 324328.9 9.082075e+03 221 297761 324328.9 -2.656793e+04 222 325560 324328.9 1.231075e+03 223 325536 324328.9 1.207075e+03 224 325560 324328.9 1.231075e+03 225 325762 324328.9 1.433075e+03 226 327957 324328.9 3.628075e+03 227 325560 324328.9 1.231075e+03 228 325560 324328.9 1.231075e+03 229 318521 324328.9 -5.807925e+03 230 325560 324328.9 1.231075e+03 231 319775 324328.9 -4.553925e+03 232 325560 324328.9 1.231075e+03 233 325560 324328.9 1.231075e+03 234 332128 324328.9 7.799075e+03 235 325560 324328.9 1.231075e+03 236 325486 324328.9 1.157075e+03 237 325560 324328.9 1.231075e+03 238 325838 324328.9 1.509075e+03 239 325560 324328.9 1.231075e+03 240 325560 324328.9 1.231075e+03 241 325560 324328.9 1.231075e+03 242 331767 324328.9 7.438075e+03 243 325560 324328.9 1.231075e+03 244 324523 324328.9 1.940747e+02 245 339995 324328.9 1.566607e+04 246 325560 324328.9 1.231075e+03 247 325560 324328.9 1.231075e+03 248 319582 324328.9 -4.746925e+03 249 325560 324328.9 1.231075e+03 250 325560 324328.9 1.231075e+03 251 307245 295013.5 1.223146e+04 252 325560 324328.9 1.231075e+03 253 317967 324328.9 -6.361925e+03 254 331488 324328.9 7.159075e+03 255 335452 340884.6 -5.432565e+03 256 325560 324328.9 1.231075e+03 257 334184 295013.5 3.917046e+04 258 313213 295013.5 1.819946e+04 259 325560 324328.9 1.231075e+03 260 325560 324328.9 1.231075e+03 261 325560 324328.9 1.231075e+03 262 325560 324328.9 1.231075e+03 263 348678 324328.9 2.434907e+04 264 328727 324328.9 4.398075e+03 265 325560 324328.9 1.231075e+03 266 325560 324328.9 1.231075e+03 267 325560 324328.9 1.231075e+03 268 387978 324328.9 6.364907e+04 269 325560 324328.9 1.231075e+03 270 336704 324328.9 1.237507e+04 271 325560 324328.9 1.231075e+03 272 325560 324328.9 1.231075e+03 273 325560 324328.9 1.231075e+03 274 322076 324328.9 -2.252925e+03 275 325560 324328.9 1.231075e+03 276 334272 324328.9 9.943075e+03 277 338197 324328.9 1.386807e+04 278 325560 324328.9 1.231075e+03 279 321024 620208.3 -2.991843e+05 280 322145 324328.9 -2.183925e+03 281 325560 324328.9 1.231075e+03 282 325560 324328.9 1.231075e+03 283 323351 324328.9 -9.779253e+02 284 325560 324328.9 1.231075e+03 285 327748 324328.9 3.419075e+03 286 325560 324328.9 1.231075e+03 287 325560 324328.9 1.231075e+03 288 328157 324328.9 3.828075e+03 289 325560 324328.9 1.231075e+03 290 311594 295013.5 1.658046e+04 291 325560 324328.9 1.231075e+03 292 335962 324328.9 1.163307e+04 293 372426 324328.9 4.809707e+04 294 325560 324328.9 1.231075e+03 295 319844 324328.9 -4.484925e+03 296 355822 324328.9 3.149307e+04 297 325560 324328.9 1.231075e+03 298 325560 324328.9 1.231075e+03 299 325560 324328.9 1.231075e+03 300 325560 324328.9 1.231075e+03 301 324047 324328.9 -2.819253e+02 302 311464 324328.9 -1.286493e+04 303 325560 324328.9 1.231075e+03 304 325560 324328.9 1.231075e+03 305 353417 324328.9 2.908807e+04 306 325590 324328.9 1.261075e+03 307 325560 324328.9 1.231075e+03 308 328576 324328.9 4.247075e+03 309 326126 295013.5 3.111246e+04 310 325560 324328.9 1.231075e+03 311 325560 324328.9 1.231075e+03 312 369376 340884.6 2.849143e+04 313 325560 324328.9 1.231075e+03 314 332013 324328.9 7.684075e+03 315 325871 324328.9 1.542075e+03 316 342165 324328.9 1.783607e+04 317 324967 324328.9 6.380747e+02 318 314832 324328.9 -9.496925e+03 319 325557 324328.9 1.228075e+03 320 325560 324328.9 1.231075e+03 321 325560 324328.9 1.231075e+03 322 325560 324328.9 1.231075e+03 323 325560 324328.9 1.231075e+03 324 325560 324328.9 1.231075e+03 325 325560 324328.9 1.231075e+03 326 322649 324328.9 -1.679925e+03 327 325560 324328.9 1.231075e+03 328 325560 324328.9 1.231075e+03 329 325560 324328.9 1.231075e+03 330 325560 324328.9 1.231075e+03 331 325560 324328.9 1.231075e+03 332 325560 324328.9 1.231075e+03 333 325560 324328.9 1.231075e+03 334 324598 324328.9 2.690747e+02 335 325567 324328.9 1.238075e+03 336 325560 324328.9 1.231075e+03 337 324005 324328.9 -3.239253e+02 338 325560 324328.9 1.231075e+03 339 325748 324328.9 1.419075e+03 340 323385 324328.9 -9.439253e+02 341 315409 324328.9 -8.919925e+03 342 325560 324328.9 1.231075e+03 343 325560 324328.9 1.231075e+03 344 325560 324328.9 1.231075e+03 345 325560 324328.9 1.231075e+03 346 325560 324328.9 1.231075e+03 347 312275 324328.9 -1.205393e+04 348 325560 324328.9 1.231075e+03 349 325560 324328.9 1.231075e+03 350 325560 324328.9 1.231075e+03 351 320576 324328.9 -3.752925e+03 352 325246 324328.9 9.170747e+02 353 332961 324328.9 8.632075e+03 354 323010 324328.9 -1.318925e+03 355 325560 324328.9 1.231075e+03 356 325560 324328.9 1.231075e+03 357 345253 324328.9 2.092407e+04 358 325560 324328.9 1.231075e+03 359 325560 324328.9 1.231075e+03 360 325560 324328.9 1.231075e+03 361 325559 324328.9 1.230075e+03 362 325560 324328.9 1.231075e+03 363 325560 324328.9 1.231075e+03 364 319634 324328.9 -4.694925e+03 365 319951 324328.9 -4.377925e+03 366 325560 324328.9 1.231075e+03 367 325560 324328.9 1.231075e+03 368 325560 324328.9 1.231075e+03 369 325560 324328.9 1.231075e+03 370 325560 324328.9 1.231075e+03 371 325560 324328.9 1.231075e+03 372 318519 324328.9 -5.809925e+03 373 343222 324328.9 1.889307e+04 374 317234 324328.9 -7.094925e+03 375 325560 324328.9 1.231075e+03 376 325560 324328.9 1.231075e+03 377 314025 324328.9 -1.030393e+04 378 320249 324328.9 -4.079925e+03 379 325560 324328.9 1.231075e+03 380 325560 324328.9 1.231075e+03 381 325560 324328.9 1.231075e+03 382 349365 324328.9 2.503607e+04 383 289197 295013.5 -5.816542e+03 384 325560 324328.9 1.231075e+03 385 329245 324328.9 4.916075e+03 386 240869 324328.9 -8.345993e+04 387 327182 324328.9 2.853075e+03 388 322876 324328.9 -1.452925e+03 389 323117 324328.9 -1.211925e+03 390 306351 324328.9 -1.797793e+04 391 335137 324328.9 1.080807e+04 392 308271 324328.9 -1.605793e+04 393 301731 324328.9 -2.259793e+04 394 382409 324328.9 5.808007e+04 395 279230 324328.9 -4.509893e+04 396 298731 324328.9 -2.559793e+04 397 243650 295013.5 -5.136354e+04 398 532682 620208.3 -8.752632e+04 399 319771 324328.9 -4.557925e+03 400 171493 620208.3 -4.487153e+05 401 347262 324328.9 2.293307e+04 402 343945 324328.9 1.961607e+04 403 311874 324328.9 -1.245493e+04 404 302211 324328.9 -2.211793e+04 405 316708 324328.9 -7.620925e+03 406 333463 324328.9 9.134075e+03 407 344282 324328.9 1.995307e+04 408 319635 324328.9 -4.693925e+03 409 301186 324328.9 -2.314293e+04 410 300381 324328.9 -2.394793e+04 411 318765 324328.9 -5.563925e+03 412 286146 324328.9 -3.818293e+04 413 306844 324328.9 -1.748493e+04 414 307705 324328.9 -1.662393e+04 415 312448 324328.9 -1.188093e+04 416 299715 324328.9 -2.461393e+04 417 373399 295013.5 7.838546e+04 418 299446 324328.9 -2.488293e+04 419 325586 324328.9 1.257075e+03 420 291221 324328.9 -3.310793e+04 421 261173 324328.9 -6.315593e+04 422 255027 324328.9 -6.930193e+04 423 -78375 295013.5 -3.733885e+05 424 -58143 295013.5 -3.531565e+05 425 227033 295013.5 -6.798054e+04 426 235098 620208.3 -3.851103e+05 427 21267 295013.5 -2.737465e+05 428 238675 808308.8 -5.696338e+05 429 197687 324328.9 -1.266419e+05 430 418341 340884.6 7.745643e+04 431 -297706 340884.6 -6.385906e+05 > 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/4se2q1292943568.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/5o5iz1292943568.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/6yfik1292943568.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/7cpjl1292943569.tab") + } > > try(system("convert tmp/2h43n1292943568.ps tmp/2h43n1292943568.png",intern=TRUE)) character(0) > try(system("convert tmp/3h43n1292943568.ps tmp/3h43n1292943568.png",intern=TRUE)) character(0) > try(system("convert tmp/4se2q1292943568.ps tmp/4se2q1292943568.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 8.273 0.843 17.245