R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(10.505 + ,10.505 + ,10.315 + ,10.145 + ,10.815 + ,13.945 + ,13.915 + ,13.525 + ,12.775 + ,12.165 + ,11.635 + ,11.045 + ,10.295 + ,10.045 + ,9.625 + ,9.245 + ,8.885 + ,8.545 + ,8.225 + ,7.895 + ,7.165 + ,6.055 + ,5.175 + ,4.415 + ,3.705 + ,2.085 + ,-7.305 + ,-8.005 + ,-6.715 + ,-2.825 + ,-0.975 + ,1.015 + ,4.795 + ,6.295 + ,7.565 + ,8.325 + ,8.475 + ,7.485 + ,6.855 + ,9.665 + ,8.525 + ,7.325 + ,6.585 + ,5.705 + ,4.805 + ,3.695 + ,2.565 + ,5.355 + ,4.915 + ,3.925 + ,3.105 + ,2.385 + ,1.605 + ,0.645 + ,-0.305 + ,-1.315 + ,-2.295 + ,1.495 + ,3.925 + ,3.135 + ,1.975 + ,1.005 + ,4.365 + ,4.305 + ,3.255 + ,2.135 + ,1.235 + ,0.125 + ,-0.805 + ,5.155 + ,3.495 + ,1.895 + ,0.645 + ,-0.615 + ,-2.075 + ,-0.385 + ,-0.735 + ,-2.125 + ,-3.485 + ,-4.985 + ,-2.385 + ,-1.865 + ,-2.235 + ,-3.695 + ,-4.025 + ,-5.455 + ,-6.395 + ,-6.425 + ,-6.765 + ,-7.415 + ,-9.005 + ,-7.515 + ,-6.975 + ,-8.395 + ,-9.155 + ,-8.385 + ,-9.825 + ,-11.565 + ,-10.135 + ,-13.325 + ,-16.115 + ,-14.435 + ,-16.455 + ,-18.135 + ,-16.315 + ,-18.185 + ,-14.905 + ,-14.925 + ,-9.335 + ,0.285 + ,14.965 + ,16.375 + ,17.375 + ,16.335 + ,14.735 + ,13.185 + ,11.385 + ,10.205 + ,11.255 + ,9.465 + ,7.875 + ,6.455 + ,4.925 + ,3.475 + ,2.025 + ,0.735 + ,-0.575 + ,-1.735 + ,-2.775 + ,-1.285 + ,0.365 + ,-0.625 + ,-0.505 + ,1.415 + ,-0.285 + ,0.535 + ,-0.125 + ,-1.785 + ,-3.265 + ,-4.705 + ,-6.185 + ,-4.815 + ,-0.485 + ,-1.915 + ,-1.845 + ,-4.875 + ,-5.765 + ,0.695 + ,-0.995 + ,-0.175 + ,-0.705 + ,-2.205 + ,-3.755 + ,-4.125 + ,-3.615 + ,-5.245 + ,-6.995 + ,-8.795 + ,-6.815 + ,-4.615 + ,-6.305 + ,-7.915 + ,-9.405 + ,-10.905 + ,-4.615 + ,-5.435 + ,-6.845 + ,-8.335 + ,-9.615 + ,-10.765 + ,-9.525 + ,-5.865 + ,-7.025 + ,-8.185 + ,-9.295 + ,-10.465 + ,-11.965 + ,-10.195 + ,-10.805 + ,-12.075 + ,-12.075 + ,-15.835 + ,-17.695 + ,-18.355 + ,-19.005 + ,-19.665 + ,-23.465 + ,-26.815 + ,-27.375 + ,-27.935 + ,-28.475 + ,-29.035 + ,-29.535 + ,-30.015 + ,-30.485 + ,-27.875 + ,-27.545 + ,-28.245 + ,-28.745 + ,-22.435 + ,-22.985 + ,-23.535 + ,-23.815 + ,-24.605 + ,-25.075 + ,-18.225 + ,1.425 + ,0.255 + ,-0.585 + ,0.375 + ,-0.905 + ,18.695 + ,32.895 + ,35.505 + ,35.235 + ,31.155 + ,29.185 + ,28.285 + ,26.205 + ,25.425 + ,28.455 + ,25.075 + ,23.115 + ,19.455 + ,17.985 + ,14.735 + ,14.855 + ,14.765 + ,8.455 + ,11.055 + ,10.605 + ,7.665 + ,8.415 + ,7.255 + ,9.955 + ,25.745 + ,27.675 + ,30.205 + ,30.245 + ,22.485 + ,17.675 + ,36.665 + ,80.555 + ,70.605 + ,95.115 + ,95.175 + ,55.935 + ,49.245 + ,44.405 + ,38.675 + ,33.705 + ,41.075 + ,40.855 + ,47.875 + ,32.815 + ,34.495 + ,23.005 + ,21.435 + ,22.425 + ,21.195 + ,12.775 + ,11.135 + ,16.565 + ,17.645 + ,16.425 + ,13.515 + ,14.685 + ,13.205 + ,11.575 + ,11.635 + ,5.665 + ,3.115 + ,-1.085 + ,-1.115 + ,7.725 + ,19.955 + ,10.705 + ,5.615 + ,6.705 + ,2.535 + ,1.385 + ,-4.005 + ,-4.325 + ,-8.315 + ,-9.155 + ,-8.015 + ,-6.705 + ,-8.225 + ,-11.475 + ,-17.815 + ,-17.605 + ,-14.405 + ,-10.495 + ,-21.155 + ,-21.545 + ,-20.925 + ,-20.025 + ,-25.885 + ,-22.895 + ,-23.825 + ,-21.695 + ,-23.165 + ,-17.995 + ,-14.925 + ,-20.865 + ,-23.455 + ,-30.365 + ,-32.205 + ,-26.775 + ,-26.775 + ,-23.415 + ,-30.545 + ,-26.325 + ,-27.705 + ,-30.925 + ,-28.325 + ,-26.815 + ,-30.245 + ,-26.265 + ,-29.195 + ,-28.725 + ,-29.935 + ,-29.105 + ,-27.615 + ,-21.235 + ,-20.955 + ,-18.555 + ,-20.585 + ,-19.005 + ,-13.585 + ,-22.015 + ,-21.035 + ,-14.235 + ,-15.385 + ,-7.175 + ,2.455 + ,3.225 + ,16.905 + ,30.855 + ,23.405 + ,20.525 + ,13.675 + ,3.865 + ,3.805 + ,-0.955 + ,8.815 + ,12.575 + ,12.645 + ,27.955 + ,18.545 + ,12.495 + ,13.665 + ,10.195 + ,3.205 + ,4.445 + ,10.575 + ,6.865 + ,5.445 + ,17.625 + ,25.405) > 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] 0.7631667 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.993561 > (armose <- arm / armse) [1] 0.7681126 > (geo <- geomean(x)) [1] NaN Warning message: In log(x) : NaNs produced > (har <- harmean(x)) [1] -35.69164 > (qua <- quamean(x)) [1] 18.84076 > (win <- winmean(x)) [,1] [,2] [1,] 0.766555556 0.9931945 [2,] 0.687777778 0.9730424 [3,] 0.605361111 0.9550449 [4,] 0.443694444 0.9246096 [5,] 0.352444444 0.9097259 [6,] 0.333444444 0.9059895 [7,] 0.267527778 0.8962834 [8,] 0.202416667 0.8856167 [9,] 0.205416667 0.8841198 [10,] 0.147361111 0.8763012 [11,] 0.088083333 0.8687390 [12,] 0.059083333 0.8633599 [13,] 0.050055556 0.8621811 [14,] 0.031000000 0.8580337 [15,] 0.004333333 0.8538046 [16,] -0.028111111 0.8495536 [17,] -0.017250000 0.8477974 [18,] -0.097250000 0.8387364 [19,] -0.104111111 0.8362721 [20,] -0.133000000 0.8323423 [21,] -0.131250000 0.8317299 [22,] -0.183194444 0.8245168 [23,] -0.194055556 0.8166565 [24,] -0.205388889 0.8155513 [25,] -0.225527778 0.8130775 [26,] -0.245750000 0.8111319 [27,] -0.322250000 0.7976686 [28,] -0.353361111 0.7939494 [29,] -0.348527778 0.7888246 [30,] -0.282694444 0.7826509 [31,] -0.270638889 0.7765079 [32,] -0.349750000 0.7572505 [33,] -0.375416667 0.7548577 [34,] -0.359361111 0.7516784 [35,] -0.403111111 0.7467466 [36,] -0.408111111 0.7461487 [37,] -0.505750000 0.7372392 [38,] -0.504694444 0.7328659 [39,] -0.557777778 0.7252541 [40,] -0.611111111 0.7193056 [41,] -0.615666667 0.7102948 [42,] -0.655333333 0.6992059 [43,] -0.635027778 0.6945859 [44,] -0.685138889 0.6878173 [45,] -0.685138889 0.6816347 [46,] -0.678750000 0.6804896 [47,] -0.665694444 0.6789825 [48,] -0.688361111 0.6755993 [49,] -0.748250000 0.6705295 [50,] -0.787138889 0.6663864 [51,] -0.767305556 0.6616300 [52,] -0.693638889 0.6544036 [53,] -0.646527778 0.6496336 [54,] -0.753027778 0.6269194 [55,] -0.769833333 0.6257481 [56,] -0.713833333 0.6191231 [57,] -0.686916667 0.6162567 [58,] -0.665972222 0.6145869 [59,] -0.667611111 0.6134938 [60,] -0.782611111 0.6043436 [61,] -0.763972222 0.6021043 [62,] -0.774305556 0.5968388 [63,] -0.755055556 0.5950530 [64,] -0.763944444 0.5921083 [65,] -0.558111111 0.5757730 [66,] -0.589277778 0.5699491 [67,] -0.555777778 0.5668446 [68,] -0.580333333 0.5576091 [69,] -0.494083333 0.5510766 [70,] -0.429916667 0.5426869 [71,] -0.443722222 0.5417616 [72,] -0.455722222 0.5403941 [73,] -0.427333333 0.5288762 [74,] -0.530111111 0.5212658 [75,] -0.494694444 0.5186460 [76,] -0.370138889 0.5077806 [77,] -0.355166667 0.5011025 [78,] -0.112500000 0.4800849 [79,] -0.138833333 0.4783521 [80,] -0.132166667 0.4754893 [81,] -0.044416667 0.4691437 [82,] -0.076305556 0.4643053 [83,] 0.029750000 0.4537405 [84,] 0.029750000 0.4506488 [85,] 0.032111111 0.4495537 [86,] 0.079888889 0.4441644 [87,] 0.087138889 0.4436839 [88,] 0.106694444 0.4362947 [89,] 0.116583333 0.4349978 [90,] 0.171583333 0.4284684 [91,] 0.222138889 0.4248666 [92,] 0.232361111 0.4225500 [93,] 0.237527778 0.4188726 [94,] 0.232305556 0.4161704 [95,] 0.166333333 0.4105373 [96,] 0.193000000 0.4074584 [97,] 0.149888889 0.4046864 [98,] 0.130833333 0.3982452 [99,] 0.089583333 0.3882802 [100,] 0.181250000 0.3800176 [101,] 0.108305556 0.3750707 [102,] 0.116805556 0.3738228 [103,] 0.108222222 0.3725668 [104,] 0.128444444 0.3705703 [105,] 0.128444444 0.3691082 [106,] 0.152000000 0.3643185 [107,] 0.125250000 0.3622786 [108,] 0.053250000 0.3544558 [109,] 0.168305556 0.3465494 [110,] 0.153027778 0.3418301 [111,] 0.168444444 0.3386004 [112,] 0.177777778 0.3342007 [113,] 0.199750000 0.3297756 [114,] 0.158583333 0.3260857 [115,] 0.142611111 0.3243278 [116,] 0.155500000 0.3200006 [117,] 0.067750000 0.3134862 [118,] 0.080861111 0.3122867 [119,] 0.047805556 0.3082878 [120,] 0.011138889 0.3056828 > (tri <- trimean(x)) [,1] [,2] [1,] 0.59153631 0.9591192 [2,] 0.41455056 0.9228459 [3,] 0.27562147 0.8956495 [4,] 0.16321023 0.8738505 [5,] 0.09108571 0.8598082 [6,] 0.03701149 0.8486263 [7,] -0.01439306 0.8377254 [8,] -0.05654070 0.8280490 [9,] -0.09061404 0.8196087 [10,] -0.12544118 0.8110474 [11,] -0.15449704 0.8031345 [12,] -0.17812500 0.7957905 [13,] -0.17812500 0.7887421 [14,] -0.22024096 0.7815444 [15,] -0.23981818 0.7744641 [16,] -0.25768293 0.7674925 [17,] -0.27352761 0.7606169 [18,] -0.29027778 0.7536176 [19,] -0.30226708 0.7470603 [20,] -0.31400000 0.7404334 [21,] -0.32424528 0.7338340 [22,] -0.33471519 0.7270170 [23,] -0.34261146 0.7204255 [24,] -0.35006410 0.7140938 [25,] -0.35706452 0.7075802 [26,] -0.35706452 0.7009604 [27,] -0.36852941 0.6941917 [28,] -0.37055921 0.6879635 [29,] -0.37129139 0.6816998 [30,] -0.37223333 0.6754749 [31,] -0.37583893 0.6693424 [32,] -0.37996622 0.6632973 [33,] -0.38112245 0.6580513 [34,] -0.38133562 0.6527130 [35,] -0.38213793 0.6473166 [36,] -0.38138889 0.6419474 [37,] -0.38045455 0.6363785 [38,] -0.37616197 0.6310218 [39,] -0.37184397 0.6256524 [40,] -0.36571429 0.6204251 [41,] -0.35776978 0.6152576 [42,] -0.34956522 0.6102984 [43,] -0.34000000 0.6056462 [44,] -0.33091912 0.6010042 [45,] -0.32018519 0.5964657 [46,] -0.30929104 0.5920069 [47,] -0.29842105 0.5873961 [48,] -0.28776515 0.5826417 [49,] -0.28776515 0.5778190 [50,] -0.26296154 0.5729967 [51,] -0.24833333 0.5681305 [52,] -0.24833333 0.5632498 [53,] -0.22149606 0.5584690 [54,] -0.21003968 0.5536756 [55,] -0.19556000 0.5496510 [56,] -0.18040323 0.5454761 [57,] -0.16646341 0.5413900 [58,] -0.15299180 0.5372266 [59,] -0.13983471 0.5329272 [60,] -0.12641667 0.5284558 [61,] -0.10987395 0.5241447 [62,] -0.09351695 0.5197098 [63,] -0.09351695 0.5152735 [64,] -0.05991379 0.5106833 [65,] -0.04269565 0.5059774 [66,] -0.03017544 0.5017744 [67,] -0.01668142 0.4975968 [68,] -0.00375000 0.4933315 [69,] 0.01000000 0.4892374 [70,] 0.02195455 0.4852144 [71,] 0.03261468 0.4813432 [72,] 0.04379630 0.4772904 [73,] 0.05546729 0.4730644 [74,] 0.06669811 0.4691157 [75,] 0.08052381 0.4652630 [76,] 0.09379808 0.4613040 [77,] 0.10446602 0.4576144 [78,] 0.11500000 0.4540034 [79,] 0.12019802 0.4511260 [80,] 0.12610000 0.4481409 [81,] 0.13196970 0.4450933 [82,] 0.13596939 0.4421383 [83,] 0.14077320 0.4392058 [84,] 0.14328125 0.4365566 [85,] 0.14584211 0.4338663 [86,] 0.14840426 0.4310419 [87,] 0.14994624 0.4282709 [88,] 0.15135870 0.4253294 [89,] 0.15236264 0.4225265 [90,] 0.15316667 0.4195852 [91,] 0.15275281 0.4167426 [92,] 0.15119318 0.4138640 [93,] 0.14936782 0.4108853 [94,] 0.14738372 0.4078655 [95,] 0.14547059 0.4047536 [96,] 0.14500000 0.4016896 [97,] 0.14391566 0.3985462 [98,] 0.14391566 0.3953024 [99,] 0.14407407 0.3921395 [100,] 0.14531250 0.3892425 [101,] 0.14449367 0.3865381 [102,] 0.14532051 0.3838653 [103,] 0.14597403 0.3810316 [104,] 0.14597403 0.3780240 [105,] 0.14726667 0.3748692 [106,] 0.14770270 0.3715247 [107,] 0.14760274 0.3681649 [108,] 0.14812500 0.3646284 [109,] 0.14812500 0.3612400 [110,] 0.14992857 0.3580186 [111,] 0.14985507 0.3547833 [112,] 0.14941176 0.3514418 [113,] 0.14873134 0.3480576 [114,] 0.14750000 0.3446282 [115,] 0.14750000 0.3411034 [116,] 0.14734375 0.3373458 [117,] 0.14714286 0.3335074 [118,] 0.14911290 0.3297300 [119,] 0.15081967 0.3256471 [120,] 0.15341667 0.3214283 > (midr <- midrange(x)) [1] 31.485 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] 0.09632597 0.15316667 0.09632597 0.15316667 0.15316667 0.09632597 0.15316667 [8] 0.15236264 > postscript(file="/var/www/html/rcomp/tmp/118ub1255890698.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/html/rcomp/tmp/2ahzf1255890698.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/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/html/rcomp/tmp/3y2is1255890698.tab") > > system("convert tmp/118ub1255890698.ps tmp/118ub1255890698.png") > system("convert tmp/2ahzf1255890698.ps tmp/2ahzf1255890698.png") > > > proc.time() user system elapsed 2.085 0.341 2.192