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(210907 + ,112285 + ,30 + ,79 + ,4 + ,2 + ,120982 + ,84786 + ,28 + ,58 + ,2 + ,3 + ,176508 + ,83123 + ,38 + ,60 + ,4 + ,2 + ,179321 + ,101193 + ,30 + ,108 + ,NA + ,NA + ,123185 + ,38361 + ,22 + ,49 + ,NA + ,NA + ,52746 + ,68504 + ,26 + ,0 + ,2 + ,3 + ,385534 + ,119182 + ,25 + ,121 + ,3 + ,4 + ,33170 + ,22807 + ,18 + ,1 + ,NA + ,NA + ,101645 + ,17140 + ,11 + ,20 + ,NA + ,NA + ,149061 + ,116174 + ,26 + ,43 + ,4 + ,4 + ,165446 + ,57635 + ,25 + ,69 + ,NA + ,NA + ,237213 + ,66198 + ,38 + ,78 + ,3 + ,2 + ,173326 + ,71701 + ,44 + ,86 + ,NA + ,NA + ,133131 + ,57793 + ,30 + ,44 + ,4 + ,2 + ,258873 + ,80444 + ,40 + ,104 + ,NA + ,NA + ,180083 + ,53855 + ,34 + ,63 + ,NA + ,NA + ,324799 + ,97668 + ,47 + ,158 + ,4 + ,2 + ,230964 + ,133824 + ,30 + ,102 + ,4 + ,4 + ,236785 + ,101481 + ,31 + ,77 + ,2 + ,2 + ,135473 + ,99645 + ,23 + ,82 + ,NA + ,NA + ,202925 + ,114789 + ,36 + ,115 + ,3 + ,2 + ,215147 + ,99052 + ,36 + ,101 + ,1 + ,2 + ,344297 + ,67654 + ,30 + ,80 + ,4 + ,3 + ,153935 + ,65553 + ,25 + ,50 + ,NA + ,NA + ,132943 + ,97500 + ,39 + ,83 + ,NA + ,NA + ,174724 + ,69112 + ,34 + ,123 + ,5 + ,2 + ,174415 + ,82753 + ,31 + ,73 + ,2 + ,1 + ,225548 + ,85323 + ,31 + ,81 + ,NA + ,NA + ,223632 + ,72654 + ,33 + ,105 + ,4 + ,2 + ,124817 + ,30727 + ,25 + ,47 + ,4 + ,2 + ,221698 + ,77873 + ,33 + ,105 + ,3 + ,1 + ,210767 + ,117478 + ,35 + ,94 + ,NA + ,NA + ,170266 + ,74007 + ,42 + ,44 + ,4 + ,4 + ,260561 + ,90183 + ,43 + ,114 + ,3 + ,3 + ,84853 + ,61542 + ,30 + ,38 + ,NA + ,NA + ,294424 + ,101494 + ,33 + ,107 + ,1 + ,2 + ,101011 + ,27570 + ,13 + ,30 + ,4 + ,4 + ,215641 + ,55813 + ,32 + ,71 + ,NA + ,NA + ,325107 + ,79215 + ,36 + ,84 + ,2 + ,3 + ,7176 + ,1423 + ,0 + ,0 + ,NA + ,NA + ,167542 + ,55461 + ,28 + ,59 + ,NA + ,NA + ,106408 + ,31081 + ,14 + ,33 + ,5 + ,4 + ,96560 + ,22996 + ,17 + ,42 + ,4 + ,3 + ,265769 + ,83122 + ,32 + ,96 + ,3 + ,1 + ,269651 + ,70106 + ,30 + ,106 + ,NA + ,NA + ,149112 + ,60578 + ,35 + ,56 + ,4 + ,1 + ,175824 + ,39992 + ,20 + ,57 + ,2 + ,4 + ,152871 + ,79892 + ,28 + ,59 + ,3 + ,4 + ,111665 + ,49810 + ,28 + ,39 + ,NA + ,NA + ,116408 + ,71570 + ,39 + ,34 + ,NA + ,NA + ,362301 + ,100708 + ,34 + ,76 + ,4 + ,2 + ,78800 + ,33032 + ,26 + ,20 + ,NA + ,NA + ,183167 + ,82875 + ,39 + ,91 + ,4 + ,3 + ,277965 + ,139077 + ,39 + ,115 + ,1 + ,2 + ,150629 + ,71595 + ,33 + ,85 + ,3 + ,3 + ,168809 + ,72260 + ,28 + ,76 + ,4 + ,2 + ,24188 + ,5950 + ,4 + ,8 + ,NA + ,NA + ,329267 + ,115762 + ,39 + ,79 + ,NA + ,NA + ,65029 + ,32551 + ,18 + ,21 + ,NA + ,NA + ,101097 + ,31701 + ,14 + ,30 + ,NA + ,NA + ,218946 + ,80670 + ,29 + ,76 + ,2 + ,5 + ,244052 + ,143558 + ,44 + ,101 + ,4 + ,4 + ,341570 + ,117105 + ,21 + ,94 + ,4 + ,4 + ,103597 + ,23789 + ,16 + ,27 + ,2 + ,2 + ,233328 + ,120733 + ,28 + ,92 + ,NA + ,NA + ,256462 + ,105195 + ,35 + ,123 + ,NA + ,NA + ,206161 + ,73107 + ,28 + ,75 + ,NA + ,NA + ,311473 + ,132068 + ,38 + ,128 + ,3 + ,4 + ,235800 + ,149193 + ,23 + ,105 + ,NA + ,NA + ,177939 + ,46821 + ,36 + ,55 + ,NA + ,NA + ,207176 + ,87011 + ,32 + ,56 + ,NA + ,NA + ,196553 + ,95260 + ,29 + ,41 + ,2 + ,2 + ,174184 + ,55183 + ,25 + ,72 + ,NA + ,NA + ,143246 + ,106671 + ,27 + ,67 + ,4 + ,1 + ,187559 + ,73511 + ,36 + ,75 + ,4 + ,1 + ,187681 + ,92945 + ,28 + ,114 + ,4 + ,4 + ,119016 + ,78664 + ,23 + ,118 + ,3 + ,1 + ,182192 + ,70054 + ,40 + ,77 + ,NA + ,NA + ,73566 + ,22618 + ,23 + ,22 + ,NA + ,NA + ,194979 + ,74011 + ,40 + ,66 + ,NA + ,NA + ,167488 + ,83737 + ,28 + ,69 + ,4 + ,1 + ,143756 + ,69094 + ,34 + ,105 + ,4 + ,2 + ,275541 + ,93133 + ,33 + ,116 + ,NA + ,NA + ,243199 + ,95536 + ,28 + ,88 + ,1 + ,4 + ,182999 + ,225920 + ,34 + ,73 + ,2 + ,4 + ,135649 + ,62133 + ,30 + ,99 + ,4 + ,1 + ,152299 + ,61370 + ,33 + ,62 + ,3 + ,2 + ,120221 + ,43836 + ,22 + ,53 + ,4 + ,4 + ,346485 + ,106117 + ,38 + ,118 + ,5 + ,4 + ,145790 + ,38692 + ,26 + ,30 + ,NA + ,NA + ,193339 + ,84651 + ,35 + ,100 + ,2 + ,4 + ,80953 + ,56622 + ,8 + ,49 + ,NA + ,NA + ,122774 + ,15986 + ,24 + ,24 + ,3 + ,2 + ,130585 + ,95364 + ,29 + ,67 + ,5 + ,2 + ,112611 + ,26706 + ,20 + ,46 + ,4 + ,4 + ,286468 + ,89691 + ,29 + ,57 + ,3 + ,3 + ,241066 + ,67267 + ,45 + ,75 + ,2 + ,4 + ,148446 + ,126846 + ,37 + ,135 + ,4 + ,4 + ,204713 + ,41140 + ,33 + ,68 + ,2 + ,3 + ,182079 + ,102860 + ,33 + ,124 + ,2 + ,2 + ,140344 + ,51715 + ,25 + ,33 + ,2 + ,1 + ,220516 + ,55801 + ,32 + ,98 + ,2 + ,2 + ,243060 + ,111813 + ,29 + ,58 + ,5 + ,4 + ,162765 + ,120293 + ,28 + ,68 + ,2 + ,1 + ,182613 + ,138599 + ,28 + ,81 + ,NA + ,NA + ,232138 + ,161647 + ,31 + ,131 + ,NA + ,NA + ,265318 + ,115929 + ,52 + ,110 + ,4 + ,4 + ,85574 + ,24266 + ,21 + ,37 + ,2 + ,4 + ,310839 + ,162901 + ,24 + ,130 + ,5 + ,4 + ,225060 + ,109825 + ,41 + ,93 + ,5 + ,4 + ,232317 + ,129838 + ,33 + ,118 + ,NA + ,NA + ,144966 + ,37510 + ,32 + ,39 + ,NA + ,NA + ,43287 + ,43750 + ,19 + ,13 + ,NA + ,NA + ,155754 + ,40652 + ,20 + ,74 + ,NA + ,NA + ,164709 + ,87771 + ,31 + ,81 + ,2 + ,2 + ,201940 + ,85872 + ,31 + ,109 + ,2 + ,2 + ,235454 + ,89275 + ,32 + ,151 + ,2 + ,3 + ,220801 + ,44418 + ,18 + ,51 + ,3 + ,2 + ,99466 + ,192565 + ,23 + ,28 + ,5 + ,5 + ,92661 + ,35232 + ,17 + ,40 + ,3 + ,5 + ,133328 + ,40909 + ,20 + ,56 + ,2 + ,4 + ,61361 + ,13294 + ,12 + ,27 + ,2 + ,2 + ,125930 + ,32387 + ,17 + ,37 + ,2 + ,2 + ,100750 + ,140867 + ,30 + ,83 + ,1 + ,1 + ,224549 + ,120662 + ,31 + ,54 + ,NA + ,NA + ,82316 + ,21233 + ,10 + ,27 + ,5 + ,2 + ,102010 + ,44332 + ,13 + ,28 + ,3 + ,2 + ,101523 + ,61056 + ,22 + ,59 + ,4 + ,2 + ,243511 + ,101338 + ,42 + ,133 + ,2 + ,4 + ,22938 + ,1168 + ,1 + ,12 + ,NA + ,NA + ,41566 + ,13497 + ,9 + ,0 + ,NA + ,NA + ,152474 + ,65567 + ,32 + ,106 + ,4 + ,3 + ,61857 + ,25162 + ,11 + ,23 + ,NA + ,NA + ,99923 + ,32334 + ,25 + ,44 + ,4 + ,1 + ,132487 + ,40735 + ,36 + ,71 + ,2 + ,1 + ,317394 + ,91413 + ,31 + ,116 + ,4 + ,2 + ,21054 + ,855 + ,0 + ,4 + ,NA + ,NA + ,209641 + ,97068 + ,24 + ,62 + ,NA + ,NA + ,22648 + ,44339 + ,13 + ,12 + ,3 + ,2 + ,31414 + ,14116 + ,8 + ,18 + ,NA + ,NA + ,46698 + ,10288 + ,13 + ,14 + ,4 + ,4 + ,131698 + ,65622 + ,19 + ,60 + ,4 + ,3 + ,91735 + ,16563 + ,18 + ,7 + ,2 + ,2 + ,244749 + ,76643 + ,33 + ,98 + ,2 + ,2 + ,184510 + ,110681 + ,40 + ,64 + ,NA + ,NA + ,79863 + ,29011 + ,22 + ,29 + ,4 + ,4 + ,128423 + ,92696 + ,38 + ,32 + ,3 + ,4 + ,97839 + ,94785 + ,24 + ,25 + ,5 + ,5 + ,38214 + ,8773 + ,8 + ,16 + ,NA + ,NA + ,151101 + ,83209 + ,35 + ,48 + ,NA + ,NA + ,272458 + ,93815 + ,43 + ,100 + ,2 + ,2 + ,172494 + ,86687 + ,43 + ,46 + ,4 + ,4 + ,108043 + ,34553 + ,14 + ,45 + ,3 + ,1 + ,328107 + ,105547 + ,41 + ,129 + ,2 + ,3 + ,250579 + ,103487 + ,38 + ,130 + ,4 + ,1 + ,351067 + ,213688 + ,45 + ,136 + ,4 + ,4 + ,158015 + ,71220 + ,31 + ,59 + ,NA + ,NA + ,98866 + ,23517 + ,13 + ,25 + ,NA + ,NA + ,85439 + ,56926 + ,28 + ,32 + ,NA + ,NA + ,229242 + ,91721 + ,31 + ,63 + ,4 + ,1 + ,351619 + ,115168 + ,40 + ,95 + ,NA + ,NA + ,84207 + ,111194 + ,30 + ,14 + ,4 + ,2 + ,120445 + ,51009 + ,16 + ,36 + ,2 + ,1 + ,324598 + ,135777 + ,37 + ,113 + ,4 + ,4 + ,131069 + ,51513 + ,30 + ,47 + ,4 + ,2 + ,204271 + ,74163 + ,35 + ,92 + ,4 + ,3 + ,165543 + ,51633 + ,32 + ,70 + ,NA + ,NA + ,141722 + ,75345 + ,27 + ,19 + ,5 + ,2 + ,116048 + ,33416 + ,20 + ,50 + ,NA + ,NA + ,250047 + ,83305 + ,18 + ,41 + ,3 + ,2 + ,299775 + ,98952 + ,31 + ,91 + ,3 + ,4 + ,195838 + ,102372 + ,31 + ,111 + ,4 + ,4 + ,173260 + ,37238 + ,21 + ,41 + ,4 + ,2 + ,254488 + ,103772 + ,39 + ,120 + ,3 + ,3 + ,104389 + ,123969 + ,41 + ,135 + ,NA + ,NA + ,136084 + ,27142 + ,13 + ,27 + ,NA + ,NA + ,199476 + ,135400 + ,32 + ,87 + ,NA + ,NA + ,92499 + ,21399 + ,18 + ,25 + ,3 + ,3 + ,224330 + ,130115 + ,39 + ,131 + ,4 + ,3 + ,135781 + ,24874 + ,14 + ,45 + ,3 + ,2 + ,74408 + ,34988 + ,7 + ,29 + ,4 + ,3 + ,81240 + ,45549 + ,17 + ,58 + ,5 + ,3 + ,14688 + ,6023 + ,0 + ,4 + ,NA + ,NA + ,181633 + ,64466 + ,30 + ,47 + ,2 + ,5 + ,271856 + ,54990 + ,37 + ,109 + ,4 + ,4 + ,7199 + ,1644 + ,0 + ,7 + ,NA + ,NA + ,46660 + ,6179 + ,5 + ,12 + ,NA + ,NA + ,17547 + ,3926 + ,1 + ,0 + ,NA + ,NA + ,133368 + ,32755 + ,16 + ,37 + ,2 + ,2 + ,95227 + ,34777 + ,32 + ,37 + ,4 + ,2 + ,152601 + ,73224 + ,24 + ,46 + ,4 + ,2 + ,98146 + ,27114 + ,17 + ,15 + ,3 + ,3 + ,79619 + ,20760 + ,11 + ,42 + ,NA + ,NA + ,59194 + ,37636 + ,24 + ,7 + ,2 + ,1 + ,139942 + ,65461 + ,22 + ,54 + ,2 + ,2 + ,118612 + ,30080 + ,12 + ,54 + ,2 + ,2 + ,72880 + ,24094 + ,19 + ,14 + ,3 + ,4 + ,65475 + ,69008 + ,13 + ,16 + ,3 + ,2 + ,99643 + ,54968 + ,17 + ,33 + ,4 + ,1 + ,71965 + ,46090 + ,15 + ,32 + ,4 + ,2 + ,77272 + ,27507 + ,16 + ,21 + ,NA + ,NA + ,49289 + ,10672 + ,24 + ,15 + ,NA + ,NA + ,135131 + ,34029 + ,15 + ,38 + ,2 + ,4 + ,108446 + ,46300 + ,17 + ,22 + ,1 + ,4 + ,89746 + ,24760 + ,18 + ,28 + ,5 + ,4 + ,44296 + ,18779 + ,20 + ,10 + ,NA + ,NA + ,77648 + ,21280 + ,16 + ,31 + ,NA + ,NA + ,181528 + ,40662 + ,16 + ,32 + ,3 + ,2 + ,134019 + ,28987 + ,18 + ,32 + ,4 + ,1 + ,124064 + ,22827 + ,22 + ,43 + ,NA + ,NA + ,92630 + ,18513 + ,8 + ,27 + ,3 + ,2 + ,121848 + ,30594 + ,17 + ,37 + ,4 + ,5 + ,52915 + ,24006 + ,18 + ,20 + ,NA + ,NA + ,81872 + ,27913 + ,16 + ,32 + ,2 + ,1 + ,58981 + ,42744 + ,23 + ,0 + ,4 + ,3 + ,53515 + ,12934 + ,22 + ,5 + ,4 + ,4 + ,60812 + ,22574 + ,13 + ,26 + ,3 + ,2 + ,56375 + ,41385 + ,13 + ,10 + ,2 + ,2 + ,65490 + ,18653 + ,16 + ,27 + ,5 + ,5 + ,80949 + ,18472 + ,16 + ,11 + ,NA + ,NA + ,76302 + ,30976 + ,20 + ,29 + ,5 + ,4 + ,104011 + ,63339 + ,22 + ,25 + ,4 + ,2 + ,98104 + ,25568 + ,17 + ,55 + ,3 + ,2 + ,67989 + ,33747 + ,18 + ,23 + ,NA + ,NA + ,30989 + ,4154 + ,17 + ,5 + ,NA + ,NA + ,135458 + ,19474 + ,12 + ,43 + ,2 + ,2 + ,73504 + ,35130 + ,7 + ,23 + ,NA + ,NA + ,63123 + ,39067 + ,17 + ,34 + ,2 + ,3 + ,61254 + ,13310 + ,14 + ,36 + ,0 + ,3 + ,74914 + ,65892 + ,23 + ,35 + ,NA + ,NA + ,31774 + ,4143 + ,17 + ,0 + ,4 + ,2 + ,81437 + ,28579 + ,14 + ,37 + ,4 + ,2 + ,87186 + ,51776 + ,15 + ,28 + ,4 + ,4 + ,50090 + ,21152 + ,17 + ,16 + ,NA + ,NA + ,65745 + ,38084 + ,21 + ,26 + ,2 + ,2 + ,56653 + ,27717 + ,18 + ,38 + ,4 + ,4 + ,158399 + ,32928 + ,18 + ,23 + ,4 + ,4 + ,46455 + ,11342 + ,17 + ,22 + ,NA + ,NA + ,73624 + ,19499 + ,17 + ,30 + ,4 + ,2 + ,38395 + ,16380 + ,16 + ,16 + ,NA + ,NA + ,91899 + ,36874 + ,15 + ,18 + ,3 + ,3 + ,139526 + ,48259 + ,21 + ,28 + ,NA + ,NA + ,52164 + ,16734 + ,16 + ,32 + ,NA + ,NA + ,51567 + ,28207 + ,14 + ,21 + ,4 + ,2 + ,70551 + ,30143 + ,15 + ,23 + ,NA + ,NA + ,84856 + ,41369 + ,17 + ,29 + ,NA + ,NA + ,102538 + ,45833 + ,15 + ,50 + ,2 + ,2 + ,86678 + ,29156 + ,15 + ,12 + ,NA + ,NA + ,85709 + ,35944 + ,10 + ,21 + ,NA + ,NA + ,34662 + ,36278 + ,6 + ,18 + ,4 + ,1 + ,150580 + ,45588 + ,22 + ,27 + ,4 + ,4 + ,99611 + ,45097 + ,21 + ,41 + ,2 + ,3 + ,19349 + ,3895 + ,1 + ,13 + ,NA + ,NA + ,99373 + ,28394 + ,18 + ,12 + ,4 + ,4 + ,86230 + ,18632 + ,17 + ,21 + ,3 + ,3 + ,30837 + ,2325 + ,4 + ,8 + ,5 + ,5 + ,31706 + ,25139 + ,10 + ,26 + ,4 + ,1 + ,89806 + ,27975 + ,16 + ,27 + ,NA + ,NA + ,62088 + ,14483 + ,16 + ,13 + ,4 + ,4 + ,40151 + ,13127 + ,9 + ,16 + ,NA + ,NA + ,27634 + ,5839 + ,16 + ,2 + ,NA + ,NA + ,76990 + ,24069 + ,17 + ,42 + ,NA + ,NA + ,37460 + ,3738 + ,7 + ,5 + ,NA + ,NA + ,54157 + ,18625 + ,15 + ,37 + ,4 + ,4 + ,49862 + ,36341 + ,14 + ,17 + ,4 + ,5 + ,84337 + ,24548 + ,14 + ,38 + ,4 + ,2 + ,64175 + ,21792 + ,18 + ,37 + ,NA + ,NA + ,59382 + ,26263 + ,12 + ,29 + ,4 + ,4 + ,119308 + ,23686 + ,16 + ,32 + ,2 + ,2 + ,76702 + ,49303 + ,21 + ,35 + ,4 + ,3 + ,103425 + ,25659 + ,19 + ,17 + ,NA + ,NA + ,70344 + ,28904 + ,16 + ,20 + ,NA + ,NA + ,43410 + ,2781 + ,1 + ,7 + ,NA + ,NA + ,104838 + ,29236 + ,16 + ,46 + ,3 + ,2 + ,62215 + ,19546 + ,10 + ,24 + ,NA + ,NA + ,69304 + ,22818 + ,19 + ,40 + ,4 + ,1 + ,53117 + ,32689 + ,12 + ,3 + ,3 + ,3 + ,19764 + ,5752 + ,2 + ,10 + ,NA + ,NA + ,86680 + ,22197 + ,14 + ,37 + ,4 + ,2 + ,84105 + ,20055 + ,17 + ,17 + ,3 + ,3 + ,77945 + ,25272 + ,19 + ,28 + ,4 + ,2 + ,89113 + ,82206 + ,14 + ,19 + ,NA + ,NA + ,91005 + ,32073 + ,11 + ,29 + ,NA + ,NA + ,40248 + ,5444 + ,4 + ,8 + ,NA + ,NA + ,64187 + ,20154 + ,16 + ,10 + ,2 + ,4 + ,50857 + ,36944 + ,20 + ,15 + ,NA + ,NA + ,56613 + ,8019 + ,12 + ,15 + ,NA + ,NA + ,62792 + ,30884 + ,15 + ,28 + ,NA + ,NA + ,72535 + ,19540 + ,16 + ,17 + ,NA + ,NA) + ,dim=c(6 + ,289) + ,dimnames=list(c('TimeRFC' + ,'TotSize' + ,'CompRV' + ,'CompBlog' + ,'Q1_1' + ,'Q1_9') + ,1:289)) > y <- array(NA,dim=c(6,289),dimnames=list(c('TimeRFC','TotSize','CompRV','CompBlog','Q1_1','Q1_9'),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 = 'yes' > par3 = '' > par2 = 'none' > par1 = '1' > 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] "TimeRFC" > x[,par1] [1] 210907 120982 176508 179321 123185 52746 385534 33170 101645 149061 [11] 165446 237213 173326 133131 258873 180083 324799 230964 236785 135473 [21] 202925 215147 344297 153935 132943 174724 174415 225548 223632 124817 [31] 221698 210767 170266 260561 84853 294424 101011 215641 325107 7176 [41] 167542 106408 96560 265769 269651 149112 175824 152871 111665 116408 [51] 362301 78800 183167 277965 150629 168809 24188 329267 65029 101097 [61] 218946 244052 341570 103597 233328 256462 206161 311473 235800 177939 [71] 207176 196553 174184 143246 187559 187681 119016 182192 73566 194979 [81] 167488 143756 275541 243199 182999 135649 152299 120221 346485 145790 [91] 193339 80953 122774 130585 112611 286468 241066 148446 204713 182079 [101] 140344 220516 243060 162765 182613 232138 265318 85574 310839 225060 [111] 232317 144966 43287 155754 164709 201940 235454 220801 99466 92661 [121] 133328 61361 125930 100750 224549 82316 102010 101523 243511 22938 [131] 41566 152474 61857 99923 132487 317394 21054 209641 22648 31414 [141] 46698 131698 91735 244749 184510 79863 128423 97839 38214 151101 [151] 272458 172494 108043 328107 250579 351067 158015 98866 85439 229242 [161] 351619 84207 120445 324598 131069 204271 165543 141722 116048 250047 [171] 299775 195838 173260 254488 104389 136084 199476 92499 224330 135781 [181] 74408 81240 14688 181633 271856 7199 46660 17547 133368 95227 [191] 152601 98146 79619 59194 139942 118612 72880 65475 99643 71965 [201] 77272 49289 135131 108446 89746 44296 77648 181528 134019 124064 [211] 92630 121848 52915 81872 58981 53515 60812 56375 65490 80949 [221] 76302 104011 98104 67989 30989 135458 73504 63123 61254 74914 [231] 31774 81437 87186 50090 65745 56653 158399 46455 73624 38395 [241] 91899 139526 52164 51567 70551 84856 102538 86678 85709 34662 [251] 150580 99611 19349 99373 86230 30837 31706 89806 62088 40151 [261] 27634 76990 37460 54157 49862 84337 64175 59382 119308 76702 [271] 103425 70344 43410 104838 62215 69304 53117 19764 86680 84105 [281] 77945 89113 91005 40248 64187 50857 56613 62792 72535 > 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]) 7176 7199 14688 17547 19349 19764 21054 22648 22938 24188 27634 1 1 1 1 1 1 1 1 1 1 1 30837 30989 31414 31706 31774 33170 34662 37460 38214 38395 40151 1 1 1 1 1 1 1 1 1 1 1 40248 41566 43287 43410 44296 46455 46660 46698 49289 49862 50090 1 1 1 1 1 1 1 1 1 1 1 50857 51567 52164 52746 52915 53117 53515 54157 56375 56613 56653 1 1 1 1 1 1 1 1 1 1 1 58981 59194 59382 60812 61254 61361 61857 62088 62215 62792 63123 1 1 1 1 1 1 1 1 1 1 1 64175 64187 65029 65475 65490 65745 67989 69304 70344 70551 71965 1 1 1 1 1 1 1 1 1 1 1 72535 72880 73504 73566 73624 74408 74914 76302 76702 76990 77272 1 1 1 1 1 1 1 1 1 1 1 77648 77945 78800 79619 79863 80949 80953 81240 81437 81872 82316 1 1 1 1 1 1 1 1 1 1 1 84105 84207 84337 84853 84856 85439 85574 85709 86230 86678 86680 1 1 1 1 1 1 1 1 1 1 1 87186 89113 89746 89806 91005 91735 91899 92499 92630 92661 95227 1 1 1 1 1 1 1 1 1 1 1 96560 97839 98104 98146 98866 99373 99466 99611 99643 99923 100750 1 1 1 1 1 1 1 1 1 1 1 101011 101097 101523 101645 102010 102538 103425 103597 104011 104389 104838 1 1 1 1 1 1 1 1 1 1 1 106408 108043 108446 111665 112611 116048 116408 118612 119016 119308 120221 1 1 1 1 1 1 1 1 1 1 1 120445 120982 121848 122774 123185 124064 124817 125930 128423 130585 131069 1 1 1 1 1 1 1 1 1 1 1 131698 132487 132943 133131 133328 133368 134019 135131 135458 135473 135649 1 1 1 1 1 1 1 1 1 1 1 135781 136084 139526 139942 140344 141722 143246 143756 144966 145790 148446 1 1 1 1 1 1 1 1 1 1 1 149061 149112 150580 150629 151101 152299 152474 152601 152871 153935 155754 1 1 1 1 1 1 1 1 1 1 1 158015 158399 162765 164709 165446 165543 167488 167542 168809 170266 172494 1 1 1 1 1 1 1 1 1 1 1 173260 173326 174184 174415 174724 175824 176508 177939 179321 180083 181528 1 1 1 1 1 1 1 1 1 1 1 181633 182079 182192 182613 182999 183167 184510 187559 187681 193339 194979 1 1 1 1 1 1 1 1 1 1 1 195838 196553 199476 201940 202925 204271 204713 206161 207176 209641 210767 1 1 1 1 1 1 1 1 1 1 1 210907 215147 215641 218946 220516 220801 221698 223632 224330 224549 225060 1 1 1 1 1 1 1 1 1 1 1 225548 229242 230964 232138 232317 233328 235454 235800 236785 237213 241066 1 1 1 1 1 1 1 1 1 1 1 243060 243199 243511 244052 244749 250047 250579 254488 256462 258873 260561 1 1 1 1 1 1 1 1 1 1 1 265318 265769 269651 271856 272458 275541 277965 286468 294424 299775 310839 1 1 1 1 1 1 1 1 1 1 1 311473 317394 324598 324799 325107 328107 329267 341570 344297 346485 351067 1 1 1 1 1 1 1 1 1 1 1 351619 362301 385534 1 1 1 > colnames(x) [1] "TimeRFC" "TotSize" "CompRV" "CompBlog" "Q1_1" "Q1_9" > colnames(x)[par1] [1] "TimeRFC" > x[,par1] [1] 210907 120982 176508 179321 123185 52746 385534 33170 101645 149061 [11] 165446 237213 173326 133131 258873 180083 324799 230964 236785 135473 [21] 202925 215147 344297 153935 132943 174724 174415 225548 223632 124817 [31] 221698 210767 170266 260561 84853 294424 101011 215641 325107 7176 [41] 167542 106408 96560 265769 269651 149112 175824 152871 111665 116408 [51] 362301 78800 183167 277965 150629 168809 24188 329267 65029 101097 [61] 218946 244052 341570 103597 233328 256462 206161 311473 235800 177939 [71] 207176 196553 174184 143246 187559 187681 119016 182192 73566 194979 [81] 167488 143756 275541 243199 182999 135649 152299 120221 346485 145790 [91] 193339 80953 122774 130585 112611 286468 241066 148446 204713 182079 [101] 140344 220516 243060 162765 182613 232138 265318 85574 310839 225060 [111] 232317 144966 43287 155754 164709 201940 235454 220801 99466 92661 [121] 133328 61361 125930 100750 224549 82316 102010 101523 243511 22938 [131] 41566 152474 61857 99923 132487 317394 21054 209641 22648 31414 [141] 46698 131698 91735 244749 184510 79863 128423 97839 38214 151101 [151] 272458 172494 108043 328107 250579 351067 158015 98866 85439 229242 [161] 351619 84207 120445 324598 131069 204271 165543 141722 116048 250047 [171] 299775 195838 173260 254488 104389 136084 199476 92499 224330 135781 [181] 74408 81240 14688 181633 271856 7199 46660 17547 133368 95227 [191] 152601 98146 79619 59194 139942 118612 72880 65475 99643 71965 [201] 77272 49289 135131 108446 89746 44296 77648 181528 134019 124064 [211] 92630 121848 52915 81872 58981 53515 60812 56375 65490 80949 [221] 76302 104011 98104 67989 30989 135458 73504 63123 61254 74914 [231] 31774 81437 87186 50090 65745 56653 158399 46455 73624 38395 [241] 91899 139526 52164 51567 70551 84856 102538 86678 85709 34662 [251] 150580 99611 19349 99373 86230 30837 31706 89806 62088 40151 [261] 27634 76990 37460 54157 49862 84337 64175 59382 119308 76702 [271] 103425 70344 43410 104838 62215 69304 53117 19764 86680 84105 [281] 77945 89113 91005 40248 64187 50857 56613 62792 72535 > 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/1prrh1324656967.tab") + } + } > m Conditional inference tree with 9 terminal nodes Response: TimeRFC Inputs: TotSize, CompRV, CompBlog, Q1_1, Q1_9 Number of observations: 289 1) CompBlog <= 50; criterion = 1, statistic = 198.82 2) CompBlog <= 18; criterion = 1, statistic = 79.237 3) CompRV <= 9; criterion = 1, statistic = 21.404 4)* weights = 19 3) CompRV > 9 5)* weights = 34 2) CompBlog > 18 6) CompRV <= 23; criterion = 1, statistic = 26.563 7) CompBlog <= 40; criterion = 0.992, statistic = 10.059 8)* weights = 75 7) CompBlog > 40 9)* weights = 16 6) CompRV > 23 10)* weights = 25 1) CompBlog > 50 11) CompBlog <= 74; criterion = 1, statistic = 25.667 12) CompRV <= 28; criterion = 0.959, statistic = 6.938 13)* weights = 20 12) CompRV > 28 14)* weights = 20 11) CompBlog > 74 15) Q1_9 <= 1; criterion = 0.956, statistic = 6.848 16)* weights = 7 15) Q1_9 > 1 17)* weights = 73 > postscript(file="/var/wessaorg/rcomp/tmp/2qjvx1324656967.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/3pr511324656967.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 210907 240108.75 -29201.7534 2 120982 147060.60 -26078.6000 3 176508 188516.15 -12008.1500 4 179321 240108.75 -60787.7534 5 123185 119975.38 3209.6250 6 52746 60800.35 -8054.3529 7 385534 240108.75 145425.2466 8 33170 60800.35 -27630.3529 9 101645 87343.68 14301.3200 10 149061 132433.36 16627.6400 11 165446 147060.60 18385.4000 12 237213 240108.75 -2895.7534 13 173326 240108.75 -66782.7534 14 133131 132433.36 697.6400 15 258873 240108.75 18764.2466 16 180083 188516.15 -8433.1500 17 324799 240108.75 84690.2466 18 230964 240108.75 -9144.7534 19 236785 240108.75 -3323.7534 20 135473 240108.75 -104635.7534 21 202925 240108.75 -37183.7534 22 215147 240108.75 -24961.7534 23 344297 240108.75 104188.2466 24 153935 132433.36 21501.6400 25 132943 240108.75 -107165.7534 26 174724 240108.75 -65384.7534 27 174415 188516.15 -14101.1500 28 225548 240108.75 -14560.7534 29 223632 240108.75 -16476.7534 30 124817 132433.36 -7616.3600 31 221698 183002.86 38695.1429 32 210767 240108.75 -29341.7534 33 170266 132433.36 37832.6400 34 260561 240108.75 20452.2466 35 84853 132433.36 -47580.3600 36 294424 240108.75 54315.2466 37 101011 87343.68 13667.3200 38 215641 188516.15 27124.8500 39 325107 240108.75 84998.2466 40 7176 28343.42 -21167.4211 41 167542 147060.60 20481.4000 42 106408 87343.68 19064.3200 43 96560 119975.38 -23415.3750 44 265769 183002.86 82766.1429 45 269651 240108.75 29542.2466 46 149112 188516.15 -39404.1500 47 175824 147060.60 28763.4000 48 152871 147060.60 5810.4000 49 111665 132433.36 -20768.3600 50 116408 132433.36 -16025.3600 51 362301 240108.75 122192.2466 52 78800 132433.36 -53633.3600 53 183167 240108.75 -56941.7534 54 277965 240108.75 37856.2466 55 150629 240108.75 -89479.7534 56 168809 240108.75 -71299.7534 57 24188 28343.42 -4155.4211 58 329267 240108.75 89158.2466 59 65029 87343.68 -22314.6800 60 101097 87343.68 13753.3200 61 218946 240108.75 -21162.7534 62 244052 240108.75 3943.2466 63 341570 240108.75 101461.2466 64 103597 87343.68 16253.3200 65 233328 240108.75 -6780.7534 66 256462 240108.75 16353.2466 67 206161 240108.75 -33947.7534 68 311473 240108.75 71364.2466 69 235800 240108.75 -4308.7534 70 177939 188516.15 -10577.1500 71 207176 188516.15 18659.8500 72 196553 132433.36 64119.6400 73 174184 147060.60 27123.4000 74 143246 147060.60 -3814.6000 75 187559 183002.86 4556.1429 76 187681 240108.75 -52427.7534 77 119016 183002.86 -63986.8571 78 182192 240108.75 -57916.7534 79 73566 87343.68 -13777.6800 80 194979 188516.15 6462.8500 81 167488 147060.60 20427.4000 82 143756 240108.75 -96352.7534 83 275541 240108.75 35432.2466 84 243199 240108.75 3090.2466 85 182999 188516.15 -5517.1500 86 135649 183002.86 -47353.8571 87 152299 188516.15 -36217.1500 88 120221 147060.60 -26839.6000 89 346485 240108.75 106376.2466 90 145790 132433.36 13356.6400 91 193339 240108.75 -46769.7534 92 80953 119975.38 -39022.3750 93 122774 132433.36 -9659.3600 94 130585 188516.15 -57931.1500 95 112611 119975.38 -7364.3750 96 286468 188516.15 97951.8500 97 241066 240108.75 957.2466 98 148446 240108.75 -91662.7534 99 204713 188516.15 16196.8500 100 182079 240108.75 -58029.7534 101 140344 132433.36 7910.6400 102 220516 240108.75 -19592.7534 103 243060 188516.15 54543.8500 104 162765 147060.60 15704.4000 105 182613 240108.75 -57495.7534 106 232138 240108.75 -7970.7534 107 265318 240108.75 25209.2466 108 85574 87343.68 -1769.6800 109 310839 240108.75 70730.2466 110 225060 240108.75 -15048.7534 111 232317 240108.75 -7791.7534 112 144966 132433.36 12532.6400 113 43287 60800.35 -17513.3529 114 155754 147060.60 8693.4000 115 164709 240108.75 -75399.7534 116 201940 240108.75 -38168.7534 117 235454 240108.75 -4654.7534 118 220801 147060.60 73740.4000 119 99466 87343.68 12122.3200 120 92661 87343.68 5317.3200 121 133328 147060.60 -13732.6000 122 61361 87343.68 -25982.6800 123 125930 87343.68 38586.3200 124 100750 183002.86 -82252.8571 125 224549 188516.15 36032.8500 126 82316 87343.68 -5027.6800 127 102010 87343.68 14666.3200 128 101523 147060.60 -45537.6000 129 243511 240108.75 3402.2466 130 22938 28343.42 -5405.4211 131 41566 28343.42 13222.5789 132 152474 240108.75 -87634.7534 133 61857 87343.68 -25486.6800 134 99923 132433.36 -32510.3600 135 132487 188516.15 -56029.1500 136 317394 240108.75 77285.2466 137 21054 28343.42 -7289.4211 138 209641 147060.60 62580.4000 139 22648 60800.35 -38152.3529 140 31414 28343.42 3070.5789 141 46698 60800.35 -14102.3529 142 131698 147060.60 -15362.6000 143 91735 60800.35 30934.6471 144 244749 240108.75 4640.2466 145 184510 188516.15 -4006.1500 146 79863 87343.68 -7480.6800 147 128423 132433.36 -4010.3600 148 97839 132433.36 -34594.3600 149 38214 28343.42 9870.5789 150 151101 132433.36 18667.6400 151 272458 240108.75 32349.2466 152 172494 132433.36 40060.6400 153 108043 119975.38 -11932.3750 154 328107 240108.75 87998.2466 155 250579 183002.86 67576.1429 156 351067 240108.75 110958.2466 157 158015 188516.15 -30501.1500 158 98866 87343.68 11522.3200 159 85439 132433.36 -46994.3600 160 229242 188516.15 40725.8500 161 351619 240108.75 111510.2466 162 84207 60800.35 23406.6471 163 120445 87343.68 33101.3200 164 324598 240108.75 84489.2466 165 131069 132433.36 -1364.3600 166 204271 240108.75 -35837.7534 167 165543 188516.15 -22973.1500 168 141722 132433.36 9288.6400 169 116048 119975.38 -3927.3750 170 250047 119975.38 130071.6250 171 299775 240108.75 59666.2466 172 195838 240108.75 -44270.7534 173 173260 119975.38 53284.6250 174 254488 240108.75 14379.2466 175 104389 240108.75 -135719.7534 176 136084 87343.68 48740.3200 177 199476 240108.75 -40632.7534 178 92499 87343.68 5155.3200 179 224330 240108.75 -15778.7534 180 135781 119975.38 15805.6250 181 74408 87343.68 -12935.6800 182 81240 147060.60 -65820.6000 183 14688 28343.42 -13655.4211 184 181633 132433.36 49199.6400 185 271856 240108.75 31747.2466 186 7199 28343.42 -21144.4211 187 46660 28343.42 18316.5789 188 17547 28343.42 -10796.4211 189 133368 87343.68 46024.3200 190 95227 132433.36 -37206.3600 191 152601 132433.36 20167.6400 192 98146 60800.35 37345.6471 193 79619 119975.38 -40356.3750 194 59194 60800.35 -1606.3529 195 139942 147060.60 -7118.6000 196 118612 147060.60 -28448.6000 197 72880 60800.35 12079.6471 198 65475 60800.35 4674.6471 199 99643 87343.68 12299.3200 200 71965 87343.68 -15378.6800 201 77272 87343.68 -10071.6800 202 49289 60800.35 -11511.3529 203 135131 87343.68 47787.3200 204 108446 87343.68 21102.3200 205 89746 87343.68 2402.3200 206 44296 60800.35 -16504.3529 207 77648 87343.68 -9695.6800 208 181528 87343.68 94184.3200 209 134019 87343.68 46675.3200 210 124064 119975.38 4088.6250 211 92630 87343.68 5286.3200 212 121848 87343.68 34504.3200 213 52915 87343.68 -34428.6800 214 81872 87343.68 -5471.6800 215 58981 60800.35 -1819.3529 216 53515 60800.35 -7285.3529 217 60812 87343.68 -26531.6800 218 56375 60800.35 -4425.3529 219 65490 87343.68 -21853.6800 220 80949 60800.35 20148.6471 221 76302 87343.68 -11041.6800 222 104011 87343.68 16667.3200 223 98104 147060.60 -48956.6000 224 67989 87343.68 -19354.6800 225 30989 60800.35 -29811.3529 226 135458 119975.38 15482.6250 227 73504 87343.68 -13839.6800 228 63123 87343.68 -24220.6800 229 61254 87343.68 -26089.6800 230 74914 87343.68 -12429.6800 231 31774 60800.35 -29026.3529 232 81437 87343.68 -5906.6800 233 87186 87343.68 -157.6800 234 50090 60800.35 -10710.3529 235 65745 87343.68 -21598.6800 236 56653 87343.68 -30690.6800 237 158399 87343.68 71055.3200 238 46455 87343.68 -40888.6800 239 73624 87343.68 -13719.6800 240 38395 60800.35 -22405.3529 241 91899 60800.35 31098.6471 242 139526 87343.68 52182.3200 243 52164 87343.68 -35179.6800 244 51567 87343.68 -35776.6800 245 70551 87343.68 -16792.6800 246 84856 87343.68 -2487.6800 247 102538 119975.38 -17437.3750 248 86678 60800.35 25877.6471 249 85709 87343.68 -1634.6800 250 34662 28343.42 6318.5789 251 150580 87343.68 63236.3200 252 99611 119975.38 -20364.3750 253 19349 28343.42 -8994.4211 254 99373 60800.35 38572.6471 255 86230 87343.68 -1113.6800 256 30837 28343.42 2493.5789 257 31706 87343.68 -55637.6800 258 89806 87343.68 2462.3200 259 62088 60800.35 1287.6471 260 40151 28343.42 11807.5789 261 27634 60800.35 -33166.3529 262 76990 119975.38 -42985.3750 263 37460 28343.42 9116.5789 264 54157 87343.68 -33186.6800 265 49862 60800.35 -10938.3529 266 84337 87343.68 -3006.6800 267 64175 87343.68 -23168.6800 268 59382 87343.68 -27961.6800 269 119308 87343.68 31964.3200 270 76702 87343.68 -10641.6800 271 103425 60800.35 42624.6471 272 70344 87343.68 -16999.6800 273 43410 28343.42 15066.5789 274 104838 119975.38 -15137.3750 275 62215 87343.68 -25128.6800 276 69304 87343.68 -18039.6800 277 53117 60800.35 -7683.3529 278 19764 28343.42 -8579.4211 279 86680 87343.68 -663.6800 280 84105 60800.35 23304.6471 281 77945 87343.68 -9398.6800 282 89113 87343.68 1769.3200 283 91005 87343.68 3661.3200 284 40248 28343.42 11904.5789 285 64187 60800.35 3386.6471 286 50857 60800.35 -9943.3529 287 56613 60800.35 -4187.3529 288 62792 87343.68 -24551.6800 289 72535 60800.35 11734.6471 > 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/4ufq61324656967.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/5rzb71324656967.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/6tqjq1324656967.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/7qxcp1324656967.tab") + } > > try(system("convert tmp/2qjvx1324656967.ps tmp/2qjvx1324656967.png",intern=TRUE)) character(0) > try(system("convert tmp/3pr511324656967.ps tmp/3pr511324656967.png",intern=TRUE)) character(0) > try(system("convert tmp/4ufq61324656967.ps tmp/4ufq61324656967.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.459 0.384 5.925