Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
-20.0738 -3.12194 5.56078 -10.8623 11.5367 -4.86228 -0.78058 -4.35753 -3.96804 22.7242 24.5031 -4.2277 17.2194 -6.59312 1.64247 10.7482 6.08959 -10.2277 0.983828 5.00789 14.0655 9.53671 8.43095 2.53671 1.08959 8.87806 -2.01617 2.87806 0.00789364 10.3252 -4.69888 -26.0162 3.45501 -7.146 2.08959 -11.5691 -4.46329 1.56078 -1.01617 3.66654 11.3492 -10.6989 -7.96804 -2.09787 -4.12194 -22.6989 -22.7806 14.3252 -1.09787 6.43095 9.30112 -4.88634 -1.25176 -1.88634 -7.54499 10.6425 10.1137 1.98383 -16.2518 0.772301 -6.88634 -3.88634 8.66654 0.983828 -16.2518 -7.99211 2.45501 -7.43922 9.64247 7.00789 -7.2277 -15.3335 0.902131 -1.33346 5.45501 17.2435 -8.2277 -21.5931 11.5848 -11.6748 -12.0979 12.7723 -20.1219 -2.46329 -4.2277 -1.35753 -6.91041 3.53671 -10.0979 5.66654 6.7723 4.40688 1.87806 -2.35753 0.560775 -18.7806 14.8781 -20.7806 -2.54499 11.5367 5.21942 2.87806 -10.3335 7.19535 3.43095 8.30112 -28.1219 5.08959 -1.67482 -0.886343 4.90213 -6.35753 6.7723 4.56078 8.43095 7.7723 5.47908 -32.7565 -7.67482 1.43095 2.79637 6.24349 1.6906 7.11366 6.32518 -0.78058 -0.732448 9.30112 -0.333462 0.878064 -15.3335 1.21942 16.5367 -0.886343 -2.54499 5.87806 -5.91041 7.98383 -17.9921 16.0079 -5.43922 -1.46329 3.53671 14.4791 -15.7565 -8.01617 12.6425 -5.69888 4.90213 0.878064 -4.17957 26.032 0.902131 1.45501 -0.0978694 1.79637 0.959761 5.45501 5.45501 -21.0979 14.5608 15.9021 22.0079 -0.463291 14.7964 -13.2277 -5.88634 3.43095 -6.65075 10.9021 5.82043 -3.2277 -4.35753 0.325183 15.0079 6.87806 22.7482 -0.439225 1.43095 6.34925 5.45501 -3.80465 -1.3094 -26.4392 -4.88634 -8.56905 0.349249 -10.6508 -3.12194 2.08959 -16.4392 6.56078 7.21942 7.43095 9.7723 -2.91041 -5.43922 9.74824 9.34925 10.7723 -10.3094 5.26755 -7.91041 -3.43922 -5.33346 13.6665 14.7869 16.9262 3.87806 -11.0162 -8.04024 -11.5691 -0.463291 -7.17957 2.7723 -11.3575 -6.80465 0.772301 1.53671 3.19535 -3.59312 -1.25176 1.58484 -13.545 -3.0738 3.98383 -8.56905 -1.78058 -0.59312 5.40688 2.90213 -7.91041 -4.01617 -4.88634 7.11366 6.53671 5.19535 -2.67482 10.7723 0.560775 7.51264 -6.35753 0.325183 7.00789 -0.357528 6.19535 -7.02567 10.4309 16.4309 -11.2758 4.66654 -2.65075 3.45501 -3.09787 -1.59312 -6.20363 -9.54499 8.87806 8.87806 -0.357528 -3.56905 -3.67482 -28.545 -11.7806 5.7723 -0.804646 6.06552 -2.91041 -6.3094 6.37332 -2.80465 -3.41516 9.66654 0.21942 0.796367 -10.5209 16.5126 12.3252 6.98383 2.19535 -10.2518 -0.0161724 3.43095 7.21942 -4.3094 1.53671 -7.78058 3.43095 5.82043 2.43095 -24.1219 -10.8046 -2.67482 3.21942 6.11366 -12.8046 -27.1555 -1.12194 -12.5691 -5.12194 -7.88634 8.32518 -25.0162 -8.12194 2.7723 -5.01617 -4.59312 -2.09787 3.56078 -22.2518 -1.80465 -15.3575 7.56078 -0.569054 13.2194 1.32518 -11.3575 4.03196 -3.99211 -5.41516 1.11366 -5.59312 -11.7806 -3.146 0.430946 -8.12194 5.30112 -8.88634 22.9503 1.30112 -14.6748 -10.5691 9.90213 0.642472 11.0896 5.03196 -0.78058 17.1137 -12.5931 -2.75651 -1.12194 -8.75651 17.6665 -0.121936 19.7482 -8.67482 11.6906 -9.35753 -3.2277 8.74824 1.854 -11.7806 -4.25176 -15.2036 0.00789364 13.5367 4.08959 -6.43922 4.7723 -14.2277 -0.886343 1.45501 -3.33346 6.19535 -6.09787 -4.46329 -2.56905 8.11366 -3.35753 4.6906 -6.146 -24.0162 -1.33346 6.40688 0.455012 -4.2277 2.854 3.87806 3.40688 -0.121936 1.45501 19.2194 -2.33346 10.4309 -2.91041 9.9262 7.08959 6.53671 6.51264 -6.80465 -7.33346 3.43095 -5.69888 -4.25176 8.95976 2.64247 7.45501 -5.69888 -3.3094 10.5848 18.5608 14.4309 12.4069 -8.12194 4.32518 -18.2518 -4.09787 7.64247 11.9838 -6.09787 1.66654 -10.8863 14.3252 13.3492 1.53671 1.95976 -8.41516 11.3011 10.7723 -14.3335 9.79637 -2.67482 3.08959 1.34925 8.19535 -2.20363 -1.43922 0.195354 -26.8623 -4.43922 -2.2277 -15.3335 10.1954 -12.4633 4.7723 -2.2277 -11.8863 -11.7806 2.98383 10.7723 10.7723 -0.59312 -8.146 3.08959 2.21942 5.32518 2.08959 -8.65075 -5.27583 9.32518 15.7242 10.3492 6.11366 6.74824 -1.3094 -9.91041 12.3492 5.43095 2.13772 -3.65075 -9.67482 -0.146002 -3.48736 -10.6748 -3.25176 -1.46329 0.0895906 7.74824 6.95976 4.30112 2.08959 7.06552 -21.968 -1.69888 2.45501 0.0895906 0.853998 -6.33346 -4.67482 0.0895906 16.9598 -8.60262 -6.46329 -3.35753 0.748235 16.9838 -2.2277 -11.2277 12.6425 -5.80465 4.34925 5.47908 1.74824 -4.01617 20.9262 11.6665 -0.146002 -2.46329
Chart options
Title:
Y-axis minimum
Y-axis maximum
R Code
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)) sqrtn <- sqrt(length(x)) (armse <- sd(x) / sqrtn) (armose <- arm / armse) (geo <- geomean(x)) (har <- harmean(x)) (qua <- quamean(x)) (win <- winmean(x)) (tri <- trimean(x)) (midr <- midrange(x)) midm <- array(NA,dim=8) for (j in 1:8) midm[j] <- midmean(x,j) midm bitmap(file='test1.png') 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() bitmap(file='test2.png') 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() load(file='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='mytable.tab')
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
1 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation