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.2612954 + ,0.1199274 + ,0.0852586 + ,0.0787527 + ,0.0475989 + ,0.0184526 + ,-0.0770353 + ,-0.0269715 + ,0.7787045 + ,-0.1638537 + ,-0.1836121 + ,-0.3507641 + ,0.0075108 + ,0.4577967 + ,0.6827424 + ,0.0616388 + ,0.2385877 + ,-0.4114253 + ,-105949972354199.0000000 + ,-0.2648054 + ,0.1070291 + ,0.1360179 + ,-0.1300411 + ,-0.0525067 + ,0.2999522 + ,-0.0058877 + ,0.5082153 + ,-0.2545075 + ,0.2698511 + ,0.2406800 + ,-0.8312265 + ,0.5704267 + ,-0.0304595 + ,-0.2219388 + ,-0.0537610 + ,-0.1964189 + ,0.4362073 + ,0.1386547 + ,-0.2652463 + ,-0.1002003 + ,0.4426762 + ,-0.0596184 + ,0.1241996 + ,-0.7183755 + ,0.0384192 + ,-0.0411679 + ,0.1062431 + ,-0.3550513 + ,-0.1364715 + ,0.5158243 + ,0.4844733 + ,-0.0873717 + ,-0.4396326 + ,-0.1563765 + ,-0.3812771 + ,-0.1394269 + ,0.0062911 + ,0.1457926 + ,0.3852481 + ,0.0586338 + ,-0.0986281 + ,-0.0997382 + ,-0.2143859 + ,0.1338376 + ,0.0347307 + ,0.2394928 + ,-0.5775264 + ,0.0199321 + ,-0.0806811 + ,-0.1985152 + ,-0.3648308 + ,0.2686832 + ,-0.1742388 + ,0.0603476 + ,-0.5146724 + ,-0.0254469 + ,0.9590277 + ,-0.2079646 + ,0.4114399 + ,-0.2411692 + ,0.3869621 + ,-0.3167880 + ,0.0850939 + ,0.3046019 + ,0.2917561 + ,0.4638277 + ,-0.0853615 + ,0.0856066 + ,-0.1002348 + ,0.1039727 + ,-0.3306544 + ,-0.4827168 + ,0.2309593 + ,0.5200578 + ,0.1699253 + ,-0.2429273 + ,-0.2344870 + ,0.0681538 + ,0.2928410 + ,-0.4215268 + ,-0.4898912 + ,0.2728075 + ,-0.0234383 + ,0.2437270 + ,0.1441034 + ,0.3486934 + ,-0.2023078 + ,-0.1854841 + ,-0.0074343 + ,-0.1426377 + ,0.1094409 + ,0.3583702 + ,0.2211597 + ,-0.0477162 + ,-0.1248808 + ,-0.0322416 + ,-0.3191736 + ,0.3667243 + ,0.4848844 + ,-0.0208251 + ,0.5054507 + ,0.0186890 + ,0.2491611 + ,-0.0125337 + ,0.4052350 + ,-0.0052602 + ,0.2340145 + ,-0.3319049 + ,-0.3975116 + ,-0.1006200 + ,-0.0256229 + ,0.3864107 + ,0.2341884 + ,0.2465479 + ,-0.4497857 + ,-0.1213249 + ,-0.1753105 + ,0.3623830 + ,0.0572417 + ,0.3763589 + ,-0.2915969 + ,-0.2416817 + ,0.0162782 + ,-0.1418666 + ,-0.3654466 + ,-0.7121934 + ,0.4687787 + ,0.3120325 + ,0.1293531 + ,0.1648593 + ,-0.4758823 + ,0.1885553 + ,0.1991413 + ,0.0473497 + ,-0.1827396 + ,0.1509197 + ,-0.5510143 + ,0.6503816 + ,0.0566364 + ,-0.4854993 + ,-0.0237593 + ,0.2340704 + ,0.4182033 + ,0.3923773 + ,0.4896438 + ,0.0558385 + ,0.1073176 + ,0.3541497 + ,0.3202133 + ,0.0060837 + ,0.5006057 + ,0.4108391 + ,0.1220578 + ,0.3928809 + ,0.0194724 + ,-0.2749880 + ,-0.3323001 + ,-0.8219820 + ,-0.6250797 + ,0.2913434 + ,0.3276369 + ,0.0527862 + ,-0.0724262 + ,-0.4526045 + ,-0.1601941 + ,-0.0564278 + ,-0.0577598 + ,-0.0998699 + ,-0.0713135 + ,0.1097104 + ,0.2555912 + ,-0.1260099 + ,-0.2107783 + ,0.1316683 + ,0.1201368 + ,0.2432284 + ,-0.4117344 + ,-0.2413680 + ,0.3052385 + ,0.0657756 + ,-0.1488040 + ,0.1193887 + ,0.1256285 + ,0.2601406 + ,0.2637692 + ,0.1564489 + ,-0.4806378 + ,-0.3081520 + ,0.0356640 + ,-0.5153010 + ,-0.3240954 + ,-0.1485235 + ,0.2335331 + ,0.4658222 + ,0.2535112 + ,-0.2585672 + ,104562110333126.0000000 + ,0.2992508 + ,0.5151253 + ,0.1458136 + ,-0.0456761 + ,-0.3869198 + ,0.0220983 + ,0.1746298 + ,0.0153408 + ,-0.0583372 + ,0.6180818 + ,-0.3458976 + ,0.3066144 + ,0.1971475 + ,-0.1520329 + ,0.6055431 + ,0.0256170 + ,-0.1293628 + ,-0.6566055 + ,-0.1435563 + ,0.1165143 + ,-0.0445963 + ,0.2245579 + ,-0.0519041 + ,0.4250692 + ,-0.0426066 + ,-0.3579304 + ,0.5294173 + ,0.0245672 + ,-0.0230731 + ,-0.0722307 + ,0.1362568 + ,-0.0340457 + ,0.3554641 + ,-0.0014537 + ,-0.0526226 + ,0.5779047 + ,0.1238081 + ,0.3384949 + ,0.2578782 + ,-0.3197173 + ,-0.0369641 + ,0.2043844 + ,-0.0281985 + ,-0.0628542 + ,-0.1879158 + ,-0.1466980 + ,0.5546829 + ,0.0170458 + ,0.1233742 + ,0.1237018 + ,-0.1105713 + ,-0.2544327 + ,-0.3824815 + ,-0.2182999 + ,0.0448819 + ,0.2738115 + ,0.2553722 + ,-0.0033340 + ,0.0779717 + ,0.0317364 + ,0.0759541 + ,0.1211982 + ,-0.4466220 + ,-0.1410048 + ,-0.1257054 + ,-0.4218211 + ,-0.1734130 + ,-0.1822666 + ,0.1446557 + ,-0.2500324 + ,0.4277234) > 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] -4818965351 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 517766813143 > (armose <- arm / armse) [1] -0.009307212 > (geo <- geomean(x)) [1] NaN Warning message: In log(x) : NaNs produced > (har <- harmean(x)) [1] -0.3113072 > (qua <- quamean(x)) [1] 8.771527e+12 > (win <- winmean(x)) [,1] [,2] [1,] 0.02482251 0.018006481 [2,] 0.02363447 0.017789942 [3,] 0.02371410 0.017481030 [4,] 0.02335050 0.017410638 [5,] 0.02375481 0.017204151 [6,] 0.02415038 0.017084203 [7,] 0.02463442 0.016857477 [8,] 0.02516314 0.016743829 [9,] 0.02578719 0.016558072 [10,] 0.02493174 0.016459915 [11,] 0.02552076 0.016315793 [12,] 0.02552736 0.016277141 [13,] 0.02562141 0.016260120 [14,] 0.02538657 0.016214077 [15,] 0.02549026 0.016172318 [16,] 0.02651431 0.016007219 [17,] 0.02603364 0.015923672 [18,] 0.02593391 0.015873051 [19,] 0.02636789 0.015822742 [20,] 0.02651490 0.015588436 [21,] 0.02632078 0.015565025 [22,] 0.02691645 0.015475600 [23,] 0.02645949 0.015426008 [24,] 0.02635893 0.015190744 [25,] 0.02671682 0.015048586 [26,] 0.02635159 0.014938131 [27,] 0.02621567 0.014904120 [28,] 0.02708723 0.014697115 [29,] 0.02646820 0.014628542 [30,] 0.02712441 0.014556175 [31,] 0.02683109 0.014472466 [32,] 0.02593477 0.014304835 [33,] 0.02643469 0.014248706 [34,] 0.02740065 0.014046890 [35,] 0.02738167 0.014036632 [36,] 0.02739266 0.014009758 [37,] 0.02709329 0.013833916 [38,] 0.02639973 0.013671842 [39,] 0.02588547 0.013614535 [40,] 0.02565947 0.013537441 [41,] 0.02647518 0.013394329 [42,] 0.02869778 0.013170484 [43,] 0.03036293 0.012892960 [44,] 0.03029314 0.012637679 [45,] 0.02866547 0.012489209 [46,] 0.02847613 0.012309529 [47,] 0.02780359 0.012146231 [48,] 0.02691304 0.012071954 [49,] 0.02742761 0.011992483 [50,] 0.02855061 0.011884740 [51,] 0.02794781 0.011800798 [52,] 0.02787780 0.011786124 [53,] 0.02673481 0.011689105 [54,] 0.02778430 0.011573459 [55,] 0.03010184 0.011380088 [56,] 0.02740043 0.011056644 [57,] 0.02797637 0.010981436 [58,] 0.02810751 0.010879534 [59,] 0.02844467 0.010817017 [60,] 0.02859942 0.010648620 [61,] 0.02887875 0.010547830 [62,] 0.02908143 0.010494908 [63,] 0.03044659 0.010318711 [64,] 0.03047874 0.010239954 [65,] 0.03085181 0.010205174 [66,] 0.03062528 0.010157887 [67,] 0.02972332 0.010072730 [68,] 0.03074873 0.009906152 [69,] 0.03032965 0.009836350 [70,] 0.03040918 0.009812655 [71,] 0.03213756 0.009595981 [72,] 0.03275566 0.009508603 [73,] 0.03349389 0.009423035 [74,] 0.03347958 0.009259349 [75,] 0.03428971 0.009198517 [76,] 0.03434898 0.009192268 [77,] 0.03470834 0.009148749 [78,] 0.03486215 0.009037346 [79,] 0.03335819 0.008887794 [80,] 0.03262844 0.008802407 [81,] 0.02815276 0.008437756 [82,] 0.02710920 0.008298117 [83,] 0.02738633 0.008197191 [84,] 0.02675580 0.007886908 [85,] 0.02284604 0.007582686 [86,] 0.02244244 0.007415079 [87,] 0.02100407 0.007303103 [88,] 0.01868618 0.007110473 [89,] 0.01807638 0.006918404 [90,] 0.01984122 0.006577696 [91,] 0.02297892 0.006362187 [92,] 0.02273880 0.006329456 [93,] 0.02257159 0.006316739 [94,] 0.02090103 0.006190877 [95,] 0.02015350 0.006135635 [96,] 0.02044390 0.006105213 > (tri <- trimean(x)) [,1] [,2] [1,] 0.02454924 0.017581070 [2,] 0.02427212 0.017131641 [3,] 0.02459773 0.016776706 [4,] 0.02490069 0.016519355 [5,] 0.02530217 0.016269615 [6,] 0.02562510 0.016056185 [7,] 0.02588345 0.015856500 [8,] 0.02607237 0.015686709 [9,] 0.02619361 0.015526541 [10,] 0.02624213 0.015384760 [11,] 0.02638401 0.015248855 [12,] 0.02646962 0.015123552 [13,] 0.02655594 0.014996627 [14,] 0.02663556 0.014865485 [15,] 0.02673515 0.014732620 [16,] 0.02682852 0.014597295 [17,] 0.02685079 0.014470200 [18,] 0.02690572 0.014344070 [19,] 0.02696792 0.014215933 [20,] 0.02700459 0.014085485 [21,] 0.02703326 0.013966608 [22,] 0.02707330 0.013843517 [23,] 0.02708179 0.013720717 [24,] 0.02711425 0.013595178 [25,] 0.02715234 0.013479492 [26,] 0.02717360 0.013367400 [27,] 0.02721251 0.013256730 [28,] 0.02725834 0.013142426 [29,] 0.02726599 0.013035227 [30,] 0.02730074 0.012926551 [31,] 0.02730823 0.012816457 [32,] 0.02732802 0.012705449 [33,] 0.02738450 0.012598388 [34,] 0.02742218 0.012488708 [35,] 0.02742302 0.012384725 [36,] 0.02742459 0.012275436 [37,] 0.02742579 0.012161447 [38,] 0.02743799 0.012051015 [39,] 0.02747547 0.011943381 [40,] 0.02753192 0.011832642 [41,] 0.02759736 0.011719672 [42,] 0.02763600 0.011608009 [43,] 0.02759996 0.011502099 [44,] 0.02750743 0.011404963 [45,] 0.02741534 0.011315663 [46,] 0.02737452 0.011228755 [47,] 0.02733897 0.011145887 [48,] 0.02732414 0.011066298 [49,] 0.02733712 0.010985385 [50,] 0.02733429 0.010903293 [51,] 0.02729663 0.010821380 [52,] 0.02727664 0.010738361 [53,] 0.02725835 0.010650420 [54,] 0.02727415 0.010561621 [55,] 0.02725887 0.010472858 [56,] 0.02717428 0.010388181 [57,] 0.02716760 0.010314748 [58,] 0.02714384 0.010239857 [59,] 0.02711569 0.010164796 [60,] 0.02707708 0.010087396 [61,] 0.02703306 0.010013159 [62,] 0.02697992 0.009938577 [63,] 0.02691966 0.009860989 [64,] 0.02681890 0.009786825 [65,] 0.02671466 0.009710976 [66,] 0.02659715 0.009630815 [67,] 0.02648302 0.009546734 [68,] 0.02639138 0.009460620 [69,] 0.02626835 0.009376838 [70,] 0.02615381 0.009290001 [71,] 0.02603390 0.009197055 [72,] 0.02586196 0.009108865 [73,] 0.02566777 0.009018032 [74,] 0.02544723 0.008924156 [75,] 0.02522071 0.008831935 [76,] 0.02496464 0.008734820 [77,] 0.02469925 0.008628952 [78,] 0.02441564 0.008515834 [79,] 0.02411894 0.008399391 [80,] 0.02385579 0.008282384 [81,] 0.02360515 0.008160013 [82,] 0.02347475 0.008052358 [83,] 0.02337012 0.007943839 [84,] 0.02325399 0.007831382 [85,] 0.02315224 0.007730124 [86,] 0.02316118 0.007640580 [87,] 0.02318230 0.007553448 [88,] 0.02324668 0.007464721 [89,] 0.02338236 0.007380124 [90,] 0.02354134 0.007300131 [91,] 0.02365305 0.007236868 [92,] 0.02367356 0.007182029 [93,] 0.02370225 0.007122029 [94,] 0.02373726 0.007054642 [95,] 0.02382593 0.006988144 [96,] 0.02394190 0.006916699 > (midr <- midrange(x)) [1] -6.93931e+11 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] 0.02455358 0.02586196 0.02455358 0.02586196 0.02586196 0.02455358 0.02586196 [8] 0.02603390 > postscript(file="/var/wessaorg/rcomp/tmp/1tl5k1324568936.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/2nsjz1324568936.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/3el201324568936.tab") > > try(system("convert tmp/1tl5k1324568936.ps tmp/1tl5k1324568936.png",intern=TRUE)) character(0) > try(system("convert tmp/2nsjz1324568936.ps tmp/2nsjz1324568936.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.740 0.161 1.899