Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
0.0368357751591943 -1.0190639003189 0.208161805224601 -2.2788665584041 -1.83765123731929 -0.594497904919413 -2.40441267822996 -1.21595267623615 -2.42855507371705 -3.40046057915535 3.15508359674545 -0.373553340482945 -0.76588445023371 3.59973622747415 1.20826233449091 2.19729052091375 1.88934280526474 2.17280299908972 -2.49057504855422 2.71040403630057 -1.27837150075848 -2.58907919835159 2.33984393750344 -1.61763854297886 -1.41555898100296 1.02889904567058 -0.394054833706567 0.233352281093463 -3.92711638592384 1.45998979343389 -0.973155560022386 -1.52676012791688 1.89955118331678 -0.040736703184997 0.0576625757107871 -1.60028866327377 4.07214852767873 5.04197077107892 0.855249323366386 -2.50431948897308 0.985349692364849 2.30658657655433 -1.13894516103742 -1.84272354440752 0.0557831160447392 -0.965219257189205 -0.564485855429203 -3.24658615426235 1.39361817938584 0.689733579138978 -2.98291313364805 -0.16391565029285 -1.43764633595845 1.47720704735019 1.09283275258998 1.1599446416828 0.0297836473745154 -3.38215002809808 3.51255728502302 6.09045932352742 -1.4380607303881 1.75006325639338 -0.332349438530708 1.69912948646031 -3.69496554552662 -0.531908384962639 2.1911882059678 0.0487003845138038 -1.87256490085429 -4.99101230551626 -0.357221175001607 1.87469197406837 -1.18166835073059 -0.905777263556753 0.709398559312217 0.159515296989041 1.00197623088057 -6.36559974139515 3.7143598892987 1.48487549966236 4.4334793256306 1.7739184935925 1.85334592329955 -0.586575199835857 0.35355830052386 -0.292254658764286 -0.449093408053045 1.04832238070239 -0.83014980447115 -1.57666633956783 -0.671277174683842 -1.32123372506703 0.704587394294252 -0.0992291874343332 -4.4351370345664 -0.554395892028946 -1.36263558897174 1.48112688125901 0.664233331749525 0.606327085737559 -1.88955706388571 5.44794503219688 0.516228402681602 4.39239667204198 0.112896158180923 -0.832174815602652 -0.341683212507999 1.25371805660489 0.567385394419931 -0.117886848361801 -2.2158217020701 -0.939483003618944 -2.09063751521921 0.580237595114395 -0.223100991231705 -0.85871704699942 -3.10004394974646 -3.04631733096399 1.10513134894708 -0.622758451182783 4.3520819242433 2.7148117720876 -2.78937709524309 -0.167443488159463 4.1727053002789 0.550963616634063 4.77553501951607 -0.62005022356656 -1.49154398268031 0.415284609604837 -1.10967483726419 -0.528580897611872 1.30444061351816 -2.84707914464274 -0.548677660690404 -0.214451000294082 -0.380683887149735 -0.380189975484037 -0.0727914887853047 -5.5371399058937 1.64649539248047 -1.94185664000441 1.9967570096981 1.56187491212005 2.20944741193416 1.07047843684451 -1.01746525511327 1.95183558863869 2.53600661602191 5.40375256393779 -2.7186263606211 -1.004849040061 0.31863516109105 -0.867981322813375 -2.52171183071327 1.23273845632762 -2.66235702646079 1.80002817124374 -0.661096201572958 -2.41430270585832 -0.310008778693897 -0.833953613503462 -4.82072047348237 0.0712094741764551 6.17039971400764 1.98015384703667 -3.03982009090767 -1.22743346232641 2.60280524958066 4.7800334467633 5.0129325270763 -1.44059479812376 -1.85997051745873 -1.63186522596681 -0.767707465308539 -0.388978803320056 0.46777657817699 -1.08699543059431 0.826370506937159 -0.409566651156072 -3.51070086958119 1.26118373465699 -2.77650796710508 0.349066307576833 0.484546395174079 -2.41225925983822 -1.39975471544014 1.03614929106713 2.50809812165549 3.58439421250938 1.03213368098337 0.781294161759724 0.0290941640710876 2.52911581036576 -0.266524208754152 2.0812332919274 -1.58738810351554 -1.42614655462839 -1.77211327774126 -1.01086560411757 0.991195831369154 1.5315489476354 -3.75766642101972 -1.95779168343568 2.45130315841064 -1.74653903169997 -2.24259910449532 1.70755549542789 -1.92342834740484 1.30741333356524 2.71550198857552 3.42372633213998 -1.43675398327492 2.29355429776156 3.08163264815911 2.07111738238772 0.389782913682394 -4.42017454752259 -0.0326198140592755 -0.594183931742408 -0.890834090821979 0.193681134498324 1.73682305567116 -1.81273878070222 -2.84585207610763 -2.15936849572974 0.0930238264161019 0.654787564364268 -0.775855274352993 -3.02066499499275 2.0334530541507 2.08877131303298 -0.512430662802789 0.739675907928347 3.40716274559129 1.14499291978022 2.10508435215283 1.16885365289879 -1.88926376257524 3.07126868148612 0.526285403668501 -1.07041096537501 -1.47568183434488 -0.176125743115906 -2.59607569113522 -0.350795310865224 -4.40626480760035 2.26826617963964 -2.26532476424654 1.73998689384217 -4.47291404971826 2.67819410391647 -3.22608795077426 1.60686038123645 6.58335638708255 1.34923758808235 0.374037093336989 2.39810745924056 -0.849057400950937 -0.205452468150575 2.50767119399353 0.0510351433973448 -2.35821666225616 0.372539117556919 -3.22625940441536 -0.77417475332925 0.528279380937435 -0.936470813462194 1.71292769694171 -3.91065649823365 -0.0191556056008895 1.14183431087096 -2.05351986514292 -0.0257643217199542 -1.77788563399384 -0.557997953903428 6.62708136410813 1.95570769054546 0.0284509462877964 -1.47443919033645 5.14457941343711 1.23307814116522 -0.608395790847639 1.30135077149576 -5.17191093426233 1.53805619072917 -0.553764717086649 -1.2628395949886 0.93760261638218 -0.852063304012524 -1.4788286112616 -1.85846542972199 -2.63076793231397 3.05051816813332 -3.2689011138175 -0.188349694353825 -1.15999193385793 1.71369201868517 3.3364738373542 -0.808699414767659 5.10011890304847 -1.52187984447781 3.47042679135923 2.4706703275427 -0.229262829123134 -3.21482807374368 1.10463274827445 0.830717865543033 -1.37198279508075 -3.13097190789517 1.08886895934984 -1.69814461608981
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