R version 2.8.1 (2008-12-22) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. 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(45.51 + ,45.51 + ,45.32 + ,45.15 + ,45.82 + ,48.95 + ,48.92 + ,48.53 + ,47.78 + ,47.17 + ,46.64 + ,46.05 + ,45.3 + ,45.05 + ,44.63 + ,44.25 + ,43.89 + ,43.55 + ,43.23 + ,42.9 + ,42.17 + ,41.06 + ,40.18 + ,39.42 + ,38.71 + ,37.09 + ,27.7 + ,27 + ,28.29 + ,32.18 + ,34.03 + ,36.02 + ,39.8 + ,41.3 + ,42.57 + ,43.33 + ,43.48 + ,42.49 + ,41.86 + ,44.67 + ,43.53 + ,42.33 + ,41.59 + ,40.71 + ,39.81 + ,38.7 + ,37.57 + ,40.36 + ,39.92 + ,38.93 + ,38.11 + ,37.39 + ,36.61 + ,35.65 + ,34.7 + ,33.69 + ,32.71 + ,36.5 + ,38.93 + ,38.14 + ,36.98 + ,36.01 + ,39.37 + ,39.31 + ,38.26 + ,37.14 + ,36.24 + ,35.13 + ,34.2 + ,40.16 + ,38.5 + ,36.9 + ,35.65 + ,34.39 + ,32.93 + ,34.62 + ,34.27 + ,32.88 + ,31.52 + ,30.02 + ,32.62 + ,33.14 + ,32.77 + ,31.31 + ,30.98 + ,29.55 + ,28.61 + ,28.58 + ,28.24 + ,27.59 + ,26 + ,27.49 + ,28.03 + ,26.61 + ,25.85 + ,26.62 + ,25.18 + ,23.44 + ,24.87 + ,21.68 + ,18.89 + ,20.57 + ,18.55 + ,16.87 + ,18.69 + ,16.82 + ,20.1 + ,20.08 + ,25.67 + ,35.29 + ,49.97 + ,51.38 + ,52.38 + ,51.34 + ,49.74 + ,48.19 + ,46.39 + ,45.21 + ,46.26 + ,44.47 + ,42.88 + ,41.46 + ,39.93 + ,38.48 + ,37.03 + ,35.74 + ,34.43 + ,33.27 + ,32.23 + ,33.72 + ,35.37 + ,34.38 + ,34.5 + ,36.42 + ,34.72 + ,35.54 + ,34.88 + ,33.22 + ,31.74 + ,30.3 + ,28.82 + ,30.19 + ,34.52 + ,33.09 + ,33.16 + ,30.13 + ,29.24 + ,35.7 + ,34.01 + ,34.83 + ,34.3 + ,32.8 + ,31.25 + ,30.88 + ,31.39 + ,29.76 + ,28.01 + ,26.21 + ,28.19 + ,30.39 + ,28.7 + ,27.09 + ,25.6 + ,24.1 + ,30.39 + ,29.57 + ,28.16 + ,26.67 + ,25.39 + ,24.24 + ,25.48 + ,29.14 + ,27.98 + ,26.82 + ,25.71 + ,24.54 + ,23.04 + ,24.81 + ,24.2 + ,22.93 + ,22.93 + ,19.17 + ,17.31 + ,16.65 + ,16 + ,15.34 + ,11.54 + ,8.19 + ,7.63 + ,7.07 + ,6.53 + ,5.97 + ,5.47 + ,4.99 + ,4.52 + ,7.13 + ,7.46 + ,6.76 + ,6.26 + ,12.57 + ,12.02 + ,11.47 + ,11.19 + ,10.4 + ,9.93 + ,16.78 + ,36.43 + ,35.26 + ,34.42 + ,35.38 + ,34.1 + ,53.7 + ,67.9 + ,70.51 + ,70.24 + ,66.16 + ,64.19 + ,63.29 + ,61.21 + ,60.43 + ,63.46 + ,60.08 + ,58.12 + ,54.46 + ,52.99 + ,49.74 + ,49.86 + ,49.77 + ,43.46 + ,46.06 + ,45.61 + ,42.67 + ,43.42 + ,42.26 + ,44.96 + ,60.75 + ,62.68 + ,65.21 + ,65.25 + ,57.49 + ,52.68 + ,71.67 + ,115.56 + ,105.61 + ,130.12 + ,130.18 + ,90.94 + ,84.25 + ,79.41 + ,73.68 + ,68.71 + ,76.08 + ,75.86 + ,82.88 + ,67.82 + ,69.5 + ,58.01 + ,56.44 + ,57.43 + ,56.2 + ,47.78 + ,46.14 + ,51.57 + ,52.65 + ,51.43 + ,48.52 + ,49.69 + ,48.21 + ,46.58 + ,46.64 + ,40.67 + ,38.12 + ,33.92 + ,33.89 + ,42.73 + ,54.96 + ,45.71 + ,40.62 + ,41.71 + ,37.54 + ,36.39 + ,31 + ,30.68 + ,26.69 + ,25.85 + ,26.99 + ,28.3 + ,26.78 + ,23.53 + ,17.19 + ,17.4 + ,20.6 + ,24.51 + ,13.85 + ,13.46 + ,14.08 + ,14.98 + ,9.12 + ,12.11 + ,11.18 + ,13.31 + ,11.84 + ,17.01 + ,20.08 + ,14.14 + ,11.55 + ,4.63 + ,2.8 + ,8.23 + ,8.23 + ,11.59 + ,4.46 + ,8.68 + ,7.3 + ,4.08 + ,6.68 + ,8.19 + ,4.76 + ,8.74 + ,5.81 + ,6.28 + ,5.07 + ,5.9 + ,7.38 + ,13.77 + ,14.05 + ,16.45 + ,14.42 + ,16 + ,21.42 + ,12.99 + ,13.97 + ,20.77 + ,19.62 + ,27.83 + ,37.46 + ,38.23 + ,51.91 + ,65.86 + ,58.41 + ,55.53 + ,48.68 + ,38.87 + ,38.81 + ,34.05 + ,43.82 + ,47.58 + ,47.65 + ,62.96 + ,53.55 + ,47.5 + ,48.67 + ,45.2 + ,38.21 + ,39.45 + ,45.58 + ,41.87 + ,40.45 + ,52.63 + ,60.41) > 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] 35.76811 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.9935656 > (armose <- arm / armse) [1] 35.99975 > (geo <- geomean(x)) [1] 30.19406 > (har <- harmean(x)) [1] 23.13015 > (qua <- quamean(x)) [1] 40.41971 > (win <- winmean(x)) [,1] [,2] [1,] 35.77150 0.9931992 [2,] 35.69272 0.9730472 [3,] 35.61031 0.9550497 [4,] 35.44853 0.9246249 [5,] 35.35742 0.9097283 [6,] 35.33842 0.9059919 [7,] 35.27250 0.8962858 [8,] 35.20739 0.8856191 [9,] 35.21039 0.8841222 [10,] 35.15233 0.8763037 [11,] 35.09306 0.8687414 [12,] 35.06406 0.8633623 [13,] 35.05503 0.8621835 [14,] 35.03597 0.8580362 [15,] 35.00931 0.8538071 [16,] 34.97686 0.8495561 [17,] 34.98772 0.8477999 [18,] 34.90772 0.8387390 [19,] 34.90086 0.8362746 [20,] 34.87142 0.8323960 [21,] 34.87375 0.8317299 [22,] 34.82181 0.8245168 [23,] 34.81094 0.8166565 [24,] 34.79961 0.8155513 [25,] 34.77947 0.8130775 [26,] 34.75925 0.8111319 [27,] 34.68275 0.7976686 [28,] 34.65164 0.7939494 [29,] 34.65647 0.7888246 [30,] 34.72231 0.7826509 [31,] 34.73436 0.7765079 [32,] 34.65525 0.7572505 [33,] 34.62958 0.7548577 [34,] 34.64564 0.7516784 [35,] 34.60189 0.7467466 [36,] 34.59689 0.7461487 [37,] 34.49925 0.7372392 [38,] 34.50031 0.7328659 [39,] 34.44722 0.7252541 [40,] 34.39389 0.7193056 [41,] 34.38933 0.7102948 [42,] 34.34967 0.6992059 [43,] 34.36997 0.6945859 [44,] 34.31986 0.6878173 [45,] 34.31986 0.6816347 [46,] 34.32625 0.6804896 [47,] 34.33931 0.6789825 [48,] 34.31664 0.6755993 [49,] 34.25675 0.6705295 [50,] 34.21786 0.6663864 [51,] 34.23769 0.6616300 [52,] 34.31136 0.6544036 [53,] 34.35847 0.6496336 [54,] 34.25197 0.6269194 [55,] 34.23517 0.6257481 [56,] 34.29117 0.6191231 [57,] 34.31808 0.6162567 [58,] 34.33903 0.6145869 [59,] 34.33739 0.6134938 [60,] 34.22239 0.6043436 [61,] 34.24103 0.6021043 [62,] 34.23069 0.5968388 [63,] 34.24994 0.5950530 [64,] 34.24106 0.5921083 [65,] 34.44689 0.5757730 [66,] 34.41572 0.5699491 [67,] 34.44922 0.5668446 [68,] 34.42467 0.5576091 [69,] 34.51092 0.5510766 [70,] 34.57508 0.5426869 [71,] 34.56128 0.5417616 [72,] 34.54928 0.5403941 [73,] 34.57767 0.5288762 [74,] 34.47489 0.5212658 [75,] 34.51031 0.5186460 [76,] 34.63486 0.5077806 [77,] 34.64983 0.5011025 [78,] 34.89250 0.4800849 [79,] 34.86617 0.4783521 [80,] 34.87283 0.4754893 [81,] 34.96058 0.4691437 [82,] 34.92869 0.4643053 [83,] 35.03475 0.4537405 [84,] 35.03475 0.4506488 [85,] 35.03711 0.4495537 [86,] 35.08489 0.4441644 [87,] 35.09214 0.4436839 [88,] 35.11169 0.4362947 [89,] 35.12158 0.4349978 [90,] 35.17658 0.4284684 [91,] 35.22714 0.4248666 [92,] 35.23736 0.4225500 [93,] 35.24253 0.4188726 [94,] 35.23731 0.4161704 [95,] 35.17133 0.4105373 [96,] 35.19800 0.4074584 [97,] 35.15489 0.4046864 [98,] 35.13583 0.3982452 [99,] 35.09458 0.3882802 [100,] 35.18625 0.3800176 [101,] 35.11331 0.3750707 [102,] 35.12181 0.3738228 [103,] 35.11322 0.3725668 [104,] 35.13344 0.3705703 [105,] 35.13344 0.3691082 [106,] 35.15700 0.3643185 [107,] 35.13025 0.3622786 [108,] 35.05825 0.3544558 [109,] 35.17331 0.3465494 [110,] 35.15803 0.3418301 [111,] 35.17344 0.3386004 [112,] 35.18278 0.3342007 [113,] 35.20475 0.3297756 [114,] 35.16358 0.3260857 [115,] 35.14761 0.3243278 [116,] 35.16050 0.3200006 [117,] 35.07275 0.3134862 [118,] 35.08586 0.3122867 [119,] 35.05281 0.3082878 [120,] 35.01614 0.3056828 > (tri <- trimean(x)) [,1] [,2] [1,] 35.59648 0.9591240 [2,] 35.41949 0.9228509 [3,] 35.28056 0.8956547 [4,] 35.16815 0.8738559 [5,] 35.09606 0.8598108 [6,] 35.04198 0.8486290 [7,] 34.99058 0.8377281 [8,] 34.94843 0.8280518 [9,] 34.91436 0.8196116 [10,] 34.87953 0.8110504 [11,] 34.85047 0.8031375 [12,] 34.82685 0.7957935 [13,] 34.82685 0.7887452 [14,] 34.78473 0.7815476 [15,] 34.76515 0.7744674 [16,] 34.74729 0.7674958 [17,] 34.73144 0.7606203 [18,] 34.71469 0.7536211 [19,] 34.70270 0.7470638 [20,] 34.69097 0.7404371 [21,] 34.68075 0.7338340 [22,] 34.67028 0.7270170 [23,] 34.66239 0.7204255 [24,] 34.65494 0.7140938 [25,] 34.64794 0.7075802 [26,] 34.64794 0.7009604 [27,] 34.63647 0.6941917 [28,] 34.63444 0.6879635 [29,] 34.63371 0.6816998 [30,] 34.63277 0.6754749 [31,] 34.62916 0.6693424 [32,] 34.62503 0.6632973 [33,] 34.62388 0.6580513 [34,] 34.62366 0.6527130 [35,] 34.62286 0.6473166 [36,] 34.62361 0.6419474 [37,] 34.62455 0.6363785 [38,] 34.62884 0.6310218 [39,] 34.63316 0.6256524 [40,] 34.63929 0.6204251 [41,] 34.64723 0.6152576 [42,] 34.65543 0.6102984 [43,] 34.66500 0.6056462 [44,] 34.67408 0.6010042 [45,] 34.68481 0.5964657 [46,] 34.69571 0.5920069 [47,] 34.70658 0.5873961 [48,] 34.71723 0.5826417 [49,] 34.71723 0.5778190 [50,] 34.74204 0.5729967 [51,] 34.75667 0.5681305 [52,] 34.75667 0.5632498 [53,] 34.78350 0.5584690 [54,] 34.79496 0.5536756 [55,] 34.80944 0.5496510 [56,] 34.82460 0.5454761 [57,] 34.83854 0.5413900 [58,] 34.85201 0.5372266 [59,] 34.86517 0.5329272 [60,] 34.87858 0.5284558 [61,] 34.89513 0.5241447 [62,] 34.91148 0.5197098 [63,] 34.91148 0.5152735 [64,] 34.94509 0.5106833 [65,] 34.96230 0.5059774 [66,] 34.97482 0.5017744 [67,] 34.98832 0.4975968 [68,] 35.00125 0.4933315 [69,] 35.01500 0.4892374 [70,] 35.02695 0.4852144 [71,] 35.03761 0.4813432 [72,] 35.04880 0.4772904 [73,] 35.06047 0.4730644 [74,] 35.07170 0.4691157 [75,] 35.08552 0.4652630 [76,] 35.09880 0.4613040 [77,] 35.10947 0.4576144 [78,] 35.12000 0.4540034 [79,] 35.12520 0.4511260 [80,] 35.13110 0.4481409 [81,] 35.13697 0.4450933 [82,] 35.14097 0.4421383 [83,] 35.14577 0.4392058 [84,] 35.14828 0.4365566 [85,] 35.15084 0.4338663 [86,] 35.15340 0.4310419 [87,] 35.15495 0.4282709 [88,] 35.15636 0.4253294 [89,] 35.15736 0.4225265 [90,] 35.15817 0.4195852 [91,] 35.15775 0.4167426 [92,] 35.15619 0.4138640 [93,] 35.15437 0.4108853 [94,] 35.15238 0.4078655 [95,] 35.15047 0.4047536 [96,] 35.15000 0.4016896 [97,] 35.14892 0.3985462 [98,] 35.14892 0.3953024 [99,] 35.14907 0.3921395 [100,] 35.15031 0.3892425 [101,] 35.14949 0.3865381 [102,] 35.15032 0.3838653 [103,] 35.15097 0.3810316 [104,] 35.15097 0.3780240 [105,] 35.15227 0.3748692 [106,] 35.15270 0.3715247 [107,] 35.15260 0.3681649 [108,] 35.15313 0.3646284 [109,] 35.15313 0.3612400 [110,] 35.15493 0.3580186 [111,] 35.15486 0.3547833 [112,] 35.15441 0.3514418 [113,] 35.15373 0.3480576 [114,] 35.15250 0.3446282 [115,] 35.15250 0.3411034 [116,] 35.15234 0.3373458 [117,] 35.15214 0.3335074 [118,] 35.15411 0.3297300 [119,] 35.15582 0.3256471 [120,] 35.15842 0.3214283 > (midr <- midrange(x)) [1] 66.49 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] 35.10133 35.15817 35.10133 35.15817 35.15817 35.10133 35.15817 35.15736 > postscript(file="/var/www/rcomp/tmp/15bkp1256155487.ps",horizontal=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/www/rcomp/tmp/2oghl1256155487.ps",horizontal=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/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/www/rcomp/tmp/3iooo1256155487.tab") > > system("convert tmp/15bkp1256155487.ps tmp/15bkp1256155487.png") > system("convert tmp/2oghl1256155487.ps tmp/2oghl1256155487.png") > > > proc.time() user system elapsed 1.900 0.620 2.648