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(255 + ,280.2 + ,299.9 + ,339.2 + ,374.2 + ,393.5 + ,389.2 + ,381.7 + ,375.2 + ,369 + ,357.4 + ,352.1 + ,346.5 + ,342.9 + ,340.3 + ,328.3 + ,322.9 + ,314.3 + ,308.9 + ,294 + ,285.6 + ,281.2 + ,280.3 + ,278.8 + ,274.5 + ,270.4 + ,263.4 + ,259.9 + ,258 + ,262.7 + ,284.7 + ,311.3 + ,322.1 + ,327 + ,331.3 + ,333.3 + ,321.4 + ,327 + ,320 + ,314.7 + ,316.7 + ,314.4 + ,321.3 + ,318.2 + ,307.2 + ,301.3 + ,287.5 + ,277.7 + ,274.4 + ,258.8 + ,253.3 + ,251 + ,248.4 + ,249.5 + ,246.1 + ,244.5 + ,243.6 + ,244 + ,240.8 + ,249.8 + ,248 + ,259.4 + ,260.5 + ,260.8 + ,261.3 + ,259.5 + ,256.6 + ,257.9 + ,256.5 + ,254.2 + ,253.3 + ,253.8 + ,255.5 + ,257.1 + ,257.3 + ,253.2 + ,252.8 + ,252 + ,250.7 + ,252.2 + ,250 + ,251 + ,253.4 + ,251.2 + ,255.6 + ,261.1 + ,258.9 + ,259.9 + ,261.2 + ,264.7 + ,267.1 + ,266.4 + ,267.7 + ,268.6 + ,267.5 + ,268.5 + ,268.5 + ,270.5 + ,270.9 + ,270.1 + ,269.3 + ,269.8 + ,270.1 + ,264.9 + ,263.7 + ,264.8 + ,263.7 + ,255.9 + ,276.2 + ,360.1 + ,380.5 + ,373.7 + ,369.8 + ,366.6 + ,359.3 + ,345.8 + ,326.2 + ,324.5 + ,328.1 + ,327.5 + ,324.4 + ,316.5 + ,310.9 + ,301.5 + ,291.7 + ,290.4 + ,287.4 + ,277.7 + ,281.6 + ,288 + ,276 + ,272.9 + ,283 + ,283.3 + ,276.8 + ,284.5 + ,282.7 + ,281.2 + ,287.4 + ,283.1 + ,284 + ,285.5 + ,289.2 + ,292.5 + ,296.4 + ,305.2 + ,303.9 + ,311.5 + ,316.3 + ,316.7 + ,322.5 + ,317.1 + ,309.8 + ,303.8 + ,290.3 + ,293.7 + ,291.7 + ,296.5 + ,289.1 + ,288.5 + ,293.8 + ,297.7 + ,305.4 + ,302.7 + ,302.5 + ,303 + ,294.5 + ,294.1 + ,294.5 + ,297.1 + ,289.4 + ,292.4 + ,287.9 + ,286.6 + ,280.5 + ,272.4 + ,269.2 + ,270.6 + ,267.3 + ,262.5 + ,266.8 + ,268.8 + ,263.1 + ,261.2 + ,266 + ,262.5 + ,265.2 + ,261.3 + ,253.7 + ,249.2 + ,239.1 + ,236.4 + ,235.2 + ,245.2 + ,246.2 + ,247.7 + ,251.4 + ,253.3 + ,254.8 + ,250 + ,249.3 + ,241.5 + ,243.3 + ,248 + ,253 + ,252.9 + ,251.5 + ,251.6 + ,253.5 + ,259.8 + ,334.1 + ,448 + ,445.8 + ,445 + ,448.2 + ,438.2 + ,439.8 + ,423.4 + ,410.8 + ,408.4 + ,406.7 + ,405.9 + ,402.7 + ,405.1 + ,399.6 + ,386.5 + ,381.4 + ,375.2 + ,357.7 + ,359 + ,355 + ,352.7 + ,344.4 + ,343.8 + ,338 + ,339 + ,333.3 + ,334.4 + ,328.3 + ,330.7 + ,330 + ,331.6 + ,351.2 + ,389.4 + ,410.9 + ,442.8 + ,462.8 + ,466.9 + ,461.7 + ,439.2 + ,430.3 + ,416.1 + ,402.5 + ,397.3 + ,403.3 + ,395.9 + ,387.8 + ,378.6 + ,377.1 + ,370.4 + ,362 + ,350.3 + ,348.2 + ,344.6 + ,343.5 + ,342.8 + ,347.6 + ,346.6 + ,349.5 + ,342.1 + ,342 + ,342.8 + ,339.3 + ,348.2 + ,333.7 + ,334.7 + ,354 + ,367.7 + ,363.3 + ,358.4 + ,353.1 + ,343.1 + ,344.6 + ,344.4 + ,333.9 + ,331.7 + ,324.3 + ,321.2 + ,322.4 + ,321.7 + ,320.5 + ,312.8 + ,309.7 + ,315.6 + ,309.7 + ,304.6 + ,302.5 + ,301.5 + ,298.8 + ,291.3 + ,293.6 + ,294.6 + ,285.9 + ,297.6 + ,301.1 + ,293.8 + ,297.7 + ,292.9 + ,292.1 + ,287.2 + ,288.2 + ,283.8 + ,299.9 + ,292.4 + ,293.3 + ,300.8 + ,293.7 + ,293.1 + ,294.4 + ,292.1 + ,291.9 + ,282.5 + ,277.9 + ,287.5 + ,289.2 + ,285.6 + ,293.2 + ,290.8 + ,283.1 + ,275 + ,287.8 + ,287.8 + ,287.4 + ,284 + ,277.8 + ,277.6 + ,304.9 + ,294 + ,300.9 + ,324 + ,332.9 + ,341.6 + ,333.4 + ,348.2 + ,344.7 + ,344.7 + ,329.3 + ,323.5 + ,323.2 + ,317.4 + ,330.1 + ,329.2 + ,334.9 + ,315.8 + ,315.4 + ,319.6 + ,317.3 + ,313.8 + ,315.8 + ,311.3) > 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] 308.3508 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 2.583439 > (armose <- arm / armse) [1] 119.3567 > (geo <- geomean(x)) [1] 304.7407 > (har <- harmean(x)) [1] 301.3851 > (qua <- quamean(x)) [1] 312.2119 > (win <- winmean(x)) [,1] [,2] [1,] 308.3428 2.5812558 [2,] 308.3517 2.5790972 [3,] 308.2533 2.5601636 [4,] 308.2589 2.5592575 [5,] 308.2533 2.5528466 [6,] 308.2450 2.5504967 [7,] 308.2100 2.5436015 [8,] 308.1544 2.5330833 [9,] 308.1569 2.5296963 [10,] 308.1542 2.5239762 [11,] 307.9158 2.4899138 [12,] 307.7358 2.4556472 [13,] 307.4831 2.4211379 [14,] 307.2808 2.3963217 [15,] 307.2933 2.3946748 [16,] 307.2222 2.3795108 [17,] 307.1467 2.3697386 [18,] 307.1167 2.3643913 [19,] 307.0903 2.3584176 [20,] 307.0014 2.3461609 [21,] 306.9664 2.3421677 [22,] 306.9969 2.3378927 [23,] 306.8308 2.3157266 [24,] 306.6775 2.2987520 [25,] 306.5942 2.2871897 [26,] 306.4353 2.2675180 [27,] 306.1353 2.2346033 [28,] 306.1275 2.2324604 [29,] 306.0469 2.2186381 [30,] 305.9553 2.2064394 [31,] 305.5936 2.1616384 [32,] 305.5758 2.1584216 [33,] 305.5025 2.1497532 [34,] 305.3419 2.1311565 [35,] 305.2058 2.1166120 [36,] 305.0158 2.0987738 [37,] 305.0158 2.0987738 [38,] 304.9208 2.0882553 [39,] 304.8775 2.0825148 [40,] 304.5331 2.0476756 [41,] 304.4761 2.0407802 [42,] 304.4294 2.0292602 [43,] 304.3458 2.0106337 [44,] 304.2358 1.9972082 [45,] 303.8858 1.9575287 [46,] 303.7325 1.9426867 [47,] 303.5236 1.9194353 [48,] 303.4969 1.9051919 [49,] 303.4697 1.9009297 [50,] 303.4558 1.8894064 [51,] 303.3850 1.8794627 [52,] 303.4283 1.8700783 [53,] 303.0897 1.8409959 [54,] 303.0597 1.8211057 [55,] 302.9375 1.8094047 [56,] 302.9531 1.7993477 [57,] 302.8739 1.7909851 [58,] 302.7772 1.7766715 [59,] 302.6461 1.7644189 [60,] 302.5128 1.7544298 [61,] 302.3942 1.7312295 [62,] 302.4458 1.7277536 [63,] 302.4983 1.7242355 [64,] 302.4094 1.7151943 [65,] 302.2289 1.7020127 [66,] 302.2289 1.6994514 [67,] 302.0986 1.6900327 [68,] 302.1175 1.6599696 [69,] 302.1175 1.6599696 [70,] 302.1369 1.6559979 [71,] 302.2158 1.6507778 [72,] 302.2358 1.6439643 [73,] 302.2967 1.6399688 [74,] 302.1733 1.6311752 [75,] 302.3192 1.6131207 [76,] 302.2558 1.6057552 [77,] 302.2344 1.6013373 [78,] 302.2778 1.5955903 [79,] 302.4533 1.5842824 [80,] 302.3867 1.5675855 [81,] 302.4542 1.5602553 [82,] 302.4314 1.5494863 [83,] 302.1778 1.5255692 [84,] 301.9911 1.5064253 [85,] 302.0147 1.5017880 [86,] 302.1581 1.4863817 [87,] 301.9164 1.4697753 [88,] 301.1831 1.4171840 [89,] 301.1831 1.4107455 [90,] 301.2081 1.3994035 [91,] 301.1575 1.3927898 [92,] 301.2342 1.3813021 [93,] 301.2600 1.3729941 [94,] 301.1817 1.3678467 [95,] 301.2344 1.3611118 [96,] 301.2611 1.3594301 [97,] 301.1803 1.3506683 [98,] 300.9353 1.3242579 [99,] 301.3203 1.2966269 [100,] 301.3758 1.2825994 [101,] 301.6283 1.2458330 [102,] 301.4867 1.2330876 [103,] 301.6011 1.2225414 [104,] 301.6878 1.1920486 [105,] 301.7169 1.1866690 [106,] 301.6286 1.1590657 [107,] 301.8664 1.1449524 [108,] 301.8364 1.1393261 [109,] 301.6547 1.1276945 [110,] 301.5325 1.1161538 [111,] 301.5633 1.1143287 [112,] 301.5944 1.0820354 [113,] 301.5003 1.0227735 [114,] 301.5003 1.0189543 [115,] 301.5322 1.0132564 [116,] 301.6611 0.9942198 [117,] 301.4986 0.9840745 [118,] 301.5314 0.9704373 [119,] 301.7297 0.9473450 [120,] 301.6631 0.9352907 > (tri <- trimean(x)) [,1] [,2] [1,] 308.1123 2.551534 [2,] 307.8792 2.520636 [3,] 307.6390 2.489646 [4,] 307.4295 2.464322 [5,] 307.2163 2.438257 [6,] 307.0017 2.412617 [7,] 306.7861 2.386412 [8,] 306.5733 2.360327 [9,] 306.3652 2.334786 [10,] 306.1544 2.308672 [11,] 305.9414 2.282203 [12,] 305.7491 2.258655 [13,] 305.7491 2.237867 [14,] 305.4111 2.219742 [15,] 305.2655 2.203255 [16,] 305.1171 2.186263 [17,] 304.9718 2.169885 [18,] 304.8296 2.153657 [19,] 304.6876 2.137198 [20,] 304.5453 2.120526 [21,] 304.4063 2.104077 [22,] 304.2674 2.087243 [23,] 304.1252 2.070001 [24,] 303.9894 2.053537 [25,] 303.8594 2.037505 [26,] 303.8594 2.021543 [27,] 303.6092 2.006136 [28,] 303.4984 1.992078 [29,] 303.3864 1.977556 [30,] 303.2763 1.963216 [31,] 303.1685 1.948959 [32,] 303.0733 1.936574 [33,] 302.9776 1.923832 [34,] 302.8832 1.911005 [35,] 302.7934 1.898602 [36,] 302.7073 1.886413 [37,] 302.6266 1.874604 [38,] 302.5447 1.862275 [39,] 302.4649 1.849927 [40,] 302.3854 1.837310 [41,] 302.3158 1.825835 [42,] 302.2471 1.814172 [43,] 302.1788 1.802521 [44,] 302.1121 1.791206 [45,] 302.0478 1.779995 [46,] 301.9929 1.770089 [47,] 301.9417 1.760389 [48,] 301.8958 1.751267 [49,] 301.8958 1.742325 [50,] 301.8042 1.733134 [51,] 301.7581 1.723989 [52,] 301.7581 1.714826 [53,] 301.6665 1.705601 [54,] 301.6282 1.697176 [55,] 301.5900 1.689153 [56,] 301.5544 1.681209 [57,] 301.5179 1.673264 [58,] 301.4828 1.665251 [59,] 301.4496 1.657409 [60,] 301.4192 1.649658 [61,] 301.3916 1.641904 [62,] 301.3665 1.634679 [63,] 301.3665 1.627185 [64,] 301.3112 1.619410 [65,] 301.2843 1.611572 [66,] 301.2614 1.603841 [67,] 301.2381 1.595770 [68,] 301.2174 1.587632 [69,] 301.1959 1.580255 [70,] 301.1741 1.572437 [71,] 301.1514 1.564315 [72,] 301.1264 1.555919 [73,] 301.1005 1.547301 [74,] 301.0726 1.538326 [75,] 301.0471 1.529191 [76,] 301.0178 1.520255 [77,] 300.9893 1.511086 [78,] 300.9608 1.501537 [79,] 300.9307 1.491635 [80,] 300.8960 1.481587 [81,] 300.8621 1.471647 [82,] 300.8260 1.461384 [83,] 300.7897 1.450941 [84,] 300.7583 1.440929 [85,] 300.7305 1.431140 [86,] 300.7016 1.420900 [87,] 300.6688 1.410659 [88,] 300.6408 1.400518 [89,] 300.6286 1.392164 [90,] 300.6161 1.383503 [91,] 300.6028 1.374737 [92,] 300.5903 1.365642 [93,] 300.5759 1.356417 [94,] 300.5605 1.346903 [95,] 300.5465 1.336929 [96,] 300.5310 1.326531 [97,] 300.5145 1.315424 [98,] 300.5145 1.303925 [99,] 300.4895 1.292933 [100,] 300.4706 1.282498 [101,] 300.4500 1.271958 [102,] 300.4231 1.262478 [103,] 300.3987 1.252897 [104,] 300.3987 1.243054 [105,] 300.3407 1.234008 [106,] 300.3088 1.224450 [107,] 300.2781 1.215589 [108,] 300.2410 1.206654 [109,] 300.2410 1.197211 [110,] 300.1693 1.187598 [111,] 300.1370 1.177780 [112,] 300.1029 1.167121 [113,] 300.0672 1.157413 [114,] 300.0326 1.150350 [115,] 300.0326 1.142743 [116,] 299.9594 1.134647 [117,] 299.9175 1.126823 [118,] 299.8782 1.118813 [119,] 299.8369 1.110766 [120,] 299.7892 1.103237 > (midr <- midrange(x)) [1] 351.05 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] 300.4403 300.6161 300.4403 300.6161 300.6161 300.4403 300.6161 300.6286 > postscript(file="/var/wessaorg/rcomp/tmp/1j6zl1321012139.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/2l4ux1321012139.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/3ok211321012139.tab") > > try(system("convert tmp/1j6zl1321012139.ps tmp/1j6zl1321012139.png",intern=TRUE)) character(0) > try(system("convert tmp/2l4ux1321012139.ps tmp/2l4ux1321012139.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.125 0.137 2.285