Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
-0.570875874954911 -0.511137633876425 -1.02711574887165 -0.247459135140635 -0.595944868112521 -0.681163109535305 0.345185635144615 1.51024603582169 -0.418019414772234 -0.311267072375839 1.67163081198947 -0.539506946905068 1.40945065934532 2.2420522686079 1.1650962896284 2.42060649786476 0.0682279397221915 -0.11067421906174 0.024453242603238 -0.497693857719122 -0.595630964725977 0.115390547461763 -0.675239658349256 -0.57778043034228 0.50210834818284 0.283004867702643 0.430374653934966 -0.695202084018761 -0.430981910529177 -0.970212998970839 -1.10289156964033 -0.506294026344613 -1.1356372838091 -0.716198265950065 2.38909456645549 0.766445974578577 0.20101606034162 0.938576757692077 -0.975096254853228 -0.0782947847538538 0.215600369809319 1.11394756921882 1.6878843005693 0.740961084054461 -0.278511975869071 0.105272624006693 -0.871792516446899 1.03273141271 1.15764643511619 -1.36281718857765 -1.22079671087844 3.02664994074065 -1.14348881138996 -1.01628030645187 -0.954424929131502 -0.21738667106372 -0.949233018879874 -1.04076580006722 -0.86871330354106 -0.895786571506119 -1.38421385241876 -0.502591734605609 -0.979653837088994 -0.756778917390011 -1.02509893199872 0.775078491645856 -0.577057910071895 -1.13886240901432 0.62205809771103 -0.265105972838122 2.87802336297808 -0.382208027407422 -0.803820507579544 -0.136143485767757 1.1797677238516 3.99082323347408 -0.600638307090792 -0.311939888127828 1.33010622026773 -0.0109999670812058 0.0925603270401305 0.0666536056689318 -0.0976293348785303 0.123635635988901 -0.518466391586699 -0.697414295956901 -1.26611290183839 0.516880230125759 0.763210392895926 -3.17516924292666 0.301867748783821 1.24353362687794 0.356838232267432 0.804523450098973 -0.736843535921125 1.45248739251206 -0.183442920152471 -1.32915521507038 0.505243391464097 -0.252827982423921 -0.0820050030754919 0.806423061579241 -1.33566333741937 11.4870981436885 0.143480495184982 -0.629857613263178 -0.278502748669541 -0.0922405695467127 0.331799201089393 -0.641972295179589 -0.52925336602269 -0.292544657144514 -0.48090361413658 -0.231631079662059 -0.546752715146306 -0.0781488200211302 -1.42330899184991 4.74593671144418 -1.03729791587256 1.1870975602054 -1.48483448678642 -1.11006560160739 0.602873113818105 0.393348983328672 -0.962148755968666 0.0184697158565785 -0.563883593450448 0.166315739043732 -1.08186987396044 -1.18733053107029 0.237743031994863 0.611036185140024 -0.79400692107665 0.278478683949076 -0.40622276355127 0.925398335411391 -1.19614998561647 -1.08864464497138 0.106042607339614 -0.937805020621083 -0.951761263569382 0.595660179931811 -2.62322849033463 2.06484177835207 -1.15690136846534 -0.971783998547422 -0.611926215083187 -0.674696186077007 -0.343071672001661 0.0120489059140767 -0.1383795628118 -0.749301027572427 -0.0329519337637752 -1.09832797043057 -1.17865313545005 -1.02319960877937 -0.63343703425983 -0.667677699369087 0.242137116993484 -0.237785307537331 -1.28283276733994 -0.319221905012263 -1.07577434747054 -1.13649959159528 -0.716757290883056 0.0050195699244691 -0.504182930963768 1.13739429185878 -0.794477152263173 -0.676009433293868 -0.129975959035785 -1.27220519162244 -0.755237196212232 3.62224545199573 -0.560259328998728 -0.250527785501192 -0.958991696990211 0.708498584924803 3.30076531741245 -0.937278704405174 -0.46112570699458 -1.35080551053675 -0.387951998968327 -0.132809676479671 0.686880241158722 -1.14841695968091 -0.198286402619942 -0.953424606143797 -0.831357405076732 22.7625252139011 4.34870014838875 -0.319775027225167 0.97886788111642 0.325925998526894 -0.110945361117234 -0.365480129339294 -0.288011496869506 -0.710975104172849 -1.8080416080161 -0.235072089058427 0.13336071414661 -0.481494207191557 -0.206654552341621 -0.71794143881947 -0.535845992452363 -0.64391059755181 0.205363138599996 0.0508051028472974 2.76211043555277 0.133938984226997 1.88662225519968 0.381866764736397 -0.827580442911865 -0.81926704434319 -1.17447429123239 -1.06053401149788 0.362718967032987 -0.607230297987153 -0.795842078874565 2.19018109168148 -0.960928566996128 0.695807217144514 2.9531433869023 0.449333749972229 0.936197534191918 0.00708092406711823 -1.0470414190653 -0.309764250493209 0.56233230889481 0.52203654340317 1.48231766408574 -2.07880984858141 0.296482095485587 -0.891179833788977 0.80794132077361 -0.552056351725605 -0.552867908673155 0.54325251003202 -0.542639108993608 -1.14471096835535 0.897529324353421 -0.0587815608245133 -1.07951863367864 -0.321172778596499 3.63437594437048 -0.947415480617462 -0.444699816200167 -0.565734426226205 -1.0922253156685 -0.459435345163184 -0.142489401411015 -0.97883583888393 -0.128394706781461 -0.844820295970723 -0.449188164589142 2.69711549482262 -0.833866835914459 0.798123612465257 -1.56644291213894 -0.858564280379805 -1.23272160763895 0.552974531733387 -1.08885968599948 -0.9105726069444 -0.467094210025088 -0.144975212059016 0.368273096383276 -1.02227305524387 -0.178894554646343 -0.956520150164327 0.993268299278574 -0.0751935665325974 -0.247427657865658 -1.04209423708647 -1.43838747724043 -0.868914642846923 -0.373821984452502 -0.95991791584591 -1.06980573040423 0.289510851234438 -0.978451460994812 0.0320063620547714 -1.04991171481537 2.22634733938379 0.0845744976638473 -0.268053463733876 0.849962268527854 0.0927671230687298 -1.00214059100251
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