R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,8 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,10 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,11 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,13 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,14 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15 + ,15) > 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] 10.74174 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.06411495 > (armose <- arm / armse) [1] 167.5387 > (geo <- geomean(x)) [1] 10.58114 > (har <- harmean(x)) [1] 10.41615 > (qua <- quamean(x)) [1] 10.89676 > (win <- winmean(x)) [,1] [,2] [1,] 10.74174 0.06411495 [2,] 10.74174 0.06411495 [3,] 10.74174 0.06411495 [4,] 10.74174 0.06411495 [5,] 10.74174 0.06411495 [6,] 10.74174 0.06411495 [7,] 10.74174 0.06411495 [8,] 10.74174 0.06411495 [9,] 10.74174 0.06411495 [10,] 10.74174 0.06411495 [11,] 10.74174 0.06411495 [12,] 10.74174 0.06411495 [13,] 10.74174 0.06411495 [14,] 10.74174 0.06411495 [15,] 10.74174 0.06411495 [16,] 10.74174 0.06411495 [17,] 10.74174 0.06411495 [18,] 10.74174 0.06411495 [19,] 10.74174 0.06411495 [20,] 10.71726 0.06232575 [21,] 10.71726 0.06232575 [22,] 10.71726 0.06232575 [23,] 10.74541 0.06051065 [24,] 10.74541 0.06051065 [25,] 10.74541 0.06051065 [26,] 10.74541 0.06051065 [27,] 10.74541 0.06051065 [28,] 10.74541 0.06051065 [29,] 10.74541 0.06051065 [30,] 10.74541 0.06051065 [31,] 10.74541 0.06051065 [32,] 10.74541 0.06051065 [33,] 10.74541 0.06051065 [34,] 10.74541 0.06051065 [35,] 10.74541 0.06051065 [36,] 10.74541 0.06051065 [37,] 10.74541 0.06051065 [38,] 10.74541 0.06051065 [39,] 10.74541 0.06051065 [40,] 10.74541 0.06051065 [41,] 10.74541 0.06051065 [42,] 10.74541 0.06051065 [43,] 10.74541 0.06051065 [44,] 10.74541 0.06051065 [45,] 10.74541 0.06051065 [46,] 10.74541 0.06051065 [47,] 10.74541 0.06051065 [48,] 10.74541 0.06051065 [49,] 10.74541 0.06051065 [50,] 10.74541 0.06051065 [51,] 10.74541 0.06051065 [52,] 10.74541 0.06051065 [53,] 10.74541 0.06051065 [54,] 10.74541 0.06051065 [55,] 10.74541 0.06051065 [56,] 10.74541 0.06051065 [57,] 10.74541 0.06051065 [58,] 10.67442 0.05635661 [59,] 10.67442 0.05635661 [60,] 10.67442 0.05635661 [61,] 10.67442 0.05635661 [62,] 10.67442 0.05635661 [63,] 10.67442 0.05635661 [64,] 10.67442 0.05635661 [65,] 10.67442 0.05635661 [66,] 10.67442 0.05635661 [67,] 10.67442 0.05635661 [68,] 10.67442 0.05635661 [69,] 10.67442 0.05635661 [70,] 10.67442 0.05635661 [71,] 10.67442 0.05635661 [72,] 10.67442 0.05635661 [73,] 10.67442 0.05635661 [74,] 10.67442 0.05635661 [75,] 10.67442 0.05635661 [76,] 10.67442 0.05635661 [77,] 10.67442 0.05635661 [78,] 10.67442 0.05635661 [79,] 10.67442 0.05635661 [80,] 10.67442 0.05635661 [81,] 10.67442 0.05635661 [82,] 10.67442 0.05635661 [83,] 10.67442 0.05635661 [84,] 10.57160 0.05199106 [85,] 10.57160 0.05199106 [86,] 10.57160 0.05199106 [87,] 10.57160 0.05199106 [88,] 10.57160 0.05199106 [89,] 10.57160 0.05199106 [90,] 10.57160 0.05199106 [91,] 10.57160 0.05199106 [92,] 10.57160 0.05199106 [93,] 10.57160 0.05199106 [94,] 10.57160 0.05199106 [95,] 10.57160 0.05199106 [96,] 10.57160 0.05199106 [97,] 10.57160 0.05199106 [98,] 10.57160 0.05199106 [99,] 10.57160 0.05199106 [100,] 10.57160 0.05199106 [101,] 10.57160 0.05199106 [102,] 10.57160 0.05199106 [103,] 10.57160 0.05199106 [104,] 10.57160 0.05199106 [105,] 10.57160 0.05199106 [106,] 10.57160 0.05199106 [107,] 10.57160 0.05199106 [108,] 10.57160 0.05199106 [109,] 10.57160 0.05199106 [110,] 10.57160 0.05199106 [111,] 10.57160 0.05199106 [112,] 10.57160 0.05199106 [113,] 10.57160 0.05199106 [114,] 10.57160 0.05199106 [115,] 10.57160 0.05199106 [116,] 10.57160 0.05199106 [117,] 10.57160 0.05199106 [118,] 10.57160 0.05199106 [119,] 10.57160 0.05199106 [120,] 10.57160 0.05199106 [121,] 10.71971 0.04386575 [122,] 10.71971 0.04386575 [123,] 10.71971 0.04386575 [124,] 10.71971 0.04386575 [125,] 10.71971 0.04386575 [126,] 10.71971 0.04386575 [127,] 10.71971 0.04386575 [128,] 10.71971 0.04386575 [129,] 10.71971 0.04386575 [130,] 10.71971 0.04386575 [131,] 10.71971 0.04386575 [132,] 10.71971 0.04386575 [133,] 10.71971 0.04386575 [134,] 10.71971 0.04386575 [135,] 10.71971 0.04386575 [136,] 10.71971 0.04386575 [137,] 10.71971 0.04386575 [138,] 10.71971 0.04386575 [139,] 10.71971 0.04386575 [140,] 10.71971 0.04386575 [141,] 10.71971 0.04386575 [142,] 10.71971 0.04386575 [143,] 10.71971 0.04386575 [144,] 10.71971 0.04386575 [145,] 10.71971 0.04386575 [146,] 10.71971 0.04386575 [147,] 10.71971 0.04386575 [148,] 10.71971 0.04386575 [149,] 10.71971 0.04386575 [150,] 10.71971 0.04386575 [151,] 10.71971 0.04386575 [152,] 10.71971 0.04386575 [153,] 10.71971 0.04386575 [154,] 10.71971 0.04386575 [155,] 10.71971 0.04386575 [156,] 10.71971 0.04386575 [157,] 10.71971 0.04386575 [158,] 10.71971 0.04386575 [159,] 10.71971 0.04386575 [160,] 10.71971 0.04386575 [161,] 10.71971 0.04386575 [162,] 10.71971 0.04386575 [163,] 10.71971 0.04386575 [164,] 10.71971 0.04386575 [165,] 10.71971 0.04386575 [166,] 10.71971 0.04386575 [167,] 10.71971 0.04386575 [168,] 10.71971 0.04386575 [169,] 10.71971 0.04386575 [170,] 10.71971 0.04386575 [171,] 10.71971 0.04386575 [172,] 10.71971 0.04386575 [173,] 10.71971 0.04386575 [174,] 10.71971 0.04386575 [175,] 10.71971 0.04386575 [176,] 10.71971 0.04386575 [177,] 10.71971 0.04386575 [178,] 10.71971 0.04386575 [179,] 10.71971 0.04386575 [180,] 10.71971 0.04386575 [181,] 10.71971 0.04386575 [182,] 10.71971 0.04386575 [183,] 10.71971 0.04386575 [184,] 10.71971 0.04386575 [185,] 10.71971 0.04386575 [186,] 10.71971 0.04386575 [187,] 10.71971 0.04386575 [188,] 10.71971 0.04386575 [189,] 10.95104 0.03416216 [190,] 10.95104 0.03416216 [191,] 10.95104 0.03416216 [192,] 10.95104 0.03416216 [193,] 10.95104 0.03416216 [194,] 10.95104 0.03416216 [195,] 10.95104 0.03416216 [196,] 10.95104 0.03416216 [197,] 10.95104 0.03416216 [198,] 10.95104 0.03416216 [199,] 10.95104 0.03416216 [200,] 10.95104 0.03416216 [201,] 10.95104 0.03416216 [202,] 10.95104 0.03416216 [203,] 10.95104 0.03416216 [204,] 10.95104 0.03416216 [205,] 10.95104 0.03416216 [206,] 10.95104 0.03416216 [207,] 10.95104 0.03416216 [208,] 10.95104 0.03416216 [209,] 10.95104 0.03416216 [210,] 10.95104 0.03416216 [211,] 10.95104 0.03416216 [212,] 10.95104 0.03416216 [213,] 10.95104 0.03416216 [214,] 10.95104 0.03416216 [215,] 10.95104 0.03416216 [216,] 10.95104 0.03416216 [217,] 10.95104 0.03416216 [218,] 10.95104 0.03416216 [219,] 10.95104 0.03416216 [220,] 10.95104 0.03416216 [221,] 10.95104 0.03416216 [222,] 10.95104 0.03416216 [223,] 10.95104 0.03416216 [224,] 10.95104 0.03416216 [225,] 10.95104 0.03416216 [226,] 10.95104 0.03416216 [227,] 10.95104 0.03416216 [228,] 10.95104 0.03416216 [229,] 10.95104 0.03416216 [230,] 10.95104 0.03416216 [231,] 10.95104 0.03416216 [232,] 10.95104 0.03416216 [233,] 10.95104 0.03416216 [234,] 10.95104 0.03416216 [235,] 10.95104 0.03416216 [236,] 10.95104 0.03416216 [237,] 10.95104 0.03416216 [238,] 10.95104 0.03416216 [239,] 10.95104 0.03416216 [240,] 10.95104 0.03416216 [241,] 10.95104 0.03416216 [242,] 10.95104 0.03416216 [243,] 10.95104 0.03416216 [244,] 10.95104 0.03416216 [245,] 10.95104 0.03416216 [246,] 10.95104 0.03416216 [247,] 10.95104 0.03416216 [248,] 10.95104 0.03416216 [249,] 10.95104 0.03416216 [250,] 10.95104 0.03416216 [251,] 10.95104 0.03416216 [252,] 10.95104 0.03416216 [253,] 10.95104 0.03416216 [254,] 10.95104 0.03416216 [255,] 10.95104 0.03416216 [256,] 10.95104 0.03416216 [257,] 10.95104 0.03416216 [258,] 10.95104 0.03416216 [259,] 10.95104 0.03416216 [260,] 10.95104 0.03416216 [261,] 10.95104 0.03416216 [262,] 10.95104 0.03416216 [263,] 10.95104 0.03416216 [264,] 10.95104 0.03416216 [265,] 10.95104 0.03416216 [266,] 10.95104 0.03416216 [267,] 10.95104 0.03416216 [268,] 10.95104 0.03416216 [269,] 10.95104 0.03416216 [270,] 10.95104 0.03416216 [271,] 10.95104 0.03416216 [272,] 10.95104 0.03416216 > (tri <- trimean(x)) [,1] [,2] [1,] 10.74174 0.06389446 [2,] 10.74110 0.06367063 [3,] 10.73983 0.06344338 [4,] 10.73983 0.06321265 [5,] 10.73854 0.06297836 [6,] 10.73789 0.06274046 [7,] 10.73789 0.06249886 [8,] 10.73724 0.06225349 [9,] 10.73592 0.06200426 [10,] 10.73526 0.06175111 [11,] 10.73459 0.06149393 [12,] 10.73392 0.06123266 [13,] 10.73325 0.06096720 [14,] 10.73325 0.06069745 [15,] 10.73189 0.06042333 [16,] 10.73189 0.06014473 [17,] 10.73052 0.05986155 [18,] 10.72983 0.05957369 [19,] 10.72914 0.05928104 [20,] 10.72844 0.05898349 [21,] 10.72903 0.05878797 [22,] 10.72962 0.05858935 [23,] 10.73022 0.05838758 [24,] 10.72952 0.05827651 [25,] 10.72881 0.05816365 [26,] 10.72810 0.05804898 [27,] 10.72739 0.05793246 [28,] 10.72739 0.05781406 [29,] 10.72596 0.05769375 [30,] 10.72523 0.05757149 [31,] 10.72450 0.05744724 [32,] 10.72450 0.05732098 [33,] 10.72304 0.05719267 [34,] 10.72230 0.05706226 [35,] 10.72155 0.05692973 [36,] 10.72081 0.05679503 [37,] 10.72005 0.05665813 [38,] 10.71930 0.05651897 [39,] 10.71854 0.05637753 [40,] 10.71777 0.05623375 [41,] 10.71701 0.05608759 [42,] 10.71623 0.05593902 [43,] 10.71546 0.05578797 [44,] 10.71468 0.05563441 [45,] 10.71389 0.05547828 [46,] 10.71310 0.05531953 [47,] 10.71231 0.05515812 [48,] 10.71151 0.05499398 [49,] 10.71071 0.05482707 [50,] 10.70990 0.05465733 [51,] 10.70909 0.05448470 [52,] 10.70827 0.05430911 [53,] 10.70745 0.05413052 [54,] 10.70663 0.05394885 [55,] 10.70580 0.05376405 [56,] 10.70580 0.05357603 [57,] 10.70413 0.05338474 [58,] 10.70328 0.05319011 [59,] 10.70328 0.05310012 [60,] 10.70445 0.05300849 [61,] 10.70504 0.05291519 [62,] 10.70563 0.05282019 [63,] 10.70622 0.05272346 [64,] 10.70622 0.05262496 [65,] 10.70742 0.05252467 [66,] 10.70803 0.05242255 [67,] 10.70864 0.05231856 [68,] 10.70925 0.05221267 [69,] 10.70987 0.05210485 [70,] 10.71049 0.05199505 [71,] 10.71111 0.05188324 [72,] 10.71174 0.05176938 [73,] 10.71237 0.05165343 [74,] 10.71300 0.05153535 [75,] 10.71364 0.05141509 [76,] 10.71429 0.05129261 [77,] 10.71493 0.05116787 [78,] 10.71558 0.05104082 [79,] 10.71624 0.05091142 [80,] 10.71689 0.05077961 [81,] 10.71756 0.05064535 [82,] 10.71822 0.05050858 [83,] 10.71889 0.05036925 [84,] 10.71957 0.05022731 [85,] 10.72179 0.05016762 [86,] 10.72403 0.05010648 [87,] 10.72628 0.05004385 [88,] 10.72855 0.04997970 [89,] 10.73083 0.04991402 [90,] 10.73312 0.04984676 [91,] 10.73543 0.04977789 [92,] 10.73776 0.04970737 [93,] 10.74010 0.04963519 [94,] 10.74245 0.04956129 [95,] 10.74482 0.04948565 [96,] 10.74720 0.04940823 [97,] 10.74960 0.04932899 [98,] 10.75201 0.04924789 [99,] 10.75444 0.04916489 [100,] 10.75689 0.04907995 [101,] 10.75935 0.04899303 [102,] 10.76183 0.04890409 [103,] 10.76432 0.04881308 [104,] 10.76683 0.04871995 [105,] 10.76936 0.04862466 [106,] 10.77190 0.04852716 [107,] 10.77190 0.04842741 [108,] 10.77704 0.04832534 [109,] 10.77963 0.04822091 [110,] 10.78224 0.04811407 [111,] 10.78487 0.04800475 [112,] 10.78487 0.04789290 [113,] 10.79019 0.04777846 [114,] 10.79287 0.04766137 [115,] 10.79557 0.04754157 [116,] 10.79829 0.04741899 [117,] 10.80103 0.04729357 [118,] 10.80103 0.04716522 [119,] 10.80656 0.04703390 [120,] 10.80936 0.04689951 [121,] 10.81217 0.04676198 [122,] 10.81326 0.04677244 [123,] 10.81326 0.04678243 [124,] 10.81547 0.04679193 [125,] 10.81658 0.04680093 [126,] 10.81770 0.04680942 [127,] 10.81883 0.04681740 [128,] 10.81883 0.04682484 [129,] 10.82111 0.04683174 [130,] 10.82226 0.04683808 [131,] 10.82342 0.04684384 [132,] 10.82459 0.04684903 [133,] 10.82577 0.04685362 [134,] 10.82696 0.04685760 [135,] 10.82815 0.04686095 [136,] 10.82936 0.04686366 [137,] 10.83057 0.04686572 [138,] 10.83179 0.04686711 [139,] 10.83302 0.04686782 [140,] 10.83426 0.04686782 [141,] 10.83551 0.04686710 [142,] 10.83677 0.04686565 [143,] 10.83804 0.04686344 [144,] 10.83932 0.04686047 [145,] 10.84061 0.04685670 [146,] 10.84190 0.04685213 [147,] 10.84321 0.04684673 [148,] 10.84453 0.04684049 [149,] 10.84586 0.04683337 [150,] 10.84720 0.04682537 [151,] 10.84854 0.04681646 [152,] 10.84990 0.04680662 [153,] 10.85127 0.04679583 [154,] 10.85265 0.04678406 [155,] 10.85404 0.04677128 [156,] 10.85545 0.04675749 [157,] 10.85686 0.04674264 [158,] 10.85828 0.04672671 [159,] 10.85972 0.04670969 [160,] 10.86117 0.04669153 [161,] 10.86263 0.04667221 [162,] 10.86410 0.04665171 [163,] 10.86558 0.04662999 [164,] 10.86708 0.04660702 [165,] 10.86858 0.04658278 [166,] 10.87010 0.04655722 [167,] 10.87164 0.04653032 [168,] 10.87318 0.04650204 [169,] 10.87474 0.04647234 [170,] 10.87631 0.04644120 [171,] 10.87789 0.04640856 [172,] 10.87949 0.04637440 [173,] 10.88110 0.04633868 [174,] 10.88273 0.04630134 [175,] 10.88437 0.04626236 [176,] 10.88602 0.04622168 [177,] 10.88769 0.04617927 [178,] 10.88937 0.04613507 [179,] 10.89107 0.04608903 [180,] 10.89278 0.04604112 [181,] 10.89451 0.04599127 [182,] 10.89625 0.04593944 [183,] 10.89800 0.04588557 [184,] 10.89978 0.04582960 [185,] 10.90157 0.04577147 [186,] 10.90337 0.04571113 [187,] 10.90519 0.04564852 [188,] 10.90703 0.04558356 [189,] 10.90888 0.04551620 [190,] 10.90847 0.04560886 [191,] 10.90805 0.04570208 [192,] 10.90762 0.04579584 [193,] 10.90719 0.04589016 [194,] 10.90676 0.04598504 [195,] 10.90632 0.04608050 [196,] 10.90588 0.04617652 [197,] 10.90544 0.04627313 [198,] 10.90499 0.04637032 [199,] 10.90453 0.04646810 [200,] 10.90408 0.04656648 [201,] 10.90361 0.04666546 [202,] 10.90315 0.04676504 [203,] 10.90268 0.04686524 [204,] 10.90220 0.04696606 [205,] 10.90172 0.04706750 [206,] 10.90123 0.04716957 [207,] 10.90074 0.04727229 [208,] 10.90025 0.04737564 [209,] 10.89975 0.04747964 [210,] 10.89924 0.04758430 [211,] 10.89873 0.04768963 [212,] 10.89822 0.04779562 [213,] 10.89822 0.04790228 [214,] 10.89770 0.04800963 [215,] 10.89664 0.04811767 [216,] 10.89610 0.04822640 [217,] 10.89556 0.04833584 [218,] 10.89501 0.04844598 [219,] 10.89446 0.04855684 [220,] 10.89390 0.04866842 [221,] 10.89333 0.04878074 [222,] 10.89276 0.04889379 [223,] 10.89218 0.04900759 [224,] 10.89218 0.04912214 [225,] 10.89160 0.04923745 [226,] 10.89041 0.04935352 [227,] 10.88981 0.04947038 [228,] 10.88920 0.04958801 [229,] 10.88858 0.04970644 [230,] 10.88796 0.04982567 [231,] 10.88732 0.04994570 [232,] 10.88669 0.05006655 [233,] 10.88604 0.05018822 [234,] 10.88539 0.05031072 [235,] 10.88539 0.05043406 [236,] 10.88473 0.05055825 [237,] 10.88338 0.05068330 [238,] 10.88270 0.05080921 [239,] 10.88201 0.05093600 [240,] 10.88131 0.05106367 [241,] 10.88060 0.05119223 [242,] 10.87988 0.05132169 [243,] 10.87915 0.05145206 [244,] 10.87842 0.05158335 [245,] 10.87768 0.05171557 [246,] 10.87768 0.05184872 [247,] 10.87692 0.05198282 [248,] 10.87539 0.05211788 [249,] 10.87461 0.05225390 [250,] 10.87382 0.05239089 [251,] 10.87302 0.05252887 [252,] 10.87220 0.05266785 [253,] 10.87138 0.05280782 [254,] 10.87055 0.05294881 [255,] 10.86971 0.05309082 [256,] 10.86971 0.05323387 [257,] 10.86799 0.05337796 [258,] 10.86711 0.05352310 [259,] 10.86622 0.05366930 [260,] 10.86532 0.05381657 [261,] 10.86441 0.05396493 [262,] 10.86348 0.05411438 [263,] 10.86254 0.05426492 [264,] 10.86159 0.05441659 [265,] 10.86063 0.05456937 [266,] 10.85965 0.05472328 [267,] 10.85866 0.05487834 [268,] 10.85765 0.05503454 [269,] 10.85663 0.05519191 [270,] 10.85560 0.05535044 [271,] 10.85455 0.05551016 [272,] 10.85348 0.05567106 > (midr <- midrange(x)) [1] 11 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] 11.11949 11.11949 11.11949 11.11949 11.11949 11.11949 11.11949 11.11949 > postscript(file="/var/www/html/freestat/rcomp/tmp/1smbl1249436495.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/freestat/rcomp/tmp/2heb31249436495.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/3ejrf1249436495.tab") > > system("convert tmp/1smbl1249436495.ps tmp/1smbl1249436495.png") > system("convert tmp/2heb31249436495.ps tmp/2heb31249436495.png") > > > proc.time() user system elapsed 8.000 0.652 8.197