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(-71.15 + ,-45.95 + ,-25.90 + ,13.72 + ,47.48 + ,61.03 + ,56.78 + ,50.00 + ,44.88 + ,39.80 + ,29.18 + ,24.96 + ,20.74 + ,17.60 + ,15.77 + ,4.47 + ,-0.26 + ,-8.24 + ,-13.05 + ,-27.34 + ,-34.40 + ,-36.76 + ,-36.04 + ,-36.14 + ,-39.13 + ,-40.25 + ,-29.97 + ,-32.19 + ,-36.46 + ,-38.92 + ,-20.32 + ,2.62 + ,6.46 + ,8.60 + ,10.56 + ,11.17 + ,-1.01 + ,6.41 + ,0.57 + ,-9.90 + ,-5.80 + ,-5.89 + ,2.37 + ,0.89 + ,-8.46 + ,-12.31 + ,-24.04 + ,-38.97 + ,-41.46 + ,-55.24 + ,-59.23 + ,-60.20 + ,-61.37 + ,-58.50 + ,-60.15 + ,-59.90 + ,-58.99 + ,-65.57 + ,-73.24 + ,-62.78 + ,-62.45 + ,-49.27 + ,-54.35 + ,-53.94 + ,-51.51 + ,-51.24 + ,-52.49 + ,-49.15 + ,-48.83 + ,-62.10 + ,-59.95 + ,-56.50 + ,-52.50 + ,-48.58 + ,-45.70 + ,-52.91 + ,-52.66 + ,-50.91 + ,-49.70 + ,-45.44 + ,-52.43 + ,-52.38 + ,-49.30 + ,-48.82 + ,-43.81 + ,-35.68 + ,-36.15 + ,-35.09 + ,-33.17 + ,-28.47 + ,-23.15 + ,-26.59 + ,-26.28 + ,-22.77 + ,-22.47 + ,-22.89 + ,-20.24 + ,-15.04 + ,-17.27 + ,-12.20 + ,-7.86 + ,-10.46 + ,-6.44 + ,-8.55 + ,-13.10 + ,-8.56 + ,-15.69 + ,-23.45 + ,-13.44 + ,52.76 + ,46.15 + ,36.75 + ,31.01 + ,29.73 + ,25.37 + ,14.72 + ,-1.56 + ,-1.09 + ,0.57 + ,3.27 + ,3.09 + ,-2.19 + ,-4.98 + ,-11.71 + ,-18.84 + ,-17.77 + ,-18.36 + ,-25.92 + ,-20.11 + ,-16.45 + ,-31.49 + ,-32.77 + ,-22.89 + ,-26.12 + ,-29.49 + ,-23.30 + ,-23.89 + ,-22.33 + ,-13.41 + ,-15.06 + ,-11.44 + ,-12.46 + ,-16.72 + ,-10.79 + ,-7.02 + ,7.35 + ,7.69 + ,3.41 + ,11.31 + ,10.21 + ,16.98 + ,14.34 + ,9.89 + ,4.57 + ,-9.86 + ,-3.47 + ,-2.25 + ,5.87 + ,-5.18 + ,-9.82 + ,-1.41 + ,5.45 + ,15.89 + ,15.95 + ,4.18 + ,6.18 + ,0.28 + ,2.62 + ,5.38 + ,10.09 + ,0.11 + ,-3.62 + ,-5.99 + ,-5.16 + ,-9.21 + ,-15.16 + ,-15.60 + ,-17.46 + ,-19.63 + ,-22.10 + ,-17.80 + ,-8.88 + ,-11.16 + ,-11.84 + ,-5.85 + ,-8.13 + ,1.56 + ,3.82 + ,-2.75 + ,-6.22 + ,-15.32 + ,-16.99 + ,-17.27 + ,-6.39 + ,-4.52 + ,-7.83 + ,-4.73 + ,-1.55 + ,0.87 + ,-15.54 + ,-15.22 + ,-22.01 + ,-19.70 + ,-13.54 + ,-7.68 + ,-20.38 + ,-57.94 + ,-55.69 + ,-52.24 + ,-47.71 + ,28.95 + ,106.79 + ,78.46 + ,72.85 + ,76.55 + ,74.06 + ,79.28 + ,64.54 + ,55.77 + ,54.80 + ,47.53 + ,52.95 + ,53.35 + ,62.49 + ,59.69 + ,52.57 + ,47.25 + ,41.22 + ,35.33 + ,31.84 + ,28.67 + ,31.78 + ,22.10 + ,23.63 + ,12.87 + ,-15.19 + ,-24.44 + ,-27.99 + ,-34.17 + ,-17.49 + ,-9.34 + ,-42.68 + ,-103.84 + ,-47.33 + ,-70.93 + ,-39.14 + ,53.06 + ,69.47 + ,73.18 + ,61.22 + ,61.47 + ,33.71 + ,20.51 + ,2.39 + ,36.10 + ,25.61 + ,38.65 + ,32.34 + ,29.02 + ,24.59 + ,31.68 + ,23.00 + ,10.90 + ,5.32 + ,6.46 + ,11.12 + ,13.76 + ,15.49 + ,21.39 + ,13.88 + ,24.76 + ,30.25 + ,34.48 + ,43.44 + ,12.67 + ,-8.83 + ,27.49 + ,50.55 + ,44.15 + ,46.92 + ,43.74 + ,43.65 + ,45.74 + ,52.88 + ,43.93 + ,39.63 + ,29.82 + ,29.52 + ,36.70 + ,47.66 + ,46.08 + ,32.49 + ,22.19 + ,47.71 + ,42.53 + ,36.29 + ,32.53 + ,42.31 + ,34.11 + ,28.32 + ,26.70 + ,30.41 + ,12.19 + ,18.25 + ,32.68 + ,30.14 + ,46.76 + ,45.34 + ,34.55 + ,29.65 + ,24.47 + ,33.19 + ,41.52 + ,36.56 + ,43.39 + ,46.10 + ,36.22 + ,41.93 + ,35.91 + ,39.00 + ,37.94 + ,30.76 + ,24.64 + ,31.50 + ,21.46 + ,17.34 + ,20.53 + ,21.86 + ,11.25 + ,-6.82 + ,21.49 + ,19.69 + ,6.78 + ,5.49 + ,-15.81 + ,-33.73 + ,-7.85 + ,-43.92 + ,-62.69 + ,-25.88 + ,-11.68 + ,9.62 + ,19.47 + ,34.38 + ,39.64 + ,21.66 + ,-0.65 + ,-6.58 + ,-35.05 + ,-23.54 + ,0.29 + ,-2.76 + ,9.33 + ,3.09 + ,0.41 + ,-6.67 + ,-2.15 + ,-3.03 + ,-23.45 + ,-42.26) > 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.1305 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 1.823713 > (armose <- arm / armse) [1] 0.07155732 > (geo <- geomean(x)) [1] NaN Warning message: In log(x) : NaNs produced > (har <- harmean(x)) [1] 25.84899 > (qua <- quamean(x)) [1] 34.55467 > (win <- winmean(x)) [,1] [,2] [1,] 0.139083333 1.8012185 [2,] 0.146138889 1.7993641 [3,] 0.132055556 1.7972545 [4,] 0.163944444 1.7876930 [5,] 0.190472222 1.7824010 [6,] 0.186472222 1.7816273 [7,] 0.125416667 1.7738568 [8,] 0.023638889 1.7615380 [9,] -0.009361111 1.7545957 [10,] -0.005194444 1.7486616 [11,] -0.011305556 1.7477684 [12,] -0.010972222 1.7465129 [13,] -0.057555556 1.7416728 [14,] -0.144666667 1.7285874 [15,] -0.176750000 1.7238036 [16,] -0.198083333 1.7178683 [17,] -0.240111111 1.7093319 [18,] -0.182611111 1.7013623 [19,] -0.145666667 1.6969365 [20,] -0.124555556 1.6943252 [21,] -0.079638889 1.6890398 [22,] -0.066194444 1.6857925 [23,] -0.129444444 1.6688936 [24,] -0.149444444 1.6643375 [25,] -0.297361111 1.6502416 [26,] -0.300250000 1.6498855 [27,] -0.305500000 1.6487004 [28,] -0.305500000 1.6480438 [29,] -0.312750000 1.6455578 [30,] -0.279416667 1.6380235 [31,] -0.269944444 1.6348963 [32,] -0.294833333 1.6280256 [33,] -0.188500000 1.6181311 [34,] -0.152611111 1.6147692 [35,] -0.182750000 1.6118921 [36,] -0.210750000 1.6077087 [37,] -0.225138889 1.6012034 [38,] -0.301138889 1.5951002 [39,] -0.298972222 1.5910521 [40,] -0.223416667 1.5812885 [41,] -0.190388889 1.5768828 [42,] -0.053888889 1.5616900 [43,] -0.030000000 1.5587859 [44,] -0.103333333 1.5480834 [45,] 0.059166667 1.5306174 [46,] 0.024666667 1.5257684 [47,] 0.118666667 1.5099493 [48,] 0.134666667 1.5024869 [49,] 0.050277778 1.4793572 [50,] 0.196111111 1.4646604 [51,] 0.351944444 1.4525512 [52,] 0.262388889 1.4456182 [53,] 0.234416667 1.4399934 [54,] 0.135416667 1.4315498 [55,] 0.283611111 1.3934743 [56,] 0.322500000 1.3894588 [57,] 0.349416667 1.3842306 [58,] 0.307527778 1.3809487 [59,] 0.312444444 1.3789121 [60,] 0.352444444 1.3730655 [61,] 0.420222222 1.3634507 [62,] 0.327222222 1.3557372 [63,] 0.304472222 1.3377175 [64,] 0.332916667 1.3338796 [65,] 0.394305556 1.3268841 [66,] 0.447472222 1.3160247 [67,] 0.447472222 1.3054439 [68,] 0.458805556 1.2907469 [69,] 0.495222222 1.2744398 [70,] 0.761611111 1.2519456 [71,] 0.848388889 1.2449380 [72,] 1.022388889 1.2290691 [73,] 1.018333333 1.2154013 [74,] 1.139611111 1.2056920 [75,] 1.275027778 1.1939964 [76,] 1.302472222 1.1870572 [77,] 1.231888889 1.1774375 [78,] 1.221055556 1.1708251 [79,] 1.148638889 1.1651563 [80,] 1.117527778 1.1623840 [81,] 1.416777778 1.1399327 [82,] 1.435000000 1.1290811 [83,] 1.448833333 1.1254572 [84,] 1.511833333 1.1190430 [85,] 1.502388889 1.1155699 [86,] 1.421166667 1.1098995 [87,] 1.418750000 1.1049466 [88,] 1.438305556 1.1014736 [89,] 1.433361111 1.0926711 [90,] 1.345861111 1.0866081 [91,] 1.166388889 1.0702798 [92,] 1.041166667 1.0517285 [93,] 0.795750000 1.0304590 [94,] 0.793138889 1.0225096 [95,] 0.708694444 1.0138011 [96,] 1.090027778 0.9834485 [97,] 1.073861111 0.9802992 [98,] 1.082027778 0.9780646 [99,] 1.084777778 0.9736868 [100,] 0.965333333 0.9512392 [101,] 0.808222222 0.9383618 [102,] 0.802555556 0.9097657 [103,] 0.914138889 0.8998515 [104,] 1.006583333 0.8856936 [105,] 0.957000000 0.8813546 [106,] 0.989388889 0.8732104 [107,] 0.989388889 0.8721018 [108,] 1.025388889 0.8673747 [109,] 0.828583333 0.8545521 [110,] 0.849972222 0.8453509 [111,] 0.927055556 0.8400681 [112,] 0.755944444 0.8186505 [113,] 0.887777778 0.8024963 [114,] 0.539444444 0.7755379 [115,] 0.360555556 0.7607014 [116,] 0.296111111 0.7542903 [117,] 0.250611111 0.7427596 [118,] -0.054222222 0.7197931 [119,] -0.064138889 0.7179831 [120,] -0.094138889 0.7149221 > (tri <- trimean(x)) [,1] [,2] [1,] 0.122988827 1.7859601 [2,] 0.106713483 1.7701630 [3,] 0.086666667 1.7547853 [4,] 0.071193182 1.7396180 [5,] 0.047342857 1.7265321 [6,] 0.017729885 1.7141596 [7,] -0.011531792 1.7014929 [8,] -0.032005814 1.6896542 [9,] -0.039327485 1.6791912 [10,] -0.042852941 1.6692649 [11,] -0.046863905 1.6596922 [12,] -0.050327381 1.6498717 [13,] -0.050327381 1.6398231 [14,] -0.053554217 1.6298750 [15,] -0.046454545 1.6207510 [16,] -0.036920732 1.6116994 [17,] -0.025797546 1.6027950 [18,] -0.011790123 1.5942212 [19,] -0.001180124 1.5859190 [20,] 0.007375000 1.5776179 [21,] 0.014842767 1.5691790 [22,] 0.019968354 1.5607686 [23,] 0.024458599 1.5522421 [24,] 0.032179487 1.5444442 [25,] 0.040967742 1.5366148 [26,] 0.040967742 1.5293045 [27,] 0.072941176 1.5217191 [28,] 0.089539474 1.5138927 [29,] 0.106357616 1.5057839 [30,] 0.123700000 1.4974787 [31,] 0.139932886 1.4892373 [32,] 0.156013514 1.4808198 [33,] 0.173265306 1.4724072 [34,] 0.186780822 1.4641511 [35,] 0.199172414 1.4557161 [36,] 0.212812500 1.4470647 [37,] 0.227622378 1.4382481 [38,] 0.243133803 1.4293685 [39,] 0.261418440 1.4203950 [40,] 0.279892857 1.4112232 [41,] 0.296187050 1.4021147 [42,] 0.311666667 1.3928114 [43,] 0.323102190 1.3838069 [44,] 0.333970588 1.3745327 [45,] 0.347222222 1.3653288 [46,] 0.355820896 1.3565058 [47,] 0.365563910 1.3474950 [48,] 0.372727273 1.3387794 [49,] 0.372727273 1.3299896 [50,] 0.388846154 1.3218059 [51,] 0.394224806 1.3138773 [52,] 0.394224806 1.3060937 [53,] 0.399015748 1.2982305 [54,] 0.403452381 1.2902243 [55,] 0.410600000 1.2821851 [56,] 0.413951613 1.2753676 [57,] 0.416341463 1.2683715 [58,] 0.418073770 1.2612369 [59,] 0.420909091 1.2538723 [60,] 0.423666667 1.2462120 [61,] 0.425462185 1.2384011 [62,] 0.425593220 1.2305892 [63,] 0.425593220 1.2226916 [64,] 0.431077586 1.2151371 [65,] 0.433478261 1.2073374 [66,] 0.434429825 1.1994121 [67,] 0.434115044 1.1915165 [68,] 0.433794643 1.1836366 [69,] 0.433198198 1.1759452 [70,] 0.431727273 1.1685151 [71,] 0.423944954 1.1616096 [72,] 0.413981481 1.1545945 [73,] 0.399766355 1.1478311 [74,] 0.385377358 1.1412427 [75,] 0.367904762 1.1346581 [76,] 0.346971154 1.1281555 [77,] 0.325000000 1.1215418 [78,] 0.304215686 1.1149332 [79,] 0.283267327 1.1081923 [80,] 0.263550000 1.1012744 [81,] 0.244141414 1.0940366 [82,] 0.217551020 1.0872904 [83,] 0.190000000 1.0805744 [84,] 0.161562500 1.0735674 [85,] 0.131105263 1.0663676 [86,] 0.100212766 1.0588382 [87,] 0.070483871 1.0510692 [88,] 0.040163043 1.0429979 [89,] 0.008736264 1.0345287 [90,] -0.023277778 1.0258932 [91,] -0.054044944 1.0169602 [92,] -0.081477273 1.0082282 [93,] -0.106724138 0.9998062 [94,] -0.127034884 0.9918586 [95,] -0.147764706 0.9837181 [96,] -0.167083333 0.9754185 [97,] -0.195481928 0.9679716 [98,] -0.195481928 0.9601060 [99,] -0.253827160 0.9517364 [100,] -0.284250000 0.9429365 [101,] -0.312721519 0.9346643 [102,] -0.338333333 0.9264453 [103,] -0.364480519 0.9190976 [104,] -0.364480519 0.9116407 [105,] -0.426200000 0.9042971 [106,] -0.458243243 0.8965631 [107,] -0.491917808 0.8886003 [108,] -0.526527778 0.8799899 [109,] -0.526527778 0.8708767 [110,] -0.595785714 0.8617759 [111,] -0.630072464 0.8524018 [112,] -0.667205882 0.8424634 [113,] -0.701343284 0.8330254 [114,] -0.739696970 0.8236856 [115,] -0.739696970 0.8153144 [116,] -0.798437500 0.8071317 [117,] -0.825396825 0.7985603 [118,] -0.852096774 0.7899072 [119,] -0.872049180 0.7820184 [120,] -0.892416667 0.7734079 > (midr <- midrange(x)) [1] 1.475 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] -0.149613260 -0.149613260 -0.149613260 -0.149613260 -0.149613260 [6] -0.149613260 -0.149613260 0.008736264 > postscript(file="/var/www/html/rcomp/tmp/1wkrv1256748143.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/2yol81256748143.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/3ki8r1256748143.tab") > > system("convert tmp/1wkrv1256748143.ps tmp/1wkrv1256748143.png") > system("convert tmp/2yol81256748143.ps tmp/2yol81256748143.png") > > > proc.time() user system elapsed 2.055 0.357 2.155