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(87.28 + ,87.28 + ,87.09 + ,86.92 + ,87.59 + ,90.72 + ,90.69 + ,90.3 + ,89.55 + ,88.94 + ,88.41 + ,87.82 + ,87.07 + ,86.82 + ,86.4 + ,86.02 + ,85.66 + ,85.32 + ,85 + ,84.67 + ,83.94 + ,82.83 + ,81.95 + ,81.19 + ,80.48 + ,78.86 + ,69.47 + ,68.77 + ,70.06 + ,73.95 + ,75.8 + ,77.79 + ,81.57 + ,83.07 + ,84.34 + ,85.1 + ,85.25 + ,84.26 + ,83.63 + ,86.44 + ,85.3 + ,84.1 + ,83.36 + ,82.48 + ,81.58 + ,80.47 + ,79.34 + ,82.13 + ,81.69 + ,80.7 + ,79.88 + ,79.16 + ,78.38 + ,77.42 + ,76.47 + ,75.46 + ,74.48 + ,78.27 + ,80.7 + ,79.91 + ,78.75 + ,77.78 + ,81.14 + ,81.08 + ,80.03 + ,78.91 + ,78.01 + ,76.9 + ,75.97 + ,81.93 + ,80.27 + ,78.67 + ,77.42 + ,76.16 + ,74.7 + ,76.39 + ,76.04 + ,74.65 + ,73.29 + ,71.79 + ,74.39 + ,74.91 + ,74.54 + ,73.08 + ,72.75 + ,71.32 + ,70.38 + ,70.35 + ,70.01 + ,69.36 + ,67.77 + ,69.26 + ,69.8 + ,68.38 + ,67.62 + ,68.39 + ,66.95 + ,65.21 + ,66.64 + ,63.45 + ,60.66 + ,62.34 + ,60.32 + ,58.64 + ,60.46 + ,58.59 + ,61.87 + ,61.85 + ,67.44 + ,77.06 + ,91.74 + ,93.15 + ,94.15 + ,93.11 + ,91.51 + ,89.96 + ,88.16 + ,86.98 + ,88.03 + ,86.24 + ,84.65 + ,83.23 + ,81.7 + ,80.25 + ,78.8 + ,77.51 + ,76.2 + ,75.04 + ,74 + ,75.49 + ,77.14 + ,76.15 + ,76.27 + ,78.19 + ,76.49 + ,77.31 + ,76.65 + ,74.99 + ,73.51 + ,72.07 + ,70.59 + ,71.96 + ,76.29 + ,74.86 + ,74.93 + ,71.9 + ,71.01 + ,77.47 + ,75.78 + ,76.6 + ,76.07 + ,74.57 + ,73.02 + ,72.65 + ,73.16 + ,71.53 + ,69.78 + ,67.98 + ,69.96 + ,72.16 + ,70.47 + ,68.86 + ,67.37 + ,65.87 + ,72.16 + ,71.34 + ,69.93 + ,68.44 + ,67.16 + ,66.01 + ,67.25 + ,70.91 + ,69.75 + ,68.59 + ,67.48 + ,66.31 + ,64.81 + ,66.58 + ,65.97 + ,64.7 + ,64.7 + ,60.94 + ,59.08 + ,58.42 + ,57.77 + ,57.11 + ,53.31 + ,49.96 + ,49.4 + ,48.84 + ,48.3 + ,47.74 + ,47.24 + ,46.76 + ,46.29 + ,48.9 + ,49.23 + ,48.53 + ,48.03 + ,54.34 + ,53.79 + ,53.24 + ,52.96 + ,52.17 + ,51.7 + ,58.55 + ,78.2 + ,77.03 + ,76.19 + ,77.15 + ,75.87 + ,95.47 + ,109.67 + ,112.28 + ,112.01 + ,107.93 + ,105.96 + ,105.06 + ,102.98 + ,102.2 + ,105.23 + ,101.85 + ,99.89 + ,96.23 + ,94.76 + ,91.51 + ,91.63 + ,91.54 + ,85.23 + ,87.83 + ,87.38 + ,84.44 + ,85.19 + ,84.03 + ,86.73 + ,102.52 + ,104.45 + ,106.98 + ,107.02 + ,99.26 + ,94.45 + ,113.44 + ,157.33 + ,147.38 + ,171.89 + ,171.95 + ,132.71 + ,126.02 + ,121.18 + ,115.45 + ,110.48 + ,117.85 + ,117.63 + ,124.65 + ,109.59 + ,111.27 + ,99.78 + ,98.21 + ,99.2 + ,97.97 + ,89.55 + ,87.91 + ,93.34 + ,94.42 + ,93.2 + ,90.29 + ,91.46 + ,89.98 + ,88.35 + ,88.41 + ,82.44 + ,79.89 + ,75.69 + ,75.66 + ,84.5 + ,96.73 + ,87.48 + ,82.39 + ,83.48 + ,79.31 + ,78.16 + ,72.77 + ,72.45 + ,68.46 + ,67.62 + ,68.76 + ,70.07 + ,68.55 + ,65.3 + ,58.96 + ,59.17 + ,62.37 + ,66.28 + ,55.62 + ,55.23 + ,55.85 + ,56.75 + ,50.89 + ,53.88 + ,52.95 + ,55.08 + ,53.61 + ,58.78 + ,61.85 + ,55.91 + ,53.32 + ,46.41 + ,44.57 + ,50 + ,50 + ,53.36 + ,46.23 + ,50.45 + ,49.07 + ,45.85 + ,48.45 + ,49.96 + ,46.53 + ,50.51 + ,47.58 + ,48.05 + ,46.84 + ,47.67 + ,49.16 + ,55.54 + ,55.82 + ,58.22 + ,56.19 + ,57.77 + ,63.19 + ,54.76 + ,55.74 + ,62.54 + ,61.39 + ,69.6 + ,79.23 + ,80 + ,93.68 + ,107.63 + ,100.18 + ,97.3 + ,90.45 + ,80.64 + ,80.58 + ,75.82 + ,85.59 + ,89.35 + ,89.42 + ,104.73 + ,95.32 + ,89.27 + ,90.44 + ,86.97 + ,79.98 + ,81.22 + ,87.35 + ,83.64 + ,82.22 + ,94.4 + ,102.18) > ylimmax = '' > ylimmin = '' > main = 'Robustness of Central Tendency' > 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] 77.53817 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.993561 > (armose <- arm / armse) [1] 78.04067 > (geo <- geomean(x)) [1] 75.40649 > (har <- harmean(x)) [1] 73.34921 > (qua <- quamean(x)) [1] 79.79072 > (win <- winmean(x)) [,1] [,2] [1,] 77.54156 0.9931945 [2,] 77.46278 0.9730424 [3,] 77.38036 0.9550449 [4,] 77.21869 0.9246096 [5,] 77.12744 0.9097259 [6,] 77.10844 0.9059895 [7,] 77.04253 0.8962834 [8,] 76.97742 0.8856167 [9,] 76.98042 0.8841198 [10,] 76.92236 0.8763012 [11,] 76.86308 0.8687390 [12,] 76.83408 0.8633599 [13,] 76.82506 0.8621811 [14,] 76.80600 0.8580337 [15,] 76.77933 0.8538046 [16,] 76.74689 0.8495536 [17,] 76.75775 0.8477974 [18,] 76.67775 0.8387364 [19,] 76.67089 0.8362721 [20,] 76.64200 0.8323423 [21,] 76.64375 0.8317299 [22,] 76.59181 0.8245168 [23,] 76.58094 0.8166565 [24,] 76.56961 0.8155513 [25,] 76.54947 0.8130775 [26,] 76.52925 0.8111319 [27,] 76.45275 0.7976686 [28,] 76.42164 0.7939494 [29,] 76.42647 0.7888246 [30,] 76.49231 0.7826509 [31,] 76.50436 0.7765079 [32,] 76.42525 0.7572505 [33,] 76.39958 0.7548577 [34,] 76.41564 0.7516784 [35,] 76.37189 0.7467466 [36,] 76.36689 0.7461487 [37,] 76.26925 0.7372392 [38,] 76.27031 0.7328659 [39,] 76.21722 0.7252541 [40,] 76.16389 0.7193056 [41,] 76.15933 0.7102948 [42,] 76.11967 0.6992059 [43,] 76.13997 0.6945859 [44,] 76.08986 0.6878173 [45,] 76.08986 0.6816347 [46,] 76.09625 0.6804896 [47,] 76.10931 0.6789825 [48,] 76.08664 0.6755993 [49,] 76.02675 0.6705295 [50,] 75.98786 0.6663864 [51,] 76.00769 0.6616300 [52,] 76.08136 0.6544036 [53,] 76.12847 0.6496336 [54,] 76.02197 0.6269194 [55,] 76.00517 0.6257481 [56,] 76.06117 0.6191231 [57,] 76.08808 0.6162567 [58,] 76.10903 0.6145869 [59,] 76.10739 0.6134938 [60,] 75.99239 0.6043436 [61,] 76.01103 0.6021043 [62,] 76.00069 0.5968388 [63,] 76.01994 0.5950530 [64,] 76.01106 0.5921083 [65,] 76.21689 0.5757730 [66,] 76.18572 0.5699491 [67,] 76.21922 0.5668446 [68,] 76.19467 0.5576091 [69,] 76.28092 0.5510766 [70,] 76.34508 0.5426869 [71,] 76.33128 0.5417616 [72,] 76.31928 0.5403941 [73,] 76.34767 0.5288762 [74,] 76.24489 0.5212658 [75,] 76.28031 0.5186460 [76,] 76.40486 0.5077806 [77,] 76.41983 0.5011025 [78,] 76.66250 0.4800849 [79,] 76.63617 0.4783521 [80,] 76.64283 0.4754893 [81,] 76.73058 0.4691437 [82,] 76.69869 0.4643053 [83,] 76.80475 0.4537405 [84,] 76.80475 0.4506488 [85,] 76.80711 0.4495537 [86,] 76.85489 0.4441644 [87,] 76.86214 0.4436839 [88,] 76.88169 0.4362947 [89,] 76.89158 0.4349978 [90,] 76.94658 0.4284684 [91,] 76.99714 0.4248666 [92,] 77.00736 0.4225500 [93,] 77.01253 0.4188726 [94,] 77.00731 0.4161704 [95,] 76.94133 0.4105373 [96,] 76.96800 0.4074584 [97,] 76.92489 0.4046864 [98,] 76.90583 0.3982452 [99,] 76.86458 0.3882802 [100,] 76.95625 0.3800176 [101,] 76.88331 0.3750707 [102,] 76.89181 0.3738228 [103,] 76.88322 0.3725668 [104,] 76.90344 0.3705703 [105,] 76.90344 0.3691082 [106,] 76.92700 0.3643185 [107,] 76.90025 0.3622786 [108,] 76.82825 0.3544558 [109,] 76.94331 0.3465494 [110,] 76.92803 0.3418301 [111,] 76.94344 0.3386004 [112,] 76.95278 0.3342007 [113,] 76.97475 0.3297756 [114,] 76.93358 0.3260857 [115,] 76.91761 0.3243278 [116,] 76.93050 0.3200006 [117,] 76.84275 0.3134862 [118,] 76.85586 0.3122867 [119,] 76.82281 0.3082878 [120,] 76.78614 0.3056828 > (tri <- trimean(x)) [,1] [,2] [1,] 77.36654 0.9591192 [2,] 77.18955 0.9228459 [3,] 77.05062 0.8956495 [4,] 76.93821 0.8738505 [5,] 76.86609 0.8598082 [6,] 76.81201 0.8486263 [7,] 76.76061 0.8377254 [8,] 76.71846 0.8280490 [9,] 76.68439 0.8196087 [10,] 76.64956 0.8110474 [11,] 76.62050 0.8031345 [12,] 76.59687 0.7957905 [13,] 76.59687 0.7887421 [14,] 76.55476 0.7815444 [15,] 76.53518 0.7744641 [16,] 76.51732 0.7674925 [17,] 76.50147 0.7606169 [18,] 76.48472 0.7536176 [19,] 76.47273 0.7470603 [20,] 76.46100 0.7404334 [21,] 76.45075 0.7338340 [22,] 76.44028 0.7270170 [23,] 76.43239 0.7204255 [24,] 76.42494 0.7140938 [25,] 76.41794 0.7075802 [26,] 76.41794 0.7009604 [27,] 76.40647 0.6941917 [28,] 76.40444 0.6879635 [29,] 76.40371 0.6816998 [30,] 76.40277 0.6754749 [31,] 76.39916 0.6693424 [32,] 76.39503 0.6632973 [33,] 76.39388 0.6580513 [34,] 76.39366 0.6527130 [35,] 76.39286 0.6473166 [36,] 76.39361 0.6419474 [37,] 76.39455 0.6363785 [38,] 76.39884 0.6310218 [39,] 76.40316 0.6256524 [40,] 76.40929 0.6204251 [41,] 76.41723 0.6152576 [42,] 76.42543 0.6102984 [43,] 76.43500 0.6056462 [44,] 76.44408 0.6010042 [45,] 76.45481 0.5964657 [46,] 76.46571 0.5920069 [47,] 76.47658 0.5873961 [48,] 76.48723 0.5826417 [49,] 76.48723 0.5778190 [50,] 76.51204 0.5729967 [51,] 76.52667 0.5681305 [52,] 76.52667 0.5632498 [53,] 76.55350 0.5584690 [54,] 76.56496 0.5536756 [55,] 76.57944 0.5496510 [56,] 76.59460 0.5454761 [57,] 76.60854 0.5413900 [58,] 76.62201 0.5372266 [59,] 76.63517 0.5329272 [60,] 76.64858 0.5284558 [61,] 76.66513 0.5241447 [62,] 76.68148 0.5197098 [63,] 76.68148 0.5152735 [64,] 76.71509 0.5106833 [65,] 76.73230 0.5059774 [66,] 76.74482 0.5017744 [67,] 76.75832 0.4975968 [68,] 76.77125 0.4933315 [69,] 76.78500 0.4892374 [70,] 76.79695 0.4852144 [71,] 76.80761 0.4813432 [72,] 76.81880 0.4772904 [73,] 76.83047 0.4730644 [74,] 76.84170 0.4691157 [75,] 76.85552 0.4652630 [76,] 76.86880 0.4613040 [77,] 76.87947 0.4576144 [78,] 76.89000 0.4540034 [79,] 76.89520 0.4511260 [80,] 76.90110 0.4481409 [81,] 76.90697 0.4450933 [82,] 76.91097 0.4421383 [83,] 76.91577 0.4392058 [84,] 76.91828 0.4365566 [85,] 76.92084 0.4338663 [86,] 76.92340 0.4310419 [87,] 76.92495 0.4282709 [88,] 76.92636 0.4253294 [89,] 76.92736 0.4225265 [90,] 76.92817 0.4195852 [91,] 76.92775 0.4167426 [92,] 76.92619 0.4138640 [93,] 76.92437 0.4108853 [94,] 76.92238 0.4078655 [95,] 76.92047 0.4047536 [96,] 76.92000 0.4016896 [97,] 76.91892 0.3985462 [98,] 76.91892 0.3953024 [99,] 76.91907 0.3921395 [100,] 76.92031 0.3892425 [101,] 76.91949 0.3865381 [102,] 76.92032 0.3838653 [103,] 76.92097 0.3810316 [104,] 76.92097 0.3780240 [105,] 76.92227 0.3748692 [106,] 76.92270 0.3715247 [107,] 76.92260 0.3681649 [108,] 76.92312 0.3646284 [109,] 76.92312 0.3612400 [110,] 76.92493 0.3580186 [111,] 76.92486 0.3547833 [112,] 76.92441 0.3514418 [113,] 76.92373 0.3480576 [114,] 76.92250 0.3446282 [115,] 76.92250 0.3411034 [116,] 76.92234 0.3373458 [117,] 76.92214 0.3335074 [118,] 76.92411 0.3297300 [119,] 76.92582 0.3256471 [120,] 76.92842 0.3214283 > (midr <- midrange(x)) [1] 108.26 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] 76.87133 76.92817 76.87133 76.92817 76.92817 76.87133 76.92817 76.92736 > postscript(file="/var/wessaorg/rcomp/tmp/1mrfq1321105595.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/2ltim1321105595.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/3kzfn1321105595.tab") > > try(system("convert tmp/1mrfq1321105595.ps tmp/1mrfq1321105595.png",intern=TRUE)) character(0) > try(system("convert tmp/2ltim1321105595.ps tmp/2ltim1321105595.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.059 0.214 2.285