R version 2.7.0 (2008-04-22) 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(8 + ,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 + ,12 + ,11 + ,13 + ,10 + ,10 + ,10 + ,8 + ,12 + ,10 + ,10 + ,8 + ,14 + ,9 + ,8 + ,12 + ,15 + ,14 + ,9 + ,7 + ,8 + ,12 + ,12 + ,10 + ,10 + ,8 + ,8 + ,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 + ,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 + ,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 + ,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 + ,10 + ,9 + ,12 + ,12 + ,10 + ,7 + ,12 + ,10 + ,10 + ,6 + ,9 + ,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 + ,10 + ,10 + ,10 + ,12 + ,12 + ,12 + ,12 + ,9 + ,12 + ,14 + ,8 + ,12 + ,10 + ,10 + ,10 + ,7 + ,8 + ,10 + ,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 + ,10 + ,13 + ,12 + ,12 + ,10 + ,12 + ,10 + ,12 + ,10 + ,10 + ,10 + ,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.72189 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.0666889 > (armose <- arm / armse) [1] 160.7747 > (geo <- geomean(x)) [1] 10.54389 > (har <- harmean(x)) [1] 10.35743 > (qua <- quamean(x)) [1] 10.89185 > (win <- winmean(x)) [,1] [,2] [1,] 10.72068 0.06653993 [2,] 10.72068 0.06605414 [3,] 10.71705 0.06573549 [4,] 10.71705 0.06573549 [5,] 10.71705 0.06573549 [6,] 10.71705 0.06573549 [7,] 10.72551 0.06507412 [8,] 10.72551 0.06507412 [9,] 10.72551 0.06507412 [10,] 10.72551 0.06507412 [11,] 10.72551 0.06507412 [12,] 10.72551 0.06507412 [13,] 10.72551 0.06507412 [14,] 10.72551 0.06507412 [15,] 10.72551 0.06507412 [16,] 10.72551 0.06507412 [17,] 10.72551 0.06507412 [18,] 10.72551 0.06507412 [19,] 10.72551 0.06507412 [20,] 10.72551 0.06507412 [21,] 10.72551 0.06507412 [22,] 10.72551 0.06507412 [23,] 10.69770 0.06308352 [24,] 10.69770 0.06308352 [25,] 10.69770 0.06308352 [26,] 10.69770 0.06308352 [27,] 10.69770 0.06308352 [28,] 10.69770 0.06308352 [29,] 10.69770 0.06308352 [30,] 10.73398 0.06080353 [31,] 10.73398 0.06080353 [32,] 10.73398 0.06080353 [33,] 10.73398 0.06080353 [34,] 10.73398 0.06080353 [35,] 10.73398 0.06080353 [36,] 10.73398 0.06080353 [37,] 10.73398 0.06080353 [38,] 10.73398 0.06080353 [39,] 10.73398 0.06080353 [40,] 10.73398 0.06080353 [41,] 10.73398 0.06080353 [42,] 10.73398 0.06080353 [43,] 10.73398 0.06080353 [44,] 10.73398 0.06080353 [45,] 10.73398 0.06080353 [46,] 10.73398 0.06080353 [47,] 10.73398 0.06080353 [48,] 10.73398 0.06080353 [49,] 10.73398 0.06080353 [50,] 10.73398 0.06080353 [51,] 10.73398 0.06080353 [52,] 10.73398 0.06080353 [53,] 10.73398 0.06080353 [54,] 10.73398 0.06080353 [55,] 10.73398 0.06080353 [56,] 10.73398 0.06080353 [57,] 10.73398 0.06080353 [58,] 10.73398 0.06080353 [59,] 10.73398 0.06080353 [60,] 10.73398 0.06080353 [61,] 10.66022 0.05653741 [62,] 10.66022 0.05653741 [63,] 10.66022 0.05653741 [64,] 10.66022 0.05653741 [65,] 10.66022 0.05653741 [66,] 10.66022 0.05653741 [67,] 10.66022 0.05653741 [68,] 10.66022 0.05653741 [69,] 10.66022 0.05653741 [70,] 10.66022 0.05653741 [71,] 10.66022 0.05653741 [72,] 10.66022 0.05653741 [73,] 10.66022 0.05653741 [74,] 10.66022 0.05653741 [75,] 10.66022 0.05653741 [76,] 10.66022 0.05653741 [77,] 10.66022 0.05653741 [78,] 10.66022 0.05653741 [79,] 10.66022 0.05653741 [80,] 10.66022 0.05653741 [81,] 10.66022 0.05653741 [82,] 10.66022 0.05653741 [83,] 10.66022 0.05653741 [84,] 10.66022 0.05653741 [85,] 10.66022 0.05653741 [86,] 10.66022 0.05653741 [87,] 10.55502 0.05210039 [88,] 10.55502 0.05210039 [89,] 10.55502 0.05210039 [90,] 10.55502 0.05210039 [91,] 10.55502 0.05210039 [92,] 10.55502 0.05210039 [93,] 10.55502 0.05210039 [94,] 10.55502 0.05210039 [95,] 10.55502 0.05210039 [96,] 10.55502 0.05210039 [97,] 10.55502 0.05210039 [98,] 10.55502 0.05210039 [99,] 10.55502 0.05210039 [100,] 10.55502 0.05210039 [101,] 10.55502 0.05210039 [102,] 10.55502 0.05210039 [103,] 10.55502 0.05210039 [104,] 10.55502 0.05210039 [105,] 10.55502 0.05210039 [106,] 10.55502 0.05210039 [107,] 10.55502 0.05210039 [108,] 10.55502 0.05210039 [109,] 10.55502 0.05210039 [110,] 10.55502 0.05210039 [111,] 10.55502 0.05210039 [112,] 10.55502 0.05210039 [113,] 10.55502 0.05210039 [114,] 10.55502 0.05210039 [115,] 10.55502 0.05210039 [116,] 10.55502 0.05210039 [117,] 10.55502 0.05210039 [118,] 10.55502 0.05210039 [119,] 10.55502 0.05210039 [120,] 10.55502 0.05210039 [121,] 10.55502 0.05210039 [122,] 10.55502 0.05210039 [123,] 10.55502 0.05210039 [124,] 10.55502 0.05210039 [125,] 10.55502 0.05210039 [126,] 10.55502 0.05210039 [127,] 10.55502 0.05210039 [128,] 10.70979 0.04376423 [129,] 10.70979 0.04376423 [130,] 10.70979 0.04376423 [131,] 10.70979 0.04376423 [132,] 10.70979 0.04376423 [133,] 10.70979 0.04376423 [134,] 10.70979 0.04376423 [135,] 10.70979 0.04376423 [136,] 10.70979 0.04376423 [137,] 10.70979 0.04376423 [138,] 10.70979 0.04376423 [139,] 10.70979 0.04376423 [140,] 10.70979 0.04376423 [141,] 10.70979 0.04376423 [142,] 10.70979 0.04376423 [143,] 10.70979 0.04376423 [144,] 10.70979 0.04376423 [145,] 10.70979 0.04376423 [146,] 10.70979 0.04376423 [147,] 10.70979 0.04376423 [148,] 10.70979 0.04376423 [149,] 10.70979 0.04376423 [150,] 10.70979 0.04376423 [151,] 10.70979 0.04376423 [152,] 10.70979 0.04376423 [153,] 10.70979 0.04376423 [154,] 10.70979 0.04376423 [155,] 10.70979 0.04376423 [156,] 10.70979 0.04376423 [157,] 10.70979 0.04376423 [158,] 10.70979 0.04376423 [159,] 10.70979 0.04376423 [160,] 10.70979 0.04376423 [161,] 10.70979 0.04376423 [162,] 10.70979 0.04376423 [163,] 10.70979 0.04376423 [164,] 10.70979 0.04376423 [165,] 10.70979 0.04376423 [166,] 10.70979 0.04376423 [167,] 10.70979 0.04376423 [168,] 10.70979 0.04376423 [169,] 10.70979 0.04376423 [170,] 10.70979 0.04376423 [171,] 10.70979 0.04376423 [172,] 10.70979 0.04376423 [173,] 10.70979 0.04376423 [174,] 10.70979 0.04376423 [175,] 10.70979 0.04376423 [176,] 10.70979 0.04376423 [177,] 10.70979 0.04376423 [178,] 10.70979 0.04376423 [179,] 10.70979 0.04376423 [180,] 10.70979 0.04376423 [181,] 10.70979 0.04376423 [182,] 10.70979 0.04376423 [183,] 10.70979 0.04376423 [184,] 10.70979 0.04376423 [185,] 10.70979 0.04376423 [186,] 10.70979 0.04376423 [187,] 10.70979 0.04376423 [188,] 10.70979 0.04376423 [189,] 10.70979 0.04376423 [190,] 10.70979 0.04376423 [191,] 10.70979 0.04376423 [192,] 10.70979 0.04376423 [193,] 10.70979 0.04376423 [194,] 10.70979 0.04376423 [195,] 10.70979 0.04376423 [196,] 10.94680 0.03395677 [197,] 10.94680 0.03395677 [198,] 10.94680 0.03395677 [199,] 10.94680 0.03395677 [200,] 10.94680 0.03395677 [201,] 10.94680 0.03395677 [202,] 10.94680 0.03395677 [203,] 10.94680 0.03395677 [204,] 10.94680 0.03395677 [205,] 10.94680 0.03395677 [206,] 10.94680 0.03395677 [207,] 10.94680 0.03395677 [208,] 10.94680 0.03395677 [209,] 10.94680 0.03395677 [210,] 10.94680 0.03395677 [211,] 10.94680 0.03395677 [212,] 10.94680 0.03395677 [213,] 10.94680 0.03395677 [214,] 10.94680 0.03395677 [215,] 10.94680 0.03395677 [216,] 10.94680 0.03395677 [217,] 10.94680 0.03395677 [218,] 10.94680 0.03395677 [219,] 10.94680 0.03395677 [220,] 10.94680 0.03395677 [221,] 10.94680 0.03395677 [222,] 10.94680 0.03395677 [223,] 10.94680 0.03395677 [224,] 10.94680 0.03395677 [225,] 10.94680 0.03395677 [226,] 10.94680 0.03395677 [227,] 10.94680 0.03395677 [228,] 10.94680 0.03395677 [229,] 10.94680 0.03395677 [230,] 10.94680 0.03395677 [231,] 10.94680 0.03395677 [232,] 10.94680 0.03395677 [233,] 10.94680 0.03395677 [234,] 10.94680 0.03395677 [235,] 10.94680 0.03395677 [236,] 10.94680 0.03395677 [237,] 10.94680 0.03395677 [238,] 10.94680 0.03395677 [239,] 10.94680 0.03395677 [240,] 10.94680 0.03395677 [241,] 10.94680 0.03395677 [242,] 10.94680 0.03395677 [243,] 10.94680 0.03395677 [244,] 10.94680 0.03395677 [245,] 10.94680 0.03395677 [246,] 10.94680 0.03395677 [247,] 10.94680 0.03395677 [248,] 10.94680 0.03395677 [249,] 10.94680 0.03395677 [250,] 10.94680 0.03395677 [251,] 10.94680 0.03395677 [252,] 10.94680 0.03395677 [253,] 10.94680 0.03395677 [254,] 10.94680 0.03395677 [255,] 10.94680 0.03395677 [256,] 10.94680 0.03395677 [257,] 10.94680 0.03395677 [258,] 10.94680 0.03395677 [259,] 10.94680 0.03395677 [260,] 10.94680 0.03395677 [261,] 10.94680 0.03395677 [262,] 10.94680 0.03395677 [263,] 10.94680 0.03395677 [264,] 10.94680 0.03395677 [265,] 10.94680 0.03395677 [266,] 10.94680 0.03395677 [267,] 10.94680 0.03395677 [268,] 10.94680 0.03395677 [269,] 10.94680 0.03395677 [270,] 10.94680 0.03395677 [271,] 10.94680 0.03395677 [272,] 10.94680 0.03395677 [273,] 10.94680 0.03395677 [274,] 10.94680 0.03395677 [275,] 10.94680 0.03395677 > (tri <- trimean(x)) [,1] [,2] [1,] 10.72000 0.06590087 [2,] 10.71932 0.06524882 [3,] 10.71864 0.06483583 [4,] 10.71917 0.06452641 [5,] 10.71971 0.06421204 [6,] 10.72025 0.06389261 [7,] 10.72079 0.06356801 [8,] 10.72010 0.06333962 [9,] 10.71941 0.06310774 [10,] 10.71871 0.06287228 [11,] 10.71801 0.06263318 [12,] 10.71731 0.06239035 [13,] 10.71660 0.06214373 [14,] 10.71589 0.06189323 [15,] 10.71518 0.06163878 [16,] 10.71447 0.06138028 [17,] 10.71375 0.06111766 [18,] 10.71302 0.06085081 [19,] 10.71229 0.06057965 [20,] 10.71156 0.06030409 [21,] 10.71083 0.06002402 [22,] 10.71009 0.05973933 [23,] 10.70935 0.05944994 [24,] 10.70988 0.05926135 [25,] 10.71042 0.05906981 [26,] 10.71097 0.05887525 [27,] 10.71151 0.05867761 [28,] 10.71206 0.05847683 [29,] 10.71261 0.05827284 [30,] 10.71317 0.05806559 [31,] 10.71242 0.05794996 [32,] 10.71166 0.05783245 [33,] 10.71091 0.05771305 [34,] 10.71014 0.05759172 [35,] 10.70938 0.05746843 [36,] 10.70861 0.05734314 [37,] 10.70784 0.05721582 [38,] 10.70706 0.05708642 [39,] 10.70628 0.05695492 [40,] 10.70549 0.05682127 [41,] 10.70470 0.05668543 [42,] 10.70390 0.05654737 [43,] 10.70310 0.05640704 [44,] 10.70230 0.05626440 [45,] 10.70149 0.05611940 [46,] 10.70068 0.05597201 [47,] 10.69986 0.05582217 [48,] 10.69904 0.05566984 [49,] 10.69822 0.05551497 [50,] 10.69739 0.05535751 [51,] 10.69655 0.05519741 [52,] 10.69571 0.05503462 [53,] 10.69487 0.05486908 [54,] 10.69402 0.05470074 [55,] 10.69317 0.05452954 [56,] 10.69231 0.05435542 [57,] 10.69144 0.05417832 [58,] 10.69058 0.05399818 [59,] 10.68970 0.05381494 [60,] 10.68883 0.05362853 [61,] 10.68794 0.05343887 [62,] 10.68848 0.05335283 [63,] 10.68902 0.05326521 [64,] 10.68956 0.05317599 [65,] 10.69010 0.05308515 [66,] 10.69065 0.05299265 [67,] 10.69120 0.05289846 [68,] 10.69175 0.05280256 [69,] 10.69231 0.05270490 [70,] 10.69287 0.05260546 [71,] 10.69343 0.05250421 [72,] 10.69400 0.05240110 [73,] 10.69457 0.05229611 [74,] 10.69514 0.05218920 [75,] 10.69572 0.05208034 [76,] 10.69630 0.05196947 [77,] 10.69688 0.05185657 [78,] 10.69747 0.05174160 [79,] 10.69806 0.05162451 [80,] 10.69865 0.05150527 [81,] 10.69925 0.05138382 [82,] 10.69985 0.05126013 [83,] 10.70045 0.05113416 [84,] 10.70106 0.05100584 [85,] 10.70167 0.05087515 [86,] 10.70229 0.05074202 [87,] 10.70291 0.05060640 [88,] 10.70507 0.05055227 [89,] 10.70724 0.05049678 [90,] 10.70943 0.05043991 [91,] 10.71163 0.05038163 [92,] 10.71384 0.05032192 [93,] 10.71607 0.05026074 [94,] 10.71831 0.05019807 [95,] 10.72057 0.05013387 [96,] 10.72283 0.05006811 [97,] 10.72512 0.05000077 [98,] 10.72742 0.04993180 [99,] 10.72973 0.04986118 [100,] 10.73206 0.04978887 [101,] 10.73440 0.04971484 [102,] 10.73676 0.04963904 [103,] 10.73913 0.04956145 [104,] 10.74152 0.04948203 [105,] 10.74392 0.04940072 [106,] 10.74634 0.04931751 [107,] 10.74878 0.04923233 [108,] 10.75123 0.04914516 [109,] 10.75123 0.04905594 [110,] 10.75618 0.04896464 [111,] 10.75868 0.04887120 [112,] 10.76119 0.04877558 [113,] 10.76373 0.04867773 [114,] 10.76628 0.04857759 [115,] 10.76628 0.04847513 [116,] 10.77143 0.04837027 [117,] 10.77403 0.04826298 [118,] 10.77665 0.04815319 [119,] 10.77929 0.04804084 [120,] 10.78194 0.04792587 [121,] 10.78194 0.04780823 [122,] 10.78731 0.04768784 [123,] 10.79002 0.04756465 [124,] 10.79275 0.04743858 [125,] 10.79549 0.04730956 [126,] 10.79826 0.04717752 [127,] 10.79826 0.04704238 [128,] 10.80385 0.04690408 [129,] 10.80492 0.04691484 [130,] 10.80600 0.04692512 [131,] 10.80708 0.04693491 [132,] 10.80817 0.04694421 [133,] 10.80927 0.04695299 [134,] 10.81038 0.04696124 [135,] 10.81149 0.04696896 [136,] 10.81261 0.04697614 [137,] 10.81374 0.04698275 [138,] 10.81488 0.04698878 [139,] 10.81603 0.04699423 [140,] 10.81718 0.04699908 [141,] 10.81835 0.04700331 [142,] 10.81952 0.04700691 [143,] 10.82070 0.04700986 [144,] 10.82189 0.04701216 [145,] 10.82309 0.04701378 [146,] 10.82430 0.04701470 [147,] 10.82552 0.04701492 [148,] 10.82674 0.04701441 [149,] 10.82798 0.04701317 [150,] 10.82922 0.04701116 [151,] 10.83048 0.04700837 [152,] 10.83174 0.04700479 [153,] 10.83301 0.04700039 [154,] 10.83430 0.04699515 [155,] 10.83559 0.04698906 [156,] 10.83689 0.04698210 [157,] 10.83821 0.04697424 [158,] 10.83953 0.04696545 [159,] 10.84086 0.04695573 [160,] 10.84221 0.04694504 [161,] 10.84356 0.04693337 [162,] 10.84493 0.04692068 [163,] 10.84631 0.04690695 [164,] 10.84770 0.04689216 [165,] 10.84909 0.04687629 [166,] 10.85051 0.04685929 [167,] 10.85193 0.04684116 [168,] 10.85336 0.04682185 [169,] 10.85481 0.04680134 [170,] 10.85626 0.04677959 [171,] 10.85773 0.04675659 [172,] 10.85921 0.04673228 [173,] 10.86071 0.04670665 [174,] 10.86221 0.04667966 [175,] 10.86373 0.04665127 [176,] 10.86526 0.04662145 [177,] 10.86681 0.04659015 [178,] 10.86837 0.04655735 [179,] 10.86994 0.04652300 [180,] 10.87152 0.04648706 [181,] 10.87312 0.04644948 [182,] 10.87473 0.04641024 [183,] 10.87636 0.04636928 [184,] 10.87800 0.04632655 [185,] 10.87965 0.04628201 [186,] 10.88132 0.04623561 [187,] 10.88300 0.04618730 [188,] 10.88470 0.04613702 [189,] 10.88641 0.04608473 [190,] 10.88814 0.04603037 [191,] 10.88989 0.04597387 [192,] 10.89165 0.04591519 [193,] 10.89342 0.04585425 [194,] 10.89522 0.04579100 [195,] 10.89703 0.04572537 [196,] 10.89885 0.04565729 [197,] 10.89838 0.04575052 [198,] 10.89791 0.04584431 [199,] 10.89744 0.04593864 [200,] 10.89696 0.04603353 [201,] 10.89647 0.04612899 [202,] 10.89598 0.04622502 [203,] 10.89549 0.04632162 [204,] 10.89499 0.04641881 [205,] 10.89448 0.04651658 [206,] 10.89398 0.04661494 [207,] 10.89346 0.04671389 [208,] 10.89294 0.04681345 [209,] 10.89242 0.04691362 [210,] 10.89189 0.04701440 [211,] 10.89136 0.04711580 [212,] 10.89082 0.04721782 [213,] 10.89027 0.04732048 [214,] 10.88972 0.04742377 [215,] 10.88917 0.04752770 [216,] 10.88861 0.04763229 [217,] 10.88861 0.04773752 [218,] 10.88804 0.04784343 [219,] 10.88689 0.04794999 [220,] 10.88630 0.04805724 [221,] 10.88571 0.04816516 [222,] 10.88512 0.04827377 [223,] 10.88451 0.04838307 [224,] 10.88391 0.04849308 [225,] 10.88329 0.04860379 [226,] 10.88267 0.04871521 [227,] 10.88204 0.04882736 [228,] 10.88140 0.04894023 [229,] 10.88140 0.04905383 [230,] 10.88076 0.04916818 [231,] 10.87945 0.04928328 [232,] 10.87879 0.04939913 [233,] 10.87812 0.04951575 [234,] 10.87744 0.04963313 [235,] 10.87675 0.04975130 [236,] 10.87606 0.04987024 [237,] 10.87535 0.04998999 [238,] 10.87464 0.05011053 [239,] 10.87393 0.05023188 [240,] 10.87320 0.05035404 [241,] 10.87320 0.05047703 [242,] 10.87246 0.05060085 [243,] 10.87172 0.05072551 [244,] 10.87021 0.05085102 [245,] 10.86944 0.05097738 [246,] 10.86866 0.05110460 [247,] 10.86787 0.05123270 [248,] 10.86707 0.05136167 [249,] 10.86626 0.05149153 [250,] 10.86544 0.05162229 [251,] 10.86462 0.05175395 [252,] 10.86378 0.05188653 [253,] 10.86293 0.05202003 [254,] 10.86293 0.05215445 [255,] 10.86207 0.05228981 [256,] 10.86032 0.05242612 [257,] 10.85942 0.05256339 [258,] 10.85852 0.05270161 [259,] 10.85761 0.05284081 [260,] 10.85668 0.05298099 [261,] 10.85574 0.05312216 [262,] 10.85479 0.05326432 [263,] 10.85382 0.05340749 [264,] 10.85284 0.05355167 [265,] 10.85185 0.05369688 [266,] 10.85085 0.05384311 [267,] 10.84983 0.05399039 [268,] 10.84880 0.05413871 [269,] 10.84775 0.05428809 [270,] 10.84669 0.05443852 [271,] 10.84561 0.05459003 [272,] 10.84452 0.05474262 [273,] 10.84342 0.05489630 [274,] 10.84229 0.05505107 [275,] 10.84116 0.05520693 > (midr <- midrange(x)) [1] 11.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/rcomp/tmp/10gyc1219000886.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/2g05k1219000886.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/3xoix1219000886.tab") > > system("convert tmp/10gyc1219000886.ps tmp/10gyc1219000886.png") > system("convert tmp/2g05k1219000886.ps tmp/2g05k1219000886.png") > > > proc.time() user system elapsed 12.817 0.675 12.962