R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(56 + ,3 + ,30 + ,112285 + ,24188 + ,146283 + ,144 + ,145 + ,1 + ,56 + ,4 + ,28 + ,84786 + ,18273 + ,98364 + ,103 + ,101 + ,1 + ,54 + ,12 + ,38 + ,83123 + ,14130 + ,86146 + ,98 + ,98 + ,1 + ,89 + ,2 + ,30 + ,101193 + ,32287 + ,96933 + ,135 + ,132 + ,1 + ,40 + ,1 + ,22 + ,38361 + ,8654 + ,79234 + ,61 + ,60 + ,1 + ,25 + ,3 + ,26 + ,68504 + ,9245 + ,42551 + ,39 + ,38 + ,1 + ,92 + ,0 + ,25 + ,119182 + ,33251 + ,195663 + ,150 + ,144 + ,1 + ,18 + ,0 + ,18 + ,22807 + ,1271 + ,6853 + ,5 + ,5 + ,1 + ,63 + ,0 + ,11 + ,17140 + ,5279 + ,21529 + ,28 + ,28 + ,0 + ,44 + ,5 + ,26 + ,116174 + ,27101 + ,95757 + ,84 + ,84 + ,1 + ,33 + ,0 + ,25 + ,57635 + ,16373 + ,85584 + ,80 + ,79 + ,1 + ,84 + ,0 + ,38 + ,66198 + ,19716 + ,143983 + ,130 + ,127 + ,1 + ,88 + ,7 + ,44 + ,71701 + ,17753 + ,75851 + ,82 + ,78 + ,1 + ,55 + ,7 + ,30 + ,57793 + ,9028 + ,59238 + ,60 + ,60 + ,1 + ,60 + ,3 + ,40 + ,80444 + ,18653 + ,93163 + ,131 + ,131 + ,1 + ,66 + ,9 + ,34 + ,53855 + ,8828 + ,96037 + ,84 + ,84 + ,1 + ,154 + ,0 + ,47 + ,97668 + ,29498 + ,151511 + ,140 + ,133 + ,1 + ,53 + ,4 + ,30 + ,133824 + ,27563 + ,136368 + ,151 + ,150 + ,1 + ,119 + ,3 + ,31 + ,101481 + ,18293 + ,112642 + ,91 + ,91 + ,1 + ,41 + ,0 + ,23 + ,99645 + ,22530 + ,94728 + ,138 + ,132 + ,1 + ,61 + ,7 + ,36 + ,114789 + ,15977 + ,105499 + ,150 + ,136 + ,1 + ,58 + ,0 + ,36 + ,99052 + ,35082 + ,121527 + ,124 + ,124 + ,1 + ,75 + ,1 + ,30 + ,67654 + ,16116 + ,127766 + ,119 + ,118 + ,1 + ,33 + ,5 + ,25 + ,65553 + ,15849 + ,98958 + ,73 + ,70 + ,1 + ,40 + ,7 + ,39 + ,97500 + ,16026 + ,77900 + ,110 + ,107 + ,1 + ,92 + ,0 + ,34 + ,69112 + ,26569 + ,85646 + ,123 + ,119 + ,1 + ,100 + ,0 + ,31 + ,82753 + ,24785 + ,98579 + ,90 + ,89 + ,1 + ,112 + ,5 + ,31 + ,85323 + ,17569 + ,130767 + ,116 + ,112 + ,1 + ,73 + ,0 + ,33 + ,72654 + ,23825 + ,131741 + ,113 + ,108 + ,1 + ,40 + ,0 + ,25 + ,30727 + ,7869 + ,53907 + ,56 + ,52 + ,1 + ,45 + ,0 + ,33 + ,77873 + ,14975 + ,178812 + ,115 + ,112 + ,1 + ,60 + ,3 + ,35 + ,117478 + ,37791 + ,146761 + ,119 + ,116 + ,1 + ,62 + ,4 + ,42 + ,74007 + ,9605 + ,82036 + ,129 + ,123 + ,1 + ,75 + ,1 + ,43 + ,90183 + ,27295 + ,163253 + ,127 + ,125 + ,1 + ,31 + ,4 + ,30 + ,61542 + ,2746 + ,27032 + ,27 + ,27 + ,1 + ,77 + ,2 + ,33 + ,101494 + ,34461 + ,171975 + ,175 + ,162 + ,1 + ,34 + ,0 + ,13 + ,27570 + ,8098 + ,65990 + ,35 + ,32 + ,0 + ,46 + ,0 + ,32 + ,55813 + ,4787 + ,86572 + ,64 + ,64 + ,1 + ,99 + ,0 + ,36 + ,79215 + ,24919 + ,159676 + ,96 + ,92 + ,1 + ,17 + ,0 + ,0 + ,1423 + ,603 + ,1929 + ,0 + ,0 + ,0 + ,66 + ,2 + ,28 + ,55461 + ,16329 + ,85371 + ,84 + ,83 + ,1 + ,30 + ,1 + ,14 + ,31081 + ,12558 + ,58391 + ,41 + ,41 + ,1 + ,76 + ,0 + ,17 + ,22996 + ,7784 + ,31580 + ,47 + ,47 + ,0 + ,146 + ,2 + ,32 + ,83122 + ,28522 + ,136815 + ,126 + ,120 + ,1 + ,67 + ,10 + ,30 + ,70106 + ,22265 + ,120642 + ,105 + ,105 + ,1 + ,56 + ,6 + ,35 + ,60578 + ,14459 + ,69107 + ,80 + ,79 + ,1 + ,107 + ,0 + ,20 + ,39992 + ,14526 + ,50495 + ,70 + ,65 + ,0 + ,58 + ,5 + ,28 + ,79892 + ,22240 + ,108016 + ,73 + ,70 + ,1 + ,34 + ,4 + ,28 + ,49810 + ,11802 + ,46341 + ,57 + ,55 + ,1 + ,61 + ,1 + ,39 + ,71570 + ,7623 + ,78348 + ,40 + ,39 + ,1 + ,119 + ,2 + ,34 + ,100708 + ,11912 + ,79336 + ,68 + ,67 + ,1 + ,42 + ,2 + ,26 + ,33032 + ,7935 + ,56968 + ,21 + ,21 + ,1 + ,66 + ,0 + ,39 + ,82875 + ,18220 + ,93176 + ,127 + ,127 + ,1 + ,89 + ,8 + ,39 + ,139077 + ,19199 + ,161632 + ,154 + ,152 + ,1 + ,44 + ,3 + ,33 + ,71595 + ,19918 + ,87850 + ,116 + ,113 + ,1 + ,66 + ,0 + ,28 + ,72260 + ,21884 + ,127969 + ,102 + ,99 + ,1 + ,24 + ,0 + ,4 + ,5950 + ,2694 + ,15049 + ,7 + ,7 + ,1 + ,259 + ,8 + ,39 + ,115762 + ,15808 + ,155135 + ,148 + ,141 + ,1 + ,17 + ,5 + ,18 + ,32551 + ,3597 + ,25109 + ,21 + ,21 + ,1 + ,64 + ,3 + ,14 + ,31701 + ,5296 + ,45824 + ,35 + ,35 + ,1 + ,41 + ,1 + ,29 + ,80670 + ,25239 + ,102996 + ,112 + ,109 + ,1 + ,68 + ,5 + ,44 + ,143558 + ,29801 + ,160604 + ,137 + ,133 + ,1 + ,168 + ,1 + ,21 + ,117105 + ,18450 + ,158051 + ,135 + ,123 + ,0 + ,43 + ,1 + ,16 + ,23789 + ,7132 + ,44547 + ,26 + ,26 + ,0 + ,132 + ,5 + ,28 + ,120733 + ,34861 + ,162647 + ,230 + ,230 + ,1 + ,105 + ,0 + ,35 + ,105195 + ,35940 + ,174141 + ,181 + ,166 + ,1 + ,71 + ,12 + ,28 + ,73107 + ,16688 + ,60622 + ,71 + ,68 + ,1 + ,112 + ,8 + ,38 + ,132068 + ,24683 + ,179566 + ,147 + ,147 + ,1 + ,94 + ,8 + ,23 + ,149193 + ,46230 + ,184301 + ,190 + ,179 + ,1 + ,82 + ,8 + ,36 + ,46821 + ,10387 + ,75661 + ,64 + ,61 + ,1 + ,70 + ,8 + ,32 + ,87011 + ,21436 + ,96144 + ,105 + ,101 + ,1 + ,57 + ,2 + ,29 + ,95260 + ,30546 + ,129847 + ,107 + ,108 + ,1 + ,53 + ,0 + ,25 + ,55183 + ,19746 + ,117286 + ,94 + ,90 + ,1 + ,103 + ,5 + ,27 + ,106671 + ,15977 + ,71180 + ,116 + ,114 + ,1 + ,121 + ,8 + ,36 + ,73511 + ,22583 + ,109377 + ,106 + ,103 + ,1 + ,62 + ,2 + ,28 + ,92945 + ,17274 + ,85298 + ,143 + ,142 + ,1 + ,52 + ,5 + ,23 + ,78664 + ,16469 + ,73631 + ,81 + ,79 + ,1 + ,52 + ,12 + ,40 + ,70054 + ,14251 + ,86767 + ,89 + ,88 + ,1 + ,32 + ,6 + ,23 + ,22618 + ,3007 + ,23824 + ,26 + ,25 + ,1 + ,62 + ,7 + ,40 + ,74011 + ,16851 + ,93487 + ,84 + ,83 + ,1 + ,45 + ,2 + ,28 + ,83737 + ,21113 + ,82981 + ,113 + ,113 + ,1 + ,46 + ,0 + ,34 + ,69094 + ,17401 + ,73815 + ,120 + ,118 + ,1 + ,63 + ,4 + ,33 + ,93133 + ,23958 + ,94552 + ,110 + ,110 + ,1 + ,75 + ,3 + ,28 + ,95536 + ,23567 + ,132190 + ,134 + ,129 + ,1 + ,88 + ,6 + ,34 + ,225920 + ,13065 + ,128754 + ,54 + ,51 + ,1 + ,46 + ,2 + ,30 + ,62133 + ,15358 + ,66363 + ,96 + ,93 + ,1 + ,53 + ,0 + ,33 + ,61370 + ,14587 + ,67808 + ,78 + ,76 + ,1 + ,37 + ,1 + ,22 + ,43836 + ,12770 + ,61724 + ,51 + ,49 + ,1 + ,90 + ,0 + ,38 + ,106117 + ,24021 + ,131722 + ,121 + ,118 + ,1 + ,63 + ,5 + ,26 + ,38692 + ,9648 + ,68580 + ,38 + ,38 + ,1 + ,78 + ,2 + ,35 + ,84651 + ,20537 + ,106175 + ,145 + ,141 + ,1 + ,25 + ,0 + ,8 + ,56622 + ,7905 + ,55792 + ,59 + ,58 + ,1 + ,45 + ,0 + ,24 + ,15986 + ,4527 + ,25157 + ,27 + ,27 + ,1 + ,46 + ,5 + ,29 + ,95364 + ,30495 + ,76669 + ,91 + ,91 + ,1 + ,41 + ,0 + ,20 + ,26706 + ,7117 + ,57283 + ,48 + ,48 + ,0 + ,144 + ,1 + ,29 + ,89691 + ,17719 + ,105805 + ,68 + ,63 + ,1 + ,82 + ,0 + ,45 + ,67267 + ,27056 + ,129484 + ,58 + ,56 + ,1 + ,91 + ,1 + ,37 + ,126846 + ,33473 + ,72413 + ,150 + ,144 + ,1 + ,71 + ,1 + ,33 + ,41140 + ,9758 + ,87831 + ,74 + ,73 + ,1 + ,63 + ,2 + ,33 + ,102860 + ,21115 + ,96971 + ,181 + ,168 + ,1 + ,53 + ,6 + ,25 + ,51715 + ,7236 + ,71299 + ,65 + ,64 + ,1 + ,62 + ,1 + ,32 + ,55801 + ,13790 + ,77494 + ,97 + ,97 + ,1 + ,63 + ,4 + ,29 + ,111813 + ,32902 + ,120336 + ,121 + ,117 + ,1 + ,32 + ,2 + ,28 + ,120293 + ,25131 + ,93913 + ,99 + ,100 + ,1 + ,39 + ,3 + ,28 + ,138599 + ,30910 + ,136048 + ,152 + ,149 + ,1 + ,62 + ,0 + ,31 + ,161647 + ,35947 + ,181248 + ,188 + ,187 + ,1 + ,117 + ,10 + ,52 + ,115929 + ,29848 + ,146123 + ,138 + ,127 + ,1 + ,34 + ,0 + ,21 + ,24266 + ,6943 + ,32036 + ,40 + ,37 + ,0 + ,92 + ,9 + ,24 + ,162901 + ,42705 + ,186646 + ,254 + ,245 + ,1 + ,93 + ,7 + ,41 + ,109825 + ,31808 + ,102255 + ,87 + ,87 + ,1 + ,54 + ,0 + ,33 + ,129838 + ,26675 + ,168237 + ,178 + ,177 + ,1 + ,144 + ,0 + ,32 + ,37510 + ,8435 + ,64219 + ,51 + ,49 + ,1 + ,14 + ,4 + ,19 + ,43750 + ,7409 + ,19630 + ,49 + ,49 + ,1 + ,61 + ,4 + ,20 + ,40652 + ,14993 + ,76825 + ,73 + ,73 + ,1 + ,109 + ,0 + ,31 + ,87771 + ,36867 + ,115338 + ,176 + ,177 + ,1 + ,38 + ,0 + ,31 + ,85872 + ,33835 + ,109427 + ,94 + ,94 + ,1 + ,73 + ,0 + ,32 + ,89275 + ,24164 + ,118168 + ,120 + ,117 + ,1 + ,75 + ,1 + ,18 + ,44418 + ,12607 + ,84845 + ,66 + ,60 + ,0 + ,50 + ,0 + ,23 + ,192565 + ,22609 + ,153197 + ,56 + ,55 + ,1 + ,61 + ,1 + ,17 + ,35232 + ,5892 + ,29877 + ,39 + ,39 + ,0 + ,55 + ,0 + ,20 + ,40909 + ,17014 + ,63506 + ,66 + ,64 + ,0 + ,77 + ,0 + ,12 + ,13294 + ,5394 + ,22445 + ,27 + ,26 + ,0 + ,75 + ,4 + ,17 + ,32387 + ,9178 + ,47695 + ,65 + ,64 + ,0 + ,72 + ,0 + ,30 + ,140867 + ,6440 + ,68370 + ,58 + ,58 + ,1 + ,50 + ,4 + ,31 + ,120662 + ,21916 + ,146304 + ,98 + ,95 + ,1 + ,32 + ,4 + ,10 + ,21233 + ,4011 + ,38233 + ,25 + ,25 + ,0 + ,53 + ,3 + ,13 + ,44332 + ,5818 + ,42071 + ,26 + ,26 + ,0 + ,42 + ,0 + ,22 + ,61056 + ,18647 + ,50517 + ,77 + ,76 + ,0 + ,71 + ,0 + ,42 + ,101338 + ,20556 + ,103950 + ,130 + ,129 + ,1 + ,10 + ,0 + ,1 + ,1168 + ,238 + ,5841 + ,11 + ,11 + ,1 + ,35 + ,5 + ,9 + ,13497 + ,70 + ,2341 + ,2 + ,2 + ,0 + ,65 + ,0 + ,32 + ,65567 + ,22392 + ,84396 + ,101 + ,101 + ,1 + ,25 + ,4 + ,11 + ,25162 + ,3913 + ,24610 + ,31 + ,28 + ,1 + ,66 + ,0 + ,25 + ,32334 + ,12237 + ,35753 + ,36 + ,36 + ,0 + ,41 + ,0 + ,36 + ,40735 + ,8388 + ,55515 + ,120 + ,89 + ,1 + ,86 + ,1 + ,31 + ,91413 + ,22120 + ,209056 + ,195 + ,193 + ,1 + ,16 + ,0 + ,0 + ,855 + ,338 + ,6622 + ,4 + ,4 + ,1 + ,42 + ,5 + ,24 + ,97068 + ,11727 + ,115814 + ,89 + ,84 + ,1 + ,19 + ,0 + ,13 + ,44339 + ,3704 + ,11609 + ,24 + ,23 + ,0 + ,19 + ,0 + ,8 + ,14116 + ,3988 + ,13155 + ,39 + ,39 + ,1 + ,45 + ,0 + ,13 + ,10288 + ,3030 + ,18274 + ,14 + ,14 + ,0 + ,65 + ,0 + ,19 + ,65622 + ,13520 + ,72875 + ,78 + ,78 + ,0 + ,35 + ,0 + ,18 + ,16563 + ,1421 + ,10112 + ,15 + ,14 + ,0 + ,95 + ,2 + ,33 + ,76643 + ,20923 + ,142775 + ,106 + ,101 + ,1 + ,49 + ,7 + ,40 + ,110681 + ,20237 + ,68847 + ,83 + ,82 + ,1 + ,37 + ,1 + ,22 + ,29011 + ,3219 + ,17659 + ,24 + ,24 + ,0 + ,64 + ,8 + ,38 + ,92696 + ,3769 + ,20112 + ,37 + ,36 + ,1 + ,38 + ,2 + ,24 + ,94785 + ,12252 + ,61023 + ,77 + ,75 + ,1 + ,34 + ,0 + ,8 + ,8773 + ,1888 + ,13983 + ,16 + ,16 + ,1 + ,32 + ,2 + ,35 + ,83209 + ,14497 + ,65176 + ,56 + ,55 + ,1 + ,65 + ,0 + ,43 + ,93815 + ,28864 + ,132432 + ,132 + ,131 + ,1 + ,52 + ,0 + ,43 + ,86687 + ,21721 + ,112494 + ,144 + ,131 + ,1 + ,62 + ,1 + ,14 + ,34553 + ,4821 + ,45109 + ,40 + ,39 + ,0 + ,65 + ,3 + ,41 + ,105547 + ,33644 + ,170875 + ,153 + ,144 + ,1 + ,83 + ,0 + ,38 + ,103487 + ,15923 + ,180759 + ,143 + ,139 + ,1 + ,95 + ,3 + ,45 + ,213688 + ,42935 + ,214921 + ,220 + ,211 + ,1 + ,29 + ,0 + ,31 + ,71220 + ,18864 + ,100226 + ,79 + ,78 + ,1 + ,18 + ,0 + ,13 + ,23517 + ,4977 + ,32043 + ,50 + ,50 + ,0 + ,33 + ,0 + ,28 + ,56926 + ,7785 + ,54454 + ,39 + ,39 + ,1 + ,247 + ,4 + ,31 + ,91721 + ,17939 + ,78876 + ,95 + ,90 + ,1 + ,139 + ,4 + ,40 + ,115168 + ,23436 + ,170745 + ,169 + ,166 + ,1 + ,29 + ,11 + ,30 + ,111194 + ,325 + ,6940 + ,12 + ,12 + ,1 + ,118 + ,0 + ,16 + ,51009 + ,13539 + ,49025 + ,63 + ,57 + ,0 + ,110 + ,0 + ,37 + ,135777 + ,34538 + ,122037 + ,134 + ,133 + ,1 + ,67 + ,4 + ,30 + ,51513 + ,12198 + ,53782 + ,69 + ,69 + ,1 + ,42 + ,0 + ,35 + ,74163 + ,26924 + ,127748 + ,119 + ,119 + ,1 + ,65 + ,1 + ,32 + ,51633 + ,12716 + ,86839 + ,119 + ,119 + ,1 + ,94 + ,0 + ,27 + ,75345 + ,8172 + ,44830 + ,75 + ,65 + ,1 + ,64 + ,0 + ,20 + ,33416 + ,10855 + ,77395 + ,63 + ,61 + ,0 + ,81 + ,0 + ,18 + ,83305 + ,11932 + ,89324 + ,55 + ,49 + ,0 + ,95 + ,9 + ,31 + ,98952 + ,14300 + ,103300 + ,103 + ,101 + ,1 + ,67 + ,1 + ,31 + ,102372 + ,25515 + ,112283 + ,197 + ,196 + ,1 + ,63 + ,3 + ,21 + ,37238 + ,2805 + ,10901 + ,16 + ,15 + ,1 + ,83 + ,10 + ,39 + ,103772 + ,29402 + ,120691 + ,140 + ,136 + ,1 + ,45 + ,5 + ,41 + ,123969 + ,16440 + ,58106 + ,89 + ,89 + ,1 + ,30 + ,0 + ,13 + ,27142 + ,11221 + ,57140 + ,40 + ,40 + ,0 + ,70 + ,2 + ,32 + ,135400 + ,28732 + ,122422 + ,125 + ,123 + ,1 + ,32 + ,0 + ,18 + ,21399 + ,5250 + ,25899 + ,21 + ,21 + ,0 + ,83 + ,1 + ,39 + ,130115 + ,28608 + ,139296 + ,167 + ,163 + ,1 + ,31 + ,2 + ,14 + ,24874 + ,8092 + ,52678 + ,32 + ,29 + ,0 + ,67 + ,4 + ,7 + ,34988 + ,4473 + ,23853 + ,36 + ,35 + ,0 + ,66 + ,0 + ,17 + ,45549 + ,1572 + ,17306 + ,13 + ,13 + ,0 + ,10 + ,0 + ,0 + ,6023 + ,2065 + ,7953 + ,5 + ,5 + ,1 + ,70 + ,2 + ,30 + ,64466 + ,14817 + ,89455 + ,96 + ,96 + ,1 + ,103 + ,1 + ,37 + ,54990 + ,16714 + ,147866 + ,151 + ,151 + ,1 + ,5 + ,0 + ,0 + ,1644 + ,556 + ,4245 + ,6 + ,6 + ,1 + ,20 + ,0 + ,5 + ,6179 + ,2089 + ,21509 + ,13 + ,13 + ,1 + ,5 + ,0 + ,1 + ,3926 + ,2658 + ,7670 + ,3 + ,3 + ,1 + ,36 + ,1 + ,16 + ,32755 + ,10695 + ,66675 + ,57 + ,56 + ,0 + ,34 + ,0 + ,32 + ,34777 + ,1669 + ,14336 + ,23 + ,23 + ,1 + ,48 + ,2 + ,24 + ,73224 + ,16267 + ,53608 + ,61 + ,57 + ,1 + ,40 + ,0 + ,17 + ,27114 + ,7768 + ,30059 + ,21 + ,14 + ,0 + ,43 + ,3 + ,11 + ,20760 + ,7252 + ,29668 + ,43 + ,43 + ,0 + ,31 + ,6 + ,24 + ,37636 + ,6387 + ,22097 + ,20 + ,20 + ,0 + ,42 + ,0 + ,22 + ,65461 + ,18715 + ,96841 + ,82 + ,72 + ,0 + ,46 + ,2 + ,12 + ,30080 + ,7936 + ,41907 + ,90 + ,87 + ,0 + ,33 + ,0 + ,19 + ,24094 + ,8643 + ,27080 + ,25 + ,21 + ,0 + ,18 + ,2 + ,13 + ,69008 + ,7294 + ,35885 + ,60 + ,56 + ,0 + ,55 + ,1 + ,17 + ,54968 + ,4570 + ,41247 + ,61 + ,59 + ,0 + ,35 + ,1 + ,15 + ,46090 + ,7185 + ,28313 + ,85 + ,82 + ,0 + ,59 + ,2 + ,16 + ,27507 + ,10058 + ,36845 + ,43 + ,43 + ,0 + ,19 + ,1 + ,24 + ,10672 + ,2342 + ,16548 + ,25 + ,25 + ,0 + ,66 + ,0 + ,15 + ,34029 + ,8509 + ,36134 + ,41 + ,38 + ,0 + ,60 + ,1 + ,17 + ,46300 + ,13275 + ,55764 + ,26 + ,25 + ,0 + ,36 + ,3 + ,18 + ,24760 + ,6816 + ,28910 + ,38 + ,38 + ,0 + ,25 + ,0 + ,20 + ,18779 + ,1930 + ,13339 + ,12 + ,12 + ,0 + ,47 + ,0 + ,16 + ,21280 + ,8086 + ,25319 + ,29 + ,29 + ,0 + ,54 + ,0 + ,16 + ,40662 + ,10737 + ,66956 + ,49 + ,47 + ,0 + ,53 + ,0 + ,18 + ,28987 + ,8033 + ,47487 + ,46 + ,45 + ,0 + ,40 + ,1 + ,22 + ,22827 + ,7058 + ,52785 + ,41 + ,40 + ,0 + ,40 + ,4 + ,8 + ,18513 + ,6782 + ,44683 + ,31 + ,30 + ,0 + ,39 + ,0 + ,17 + ,30594 + ,5401 + ,35619 + ,41 + ,41 + ,0 + ,14 + ,0 + ,18 + ,24006 + ,6521 + ,21920 + ,26 + ,25 + ,0 + ,45 + ,0 + ,16 + ,27913 + ,10856 + ,45608 + ,23 + ,23 + ,0 + ,36 + ,7 + ,23 + ,42744 + ,2154 + ,7721 + ,14 + ,14 + ,0 + ,28 + ,2 + ,22 + ,12934 + ,6117 + ,20634 + ,16 + ,16 + ,0 + ,44 + ,0 + ,13 + ,22574 + ,5238 + ,29788 + ,25 + ,26 + ,0 + ,30 + ,7 + ,13 + ,41385 + ,4820 + ,31931 + ,21 + ,21 + ,0 + ,22 + ,3 + ,16 + ,18653 + ,5615 + ,37754 + ,32 + ,27 + ,0 + ,17 + ,0 + ,16 + ,18472 + ,4272 + ,32505 + ,9 + ,9 + ,0 + ,31 + ,0 + ,20 + ,30976 + ,8702 + ,40557 + ,35 + ,33 + ,0 + ,55 + ,6 + ,22 + ,63339 + ,15340 + ,94238 + ,42 + ,42 + ,0 + ,54 + ,2 + ,17 + ,25568 + ,8030 + ,44197 + ,68 + ,68 + ,0 + ,21 + ,0 + ,18 + ,33747 + ,9526 + ,43228 + ,32 + ,32 + ,0 + ,14 + ,0 + ,17 + ,4154 + ,1278 + ,4103 + ,6 + ,6 + ,0 + ,81 + ,3 + ,12 + ,19474 + ,4236 + ,44144 + ,68 + ,67 + ,0 + ,35 + ,0 + ,7 + ,35130 + ,3023 + ,32868 + ,33 + ,33 + ,0 + ,43 + ,1 + ,17 + ,39067 + ,7196 + ,27640 + ,84 + ,77 + ,0 + ,46 + ,1 + ,14 + ,13310 + ,3394 + ,14063 + ,46 + ,46 + ,0 + ,30 + ,0 + ,23 + ,65892 + ,6371 + ,28990 + ,30 + ,30 + ,0 + ,23 + ,1 + ,17 + ,4143 + ,1574 + ,4694 + ,0 + ,0 + ,0 + ,38 + ,0 + ,14 + ,28579 + ,9620 + ,42648 + ,36 + ,36 + ,0 + ,54 + ,0 + ,15 + ,51776 + ,6978 + ,64329 + ,47 + ,46 + ,0 + ,20 + ,0 + ,17 + ,21152 + ,4911 + ,21928 + ,20 + ,18 + ,0 + ,53 + ,0 + ,21 + ,38084 + ,8645 + ,25836 + ,50 + ,48 + ,0 + ,45 + ,0 + ,18 + ,27717 + ,8987 + ,22779 + ,30 + ,29 + ,0 + ,39 + ,0 + ,18 + ,32928 + ,5544 + ,40820 + ,30 + ,28 + ,0 + ,20 + ,0 + ,17 + ,11342 + ,3083 + ,27530 + ,34 + ,34 + ,0 + ,24 + ,0 + ,17 + ,19499 + ,6909 + ,32378 + ,33 + ,33 + ,0 + ,31 + ,0 + ,16 + ,16380 + ,3189 + ,10824 + ,34 + ,34 + ,0 + ,35 + ,0 + ,15 + ,36874 + ,6745 + ,39613 + ,37 + ,33 + ,0 + ,151 + ,0 + ,21 + ,48259 + ,16724 + ,60865 + ,83 + ,80 + ,0 + ,52 + ,0 + ,16 + ,16734 + ,4850 + ,19787 + ,32 + ,32 + ,0 + ,30 + ,2 + ,14 + ,28207 + ,7025 + ,20107 + ,30 + ,30 + ,0 + ,31 + ,0 + ,15 + ,30143 + ,6047 + ,36605 + ,43 + ,41 + ,0 + ,29 + ,1 + ,17 + ,41369 + ,7377 + ,40961 + ,41 + ,41 + ,0 + ,57 + ,1 + ,15 + ,45833 + ,9078 + ,48231 + ,51 + ,51 + ,0 + ,40 + ,0 + ,15 + ,29156 + ,4605 + ,39725 + ,19 + ,18 + ,0 + ,44 + ,0 + ,10 + ,35944 + ,3238 + ,21455 + ,37 + ,34 + ,0 + ,25 + ,0 + ,6 + ,36278 + ,8100 + ,23430 + ,33 + ,31 + ,0 + ,77 + ,0 + ,22 + ,45588 + ,9653 + ,62991 + ,41 + ,39 + ,0 + ,35 + ,0 + ,21 + ,45097 + ,8914 + ,49363 + ,54 + ,54 + ,0 + ,11 + ,0 + ,1 + ,3895 + ,786 + ,9604 + ,14 + ,14 + ,0 + ,63 + ,1 + ,18 + ,28394 + ,6700 + ,24552 + ,25 + ,24 + ,0 + ,44 + ,0 + ,17 + ,18632 + ,5788 + ,31493 + ,25 + ,24 + ,0 + ,19 + ,0 + ,4 + ,2325 + ,593 + ,3439 + ,8 + ,8 + ,0 + ,13 + ,0 + ,10 + ,25139 + ,4506 + ,19555 + ,26 + ,26 + ,0 + ,42 + ,0 + ,16 + ,27975 + ,6382 + ,21228 + ,20 + ,19 + ,0 + ,38 + ,1 + ,16 + ,14483 + ,5621 + ,23177 + ,11 + ,11 + ,0 + ,29 + ,0 + ,9 + ,13127 + ,3997 + ,22094 + ,14 + ,14 + ,0 + ,20 + ,0 + ,16 + ,5839 + ,520 + ,2342 + ,3 + ,1 + ,0 + ,27 + ,0 + ,17 + ,24069 + ,8891 + ,38798 + ,40 + ,39 + ,0 + ,20 + ,0 + ,7 + ,3738 + ,999 + ,3255 + ,5 + ,5 + ,0 + ,19 + ,0 + ,15 + ,18625 + ,7067 + ,24261 + ,38 + ,37 + ,0 + ,37 + ,0 + ,14 + ,36341 + ,4639 + ,18511 + ,32 + ,32 + ,0 + ,26 + ,0 + ,14 + ,24548 + ,5654 + ,40798 + ,41 + ,38 + ,0 + ,42 + ,0 + ,18 + ,21792 + ,6928 + ,28893 + ,46 + ,47 + ,0 + ,49 + ,0 + ,12 + ,26263 + ,1514 + ,21425 + ,47 + ,47 + ,0 + ,30 + ,0 + ,16 + ,23686 + ,9238 + ,50276 + ,37 + ,37 + ,0 + ,49 + ,0 + ,21 + ,49303 + ,8204 + ,37643 + ,51 + ,51 + ,0 + ,67 + ,1 + ,19 + ,25659 + ,5926 + ,30377 + ,49 + ,45 + ,0 + ,28 + ,0 + ,16 + ,28904 + ,5785 + ,27126 + ,21 + ,21 + ,0 + ,19 + ,0 + ,1 + ,2781 + ,4 + ,13 + ,1 + ,1 + ,0 + ,49 + ,1 + ,16 + ,29236 + ,5930 + ,42097 + ,44 + ,42 + ,0 + ,27 + ,0 + ,10 + ,19546 + ,3710 + ,24451 + ,26 + ,26 + ,0 + ,30 + ,6 + ,19 + ,22818 + ,705 + ,14335 + ,21 + ,21 + ,0 + ,22 + ,3 + ,12 + ,32689 + ,443 + ,5084 + ,4 + ,4 + ,0 + ,12 + ,1 + ,2 + ,5752 + ,2416 + ,9927 + ,10 + ,10 + ,0 + ,31 + ,2 + ,14 + ,22197 + ,7747 + ,43527 + ,43 + ,43 + ,0 + ,20 + ,0 + ,17 + ,20055 + ,5432 + ,27184 + ,34 + ,34 + ,0 + ,20 + ,0 + ,19 + ,25272 + ,4913 + ,21610 + ,32 + ,31 + ,0 + ,39 + ,0 + ,14 + ,82206 + ,2650 + ,20484 + ,20 + ,19 + ,0 + ,29 + ,3 + ,11 + ,32073 + ,2370 + ,20156 + ,34 + ,34 + ,0 + ,16 + ,1 + ,4 + ,5444 + ,775 + ,6012 + ,6 + ,6 + ,0 + ,27 + ,0 + ,16 + ,20154 + ,5576 + ,18475 + ,12 + ,11 + ,0 + ,21 + ,0 + ,20 + ,36944 + ,1352 + ,12645 + ,24 + ,24 + ,0 + ,19 + ,1 + ,12 + ,8019 + ,3080 + ,11017 + ,16 + ,16 + ,0 + ,35 + ,0 + ,15 + ,30884 + ,10205 + ,37623 + ,72 + ,72 + ,0 + ,14 + ,0 + ,16 + ,19540 + ,6095 + ,35873 + ,27 + ,21 + ,0) + ,dim=c(9 + ,289) + ,dimnames=list(c('logins' + ,'shared_compendiums' + ,'compendiums_reviewed' + ,'totsize' + ,'totrevisions' + ,'totseconds' + ,'tothyperlinks' + ,'totblogs' + ,'course_cid') + ,1:289)) > y <- array(NA,dim=c(9,289),dimnames=list(c('logins','shared_compendiums','compendiums_reviewed','totsize','totrevisions','totseconds','tothyperlinks','totblogs','course_cid'),1:289)) > 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' > 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 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] "totsize" > x[,par1] [1] 112285 84786 83123 101193 38361 68504 119182 22807 17140 116174 [11] 57635 66198 71701 57793 80444 53855 97668 133824 101481 99645 [21] 114789 99052 67654 65553 97500 69112 82753 85323 72654 30727 [31] 77873 117478 74007 90183 61542 101494 27570 55813 79215 1423 [41] 55461 31081 22996 83122 70106 60578 39992 79892 49810 71570 [51] 100708 33032 82875 139077 71595 72260 5950 115762 32551 31701 [61] 80670 143558 117105 23789 120733 105195 73107 132068 149193 46821 [71] 87011 95260 55183 106671 73511 92945 78664 70054 22618 74011 [81] 83737 69094 93133 95536 225920 62133 61370 43836 106117 38692 [91] 84651 56622 15986 95364 26706 89691 67267 126846 41140 102860 [101] 51715 55801 111813 120293 138599 161647 115929 24266 162901 109825 [111] 129838 37510 43750 40652 87771 85872 89275 44418 192565 35232 [121] 40909 13294 32387 140867 120662 21233 44332 61056 101338 1168 [131] 13497 65567 25162 32334 40735 91413 855 97068 44339 14116 [141] 10288 65622 16563 76643 110681 29011 92696 94785 8773 83209 [151] 93815 86687 34553 105547 103487 213688 71220 23517 56926 91721 [161] 115168 111194 51009 135777 51513 74163 51633 75345 33416 83305 [171] 98952 102372 37238 103772 123969 27142 135400 21399 130115 24874 [181] 34988 45549 6023 64466 54990 1644 6179 3926 32755 34777 [191] 73224 27114 20760 37636 65461 30080 24094 69008 54968 46090 [201] 27507 10672 34029 46300 24760 18779 21280 40662 28987 22827 [211] 18513 30594 24006 27913 42744 12934 22574 41385 18653 18472 [221] 30976 63339 25568 33747 4154 19474 35130 39067 13310 65892 [231] 4143 28579 51776 21152 38084 27717 32928 11342 19499 16380 [241] 36874 48259 16734 28207 30143 41369 45833 29156 35944 36278 [251] 45588 45097 3895 28394 18632 2325 25139 27975 14483 13127 [261] 5839 24069 3738 18625 36341 24548 21792 26263 23686 49303 [271] 25659 28904 2781 29236 19546 22818 32689 5752 22197 20055 [281] 25272 82206 32073 5444 20154 36944 8019 30884 19540 > 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]) 855 1168 1423 1644 2325 2781 3738 3895 3926 4143 4154 1 1 1 1 1 1 1 1 1 1 1 5444 5752 5839 5950 6023 6179 8019 8773 10288 10672 11342 1 1 1 1 1 1 1 1 1 1 1 12934 13127 13294 13310 13497 14116 14483 15986 16380 16563 16734 1 1 1 1 1 1 1 1 1 1 1 17140 18472 18513 18625 18632 18653 18779 19474 19499 19540 19546 1 1 1 1 1 1 1 1 1 1 1 20055 20154 20760 21152 21233 21280 21399 21792 22197 22574 22618 1 1 1 1 1 1 1 1 1 1 1 22807 22818 22827 22996 23517 23686 23789 24006 24069 24094 24266 1 1 1 1 1 1 1 1 1 1 1 24548 24760 24874 25139 25162 25272 25568 25659 26263 26706 27114 1 1 1 1 1 1 1 1 1 1 1 27142 27507 27570 27717 27913 27975 28207 28394 28579 28904 28987 1 1 1 1 1 1 1 1 1 1 1 29011 29156 29236 30080 30143 30594 30727 30884 30976 31081 31701 1 1 1 1 1 1 1 1 1 1 1 32073 32334 32387 32551 32689 32755 32928 33032 33416 33747 34029 1 1 1 1 1 1 1 1 1 1 1 34553 34777 34988 35130 35232 35944 36278 36341 36874 36944 37238 1 1 1 1 1 1 1 1 1 1 1 37510 37636 38084 38361 38692 39067 39992 40652 40662 40735 40909 1 1 1 1 1 1 1 1 1 1 1 41140 41369 41385 42744 43750 43836 44332 44339 44418 45097 45549 1 1 1 1 1 1 1 1 1 1 1 45588 45833 46090 46300 46821 48259 49303 49810 51009 51513 51633 1 1 1 1 1 1 1 1 1 1 1 51715 51776 53855 54968 54990 55183 55461 55801 55813 56622 56926 1 1 1 1 1 1 1 1 1 1 1 57635 57793 60578 61056 61370 61542 62133 63339 64466 65461 65553 1 1 1 1 1 1 1 1 1 1 1 65567 65622 65892 66198 67267 67654 68504 69008 69094 69112 70054 1 1 1 1 1 1 1 1 1 1 1 70106 71220 71570 71595 71701 72260 72654 73107 73224 73511 74007 1 1 1 1 1 1 1 1 1 1 1 74011 74163 75345 76643 77873 78664 79215 79892 80444 80670 82206 1 1 1 1 1 1 1 1 1 1 1 82753 82875 83122 83123 83209 83305 83737 84651 84786 85323 85872 1 1 1 1 1 1 1 1 1 1 1 86687 87011 87771 89275 89691 90183 91413 91721 92696 92945 93133 1 1 1 1 1 1 1 1 1 1 1 93815 94785 95260 95364 95536 97068 97500 97668 98952 99052 99645 1 1 1 1 1 1 1 1 1 1 1 100708 101193 101338 101481 101494 102372 102860 103487 103772 105195 105547 1 1 1 1 1 1 1 1 1 1 1 106117 106671 109825 110681 111194 111813 112285 114789 115168 115762 115929 1 1 1 1 1 1 1 1 1 1 1 116174 117105 117478 119182 120293 120662 120733 123969 126846 129838 130115 1 1 1 1 1 1 1 1 1 1 1 132068 133824 135400 135777 138599 139077 140867 143558 149193 161647 162901 1 1 1 1 1 1 1 1 1 1 1 192565 213688 225920 1 1 1 > colnames(x) [1] "logins" "shared_compendiums" "compendiums_reviewed" [4] "totsize" "totrevisions" "totseconds" [7] "tothyperlinks" "totblogs" "course_cid" > colnames(x)[par1] [1] "totsize" > x[,par1] [1] 112285 84786 83123 101193 38361 68504 119182 22807 17140 116174 [11] 57635 66198 71701 57793 80444 53855 97668 133824 101481 99645 [21] 114789 99052 67654 65553 97500 69112 82753 85323 72654 30727 [31] 77873 117478 74007 90183 61542 101494 27570 55813 79215 1423 [41] 55461 31081 22996 83122 70106 60578 39992 79892 49810 71570 [51] 100708 33032 82875 139077 71595 72260 5950 115762 32551 31701 [61] 80670 143558 117105 23789 120733 105195 73107 132068 149193 46821 [71] 87011 95260 55183 106671 73511 92945 78664 70054 22618 74011 [81] 83737 69094 93133 95536 225920 62133 61370 43836 106117 38692 [91] 84651 56622 15986 95364 26706 89691 67267 126846 41140 102860 [101] 51715 55801 111813 120293 138599 161647 115929 24266 162901 109825 [111] 129838 37510 43750 40652 87771 85872 89275 44418 192565 35232 [121] 40909 13294 32387 140867 120662 21233 44332 61056 101338 1168 [131] 13497 65567 25162 32334 40735 91413 855 97068 44339 14116 [141] 10288 65622 16563 76643 110681 29011 92696 94785 8773 83209 [151] 93815 86687 34553 105547 103487 213688 71220 23517 56926 91721 [161] 115168 111194 51009 135777 51513 74163 51633 75345 33416 83305 [171] 98952 102372 37238 103772 123969 27142 135400 21399 130115 24874 [181] 34988 45549 6023 64466 54990 1644 6179 3926 32755 34777 [191] 73224 27114 20760 37636 65461 30080 24094 69008 54968 46090 [201] 27507 10672 34029 46300 24760 18779 21280 40662 28987 22827 [211] 18513 30594 24006 27913 42744 12934 22574 41385 18653 18472 [221] 30976 63339 25568 33747 4154 19474 35130 39067 13310 65892 [231] 4143 28579 51776 21152 38084 27717 32928 11342 19499 16380 [241] 36874 48259 16734 28207 30143 41369 45833 29156 35944 36278 [251] 45588 45097 3895 28394 18632 2325 25139 27975 14483 13127 [261] 5839 24069 3738 18625 36341 24548 21792 26263 23686 49303 [271] 25659 28904 2781 29236 19546 22818 32689 5752 22197 20055 [281] 25272 82206 32073 5444 20154 36944 8019 30884 19540 > if (par2 == 'none') { + m <- ctree(as.formula(paste(colnames(x)[par1],' ~ .',sep='')),data = x) + } > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/1oewd1324308544.tab") + } + } > m Conditional inference tree with 9 terminal nodes Response: totsize Inputs: logins, shared_compendiums, compendiums_reviewed, totrevisions, totseconds, tothyperlinks, totblogs, course_cid Number of observations: 289 1) totseconds <= 67808; criterion = 1, statistic = 195.162 2) compendiums_reviewed <= 25; criterion = 1, statistic = 73.579 3) tothyperlinks <= 16; criterion = 1, statistic = 52.167 4) logins <= 34; criterion = 1, statistic = 16.799 5) compendiums_reviewed <= 8; criterion = 0.986, statistic = 9.757 6)* weights = 15 5) compendiums_reviewed > 8 7)* weights = 11 4) logins > 34 8)* weights = 7 3) tothyperlinks > 16 9) totrevisions <= 12237; criterion = 1, statistic = 19.076 10)* weights = 106 9) totrevisions > 12237 11)* weights = 10 2) compendiums_reviewed > 25 12)* weights = 18 1) totseconds > 67808 13) totseconds <= 120642; criterion = 1, statistic = 36.68 14) totrevisions <= 15849; criterion = 1, statistic = 17.72 15)* weights = 26 14) totrevisions > 15849 16)* weights = 47 13) totseconds > 120642 17)* weights = 49 > postscript(file="/var/wessaorg/rcomp/tmp/2cokm1324308544.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/wessaorg/rcomp/tmp/3b23w1324308544.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 112285 113150.510 -865.51020 2 84786 87895.319 -3109.31915 3 83123 65058.808 18064.19231 4 101193 87895.319 13297.68085 5 38361 65058.808 -26697.80769 6 68504 65286.944 3217.05556 7 119182 113150.510 6031.48980 8 22807 14647.000 8160.00000 9 17140 30124.028 -12984.02830 10 116174 87895.319 28278.68085 11 57635 87895.319 -30260.31915 12 66198 113150.510 -46952.51020 13 71701 87895.319 -16194.31915 14 57793 65286.944 -7493.94444 15 80444 87895.319 -7451.31915 16 53855 65058.808 -11203.80769 17 97668 113150.510 -15482.51020 18 133824 113150.510 20673.48980 19 101481 87895.319 13585.68085 20 99645 87895.319 11749.68085 21 114789 87895.319 26893.68085 22 99052 113150.510 -14098.51020 23 67654 113150.510 -45496.51020 24 65553 65058.808 494.19231 25 97500 87895.319 9604.68085 26 69112 87895.319 -18783.31915 27 82753 87895.319 -5142.31915 28 85323 113150.510 -27827.51020 29 72654 113150.510 -40496.51020 30 30727 30124.028 602.97170 31 77873 113150.510 -35277.51020 32 117478 113150.510 4327.48980 33 74007 65058.808 8948.19231 34 90183 113150.510 -22967.51020 35 61542 65286.944 -3744.94444 36 101494 113150.510 -11656.51020 37 27570 30124.028 -2554.02830 38 55813 65058.808 -9245.80769 39 79215 113150.510 -33935.51020 40 1423 3991.733 -2568.73333 41 55461 87895.319 -32434.31915 42 31081 53045.100 -21964.10000 43 22996 30124.028 -7128.02830 44 83122 113150.510 -30028.51020 45 70106 87895.319 -17789.31915 46 60578 65058.808 -4480.80769 47 39992 53045.100 -13053.10000 48 79892 87895.319 -8003.31915 49 49810 65286.944 -15476.94444 50 71570 65058.808 6511.19231 51 100708 65058.808 35649.19231 52 33032 65286.944 -32254.94444 53 82875 87895.319 -5020.31915 54 139077 113150.510 25926.48980 55 71595 87895.319 -16300.31915 56 72260 113150.510 -40890.51020 57 5950 3991.733 1958.26667 58 115762 113150.510 2611.48980 59 32551 30124.028 2426.97170 60 31701 30124.028 1576.97170 61 80670 87895.319 -7225.31915 62 143558 113150.510 30407.48980 63 117105 113150.510 3954.48980 64 23789 30124.028 -6335.02830 65 120733 113150.510 7582.48980 66 105195 113150.510 -7955.51020 67 73107 65286.944 7820.05556 68 132068 113150.510 18917.48980 69 149193 113150.510 36042.48980 70 46821 65058.808 -18237.80769 71 87011 87895.319 -884.31915 72 95260 113150.510 -17890.51020 73 55183 87895.319 -32712.31915 74 106671 87895.319 18775.68085 75 73511 87895.319 -14384.31915 76 92945 87895.319 5049.68085 77 78664 87895.319 -9231.31915 78 70054 65058.808 4995.19231 79 22618 30124.028 -7506.02830 80 74011 87895.319 -13884.31915 81 83737 87895.319 -4158.31915 82 69094 87895.319 -18801.31915 83 93133 87895.319 5237.68085 84 95536 113150.510 -17614.51020 85 225920 113150.510 112769.48980 86 62133 65286.944 -3153.94444 87 61370 65286.944 -3916.94444 88 43836 53045.100 -9209.10000 89 106117 113150.510 -7033.51020 90 38692 65058.808 -26366.80769 91 84651 87895.319 -3244.31915 92 56622 30124.028 26497.97170 93 15986 30124.028 -14138.02830 94 95364 87895.319 7468.68085 95 26706 30124.028 -3418.02830 96 89691 87895.319 1795.68085 97 67267 113150.510 -45883.51020 98 126846 87895.319 38950.68085 99 41140 65058.808 -23918.80769 100 102860 87895.319 14964.68085 101 51715 65058.808 -13343.80769 102 55801 65058.808 -9257.80769 103 111813 87895.319 23917.68085 104 120293 87895.319 32397.68085 105 138599 113150.510 25448.48980 106 161647 113150.510 48496.48980 107 115929 113150.510 2778.48980 108 24266 30124.028 -5858.02830 109 162901 113150.510 49750.48980 110 109825 87895.319 21929.68085 111 129838 113150.510 16687.48980 112 37510 65286.944 -27776.94444 113 43750 30124.028 13625.97170 114 40652 65058.808 -24406.80769 115 87771 87895.319 -124.31915 116 85872 87895.319 -2023.31915 117 89275 87895.319 1379.68085 118 44418 65058.808 -20640.80769 119 192565 113150.510 79414.48980 120 35232 30124.028 5107.97170 121 40909 53045.100 -12136.10000 122 13294 30124.028 -16830.02830 123 32387 30124.028 2262.97170 124 140867 65058.808 75808.19231 125 120662 113150.510 7511.48980 126 21233 30124.028 -8891.02830 127 44332 30124.028 14207.97170 128 61056 53045.100 8010.90000 129 101338 87895.319 13442.68085 130 1168 3991.733 -2823.73333 131 13497 25766.000 -12269.00000 132 65567 87895.319 -22328.31915 133 25162 30124.028 -4962.02830 134 32334 30124.028 2209.97170 135 40735 65286.944 -24551.94444 136 91413 113150.510 -21737.51020 137 855 3991.733 -3136.73333 138 97068 65058.808 32009.19231 139 44339 30124.028 14214.97170 140 14116 30124.028 -16008.02830 141 10288 25766.000 -15478.00000 142 65622 65058.808 563.19231 143 16563 25766.000 -9203.00000 144 76643 113150.510 -36507.51020 145 110681 87895.319 22785.68085 146 29011 30124.028 -1113.02830 147 92696 65286.944 27409.05556 148 94785 53045.100 41739.90000 149 8773 3991.733 4781.26667 150 83209 65286.944 17922.05556 151 93815 113150.510 -19335.51020 152 86687 87895.319 -1208.31915 153 34553 30124.028 4428.97170 154 105547 113150.510 -7603.51020 155 103487 113150.510 -9663.51020 156 213688 113150.510 100537.48980 157 71220 87895.319 -16675.31915 158 23517 30124.028 -6607.02830 159 56926 65286.944 -8360.94444 160 91721 87895.319 3825.68085 161 115168 113150.510 2017.48980 162 111194 65286.944 45907.05556 163 51009 53045.100 -2036.10000 164 135777 113150.510 22626.48980 165 51513 65286.944 -13773.94444 166 74163 113150.510 -38987.51020 167 51633 65058.808 -13425.80769 168 75345 65286.944 10058.05556 169 33416 65058.808 -31642.80769 170 83305 65058.808 18246.19231 171 98952 65058.808 33893.19231 172 102372 87895.319 14476.68085 173 37238 25766.000 11472.00000 174 103772 113150.510 -9378.51020 175 123969 65286.944 58682.05556 176 27142 30124.028 -2982.02830 177 135400 113150.510 22249.48980 178 21399 30124.028 -8725.02830 179 130115 113150.510 16964.48980 180 24874 30124.028 -5250.02830 181 34988 30124.028 4863.97170 182 45549 25766.000 19783.00000 183 6023 3991.733 2031.26667 184 64466 65058.808 -592.80769 185 54990 113150.510 -58160.51020 186 1644 3991.733 -2347.73333 187 6179 3991.733 2187.26667 188 3926 3991.733 -65.73333 189 32755 30124.028 2630.97170 190 34777 65286.944 -30509.94444 191 73224 53045.100 20178.90000 192 27114 30124.028 -3010.02830 193 20760 30124.028 -9364.02830 194 37636 30124.028 7511.97170 195 65461 87895.319 -22434.31915 196 30080 30124.028 -44.02830 197 24094 30124.028 -6030.02830 198 69008 30124.028 38883.97170 199 54968 30124.028 24843.97170 200 46090 30124.028 15965.97170 201 27507 30124.028 -2617.02830 202 10672 30124.028 -19452.02830 203 34029 30124.028 3904.97170 204 46300 53045.100 -6745.10000 205 24760 30124.028 -5364.02830 206 18779 14647.000 4132.00000 207 21280 30124.028 -8844.02830 208 40662 30124.028 10537.97170 209 28987 30124.028 -1137.02830 210 22827 30124.028 -7297.02830 211 18513 30124.028 -11611.02830 212 30594 30124.028 469.97170 213 24006 30124.028 -6118.02830 214 27913 30124.028 -2211.02830 215 42744 25766.000 16978.00000 216 12934 14647.000 -1713.00000 217 22574 30124.028 -7550.02830 218 41385 30124.028 11260.97170 219 18653 30124.028 -11471.02830 220 18472 14647.000 3825.00000 221 30976 30124.028 851.97170 222 63339 65058.808 -1719.80769 223 25568 30124.028 -4556.02830 224 33747 30124.028 3622.97170 225 4154 14647.000 -10493.00000 226 19474 30124.028 -10650.02830 227 35130 30124.028 5005.97170 228 39067 30124.028 8942.97170 229 13310 30124.028 -16814.02830 230 65892 30124.028 35767.97170 231 4143 14647.000 -10504.00000 232 28579 30124.028 -1545.02830 233 51776 30124.028 21651.97170 234 21152 30124.028 -8972.02830 235 38084 30124.028 7959.97170 236 27717 30124.028 -2407.02830 237 32928 30124.028 2803.97170 238 11342 30124.028 -18782.02830 239 19499 30124.028 -10625.02830 240 16380 30124.028 -13744.02830 241 36874 30124.028 6749.97170 242 48259 53045.100 -4786.10000 243 16734 30124.028 -13390.02830 244 28207 30124.028 -1917.02830 245 30143 30124.028 18.97170 246 41369 30124.028 11244.97170 247 45833 30124.028 15708.97170 248 29156 30124.028 -968.02830 249 35944 30124.028 5819.97170 250 36278 30124.028 6153.97170 251 45588 30124.028 15463.97170 252 45097 30124.028 14972.97170 253 3895 3991.733 -96.73333 254 28394 30124.028 -1730.02830 255 18632 30124.028 -11492.02830 256 2325 3991.733 -1666.73333 257 25139 30124.028 -4985.02830 258 27975 30124.028 -2149.02830 259 14483 25766.000 -11283.00000 260 13127 14647.000 -1520.00000 261 5839 14647.000 -8808.00000 262 24069 30124.028 -6055.02830 263 3738 3991.733 -253.73333 264 18625 30124.028 -11499.02830 265 36341 30124.028 6216.97170 266 24548 30124.028 -5576.02830 267 21792 30124.028 -8332.02830 268 26263 30124.028 -3861.02830 269 23686 30124.028 -6438.02830 270 49303 30124.028 19178.97170 271 25659 30124.028 -4465.02830 272 28904 30124.028 -1220.02830 273 2781 3991.733 -1210.73333 274 29236 30124.028 -888.02830 275 19546 30124.028 -10578.02830 276 22818 30124.028 -7306.02830 277 32689 14647.000 18042.00000 278 5752 3991.733 1760.26667 279 22197 30124.028 -7927.02830 280 20055 30124.028 -10069.02830 281 25272 30124.028 -4852.02830 282 82206 30124.028 52081.97170 283 32073 30124.028 1948.97170 284 5444 3991.733 1452.26667 285 20154 14647.000 5507.00000 286 36944 30124.028 6819.97170 287 8019 14647.000 -6628.00000 288 30884 30124.028 759.97170 289 19540 30124.028 -10584.02830 > if (par2 != 'none') { + print(cbind(as.factor(x[,par1]),predict(m))) + myt <- table(as.factor(x[,par1]),predict(m)) + print(myt) + } > postscript(file="/var/wessaorg/rcomp/tmp/4usos1324308544.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/wessaorg/rcomp/tmp/5x0ta1324308545.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/wessaorg/rcomp/tmp/6plga1324308545.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/wessaorg/rcomp/tmp/7drrn1324308545.tab") + } > > try(system("convert tmp/2cokm1324308544.ps tmp/2cokm1324308544.png",intern=TRUE)) character(0) > try(system("convert tmp/3b23w1324308544.ps tmp/3b23w1324308544.png",intern=TRUE)) character(0) > try(system("convert tmp/4usos1324308544.ps tmp/4usos1324308544.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.758 0.293 7.086