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(10 + ,10 + ,13 + ,14 + ,12 + ,11 + ,8 + ,8 + ,10 + ,10 + ,12 + ,12 + ,12 + ,11 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,10 + ,12 + ,10 + ,11 + ,10 + ,10 + ,12 + ,10 + ,12 + ,7 + ,12 + ,18 + ,12 + ,11 + ,13 + ,10 + ,10 + ,10 + ,8 + ,12 + ,10 + ,10 + ,8 + ,14 + ,9 + ,8 + ,12 + ,15 + ,14 + ,1 + ,9 + ,7 + ,8 + ,12 + ,12 + ,10 + ,10 + ,8 + ,8 + ,16 + ,14 + ,13 + ,10 + ,12 + ,9 + ,12 + ,11 + ,10 + ,8 + ,8 + ,9 + ,12 + ,8 + ,12 + ,10 + ,12 + ,9 + ,8 + ,12 + ,8 + ,12 + ,10 + ,12 + ,9 + ,10 + ,12 + ,9 + ,14 + ,12 + ,12 + ,13 + ,13 + ,14 + ,12 + ,12 + ,10 + ,11 + ,12 + ,14 + ,10 + ,12 + ,12 + ,6 + ,12 + ,10 + ,12 + ,12 + ,12 + ,9 + ,12 + ,12 + ,13 + ,8 + ,12 + ,10 + ,10 + ,10 + ,9 + ,12 + ,9 + ,10 + ,8 + ,12 + ,10 + ,8 + ,8 + ,9 + ,12 + ,12 + ,10 + ,10 + ,9 + ,11 + ,10 + ,9 + ,15 + ,10 + ,8 + ,10 + ,8 + ,9 + ,9 + ,6 + ,16 + ,12 + ,12 + ,12 + ,12 + ,10 + ,12 + ,8 + ,9 + ,12 + ,12 + ,8 + ,14 + ,10 + ,12 + ,8 + ,11 + ,10 + ,12 + ,12 + ,12 + ,12 + ,8 + ,10 + ,7 + ,10 + ,10 + ,12 + ,11 + ,9 + ,10 + ,12 + ,14 + ,13 + ,10 + ,11 + ,10 + ,10 + ,8 + ,10 + ,10 + ,10 + ,8 + ,8 + ,4 + ,14 + ,8 + ,12 + ,12 + ,10 + ,8 + ,12 + ,12 + ,10 + ,10 + ,12 + ,12 + ,9 + ,11 + ,14 + ,10 + ,8 + ,12 + ,8 + ,10 + ,11 + ,12 + ,10 + ,10 + ,12 + ,8 + ,9 + ,12 + ,8 + ,8 + ,10 + ,10 + ,10 + ,14 + ,10 + ,12 + ,12 + ,13 + ,9 + ,12 + ,12 + ,10 + ,12 + ,6 + ,8 + ,12 + ,10 + ,9 + ,11 + ,11 + ,9 + ,10 + ,15 + ,12 + ,7 + ,7 + ,10 + ,9 + ,10 + ,10 + ,9 + ,12 + ,10 + ,9 + ,12 + ,10 + ,7 + ,12 + ,10 + ,10 + ,12 + ,8 + ,12 + ,10 + ,10 + ,9 + ,8 + ,8 + ,12 + ,12 + ,10 + ,12 + ,10 + ,9 + ,10 + ,10 + ,8 + ,10 + ,12 + ,12 + ,16 + ,10 + ,9 + ,12 + ,12 + ,10 + ,7 + ,12 + ,10 + ,10 + ,6 + ,9 + ,6 + ,18 + ,13 + ,10 + ,12 + ,15 + ,12 + ,12 + ,9 + ,7 + ,12 + ,13 + ,14 + ,13 + ,12 + ,8 + ,8 + ,10 + ,10 + ,8 + ,12 + ,10 + ,12 + ,12 + ,12 + ,9 + ,12 + ,7 + ,12 + ,8 + ,8 + ,12 + ,14 + ,10 + ,5 + ,9 + ,8 + ,13 + ,10 + ,10 + ,14 + ,10 + ,10 + ,12 + ,17 + ,14 + ,8 + ,14 + ,12 + ,12 + ,10 + ,10 + ,8 + ,12 + ,12 + ,12 + ,10 + ,12 + ,10 + ,10 + ,12 + ,12 + ,12 + ,12 + ,13 + ,12 + ,8 + ,10 + ,12 + ,8 + ,10 + ,10 + ,12 + ,12 + ,12 + ,12 + ,12 + ,12 + ,14 + ,10 + ,12 + ,14 + ,12 + ,14 + ,12 + ,13 + ,8 + ,12 + ,14 + ,10 + ,10 + ,11 + ,16 + ,12 + ,10 + ,10 + ,8 + ,11 + ,12 + ,12 + ,11 + ,10 + ,9 + ,14 + ,12 + ,10 + ,12 + ,10 + ,12 + ,12 + ,8 + ,12 + ,12 + ,10 + ,12 + ,2 + ,10 + ,10 + ,10 + ,12 + ,12 + ,12 + ,12 + ,9 + ,12 + ,14 + ,8 + ,12 + ,10 + ,10 + ,10 + ,7 + ,8 + ,10 + ,1 + ,10 + ,10 + ,9 + ,15 + ,10 + ,12 + ,12 + ,12 + ,11 + ,12 + ,12 + ,14 + ,8 + ,12 + ,12 + ,10 + ,14 + ,8 + ,10 + ,12 + ,10 + ,10 + ,10 + ,12 + ,9 + ,12 + ,11 + ,8 + ,14 + ,12 + ,10 + ,12 + ,10 + ,8 + ,14 + ,12 + ,12 + ,12 + ,8 + ,12 + ,12 + ,10 + ,12 + ,12 + ,12 + ,9 + ,11 + ,10 + ,15 + ,10 + ,9 + ,9 + ,10 + ,7 + ,10 + ,9 + ,10 + ,10 + ,10 + ,15 + ,12 + ,12 + ,10 + ,12 + ,8 + ,12 + ,11 + ,8 + ,14 + ,8 + ,12 + ,10 + ,15 + ,9 + ,13 + ,12 + ,14 + ,12 + ,12 + ,17 + ,10 + ,13 + ,12 + ,12 + ,10 + ,12 + ,10 + ,12 + ,10 + ,10 + ,10 + ,1 + ,8 + ,12 + ,10 + ,10 + ,10 + ,12 + ,12 + ,11 + ,12 + ,8 + ,8 + ,12 + ,12 + ,10 + ,12 + ,9 + ,10 + ,12 + ,12 + ,12 + ,12 + ,10 + ,10 + ,9 + ,12 + ,10 + ,9 + ,12 + ,7 + ,14 + ,10 + ,10 + ,9 + ,10 + ,8 + ,10 + ,12 + ,12 + ,10 + ,9 + ,10 + ,9 + ,12 + ,10 + ,12 + ,10 + ,9 + ,7 + ,12 + ,11 + ,12 + ,9 + ,13 + ,12 + ,12 + ,7 + ,8 + ,12 + ,12 + ,12 + ,11 + ,12 + ,13 + ,10 + ,12 + ,10 + ,12 + ,12 + ,15 + ,12 + ,12 + ,13 + ,10 + ,10 + ,8 + ,11 + ,12 + ,12 + ,12 + ,12 + ,10 + ,10 + ,12 + ,15 + ,12 + ,10 + ,10 + ,7 + ,12 + ,10 + ,11 + ,10 + ,10 + ,10 + ,10 + ,11 + ,7 + ,15 + ,8 + ,10 + ,6 + ,8 + ,9 + ,8 + ,7 + ,10 + ,12 + ,14 + ,11 + ,8 + ,10 + ,8 + ,8 + ,14 + ,12 + ,15 + ,12 + ,12 + ,9 + ,12 + ,12 + ,9 + ,11 + ,15 + ,11 + ,12 + ,7 + ,15 + ,9 + ,10 + ,15 + ,15 + ,8 + ,11 + ,12 + ,10 + ,10 + ,12 + ,7 + ,12 + ,10 + ,11 + ,12 + ,10 + ,10 + ,8 + ,9 + ,8 + ,10 + ,10 + ,14 + ,10 + ,10 + ,12 + ,12 + ,7 + ,12 + ,10 + ,12 + ,9 + ,9 + ,13 + ,14 + ,10 + ,12 + ,12 + ,12 + ,12 + ,12 + ,10 + ,10 + ,8 + ,12 + ,8 + ,14 + ,10 + ,12 + ,10 + ,8 + ,8 + ,11 + ,10 + ,8 + ,7 + ,8 + ,9 + ,12 + ,12 + ,7 + ,10 + ,8 + ,10 + ,10 + ,10 + ,8 + ,12 + ,7 + ,13 + ,13 + ,8 + ,8 + ,11 + ,6 + ,12 + ,9 + ,12 + ,13 + ,13 + ,12 + ,12 + ,10 + ,8 + ,12 + ,10 + ,10 + ,15 + ,12 + ,10 + ,12 + ,8 + ,8 + ,12 + ,12 + ,10 + ,12 + ,9 + ,12 + ,12 + ,10 + ,9 + ,10 + ,10 + ,10 + ,12 + ,12 + ,12 + ,12 + ,8 + ,10 + ,12 + ,15 + ,10 + ,8 + ,15 + ,10 + ,9 + ,12 + ,10 + ,10 + ,11 + ,11 + ,12 + ,12 + ,14 + ,12 + ,14 + ,9 + ,10 + ,12 + ,13 + ,10 + ,11 + ,10 + ,12 + ,12 + ,12 + ,13 + ,14 + ,9 + ,10 + ,10 + ,12 + ,12 + ,10 + ,8 + ,12 + ,12 + ,10 + ,12 + ,10 + ,12 + ,12 + ,12 + ,10 + ,12 + ,12 + ,10 + ,10 + ,12 + ,12 + ,12 + ,9 + ,12 + ,12 + ,9 + ,12 + ,12 + ,12 + ,15 + ,12 + ,12 + ,12 + ,8 + ,8 + ,12 + ,8 + ,12 + ,12 + ,10 + ,10 + ,12 + ,8 + ,8 + ,10 + ,10 + ,5 + ,9 + ,9 + ,9 + ,10 + ,12) > 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.69570 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.07219099 > (armose <- arm / armse) [1] 148.1584 > (geo <- geomean(x)) [1] 10.44014 > (har <- harmean(x)) [1] 9.963584 > (qua <- quamean(x)) [1] 10.89771 > (win <- winmean(x)) [,1] [,2] [1,] 10.69570 0.07219099 [2,] 10.69332 0.07192168 [3,] 10.69690 0.07137276 [4,] 10.70167 0.06965830 [5,] 10.70764 0.06902042 [6,] 10.70764 0.06902042 [7,] 10.71599 0.06826267 [8,] 10.70644 0.06745779 [9,] 10.70644 0.06745779 [10,] 10.70644 0.06745779 [11,] 10.70644 0.06745779 [12,] 10.70644 0.06745779 [13,] 10.70644 0.06745779 [14,] 10.72315 0.06619894 [15,] 10.72315 0.06619894 [16,] 10.72315 0.06619894 [17,] 10.72315 0.06619894 [18,] 10.72315 0.06619894 [19,] 10.72315 0.06619894 [20,] 10.72315 0.06619894 [21,] 10.72315 0.06619894 [22,] 10.72315 0.06619894 [23,] 10.72315 0.06619894 [24,] 10.72315 0.06619894 [25,] 10.72315 0.06619894 [26,] 10.72315 0.06619894 [27,] 10.72315 0.06619894 [28,] 10.68974 0.06387036 [29,] 10.68974 0.06387036 [30,] 10.68974 0.06387036 [31,] 10.68974 0.06387036 [32,] 10.68974 0.06387036 [33,] 10.68974 0.06387036 [34,] 10.68974 0.06387036 [35,] 10.68974 0.06387036 [36,] 10.68974 0.06387036 [37,] 10.73389 0.06116019 [38,] 10.73389 0.06116019 [39,] 10.73389 0.06116019 [40,] 10.73389 0.06116019 [41,] 10.73389 0.06116019 [42,] 10.73389 0.06116019 [43,] 10.73389 0.06116019 [44,] 10.73389 0.06116019 [45,] 10.73389 0.06116019 [46,] 10.73389 0.06116019 [47,] 10.73389 0.06116019 [48,] 10.73389 0.06116019 [49,] 10.73389 0.06116019 [50,] 10.73389 0.06116019 [51,] 10.73389 0.06116019 [52,] 10.73389 0.06116019 [53,] 10.73389 0.06116019 [54,] 10.73389 0.06116019 [55,] 10.73389 0.06116019 [56,] 10.73389 0.06116019 [57,] 10.73389 0.06116019 [58,] 10.73389 0.06116019 [59,] 10.73389 0.06116019 [60,] 10.73389 0.06116019 [61,] 10.73389 0.06116019 [62,] 10.73389 0.06116019 [63,] 10.73389 0.06116019 [64,] 10.73389 0.06116019 [65,] 10.73389 0.06116019 [66,] 10.65513 0.05667975 [67,] 10.65513 0.05667975 [68,] 10.65513 0.05667975 [69,] 10.65513 0.05667975 [70,] 10.65513 0.05667975 [71,] 10.65513 0.05667975 [72,] 10.65513 0.05667975 [73,] 10.65513 0.05667975 [74,] 10.65513 0.05667975 [75,] 10.65513 0.05667975 [76,] 10.65513 0.05667975 [77,] 10.65513 0.05667975 [78,] 10.65513 0.05667975 [79,] 10.65513 0.05667975 [80,] 10.65513 0.05667975 [81,] 10.65513 0.05667975 [82,] 10.65513 0.05667975 [83,] 10.65513 0.05667975 [84,] 10.65513 0.05667975 [85,] 10.65513 0.05667975 [86,] 10.65513 0.05667975 [87,] 10.65513 0.05667975 [88,] 10.65513 0.05667975 [89,] 10.65513 0.05667975 [90,] 10.65513 0.05667975 [91,] 10.65513 0.05667975 [92,] 10.54535 0.05209827 [93,] 10.54535 0.05209827 [94,] 10.54535 0.05209827 [95,] 10.54535 0.05209827 [96,] 10.54535 0.05209827 [97,] 10.54535 0.05209827 [98,] 10.54535 0.05209827 [99,] 10.54535 0.05209827 [100,] 10.54535 0.05209827 [101,] 10.54535 0.05209827 [102,] 10.54535 0.05209827 [103,] 10.54535 0.05209827 [104,] 10.54535 0.05209827 [105,] 10.54535 0.05209827 [106,] 10.54535 0.05209827 [107,] 10.54535 0.05209827 [108,] 10.54535 0.05209827 [109,] 10.54535 0.05209827 [110,] 10.54535 0.05209827 [111,] 10.54535 0.05209827 [112,] 10.54535 0.05209827 [113,] 10.54535 0.05209827 [114,] 10.54535 0.05209827 [115,] 10.54535 0.05209827 [116,] 10.54535 0.05209827 [117,] 10.54535 0.05209827 [118,] 10.54535 0.05209827 [119,] 10.54535 0.05209827 [120,] 10.54535 0.05209827 [121,] 10.54535 0.05209827 [122,] 10.54535 0.05209827 [123,] 10.54535 0.05209827 [124,] 10.54535 0.05209827 [125,] 10.54535 0.05209827 [126,] 10.54535 0.05209827 [127,] 10.54535 0.05209827 [128,] 10.54535 0.05209827 [129,] 10.54535 0.05209827 [130,] 10.54535 0.05209827 [131,] 10.54535 0.05209827 [132,] 10.54535 0.05209827 [133,] 10.54535 0.05209827 [134,] 10.70525 0.04361393 [135,] 10.70525 0.04361393 [136,] 10.70525 0.04361393 [137,] 10.70525 0.04361393 [138,] 10.70525 0.04361393 [139,] 10.70525 0.04361393 [140,] 10.70525 0.04361393 [141,] 10.70525 0.04361393 [142,] 10.70525 0.04361393 [143,] 10.70525 0.04361393 [144,] 10.70525 0.04361393 [145,] 10.70525 0.04361393 [146,] 10.70525 0.04361393 [147,] 10.70525 0.04361393 [148,] 10.70525 0.04361393 [149,] 10.70525 0.04361393 [150,] 10.70525 0.04361393 [151,] 10.70525 0.04361393 [152,] 10.70525 0.04361393 [153,] 10.70525 0.04361393 [154,] 10.70525 0.04361393 [155,] 10.70525 0.04361393 [156,] 10.70525 0.04361393 [157,] 10.70525 0.04361393 [158,] 10.70525 0.04361393 [159,] 10.70525 0.04361393 [160,] 10.70525 0.04361393 [161,] 10.70525 0.04361393 [162,] 10.70525 0.04361393 [163,] 10.70525 0.04361393 [164,] 10.70525 0.04361393 [165,] 10.70525 0.04361393 [166,] 10.70525 0.04361393 [167,] 10.70525 0.04361393 [168,] 10.70525 0.04361393 [169,] 10.70525 0.04361393 [170,] 10.70525 0.04361393 [171,] 10.70525 0.04361393 [172,] 10.70525 0.04361393 [173,] 10.70525 0.04361393 [174,] 10.70525 0.04361393 [175,] 10.70525 0.04361393 [176,] 10.70525 0.04361393 [177,] 10.70525 0.04361393 [178,] 10.70525 0.04361393 [179,] 10.70525 0.04361393 [180,] 10.70525 0.04361393 [181,] 10.70525 0.04361393 [182,] 10.70525 0.04361393 [183,] 10.70525 0.04361393 [184,] 10.70525 0.04361393 [185,] 10.70525 0.04361393 [186,] 10.70525 0.04361393 [187,] 10.70525 0.04361393 [188,] 10.70525 0.04361393 [189,] 10.70525 0.04361393 [190,] 10.70525 0.04361393 [191,] 10.70525 0.04361393 [192,] 10.70525 0.04361393 [193,] 10.70525 0.04361393 [194,] 10.70525 0.04361393 [195,] 10.70525 0.04361393 [196,] 10.70525 0.04361393 [197,] 10.70525 0.04361393 [198,] 10.70525 0.04361393 [199,] 10.70525 0.04361393 [200,] 10.70525 0.04361393 [201,] 10.70525 0.04361393 [202,] 10.94630 0.03374236 [203,] 10.94630 0.03374236 [204,] 10.94630 0.03374236 [205,] 10.94630 0.03374236 [206,] 10.94630 0.03374236 [207,] 10.94630 0.03374236 [208,] 10.94630 0.03374236 [209,] 10.94630 0.03374236 [210,] 10.94630 0.03374236 [211,] 10.94630 0.03374236 [212,] 10.94630 0.03374236 [213,] 10.94630 0.03374236 [214,] 10.94630 0.03374236 [215,] 10.94630 0.03374236 [216,] 10.94630 0.03374236 [217,] 10.94630 0.03374236 [218,] 10.94630 0.03374236 [219,] 10.94630 0.03374236 [220,] 10.94630 0.03374236 [221,] 10.94630 0.03374236 [222,] 10.94630 0.03374236 [223,] 10.94630 0.03374236 [224,] 10.94630 0.03374236 [225,] 10.94630 0.03374236 [226,] 10.94630 0.03374236 [227,] 10.94630 0.03374236 [228,] 10.94630 0.03374236 [229,] 10.94630 0.03374236 [230,] 10.94630 0.03374236 [231,] 10.94630 0.03374236 [232,] 10.94630 0.03374236 [233,] 10.94630 0.03374236 [234,] 10.94630 0.03374236 [235,] 10.94630 0.03374236 [236,] 10.94630 0.03374236 [237,] 10.94630 0.03374236 [238,] 10.94630 0.03374236 [239,] 10.94630 0.03374236 [240,] 10.94630 0.03374236 [241,] 10.94630 0.03374236 [242,] 10.94630 0.03374236 [243,] 10.94630 0.03374236 [244,] 10.94630 0.03374236 [245,] 10.94630 0.03374236 [246,] 10.94630 0.03374236 [247,] 10.94630 0.03374236 [248,] 10.94630 0.03374236 [249,] 10.94630 0.03374236 [250,] 10.94630 0.03374236 [251,] 10.94630 0.03374236 [252,] 10.94630 0.03374236 [253,] 10.94630 0.03374236 [254,] 10.94630 0.03374236 [255,] 10.94630 0.03374236 [256,] 10.94630 0.03374236 [257,] 10.94630 0.03374236 [258,] 10.94630 0.03374236 [259,] 10.94630 0.03374236 [260,] 10.94630 0.03374236 [261,] 10.94630 0.03374236 [262,] 10.94630 0.03374236 [263,] 10.94630 0.03374236 [264,] 10.94630 0.03374236 [265,] 10.94630 0.03374236 [266,] 10.94630 0.03374236 [267,] 10.94630 0.03374236 [268,] 10.94630 0.03374236 [269,] 10.94630 0.03374236 [270,] 10.94630 0.03374236 [271,] 10.94630 0.03374236 [272,] 10.94630 0.03374236 [273,] 10.94630 0.03374236 [274,] 10.94630 0.03374236 [275,] 10.94630 0.03374236 [276,] 10.94630 0.03374236 [277,] 10.94630 0.03374236 [278,] 10.94630 0.03374236 [279,] 10.94630 0.03374236 > (tri <- trimean(x)) [,1] [,2] [1,] 10.69856 0.07089013 [2,] 10.70144 0.06955152 [3,] 10.70553 0.06831680 [4,] 10.70843 0.06724569 [5,] 10.71014 0.06661270 [6,] 10.71065 0.06610497 [7,] 10.71117 0.06558792 [8,] 10.71046 0.06517982 [9,] 10.71098 0.06487475 [10,] 10.71149 0.06456483 [11,] 10.71201 0.06424995 [12,] 10.71253 0.06392999 [13,] 10.71305 0.06360485 [14,] 10.71358 0.06327439 [15,] 10.71287 0.06304108 [16,] 10.71216 0.06280416 [17,] 10.71144 0.06256357 [18,] 10.71072 0.06231923 [19,] 10.71000 0.06207106 [20,] 10.70927 0.06181897 [21,] 10.70854 0.06156290 [22,] 10.70781 0.06130275 [23,] 10.70707 0.06103843 [24,] 10.70633 0.06076985 [25,] 10.70558 0.06049693 [26,] 10.70483 0.06021955 [27,] 10.70408 0.05993763 [28,] 10.70332 0.05965105 [29,] 10.70332 0.05946489 [30,] 10.70437 0.05927581 [31,] 10.70437 0.05908376 [32,] 10.70543 0.05888868 [33,] 10.70596 0.05869050 [34,] 10.70649 0.05848918 [35,] 10.70703 0.05828464 [36,] 10.70757 0.05807683 [37,] 10.70812 0.05786566 [38,] 10.70735 0.05774696 [39,] 10.70658 0.05762634 [40,] 10.70580 0.05750376 [41,] 10.70503 0.05737921 [42,] 10.70424 0.05725263 [43,] 10.70346 0.05712400 [44,] 10.70267 0.05699327 [45,] 10.70187 0.05686041 [46,] 10.70107 0.05672538 [47,] 10.70027 0.05658813 [48,] 10.69946 0.05644864 [49,] 10.69865 0.05630685 [50,] 10.69783 0.05616273 [51,] 10.69701 0.05601622 [52,] 10.69619 0.05586729 [53,] 10.69619 0.05571588 [54,] 10.69452 0.05556195 [55,] 10.69368 0.05540545 [56,] 10.69284 0.05524633 [57,] 10.69199 0.05508453 [58,] 10.69199 0.05492001 [59,] 10.69028 0.05475271 [60,] 10.68942 0.05458257 [61,] 10.68855 0.05440954 [62,] 10.68855 0.05423355 [63,] 10.68680 0.05405454 [64,] 10.68592 0.05387245 [65,] 10.68503 0.05368722 [66,] 10.68414 0.05349877 [67,] 10.68466 0.05341368 [68,] 10.68519 0.05332703 [69,] 10.68571 0.05323880 [70,] 10.68625 0.05314896 [71,] 10.68678 0.05305748 [72,] 10.68732 0.05296433 [73,] 10.68786 0.05286949 [74,] 10.68841 0.05277291 [75,] 10.68895 0.05267457 [76,] 10.68950 0.05257443 [77,] 10.69006 0.05247246 [78,] 10.69062 0.05236863 [79,] 10.69118 0.05226290 [80,] 10.69174 0.05215524 [81,] 10.69231 0.05204560 [82,] 10.69288 0.05193395 [83,] 10.69345 0.05182025 [84,] 10.69403 0.05170446 [85,] 10.69461 0.05158654 [86,] 10.69520 0.05146644 [87,] 10.69578 0.05134413 [88,] 10.69637 0.05121955 [89,] 10.69697 0.05109267 [90,] 10.69757 0.05096343 [91,] 10.69817 0.05083179 [92,] 10.69878 0.05069770 [93,] 10.70092 0.05064490 [94,] 10.70308 0.05059077 [95,] 10.70525 0.05053528 [96,] 10.70743 0.05047841 [97,] 10.70963 0.05042013 [98,] 10.71184 0.05036041 [99,] 10.71406 0.05029922 [100,] 10.71630 0.05023653 [101,] 10.71855 0.05017231 [102,] 10.72082 0.05010654 [103,] 10.72310 0.05003917 [104,] 10.72540 0.04997018 [105,] 10.72771 0.04989953 [106,] 10.72771 0.04982719 [107,] 10.73003 0.04975312 [108,] 10.73473 0.04967728 [109,] 10.73710 0.04959965 [110,] 10.73948 0.04952017 [111,] 10.74188 0.04943882 [112,] 10.74430 0.04935554 [113,] 10.74673 0.04927030 [114,] 10.74918 0.04918306 [115,] 10.74918 0.04909378 [116,] 10.75164 0.04900240 [117,] 10.75662 0.04890887 [118,] 10.75914 0.04881317 [119,] 10.76167 0.04871522 [120,] 10.76421 0.04861499 [121,] 10.76678 0.04851242 [122,] 10.76936 0.04840746 [123,] 10.77196 0.04830005 [124,] 10.77196 0.04819013 [125,] 10.77458 0.04807766 [126,] 10.77986 0.04796255 [127,] 10.78253 0.04784477 [128,] 10.78522 0.04772423 [129,] 10.78793 0.04760088 [130,] 10.79066 0.04747464 [131,] 10.79340 0.04734544 [132,] 10.79617 0.04721322 [133,] 10.79895 0.04707789 [134,] 10.80175 0.04693939 [135,] 10.80282 0.04695022 [136,] 10.80389 0.04696057 [137,] 10.80496 0.04697044 [138,] 10.80605 0.04697980 [139,] 10.80714 0.04698865 [140,] 10.80824 0.04699697 [141,] 10.80935 0.04700476 [142,] 10.81047 0.04701200 [143,] 10.81159 0.04701867 [144,] 10.81273 0.04702477 [145,] 10.81387 0.04703028 [146,] 10.81502 0.04703519 [147,] 10.81618 0.04703948 [148,] 10.81734 0.04704314 [149,] 10.81852 0.04704615 [150,] 10.81970 0.04704850 [151,] 10.82090 0.04705017 [152,] 10.82210 0.04705115 [153,] 10.82331 0.04705142 [154,] 10.82453 0.04705096 [155,] 10.82576 0.04704976 [156,] 10.82700 0.04704780 [157,] 10.82824 0.04704505 [158,] 10.82950 0.04704151 [159,] 10.83077 0.04703715 [160,] 10.83205 0.04703195 [161,] 10.83333 0.04702589 [162,] 10.83463 0.04701896 [163,] 10.83594 0.04701113 [164,] 10.83725 0.04700237 [165,] 10.83858 0.04699267 [166,] 10.83992 0.04698200 [167,] 10.84127 0.04697035 [168,] 10.84263 0.04695767 [169,] 10.84400 0.04694396 [170,] 10.84538 0.04692918 [171,] 10.84677 0.04691331 [172,] 10.84818 0.04689632 [173,] 10.84959 0.04687818 [174,] 10.85102 0.04685887 [175,] 10.85246 0.04683835 [176,] 10.85391 0.04681659 [177,] 10.85537 0.04679357 [178,] 10.85685 0.04676924 [179,] 10.85833 0.04674359 [180,] 10.85983 0.04671656 [181,] 10.86134 0.04668814 [182,] 10.86287 0.04665827 [183,] 10.86441 0.04662693 [184,] 10.86596 0.04659408 [185,] 10.86752 0.04655967 [186,] 10.86910 0.04652367 [187,] 10.87069 0.04648603 [188,] 10.87229 0.04644671 [189,] 10.87391 0.04640566 [190,] 10.87555 0.04636285 [191,] 10.87719 0.04631821 [192,] 10.87885 0.04627171 [193,] 10.88053 0.04622329 [194,] 10.88222 0.04617290 [195,] 10.88393 0.04612048 [196,] 10.88565 0.04606598 [197,] 10.88739 0.04600934 [198,] 10.88914 0.04595051 [199,] 10.89091 0.04588941 [200,] 10.89269 0.04582599 [201,] 10.89450 0.04576017 [202,] 10.89631 0.04569190 [203,] 10.89583 0.04578526 [204,] 10.89535 0.04587918 [205,] 10.89486 0.04597364 [206,] 10.89437 0.04606867 [207,] 10.89387 0.04616426 [208,] 10.89336 0.04626042 [209,] 10.89286 0.04635716 [210,] 10.89234 0.04645447 [211,] 10.89183 0.04655237 [212,] 10.89183 0.04665087 [213,] 10.89078 0.04674995 [214,] 10.89078 0.04684964 [215,] 10.88971 0.04694994 [216,] 10.88916 0.04705085 [217,] 10.88861 0.04715238 [218,] 10.88806 0.04725454 [219,] 10.88750 0.04735732 [220,] 10.88693 0.04746075 [221,] 10.88693 0.04756481 [222,] 10.88579 0.04766952 [223,] 10.88579 0.04777489 [224,] 10.88462 0.04788092 [225,] 10.88402 0.04798762 [226,] 10.88342 0.04809498 [227,] 10.88281 0.04820303 [228,] 10.88220 0.04831177 [229,] 10.88158 0.04842120 [230,] 10.88158 0.04853132 [231,] 10.88032 0.04864216 [232,] 10.88032 0.04875370 [233,] 10.87903 0.04886597 [234,] 10.87838 0.04897896 [235,] 10.87772 0.04909268 [236,] 10.87705 0.04920714 [237,] 10.87637 0.04932235 [238,] 10.87569 0.04943832 [239,] 10.87569 0.04955505 [240,] 10.87430 0.04967254 [241,] 10.87430 0.04979081 [242,] 10.87288 0.04990986 [243,] 10.87216 0.05002971 [244,] 10.87143 0.05015035 [245,] 10.87069 0.05027180 [246,] 10.86994 0.05039406 [247,] 10.86919 0.05051714 [248,] 10.86919 0.05064105 [249,] 10.86765 0.05076579 [250,] 10.86765 0.05089138 [251,] 10.86607 0.05101782 [252,] 10.86527 0.05114512 [253,] 10.86446 0.05127329 [254,] 10.86364 0.05140233 [255,] 10.86280 0.05153226 [256,] 10.86196 0.05166308 [257,] 10.86111 0.05179479 [258,] 10.86025 0.05192742 [259,] 10.85938 0.05206096 [260,] 10.85849 0.05219543 [261,] 10.85759 0.05233082 [262,] 10.85669 0.05246716 [263,] 10.85577 0.05260444 [264,] 10.85484 0.05274268 [265,] 10.85390 0.05288189 [266,] 10.85294 0.05302207 [267,] 10.85197 0.05316323 [268,] 10.85099 0.05330538 [269,] 10.85000 0.05344852 [270,] 10.84899 0.05359267 [271,] 10.84797 0.05373784 [272,] 10.84694 0.05388402 [273,] 10.84589 0.05403123 [274,] 10.84483 0.05417948 [275,] 10.84375 0.05432877 [276,] 10.84266 0.05447912 [277,] 10.84155 0.05463052 [278,] 10.84043 0.05478299 [279,] 10.83929 0.05493652 > (midr <- midrange(x)) [1] 9.5 > 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/1qtrj1250083297.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/2717o1250083297.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/3ve991250083298.tab") > > system("convert tmp/1qtrj1250083297.ps tmp/1qtrj1250083297.png") > system("convert tmp/2717o1250083297.ps tmp/2717o1250083297.png") > > > proc.time() user system elapsed 8.410 0.635 8.568