Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
-20.27090547 13.09906119 16.93353478 29.0528023 7.388200695 -29.55792205 -10.10725016 -0.152685277 -4.636820184 -26.74516269 -26.36640366 -23.72636888 -29.80269557 -6.210335191 -7.453467875 6.324311334 36.21822142 -4.158315579 48.16194206 27.45685656 3.813071273 32.36525685 -13.69545605 0.971265782 28.92162614 44.09178164 29.32644407 16.92668567 10.74305815 -17.81499658 -3.176256667 -25.47607901 -3.81460113 -16.53900414 6.823694366 22.04717893 -14.54569797 -26.44319984 -16.57619477 -10.56187803 -1.231430405 -34.34551084 -14.16279665 -7.165294777 20.39350731 24.60814111 28.10987643 8.197222561 -16.63179278 -15.88863222 -24.98096471 -0.023620959 17.74985367 -27.80762943 2.431682105 19.32042171 19.87046153 13.53110943 5.878858861 2.479150209 -7.836919915 -30.8115267 -18.42162656 14.31387913 12.2655157 -47.29743855 -33.16359817 -35.25099103 -20.87708367 -27.87735236 -23.19051952 -8.874810406 19.92453723 37.01159205 49.46315381 59.26275569 50.97848844 -22.44259766 -2.86688912 11.1756737 28.37953674 0.425431909 3.958428602 -0.594897645 0.935414634 -9.638161803 -5.247231302 28.03068284 9.224727853 -37.67881633 -32.48556589 -9.776699193 -8.30653228 3.683657757 8.760949318 12.67954801 -13.91821478 -20.63534996 2.512021797 4.341180502 35.18647008 1.255525989 5.321376528 -13.93886097 -14.93779826 -15.60736534 15.2101691 20.45434662 3.682162662 -17.6808173 -21.07929033 -3.002725372 16.98997046 -12.24921285 -24.39160153 -38.27211642 -36.7913311 -43.6359683 -17.99350398 -19.52838075 1.120381008 39.92514868 49.59442329 69.81981419 57.56133598 22.16958918 30.67463702 18.28821122 -13.93691437 -18.29283679 -25.8616577 12.60047989 13.246256 16.26529601 9.448842953 -18.30111861 -13.53494929 -35.79222958 -25.35271524 -16.53135376 -11.14869207 8.682040314 27.89987422 13.03895964 -1.038316416 -34.80153384 14.69975566 -3.589269165 -7.262163117 -6.587034949 -18.41511215 -14.86810261 -47.65979286 -21.2939047 -11.64091502 26.18993652 29.70442658 45.46466455 38.38940946 23.09816729 21.42305599 18.24177057 11.15727978 -0.715531051 -15.12704166 -7.221308409 -11.92847363 4.366851475 -1.854184893 -18.39693339 -4.57517496 -6.367007752 28.35729033 -15.13850615 -28.83750799 3.691409338 -17.81837312 -25.45406909 0.697336464 0.513021946 13.11234595 27.37574971 6.703660396 1.72995279 18.87237606 8.456757361 -8.362066705 -13.13090143 -21.93843593 -11.31621011 15.79311723 9.193042813 12.07660692 -0.15854253 1.870814958 5.561329377 -0.032025328 24.39518598 -25.98080808 -2.755736589 -10.06936488 3.018100073 -3.007333447 7.284903863 -8.839220301 8.433324544 -12.52962367 10.58494652 8.215647595 25.78336247 -8.252128021 3.961945683 -3.762680397 5.601932724 8.653647369 1.610185382 -20.34963808 -39.78261452 -25.45108403 -9.779510729 19.80819345 28.36416371 -1.683071403 7.852903374 -5.549821634 8.427960424 0.092844006 7.89581562 -14.01757424 -21.8600192 -23.03795723 -15.16791154 -17.28173498 25.33011244 8.5387545 9.137448334 21.69744238 45.24159336 20.67284586 3.136447656 -31.21631202 -16.38338635 -26.48595374 -28.49659812 -23.79111162 36.69683353 21.7815733 10.68583046 13.55138783 22.27837801 9.792469716 -5.804661742 -30.41815467 -34.83585311 -29.48904461 -12.97103997 -18.53690445 14.10796047 12.44962003 7.09166281 27.69500581 24.82046264 -16.766979 -35.66628456 -38.8819516 -20.17550548 -14.20455243 -6.650802614 -16.18092192 24.25663153 15.79097961 4.427743978 15.22580856 18.17291664 21.70712624 16.22815529 15.13282287 4.221479788 -4.025356356 -15.2689129 -26.79633857 9.456791794 15.60671679 20.00867369 15.1719308 4.98222086 8.779612446 -3.120796043 1.662433994 -8.779007713 -3.255942484 -13.06118154 -24.75028972 15.28708152 17.32124739 22.78235303 25.90475889 29.28335366 -6.450950051 -16.84580409 -26.85701961 -13.33006875 -17.93861095 -8.811079108 -21.76741639 11.09391952 4.952050071 0.829786516 12.56882318 -13.56260833 -7.706938304 -12.59406354 6.802449754 4.752069695 -16.83380343 -33.11449211 -38.07904992 -4.390619601 -10.80539465 -42.5701834 -19.17367194 -48.90715649 -36.25353951 -24.42630006 82.18457793 62.31468142 66.70929185 36.76723424 22.64130752 39.5702183 21.39592372 4.891826209 8.249028909 4.319956044 -10.6220153 -7.707930757 26.18979231 8.756155686 -13.212974 -33.82770471 -67.92630454 -3.506438968 13.51022124 19.62654245 7.604163885 5.258515067 10.89996777 5.566749751 19.61717026 42.4005549 15.94844648 -36.60241093 -50.43713745 15.77575859 -3.914550728 17.95886229 12.19357552 14.93931015 14.27214631 -26.01025379 11.49098464 -6.155754594 -1.837986892 -37.29463141 -35.13514505 -16.50443739 21.92306492 6.305807161 13.94984962 -0.724386281 -2.311520658 8.289109243
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
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation