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 <- c(-0.570875874954911 + ,-0.511137633876425 + ,-1.02711574887165 + ,-0.247459135140635 + ,-0.595944868112521 + ,-0.681163109535305 + ,0.345185635144615 + ,1.51024603582169 + ,-0.418019414772234 + ,-0.311267072375839 + ,1.67163081198947 + ,-0.539506946905068 + ,1.40945065934532 + ,2.2420522686079 + ,1.1650962896284 + ,2.42060649786476 + ,0.0682279397221915 + ,-0.11067421906174 + ,0.024453242603238 + ,-0.497693857719122 + ,-0.595630964725977 + ,0.115390547461763 + ,-0.675239658349256 + ,-0.57778043034228 + ,0.50210834818284 + ,0.283004867702643 + ,0.430374653934966 + ,-0.695202084018761 + ,-0.430981910529177 + ,-0.970212998970839 + ,-1.10289156964033 + ,-0.506294026344613 + ,-1.1356372838091 + ,-0.716198265950065 + ,2.38909456645549 + ,0.766445974578577 + ,0.20101606034162 + ,0.938576757692077 + ,-0.975096254853228 + ,-0.0782947847538538 + ,0.215600369809319 + ,1.11394756921882 + ,1.6878843005693 + ,0.740961084054461 + ,-0.278511975869071 + ,0.105272624006693 + ,-0.871792516446899 + ,1.03273141271 + ,1.15764643511619 + ,-1.36281718857765 + ,-1.22079671087844 + ,3.02664994074065 + ,-1.14348881138996 + ,-1.01628030645187 + ,-0.954424929131502 + ,-0.21738667106372 + ,-0.949233018879874 + ,-1.04076580006722 + ,-0.86871330354106 + ,-0.895786571506119 + ,-1.38421385241876 + ,-0.502591734605609 + ,-0.979653837088994 + ,-0.756778917390011 + ,-1.02509893199872 + ,0.775078491645856 + ,-0.577057910071895 + ,-1.13886240901432 + ,0.62205809771103 + ,-0.265105972838122 + ,2.87802336297808 + ,-0.382208027407422 + ,-0.803820507579544 + ,-0.136143485767757 + ,1.1797677238516 + ,3.99082323347408 + ,-0.600638307090792 + ,-0.311939888127828 + ,1.33010622026773 + ,-0.0109999670812058 + ,0.0925603270401305 + ,0.0666536056689318 + ,-0.0976293348785303 + ,0.123635635988901 + ,-0.518466391586699 + ,-0.697414295956901 + ,-1.26611290183839 + ,0.516880230125759 + ,0.763210392895926 + ,-3.17516924292666 + ,0.301867748783821 + ,1.24353362687794 + ,0.356838232267432 + ,0.804523450098973 + ,-0.736843535921125 + ,1.45248739251206 + ,-0.183442920152471 + ,-1.32915521507038 + ,0.505243391464097 + ,-0.252827982423921 + ,-0.0820050030754919 + ,0.806423061579241 + ,-1.33566333741937 + ,11.4870981436885 + ,0.143480495184982 + ,-0.629857613263178 + ,-0.278502748669541 + ,-0.0922405695467127 + ,0.331799201089393 + ,-0.641972295179589 + ,-0.52925336602269 + ,-0.292544657144514 + ,-0.48090361413658 + ,-0.231631079662059 + ,-0.546752715146306 + ,-0.0781488200211302 + ,-1.42330899184991 + ,4.74593671144418 + ,-1.03729791587256 + ,1.1870975602054 + ,-1.48483448678642 + ,-1.11006560160739 + ,0.602873113818105 + ,0.393348983328672 + ,-0.962148755968666 + ,0.0184697158565785 + ,-0.563883593450448 + ,0.166315739043732 + ,-1.08186987396044 + ,-1.18733053107029 + ,0.237743031994863 + ,0.611036185140024 + ,-0.79400692107665 + ,0.278478683949076 + ,-0.40622276355127 + ,0.925398335411391 + ,-1.19614998561647 + ,-1.08864464497138 + ,0.106042607339614 + ,-0.937805020621083 + ,-0.951761263569382 + ,0.595660179931811 + ,-2.62322849033463 + ,2.06484177835207 + ,-1.15690136846534 + ,-0.971783998547422 + ,-0.611926215083187 + ,-0.674696186077007 + ,-0.343071672001661 + ,0.0120489059140767 + ,-0.1383795628118 + ,-0.749301027572427 + ,-0.0329519337637752 + ,-1.09832797043057 + ,-1.17865313545005 + ,-1.02319960877937 + ,-0.63343703425983 + ,-0.667677699369087 + ,0.242137116993484 + ,-0.237785307537331 + ,-1.28283276733994 + ,-0.319221905012263 + ,-1.07577434747054 + ,-1.13649959159528 + ,-0.716757290883056 + ,0.0050195699244691 + ,-0.504182930963768 + ,1.13739429185878 + ,-0.794477152263173 + ,-0.676009433293868 + ,-0.129975959035785 + ,-1.27220519162244 + ,-0.755237196212232 + ,3.62224545199573 + ,-0.560259328998728 + ,-0.250527785501192 + ,-0.958991696990211 + ,0.708498584924803 + ,3.30076531741245 + ,-0.937278704405174 + ,-0.46112570699458 + ,-1.35080551053675 + ,-0.387951998968327 + ,-0.132809676479671 + ,0.686880241158722 + ,-1.14841695968091 + ,-0.198286402619942 + ,-0.953424606143797 + ,-0.831357405076732 + ,22.7625252139011 + ,4.34870014838875 + ,-0.319775027225167 + ,0.97886788111642 + ,0.325925998526894 + ,-0.110945361117234 + ,-0.365480129339294 + ,-0.288011496869506 + ,-0.710975104172849 + ,-1.8080416080161 + ,-0.235072089058427 + ,0.13336071414661 + ,-0.481494207191557 + ,-0.206654552341621 + ,-0.71794143881947 + ,-0.535845992452363 + ,-0.64391059755181 + ,0.205363138599996 + ,0.0508051028472974 + ,2.76211043555277 + ,0.133938984226997 + ,1.88662225519968 + ,0.381866764736397 + ,-0.827580442911865 + ,-0.81926704434319 + ,-1.17447429123239 + ,-1.06053401149788 + ,0.362718967032987 + ,-0.607230297987153 + ,-0.795842078874565 + ,2.19018109168148 + ,-0.960928566996128 + ,0.695807217144514 + ,2.9531433869023 + ,0.449333749972229 + ,0.936197534191918 + ,0.00708092406711823 + ,-1.0470414190653 + ,-0.309764250493209 + ,0.56233230889481 + ,0.52203654340317 + ,1.48231766408574 + ,-2.07880984858141 + ,0.296482095485587 + ,-0.891179833788977 + ,0.80794132077361 + ,-0.552056351725605 + ,-0.552867908673155 + ,0.54325251003202 + ,-0.542639108993608 + ,-1.14471096835535 + ,0.897529324353421 + ,-0.0587815608245133 + ,-1.07951863367864 + ,-0.321172778596499 + ,3.63437594437048 + ,-0.947415480617462 + ,-0.444699816200167 + ,-0.565734426226205 + ,-1.0922253156685 + ,-0.459435345163184 + ,-0.142489401411015 + ,-0.97883583888393 + ,-0.128394706781461 + ,-0.844820295970723 + ,-0.449188164589142 + ,2.69711549482262 + ,-0.833866835914459 + ,0.798123612465257 + ,-1.56644291213894 + ,-0.858564280379805 + ,-1.23272160763895 + ,0.552974531733387 + ,-1.08885968599948 + ,-0.9105726069444 + ,-0.467094210025088 + ,-0.144975212059016 + ,0.368273096383276 + ,-1.02227305524387 + ,-0.178894554646343 + ,-0.956520150164327 + ,0.993268299278574 + ,-0.0751935665325974 + ,-0.247427657865658 + ,-1.04209423708647 + ,-1.43838747724043 + ,-0.868914642846923 + ,-0.373821984452502 + ,-0.95991791584591 + ,-1.06980573040423 + ,0.289510851234438 + ,-0.978451460994812 + ,0.0320063620547714 + ,-1.04991171481537 + ,2.22634733938379 + ,0.0845744976638473 + ,-0.268053463733876 + ,0.849962268527854 + ,0.0927671230687298 + ,-1.00214059100251) > ylimmax = '' > ylimmin = '' > main = 'Robustness of Central Tendency' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), 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: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > geomean <- function(x) { + return(exp(mean(log(x)))) + } > harmean <- function(x) { + return(1/mean(1/x)) + } > quamean <- function(x) { + return(sqrt(mean(x*x))) + } > winmean <- function(x) { + x <-sort(x[!is.na(x)]) + n<-length(x) + denom <- 3 + nodenom <- n/denom + if (nodenom>40) denom <- n/40 + sqrtn = sqrt(n) + roundnodenom = floor(nodenom) + win <- array(NA,dim=c(roundnodenom,2)) + for (j in 1:roundnodenom) { + win[j,1] <- (j*x[j+1]+sum(x[(j+1):(n-j)])+j*x[n-j])/n + win[j,2] <- sd(c(rep(x[j+1],j),x[(j+1):(n-j)],rep(x[n-j],j)))/sqrtn + } + return(win) + } > trimean <- function(x) { + x <-sort(x[!is.na(x)]) + n<-length(x) + denom <- 3 + nodenom <- n/denom + if (nodenom>40) denom <- n/40 + sqrtn = sqrt(n) + roundnodenom = floor(nodenom) + tri <- array(NA,dim=c(roundnodenom,2)) + for (j in 1:roundnodenom) { + tri[j,1] <- mean(x,trim=j/n) + tri[j,2] <- sd(x[(j+1):(n-j)]) / sqrt(n-j*2) + } + return(tri) + } > midrange <- function(x) { + return((max(x)+min(x))/2) + } > q1 <- function(data,n,p,i,f) { + np <- n*p; + i <<- floor(np) + f <<- np - i + qvalue <- (1-f)*data[i] + f*data[i+1] + } > q2 <- function(data,n,p,i,f) { + np <- (n+1)*p + i <<- floor(np) + f <<- np - i + qvalue <- (1-f)*data[i] + f*data[i+1] + } > q3 <- function(data,n,p,i,f) { + np <- n*p + i <<- floor(np) + f <<- np - i + if (f==0) { + qvalue <- data[i] + } else { + qvalue <- data[i+1] + } + } > q4 <- function(data,n,p,i,f) { + np <- n*p + i <<- floor(np) + f <<- np - i + if (f==0) { + qvalue <- (data[i]+data[i+1])/2 + } else { + qvalue <- data[i+1] + } + } > q5 <- function(data,n,p,i,f) { + np <- (n-1)*p + i <<- floor(np) + f <<- np - i + if (f==0) { + qvalue <- data[i+1] + } else { + qvalue <- data[i+1] + f*(data[i+2]-data[i+1]) + } + } > q6 <- function(data,n,p,i,f) { + np <- n*p+0.5 + i <<- floor(np) + f <<- np - i + qvalue <- data[i] + } > q7 <- function(data,n,p,i,f) { + np <- (n+1)*p + i <<- floor(np) + f <<- np - i + if (f==0) { + qvalue <- data[i] + } else { + qvalue <- f*data[i] + (1-f)*data[i+1] + } + } > q8 <- function(data,n,p,i,f) { + np <- (n+1)*p + i <<- floor(np) + f <<- np - i + if (f==0) { + qvalue <- data[i] + } else { + if (f == 0.5) { + qvalue <- (data[i]+data[i+1])/2 + } else { + if (f < 0.5) { + qvalue <- data[i] + } else { + qvalue <- data[i+1] + } + } + } + } > midmean <- function(x,def) { + x <-sort(x[!is.na(x)]) + n<-length(x) + if (def==1) { + qvalue1 <- q1(x,n,0.25,i,f) + qvalue3 <- q1(x,n,0.75,i,f) + } + if (def==2) { + qvalue1 <- q2(x,n,0.25,i,f) + qvalue3 <- q2(x,n,0.75,i,f) + } + if (def==3) { + qvalue1 <- q3(x,n,0.25,i,f) + qvalue3 <- q3(x,n,0.75,i,f) + } + if (def==4) { + qvalue1 <- q4(x,n,0.25,i,f) + qvalue3 <- q4(x,n,0.75,i,f) + } + if (def==5) { + qvalue1 <- q5(x,n,0.25,i,f) + qvalue3 <- q5(x,n,0.75,i,f) + } + if (def==6) { + qvalue1 <- q6(x,n,0.25,i,f) + qvalue3 <- q6(x,n,0.75,i,f) + } + if (def==7) { + qvalue1 <- q7(x,n,0.25,i,f) + qvalue3 <- q7(x,n,0.75,i,f) + } + if (def==8) { + qvalue1 <- q8(x,n,0.25,i,f) + qvalue3 <- q8(x,n,0.75,i,f) + } + midm <- 0 + myn <- 0 + roundno4 <- round(n/4) + round3no4 <- round(3*n/4) + for (i in 1:n) { + if ((x[i]>=qvalue1) & (x[i]<=qvalue3)){ + midm = midm + x[i] + myn = myn + 1 + } + } + midm = midm / myn + return(midm) + } > (arm <- mean(x)) [1] -1.323927e-18 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.1098082 > (armose <- arm / armse) [1] -1.205672e-17 > (geo <- geomean(x)) [1] NaN Warning message: In log(x) : NaNs produced > (har <- harmean(x)) [1] 1.105706 > (qua <- quamean(x)) [1] 1.863508 > (win <- winmean(x)) [,1] [,2] [1,] -0.03710549 0.08587681 [2,] -0.07998952 0.06831086 [3,] -0.08130234 0.06706331 [4,] -0.08291173 0.06568073 [5,] -0.08766673 0.06428768 [6,] -0.08695427 0.06416544 [7,] -0.09437577 0.06262366 [8,] -0.10088152 0.06115598 [9,] -0.10250432 0.06070438 [10,] -0.10468800 0.06022380 [11,] -0.10852356 0.05943306 [12,] -0.11095208 0.05896424 [13,] -0.12130649 0.05681997 [14,] -0.12231819 0.05654726 [15,] -0.12963394 0.05536859 [16,] -0.12865476 0.05510924 [17,] -0.13008072 0.05474621 [18,] -0.13635223 0.05350818 [19,] -0.14748926 0.05183233 [20,] -0.16064224 0.04996883 [21,] -0.16151964 0.04979603 [22,] -0.17246725 0.04817042 [23,] -0.17401470 0.04785423 [24,] -0.17618419 0.04753624 [25,] -0.17980136 0.04708915 [26,] -0.18652340 0.04623459 [27,] -0.19439075 0.04531237 [28,] -0.19977506 0.04471058 [29,] -0.19794456 0.04444671 [30,] -0.19872284 0.04423026 [31,] -0.19903244 0.04411011 [32,] -0.20059916 0.04382372 [33,] -0.20289216 0.04351398 [34,] -0.21242170 0.04252427 [35,] -0.21638050 0.04198351 [36,] -0.21788143 0.04178361 [37,] -0.22256044 0.04124056 [38,] -0.22208848 0.04115373 [39,] -0.22229461 0.04092232 [40,] -0.22468170 0.04044431 [41,] -0.23102276 0.03977182 [42,] -0.23641064 0.03914949 [43,] -0.23643889 0.03911446 [44,] -0.23620012 0.03905003 [45,] -0.23561118 0.03884533 [46,] -0.23895824 0.03848532 [47,] -0.24005326 0.03833520 [48,] -0.24043677 0.03827533 [49,] -0.24319307 0.03786129 [50,] -0.24636310 0.03718438 [51,] -0.24463450 0.03670692 [52,] -0.24609356 0.03655406 [53,] -0.25791086 0.03551071 [54,] -0.25934340 0.03528976 [55,] -0.26026656 0.03511257 [56,] -0.26135981 0.03497204 [57,] -0.26634260 0.03430469 [58,] -0.26797575 0.03413024 [59,] -0.26975420 0.03395029 [60,] -0.27396660 0.03357224 [61,] -0.27453328 0.03344579 [62,] -0.27658027 0.03320935 [63,] -0.27704563 0.03313806 [64,] -0.28836438 0.03216929 [65,] -0.29205990 0.03179052 [66,] -0.30010051 0.03109963 [67,] -0.30053445 0.03073324 [68,] -0.30360912 0.03047860 [69,] -0.29855900 0.02992035 [70,] -0.29640200 0.02955777 [71,] -0.29813299 0.02925898 [72,] -0.29663796 0.02866652 [73,] -0.29739457 0.02850311 [74,] -0.30350326 0.02803466 [75,] -0.30226709 0.02774603 [76,] -0.30048602 0.02735804 [77,] -0.29930106 0.02702728 [78,] -0.29984537 0.02688947 [79,] -0.30874711 0.02608309 [80,] -0.30766218 0.02583532 [81,] -0.30953895 0.02508533 [82,] -0.31017986 0.02471993 [83,] -0.31103632 0.02460288 [84,] -0.32098555 0.02387152 [85,] -0.31675239 0.02265038 [86,] -0.31913295 0.02241964 [87,] -0.31752002 0.02228696 [88,] -0.31668800 0.02182485 [89,] -0.31340609 0.02126012 [90,] -0.31594844 0.02103240 [91,] -0.31601487 0.02100387 [92,] -0.31833312 0.02061745 [93,] -0.31403581 0.02032564 [94,] -0.31591374 0.02009844 [95,] -0.31667228 0.01942615 [96,] -0.31548330 0.01927882 > (tri <- trimean(x)) [,1] [,2] [1,] -0.06824863 0.07599537 [2,] -0.09982886 0.06421002 [3,] -0.10995884 0.06195032 [4,] -0.11978296 0.06002590 [5,] -0.12933115 0.05839419 [6,] -0.13802503 0.05700699 [7,] -0.14697015 0.05556023 [8,] -0.15492398 0.05431545 [9,] -0.16212798 0.05324255 [10,] -0.16924539 0.05217617 [11,] -0.17623306 0.05111536 [12,] -0.18294594 0.05009636 [13,] -0.18953853 0.04907569 [14,] -0.19535022 0.04824321 [15,] -0.20117103 0.04739323 [16,] -0.20653400 0.04661761 [17,] -0.21205044 0.04582281 [18,] -0.21755829 0.04501702 [19,] -0.22275275 0.04427905 [20,] -0.22735032 0.04364762 [21,] -0.23125288 0.04313735 [22,] -0.23516987 0.04261316 [23,] -0.23855952 0.04218599 [24,] -0.24192475 0.04175907 [25,] -0.24192475 0.04133209 [26,] -0.24842870 0.04091377 [27,] -0.25135679 0.04053201 [28,] -0.25397373 0.04019161 [29,] -0.25639541 0.03987200 [30,] -0.25893905 0.03955046 [31,] -0.26149448 0.03922428 [32,] -0.26408251 0.03888696 [33,] -0.26665352 0.03854796 [34,] -0.26918019 0.03820847 [35,] -0.27138315 0.03790969 [36,] -0.27347607 0.03762531 [37,] -0.27555189 0.03733574 [38,] -0.27749511 0.03706045 [39,] -0.27949218 0.03677322 [40,] -0.28152017 0.03648136 [41,] -0.28350402 0.03619846 [42,] -0.28530856 0.03593615 [43,] -0.28696601 0.03569194 [44,] -0.28865551 0.03543400 [45,] -0.29038685 0.03516289 [46,] -0.29217255 0.03488504 [47,] -0.29388703 0.03460923 [48,] -0.29560216 0.03432357 [49,] -0.29734112 0.03402228 [50,] -0.29734112 0.03372397 [51,] -0.30065879 0.03344274 [52,] -0.30237485 0.03316725 [53,] -0.30408411 0.03288117 [54,] -0.30547513 0.03263384 [55,] -0.30685440 0.03238084 [56,] -0.30823744 0.03211925 [57,] -0.30961985 0.03184644 [58,] -0.31088820 0.03159082 [59,] -0.31213862 0.03132594 [60,] -0.31336709 0.03105139 [61,] -0.31336709 0.03077780 [62,] -0.31565117 0.03049038 [63,] -0.31676848 0.03019452 [64,] -0.31790028 0.02987974 [65,] -0.31873911 0.02959803 [66,] -0.31949465 0.02931604 [67,] -0.32004254 0.02905198 [68,] -0.32059252 0.02878722 [69,] -0.32107052 0.02851549 [70,] -0.32170333 0.02825277 [71,] -0.32241393 0.02798840 [72,] -0.32309554 0.02771901 [73,] -0.32383818 0.02746108 [74,] -0.32458065 0.02718990 [75,] -0.32517285 0.02692397 [76,] -0.32581710 0.02665116 [77,] -0.32581710 0.02637690 [78,] -0.32729904 0.02609741 [79,] -0.32807552 0.02579998 [80,] -0.32862364 0.02552874 [81,] -0.32921989 0.02524668 [82,] -0.32978165 0.02498707 [83,] -0.33034331 0.02472540 [84,] -0.33089889 0.02444431 [85,] -0.33118550 0.02418645 [86,] -0.33160492 0.02398529 [87,] -0.33196937 0.02377700 [88,] -0.33239414 0.02355321 [89,] -0.33285883 0.02333637 [90,] -0.33343834 0.02313397 [91,] -0.33396322 0.02292343 [92,] -0.33450608 0.02268791 [93,] -0.33499932 0.02245341 [94,] -0.33564432 0.02221066 [95,] -0.33625706 0.02195496 [96,] -0.33687128 0.02172233 > (midr <- midrange(x)) [1] 9.793678 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] -0.3276434 -0.3230955 -0.3230955 -0.3230955 -0.3230955 -0.3269865 -0.3230955 [8] -0.3230955 > postscript(file="/var/wessaorg/rcomp/tmp/1792s1323518675.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > lb <- win[,1] - 2*win[,2] > ub <- win[,1] + 2*win[,2] > if ((ylimmin == '') | (ylimmax == '')) plot(win[,1],type='b',main=main, xlab='j', pch=19, ylab='Winsorized Mean(j/n)', ylim=c(min(lb),max(ub))) else plot(win[,1],type='l',main=main, xlab='j', pch=19, ylab='Winsorized Mean(j/n)', ylim=c(ylimmin,ylimmax)) > lines(ub,lty=3) > lines(lb,lty=3) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/26tei1323518675.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > lb <- tri[,1] - 2*tri[,2] > ub <- tri[,1] + 2*tri[,2] > if ((ylimmin == '') | (ylimmax == '')) plot(tri[,1],type='b',main=main, xlab='j', pch=19, ylab='Trimmed Mean(j/n)', ylim=c(min(lb),max(ub))) else plot(tri[,1],type='l',main=main, xlab='j', pch=19, ylab='Trimmed Mean(j/n)', ylim=c(ylimmin,ylimmax)) > lines(ub,lty=3) > lines(lb,lty=3) > grid() > dev.off() null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Central Tendency - Ungrouped Data',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Measure',header=TRUE) > a<-table.element(a,'Value',header=TRUE) > a<-table.element(a,'S.E.',header=TRUE) > a<-table.element(a,'Value/S.E.',header=TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/arithmetic_mean.htm', 'Arithmetic Mean', 'click to view the definition of the Arithmetic Mean'),header=TRUE) > a<-table.element(a,arm) > a<-table.element(a,hyperlink('http://www.xycoon.com/arithmetic_mean_standard_error.htm', armse, 'click to view the definition of the Standard Error of the Arithmetic Mean')) > a<-table.element(a,armose) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/geometric_mean.htm', 'Geometric Mean', 'click to view the definition of the Geometric Mean'),header=TRUE) > a<-table.element(a,geo) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/harmonic_mean.htm', 'Harmonic Mean', 'click to view the definition of the Harmonic Mean'),header=TRUE) > a<-table.element(a,har) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/quadratic_mean.htm', 'Quadratic Mean', 'click to view the definition of the Quadratic Mean'),header=TRUE) > a<-table.element(a,qua) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > for (j in 1:length(win[,1])) { + a<-table.row.start(a) + mylabel <- paste('Winsorized Mean (',j) + mylabel <- paste(mylabel,'/') + mylabel <- paste(mylabel,length(win[,1])) + mylabel <- paste(mylabel,')') + a<-table.element(a,hyperlink('http://www.xycoon.com/winsorized_mean.htm', mylabel, 'click to view the definition of the Winsorized Mean'),header=TRUE) + a<-table.element(a,win[j,1]) + a<-table.element(a,win[j,2]) + a<-table.element(a,win[j,1]/win[j,2]) + a<-table.row.end(a) + } > for (j in 1:length(tri[,1])) { + a<-table.row.start(a) + mylabel <- paste('Trimmed Mean (',j) + mylabel <- paste(mylabel,'/') + mylabel <- paste(mylabel,length(tri[,1])) + mylabel <- paste(mylabel,')') + a<-table.element(a,hyperlink('http://www.xycoon.com/arithmetic_mean.htm', mylabel, 'click to view the definition of the Trimmed Mean'),header=TRUE) + a<-table.element(a,tri[j,1]) + a<-table.element(a,tri[j,2]) + a<-table.element(a,tri[j,1]/tri[j,2]) + a<-table.row.end(a) + } > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/median_1.htm', 'Median', 'click to view the definition of the Median'),header=TRUE) > a<-table.element(a,median(x)) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/midrange.htm', 'Midrange', 'click to view the definition of the Midrange'),header=TRUE) > a<-table.element(a,midr) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_1.htm','Weighted Average at Xnp',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[1]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_2.htm','Weighted Average at X(n+1)p',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[2]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_3.htm','Empirical Distribution Function',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[3]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_4.htm','Empirical Distribution Function - Averaging',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[4]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_5.htm','Empirical Distribution Function - Interpolation',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[5]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_6.htm','Closest Observation',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[6]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_7.htm','True Basic - Statistics Graphics Toolkit',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[7]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_8.htm','MS Excel (old versions)',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[8]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Number of observations',header=TRUE) > a<-table.element(a,length(x)) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/31wmt1323518675.tab") > > try(system("convert tmp/1792s1323518675.ps tmp/1792s1323518675.png",intern=TRUE)) character(0) > try(system("convert tmp/26tei1323518675.ps tmp/26tei1323518675.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.652 0.140 1.802