Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
-18.3472554888036 21.8411545043334 1.94131149188994 3.06446453577127 -10.9817234128314 13.1762980044993 -57.480588180001 -12.1693035028418 -9.02893484978586 -2.87560000384019 -18.487997001154 23.4447011937956 63.431553720839 19.7262838348708 14.9528993694551 -10.3255169168221 41.6644069163984 -9.16222084130529 -37.2619574728934 -25.8383755783035 23.656770115883 10.6976215318755 -12.8546260061666 5.61862190870751 67.7559556726568 33.7099653223812 25.1492304332054 -7.86732856651091 22.3455548816274 22.3508372349001 10.5852248234667 21.549385193819 33.4463435779078 45.3156396309487 49.3307717528811 -1.92612824107369 -12.4339926459197 5.68533133778634 7.7494416818379 -21.1110924198331 -8.2259727021421 -17.5072369178776 -10.9300620531521 10.3752832635521 -11.8648917322356 18.8522398009412 5.46196648241639 7.12042415676524 17.0220897799982 -38.1675060017719 -19.5642610212543 18.2550088004785 43.6352522916981 -0.907928741250495 30.1761488656282 14.2298140074674 -19.4136745014387 4.56175439376469 15.9209443943803 -11.6328046515688 -3.06138929771845 35.6802283814724 -57.0261149006048 -0.799167197442603 -23.2076056822506 3.91458088073465 8.20672440984913 -8.9942640607071 -69.9276838611892 -1.81343211249722 15.5635377593447 -1.54821438880418 -10.2610544225243 10.4344580610578 26.7869025691798 -9.09080064327698 -2.40359602621524 51.5971085000225 23.5661301080828 60.8776779867316 -18.8507469458476 38.769926605858 -0.493805289714407 -6.22353125429556 -34.4343411938824 32.9648088681874 21.24824681254 7.11927888040566 -22.9759917279972 34.6497510600793 -27.3515962239552 -32.6853478648039 18.4835759034276 21.114520962863 18.3150947451347 -3.97957384446414 -1.59948054918699 25.7898486308487 -10.573786589234 13.2192845099626 3.13243666273028 29.5612434883818 -11.8602478142646 5.26443867280085 -17.2638350508333 -47.2289986393519 75.5623165972809 -11.0564884262696 -72.2387181522382 30.2165779801266 -19.0730033077861 -14.1130029507274 16.9664499520742 -38.5649718945339 -33.4574978264978 -4.51551922501207 -0.148275252869555 -19.6579985578717 -41.7913542448915 -11.0577969791679 -8.50038001683127 -12.1478308008691 5.61661070580364 0.386305421605932 0.00654459540917419 -6.802097118893 -12.6303374738841 20.5565417555207 -3.24294836395067 -25.0015328118681 -4.8776420344965 2.92631124019649 -12.5834301173819 28.1513933386787 31.3693266939552 -47.6725198147632 -23.8925955570555 -41.4463404724277 -12.8029732693732 -24.4927935486996 0.301133789515378 -14.8449108782798 5.05372402754382 13.4009445202507 39.000940361025 2.75987438106259 40.3151453980178 -11.6028456879744 -9.89409611288635 41.4823153470578 35.4745724875979 44.3418128364264 -17.1392582771747 11.5478495228229 3.80781737461359 -20.3998222091219 31.8848218694971 -11.9271942373356 18.9985759295609 16.6031945558762 -0.247456429167358 25.4986028893473 -8.61594772242585 -7.72512796060404 14.8962631997414 20.470772995878 10.7410407218897 -42.4999081150008 -8.67435340875801 -40.5791329331308 -23.0547153573788 -11.7135626095208 11.1589280509275 0.515811911267503 57.92602731971 -17.4084323427727 -10.4148903408043 8.51114214341662 9.8002750210583 -12.9588575247091 -27.1182978527389 -1.14331803310468 -24.70204608064 -12.1826161129175 -17.9292046360694 -21.7989095618193 -18.6470919636876 -20.4836462759463 -4.04893584992517 -3.98749183281087 -33.5323378229951 -0.966457696249048 -12.9534614896775 23.0771603926872 11.5259277703952 -16.8318769505556 23.5436772880304 -14.9914145784493 -16.2963678483275 -0.174767694873481 0.632773366910968 9.23475052462576 -0.449589647859677 6.61262770945114 7.07725256625598 2.62774625740101 8.12558736074492 -12.9428261054994 -5.25863713039864 31.2567541101292 -21.9537791586826 -5.05419677922152 8.92239780116223 14.0747032188813 14.6484683363915 45.6447901711659 2.42288095853275 -6.34207690355982 -0.818511129601041 13.4383104139307 20.5053023453134 14.487502848273 -4.76592392726873 9.96683484119699 13.646905382173 -28.2898791313897 -45.5527769428723 8.65771041061359 -9.00172187961303 20.239059354479 20.3724331159715 -7.74506885649025 -9.49264589262374 -1.74931758627858 -6.95076368154019 6.77204137596447 -7.30647909440663 -22.9539746533088 -2.90502783749989 7.94092109026678 -19.6525842098968 8.00263727939827 5.40290814517031 3.4108115332516 0.128867151954736 -10.5156422871781 -13.7567386412394 2.02079343224868 -16.2225226863954 -34.1315518861043 3.53200270158772 8.03831515353832 -25.6361215499347 11.8390165128938 9.77610691885841 -22.6799993544108 -11.2960851164815 -8.0980592818196 0.684381749941451 -13.7942405864085 -9.52533994704161 21.0957980090361 -14.2047132668961 -9.30318908049579 9.80245428920579 -12.4710178701786 15.954997151687 -19.7687861843889 3.61425312282708 -13.4339618608886 -5.49720876446808 16.1046362591557 -25.4915647649398 -1.22638057976329 -15.35612837253 -2.11114923413006 -9.37398112400413 -21.9715959127732 1.78056713821058 17.3234115962844 21.1612869002687 -35.0413877434668 -27.8012755394628 -22.4632340625462 14.2312339988766 -6.73336955206085 0.759825560877368 2.85858083342672 -2.91845527687566
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