R version 2.7.1 (2008-06-23) 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 + ,18 + ,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 + ,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 + ,20 + ,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 + ,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 + ,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.73716 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.07056414 > (armose <- arm / armse) [1] 152.1616 > (geo <- geomean(x)) [1] 10.5244 > (har <- harmean(x)) [1] 10.23462 > (qua <- quamean(x)) [1] 10.92928 > (win <- winmean(x)) [,1] [,2] [1,] 10.73835 0.06972396 [2,] 10.74074 0.06946771 [3,] 10.73716 0.06904918 [4,] 10.74194 0.06861403 [5,] 10.73596 0.06801142 [6,] 10.73596 0.06801142 [7,] 10.73596 0.06801142 [8,] 10.73596 0.06801142 [9,] 10.72521 0.06710338 [10,] 10.72521 0.06710338 [11,] 10.73835 0.06610457 [12,] 10.73835 0.06610457 [13,] 10.73835 0.06610457 [14,] 10.73835 0.06610457 [15,] 10.73835 0.06610457 [16,] 10.73835 0.06610457 [17,] 10.73835 0.06610457 [18,] 10.73835 0.06610457 [19,] 10.73835 0.06610457 [20,] 10.73835 0.06610457 [21,] 10.73835 0.06610457 [22,] 10.73835 0.06610457 [23,] 10.73835 0.06610457 [24,] 10.73835 0.06610457 [25,] 10.73835 0.06610457 [26,] 10.73835 0.06610457 [27,] 10.73835 0.06610457 [28,] 10.73835 0.06610457 [29,] 10.70370 0.06369128 [30,] 10.70370 0.06369128 [31,] 10.70370 0.06369128 [32,] 10.70370 0.06369128 [33,] 10.70370 0.06369128 [34,] 10.74432 0.06118227 [35,] 10.74432 0.06118227 [36,] 10.74432 0.06118227 [37,] 10.74432 0.06118227 [38,] 10.74432 0.06118227 [39,] 10.74432 0.06118227 [40,] 10.74432 0.06118227 [41,] 10.74432 0.06118227 [42,] 10.74432 0.06118227 [43,] 10.74432 0.06118227 [44,] 10.74432 0.06118227 [45,] 10.74432 0.06118227 [46,] 10.74432 0.06118227 [47,] 10.74432 0.06118227 [48,] 10.74432 0.06118227 [49,] 10.74432 0.06118227 [50,] 10.74432 0.06118227 [51,] 10.74432 0.06118227 [52,] 10.74432 0.06118227 [53,] 10.74432 0.06118227 [54,] 10.74432 0.06118227 [55,] 10.74432 0.06118227 [56,] 10.74432 0.06118227 [57,] 10.74432 0.06118227 [58,] 10.74432 0.06118227 [59,] 10.74432 0.06118227 [60,] 10.74432 0.06118227 [61,] 10.74432 0.06118227 [62,] 10.74432 0.06118227 [63,] 10.74432 0.06118227 [64,] 10.74432 0.06118227 [65,] 10.74432 0.06118227 [66,] 10.74432 0.06118227 [67,] 10.66428 0.05663822 [68,] 10.66428 0.05663822 [69,] 10.66428 0.05663822 [70,] 10.66428 0.05663822 [71,] 10.66428 0.05663822 [72,] 10.66428 0.05663822 [73,] 10.66428 0.05663822 [74,] 10.66428 0.05663822 [75,] 10.66428 0.05663822 [76,] 10.66428 0.05663822 [77,] 10.66428 0.05663822 [78,] 10.66428 0.05663822 [79,] 10.66428 0.05663822 [80,] 10.66428 0.05663822 [81,] 10.66428 0.05663822 [82,] 10.66428 0.05663822 [83,] 10.66428 0.05663822 [84,] 10.66428 0.05663822 [85,] 10.66428 0.05663822 [86,] 10.66428 0.05663822 [87,] 10.66428 0.05663822 [88,] 10.66428 0.05663822 [89,] 10.66428 0.05663822 [90,] 10.66428 0.05663822 [91,] 10.66428 0.05663822 [92,] 10.66428 0.05663822 [93,] 10.55317 0.05201111 [94,] 10.55317 0.05201111 [95,] 10.55317 0.05201111 [96,] 10.55317 0.05201111 [97,] 10.55317 0.05201111 [98,] 10.55317 0.05201111 [99,] 10.55317 0.05201111 [100,] 10.55317 0.05201111 [101,] 10.55317 0.05201111 [102,] 10.55317 0.05201111 [103,] 10.55317 0.05201111 [104,] 10.55317 0.05201111 [105,] 10.55317 0.05201111 [106,] 10.55317 0.05201111 [107,] 10.55317 0.05201111 [108,] 10.55317 0.05201111 [109,] 10.55317 0.05201111 [110,] 10.55317 0.05201111 [111,] 10.55317 0.05201111 [112,] 10.55317 0.05201111 [113,] 10.55317 0.05201111 [114,] 10.55317 0.05201111 [115,] 10.55317 0.05201111 [116,] 10.55317 0.05201111 [117,] 10.55317 0.05201111 [118,] 10.55317 0.05201111 [119,] 10.55317 0.05201111 [120,] 10.55317 0.05201111 [121,] 10.55317 0.05201111 [122,] 10.55317 0.05201111 [123,] 10.55317 0.05201111 [124,] 10.55317 0.05201111 [125,] 10.55317 0.05201111 [126,] 10.55317 0.05201111 [127,] 10.55317 0.05201111 [128,] 10.55317 0.05201111 [129,] 10.55317 0.05201111 [130,] 10.55317 0.05201111 [131,] 10.55317 0.05201111 [132,] 10.71087 0.04359785 [133,] 10.71087 0.04359785 [134,] 10.71087 0.04359785 [135,] 10.71087 0.04359785 [136,] 10.71087 0.04359785 [137,] 10.71087 0.04359785 [138,] 10.71087 0.04359785 [139,] 10.71087 0.04359785 [140,] 10.71087 0.04359785 [141,] 10.71087 0.04359785 [142,] 10.71087 0.04359785 [143,] 10.71087 0.04359785 [144,] 10.71087 0.04359785 [145,] 10.71087 0.04359785 [146,] 10.71087 0.04359785 [147,] 10.71087 0.04359785 [148,] 10.71087 0.04359785 [149,] 10.71087 0.04359785 [150,] 10.71087 0.04359785 [151,] 10.71087 0.04359785 [152,] 10.71087 0.04359785 [153,] 10.71087 0.04359785 [154,] 10.71087 0.04359785 [155,] 10.71087 0.04359785 [156,] 10.71087 0.04359785 [157,] 10.71087 0.04359785 [158,] 10.71087 0.04359785 [159,] 10.71087 0.04359785 [160,] 10.71087 0.04359785 [161,] 10.71087 0.04359785 [162,] 10.71087 0.04359785 [163,] 10.71087 0.04359785 [164,] 10.71087 0.04359785 [165,] 10.71087 0.04359785 [166,] 10.71087 0.04359785 [167,] 10.71087 0.04359785 [168,] 10.71087 0.04359785 [169,] 10.71087 0.04359785 [170,] 10.71087 0.04359785 [171,] 10.71087 0.04359785 [172,] 10.71087 0.04359785 [173,] 10.71087 0.04359785 [174,] 10.71087 0.04359785 [175,] 10.71087 0.04359785 [176,] 10.71087 0.04359785 [177,] 10.71087 0.04359785 [178,] 10.71087 0.04359785 [179,] 10.71087 0.04359785 [180,] 10.71087 0.04359785 [181,] 10.71087 0.04359785 [182,] 10.71087 0.04359785 [183,] 10.71087 0.04359785 [184,] 10.71087 0.04359785 [185,] 10.71087 0.04359785 [186,] 10.71087 0.04359785 [187,] 10.71087 0.04359785 [188,] 10.71087 0.04359785 [189,] 10.71087 0.04359785 [190,] 10.71087 0.04359785 [191,] 10.71087 0.04359785 [192,] 10.71087 0.04359785 [193,] 10.71087 0.04359785 [194,] 10.71087 0.04359785 [195,] 10.71087 0.04359785 [196,] 10.71087 0.04359785 [197,] 10.71087 0.04359785 [198,] 10.71087 0.04359785 [199,] 10.71087 0.04359785 [200,] 10.94982 0.03376808 [201,] 10.94982 0.03376808 [202,] 10.94982 0.03376808 [203,] 10.94982 0.03376808 [204,] 10.94982 0.03376808 [205,] 10.94982 0.03376808 [206,] 10.94982 0.03376808 [207,] 10.94982 0.03376808 [208,] 10.94982 0.03376808 [209,] 10.94982 0.03376808 [210,] 10.94982 0.03376808 [211,] 10.94982 0.03376808 [212,] 10.94982 0.03376808 [213,] 10.94982 0.03376808 [214,] 10.94982 0.03376808 [215,] 10.94982 0.03376808 [216,] 10.94982 0.03376808 [217,] 10.94982 0.03376808 [218,] 10.94982 0.03376808 [219,] 10.94982 0.03376808 [220,] 10.94982 0.03376808 [221,] 10.94982 0.03376808 [222,] 10.94982 0.03376808 [223,] 10.94982 0.03376808 [224,] 10.94982 0.03376808 [225,] 10.94982 0.03376808 [226,] 10.94982 0.03376808 [227,] 10.94982 0.03376808 [228,] 10.94982 0.03376808 [229,] 10.94982 0.03376808 [230,] 10.94982 0.03376808 [231,] 10.94982 0.03376808 [232,] 10.94982 0.03376808 [233,] 10.94982 0.03376808 [234,] 10.94982 0.03376808 [235,] 10.94982 0.03376808 [236,] 10.94982 0.03376808 [237,] 10.94982 0.03376808 [238,] 10.94982 0.03376808 [239,] 10.94982 0.03376808 [240,] 10.94982 0.03376808 [241,] 10.94982 0.03376808 [242,] 10.94982 0.03376808 [243,] 10.94982 0.03376808 [244,] 10.94982 0.03376808 [245,] 10.94982 0.03376808 [246,] 10.94982 0.03376808 [247,] 10.94982 0.03376808 [248,] 10.94982 0.03376808 [249,] 10.94982 0.03376808 [250,] 10.94982 0.03376808 [251,] 10.94982 0.03376808 [252,] 10.94982 0.03376808 [253,] 10.94982 0.03376808 [254,] 10.94982 0.03376808 [255,] 10.94982 0.03376808 [256,] 10.94982 0.03376808 [257,] 10.94982 0.03376808 [258,] 10.94982 0.03376808 [259,] 10.94982 0.03376808 [260,] 10.94982 0.03376808 [261,] 10.94982 0.03376808 [262,] 10.94982 0.03376808 [263,] 10.94982 0.03376808 [264,] 10.94982 0.03376808 [265,] 10.94982 0.03376808 [266,] 10.94982 0.03376808 [267,] 10.94982 0.03376808 [268,] 10.94982 0.03376808 [269,] 10.94982 0.03376808 [270,] 10.94982 0.03376808 [271,] 10.94982 0.03376808 [272,] 10.94982 0.03376808 [273,] 10.94982 0.03376808 [274,] 10.94982 0.03376808 [275,] 10.94982 0.03376808 [276,] 10.94982 0.03376808 [277,] 10.94982 0.03376808 [278,] 10.94982 0.03376808 [279,] 10.94982 0.03376808 > (tri <- trimean(x)) [,1] [,2] [1,] 10.73716 0.06887553 [2,] 10.73772 0.06800777 [3,] 10.73526 0.06725442 [4,] 10.73526 0.06663275 [5,] 10.73277 0.06611468 [6,] 10.73212 0.06571622 [7,] 10.73147 0.06531101 [8,] 10.73147 0.06489887 [9,] 10.73016 0.06447962 [10,] 10.73072 0.06416467 [11,] 10.73129 0.06384466 [12,] 10.73063 0.06362027 [13,] 10.72996 0.06339247 [14,] 10.72930 0.06316117 [15,] 10.72862 0.06292631 [16,] 10.72862 0.06268782 [17,] 10.72727 0.06244562 [18,] 10.72659 0.06219964 [19,] 10.72591 0.06194979 [20,] 10.72522 0.06169599 [21,] 10.72453 0.06143817 [22,] 10.72383 0.06117624 [23,] 10.72314 0.06091009 [24,] 10.72243 0.06063966 [25,] 10.72173 0.06036483 [26,] 10.72102 0.06008550 [27,] 10.72031 0.05980159 [28,] 10.71959 0.05951298 [29,] 10.71887 0.05921956 [30,] 10.71943 0.05902755 [31,] 10.72000 0.05883252 [32,] 10.72000 0.05863440 [33,] 10.72114 0.05843313 [34,] 10.72172 0.05822866 [35,] 10.72099 0.05811533 [36,] 10.72026 0.05800018 [37,] 10.71953 0.05788318 [38,] 10.71879 0.05776429 [39,] 10.71805 0.05764347 [40,] 10.71731 0.05752070 [41,] 10.71656 0.05739595 [42,] 10.71580 0.05726916 [43,] 10.71505 0.05714031 [44,] 10.71429 0.05700937 [45,] 10.71352 0.05687629 [46,] 10.71275 0.05674103 [47,] 10.71198 0.05660355 [48,] 10.71120 0.05646382 [49,] 10.71042 0.05632178 [50,] 10.70963 0.05617741 [51,] 10.70884 0.05603064 [52,] 10.70805 0.05588144 [53,] 10.70725 0.05572976 [54,] 10.70645 0.05557556 [55,] 10.70564 0.05541877 [56,] 10.70483 0.05525936 [57,] 10.70401 0.05509727 [58,] 10.70319 0.05493244 [59,] 10.70236 0.05476483 [60,] 10.70153 0.05459437 [61,] 10.70070 0.05442100 [62,] 10.69986 0.05424467 [63,] 10.69902 0.05406532 [64,] 10.69902 0.05388288 [65,] 10.69731 0.05369728 [66,] 10.69645 0.05350846 [67,] 10.69559 0.05331635 [68,] 10.69615 0.05322836 [69,] 10.69671 0.05313876 [70,] 10.69727 0.05304753 [71,] 10.69784 0.05295464 [72,] 10.69841 0.05286005 [73,] 10.69899 0.05276374 [74,] 10.69956 0.05266567 [75,] 10.70015 0.05256582 [76,] 10.70073 0.05246414 [77,] 10.70132 0.05236060 [78,] 10.70191 0.05225517 [79,] 10.70250 0.05214781 [80,] 10.70310 0.05203849 [81,] 10.70370 0.05192716 [82,] 10.70431 0.05181379 [83,] 10.70492 0.05169834 [84,] 10.70553 0.05158076 [85,] 10.70615 0.05146102 [86,] 10.70677 0.05133907 [87,] 10.70739 0.05121486 [88,] 10.70802 0.05108836 [89,] 10.70865 0.05095951 [90,] 10.70928 0.05082827 [91,] 10.70992 0.05069458 [92,] 10.71057 0.05055840 [93,] 10.71121 0.05041968 [94,] 10.71341 0.05036281 [95,] 10.71561 0.05030454 [96,] 10.71783 0.05024484 [97,] 10.72006 0.05018368 [98,] 10.72231 0.05012103 [99,] 10.72457 0.05005686 [100,] 10.72684 0.04999114 [101,] 10.72913 0.04992384 [102,] 10.73144 0.04985492 [103,] 10.73376 0.04978436 [104,] 10.73609 0.04971211 [105,] 10.73609 0.04963815 [106,] 10.74080 0.04956243 [107,] 10.74318 0.04948493 [108,] 10.74557 0.04940560 [109,] 10.74557 0.04932440 [110,] 10.75041 0.04924129 [111,] 10.75285 0.04915624 [112,] 10.75530 0.04906919 [113,] 10.75530 0.04898012 [114,] 10.76026 0.04888896 [115,] 10.76277 0.04879568 [116,] 10.76529 0.04870023 [117,] 10.76529 0.04860256 [118,] 10.77038 0.04850261 [119,] 10.77295 0.04840035 [120,] 10.77554 0.04829571 [121,] 10.77815 0.04818865 [122,] 10.78078 0.04807910 [123,] 10.78342 0.04796700 [124,] 10.78608 0.04785230 [125,] 10.78876 0.04773494 [126,] 10.79145 0.04761485 [127,] 10.79417 0.04749196 [128,] 10.79417 0.04736622 [129,] 10.79965 0.04723754 [130,] 10.80243 0.04710586 [131,] 10.80522 0.04697111 [132,] 10.80803 0.04683320 [133,] 10.80911 0.04684381 [134,] 10.81019 0.04685395 [135,] 10.81129 0.04686359 [136,] 10.81239 0.04687274 [137,] 10.81350 0.04688138 [138,] 10.81462 0.04688950 [139,] 10.81574 0.04689709 [140,] 10.81688 0.04690412 [141,] 10.81802 0.04691060 [142,] 10.81917 0.04691650 [143,] 10.82033 0.04692182 [144,] 10.82149 0.04692654 [145,] 10.82267 0.04693065 [146,] 10.82385 0.04693413 [147,] 10.82505 0.04693697 [148,] 10.82625 0.04693915 [149,] 10.82746 0.04694066 [150,] 10.82868 0.04694147 [151,] 10.82991 0.04694159 [152,] 10.83114 0.04694098 [153,] 10.83239 0.04693963 [154,] 10.83365 0.04693753 [155,] 10.83491 0.04693465 [156,] 10.83619 0.04693098 [157,] 10.83748 0.04692650 [158,] 10.83877 0.04692118 [159,] 10.84008 0.04691502 [160,] 10.84139 0.04690799 [161,] 10.84272 0.04690006 [162,] 10.84405 0.04689122 [163,] 10.84540 0.04688144 [164,] 10.84676 0.04687070 [165,] 10.84813 0.04685898 [166,] 10.84950 0.04684626 [167,] 10.85089 0.04683250 [168,] 10.85230 0.04681769 [169,] 10.85371 0.04680179 [170,] 10.85513 0.04678478 [171,] 10.85657 0.04676664 [172,] 10.85801 0.04674733 [173,] 10.85947 0.04672683 [174,] 10.86094 0.04670511 [175,] 10.86242 0.04668213 [176,] 10.86392 0.04665786 [177,] 10.86542 0.04663227 [178,] 10.86694 0.04660533 [179,] 10.86848 0.04657700 [180,] 10.87002 0.04654724 [181,] 10.87158 0.04651603 [182,] 10.87315 0.04648332 [183,] 10.87473 0.04644907 [184,] 10.87633 0.04641324 [185,] 10.87794 0.04637580 [186,] 10.87957 0.04633669 [187,] 10.88121 0.04629588 [188,] 10.88286 0.04625331 [189,] 10.88453 0.04620895 [190,] 10.88621 0.04616275 [191,] 10.88791 0.04611464 [192,] 10.88962 0.04606459 [193,] 10.89135 0.04601253 [194,] 10.89310 0.04595843 [195,] 10.89485 0.04590220 [196,] 10.89663 0.04584381 [197,] 10.89842 0.04578318 [198,] 10.90023 0.04572026 [199,] 10.90205 0.04565498 [200,] 10.90389 0.04558727 [201,] 10.90345 0.04568022 [202,] 10.90300 0.04577373 [203,] 10.90255 0.04586778 [204,] 10.90210 0.04596240 [205,] 10.90164 0.04605758 [206,] 10.90118 0.04615333 [207,] 10.90071 0.04624965 [208,] 10.90024 0.04634656 [209,] 10.89976 0.04644405 [210,] 10.89976 0.04654213 [211,] 10.89928 0.04664080 [212,] 10.89831 0.04674008 [213,] 10.89781 0.04683997 [214,] 10.89731 0.04694047 [215,] 10.89681 0.04704159 [216,] 10.89630 0.04714333 [217,] 10.89578 0.04724571 [218,] 10.89578 0.04734872 [219,] 10.89474 0.04745238 [220,] 10.89421 0.04755668 [221,] 10.89367 0.04766165 [222,] 10.89313 0.04776727 [223,] 10.89258 0.04787356 [224,] 10.89203 0.04798053 [225,] 10.89147 0.04808818 [226,] 10.89147 0.04819652 [227,] 10.89034 0.04830555 [228,] 10.88976 0.04841528 [229,] 10.88918 0.04852573 [230,] 10.88859 0.04863688 [231,] 10.88800 0.04874876 [232,] 10.88740 0.04886137 [233,] 10.88740 0.04897472 [234,] 10.88679 0.04908881 [235,] 10.88556 0.04920365 [236,] 10.88493 0.04931925 [237,] 10.88430 0.04943561 [238,] 10.88366 0.04955275 [239,] 10.88301 0.04967067 [240,] 10.88235 0.04978938 [241,] 10.88235 0.04990888 [242,] 10.88102 0.05002919 [243,] 10.88034 0.05015031 [244,] 10.87966 0.05027225 [245,] 10.87896 0.05039502 [246,] 10.87826 0.05051862 [247,] 10.87755 0.05064307 [248,] 10.87683 0.05076837 [249,] 10.87683 0.05089454 [250,] 10.87537 0.05102157 [251,] 10.87463 0.05114948 [252,] 10.87387 0.05127827 [253,] 10.87311 0.05140796 [254,] 10.87234 0.05153855 [255,] 10.87156 0.05167006 [256,] 10.87156 0.05180249 [257,] 10.86997 0.05193584 [258,] 10.86916 0.05207014 [259,] 10.86834 0.05220538 [260,] 10.86751 0.05234158 [261,] 10.86667 0.05247875 [262,] 10.86581 0.05261689 [263,] 10.86495 0.05275601 [264,] 10.86408 0.05289613 [265,] 10.86319 0.05303724 [266,] 10.86230 0.05317937 [267,] 10.86139 0.05332252 [268,] 10.86047 0.05346670 [269,] 10.85953 0.05361192 [270,] 10.85859 0.05375818 [271,] 10.85763 0.05390551 [272,] 10.85666 0.05405389 [273,] 10.85567 0.05420336 [274,] 10.85467 0.05435390 [275,] 10.85366 0.05450554 [276,] 10.85263 0.05465829 [277,] 10.85159 0.05481214 [278,] 10.85053 0.05496711 [279,] 10.84946 0.05512321 > (midr <- midrange(x)) [1] 10.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/1puuv1218486895.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/2kyc31218486895.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/3prp01218486896.tab") > > system("convert tmp/1puuv1218486895.ps tmp/1puuv1218486895.png") > system("convert tmp/2kyc31218486895.ps tmp/2kyc31218486895.png") > > > proc.time() user system elapsed 10.358 0.611 10.478