Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
-0.00967807225396911 0.0164794475686852 -0.0493088546156912 0.0623910888579425 0.000132222601049234 -0.0358626166041775 0.0369673031192541 0.0298942595267861 0.0355112629150787 0.0111321176091666 -0.0781042857731448 0.0261057023165929 0.00307483824813377 -0.0420024174185996 -0.0208676882873148 -0.0266004373587862 -0.0568038435442881 0.065436780027782 0.00238463495985452 -0.00825154867103116 0.000414157973718616 0.0288316205165907 -0.0668393987647476 0.00881630884710465 0.0382784321172755 -0.0282024152664003 -0.0394948185284319 0.00200053433495244 0.00876338104684245 -0.0299787630286529 0.130483120226793 -0.062358132657011 -0.00454931899612576 0.0169613964240008 -0.10099816781895 0.0364731742345563 0.0294077928772225 -0.0432878993879228 0.0790838432631322 -0.026678537555161 0.057759207995161 0.0381719954027447 -0.0386085876455873 -0.0662532326229567 0.00125663388372025 -0.0237896829347677 0.0118585270330474 0.0872488471580152 0.0203414310391486 0.00243796966088249 -0.0150303702193275 -0.0864771206778074 -0.0668164373916027 -0.0599920656599981 -0.0379226206980389 -0.0384684379250221 0.0105142198917544 0.0114791571000179 0.0138907732499689 0.049019849841956 -0.0524321217243687 -0.0297142522694878 0.13152746375791 -0.0269070459500943 0.142710108469853 -0.00294016994823054 0.0519447136166207 0.0974654499260434 0.0254668642091284 -0.0385218915308106 0.0213633912218578 -0.149862957988217 0.0669300736408377 0.00991602128092244 -0.0551434053187877 0.0469384389973022 0.0833015317164275 -0.00824036942070868 0.0394468776102158 0.0445173131838165 -0.00338699144228222 0.0408989611422278 -0.13799572408857 -0.0674472299233161 0.0292338556652686 0.0731970881059153 0.00166922539064377 -0.0171425517298409 -0.07395867811426 0.0464227393699168 0.00402911460525484 -0.0142478481771155 0.00617669658639961 0.0802719169156852 -0.0486739855187096 -0.0462598029393819 0.0207937712480272 0.100838459337869 -0.0455794766120341 -0.0199421029609104 -0.0432501181130898 0.00600525149546866 0.000459206793824974 0.0264489507849348 0.0361988679067562 -0.0198816712875626 -0.0529133984191794 0.0301295425071409 0.0345035334552978 -0.093700219755961 -0.0212421374268539 0.00333810603143845 -0.0356836941939651 0.0765106384597775 -0.0439032190775773 -0.0359834018083077 -0.0595190437511208 0.00914620025297714 -0.0546820386215433 -0.0391280871004685 -0.0730110502761489 -0.0751741197149775 0.00454308220286228 0.0700205810336228 -0.0684707117737271 -0.0607199860519776 0.0190793364609511 0.0273705293887626 0.00332590397529746 0.0579765274731335 0.00861571873998509 -0.0409856626251963 0.111891022774118 0.0480725451038907 -0.0224231354331285 0.0221459129333183 0.0519941362581379 -0.0971441153847536 -0.0147502049734464 -0.00370776581399225 -0.0334306104251128 -0.00305513632125687 0.00739804265481421 0.003757167077047 0.0549531737140726 0.0285572361563691 -0.0305502704529807 0.0498625368870577 0.00638089118971285 0.0133403360894268 -0.00351178834950004 0.0401467713268246 -0.0337031054945962 0.0662383527004434 -0.0442220061649935 -0.0257388212718188 0.00890029777935945 0.0491913465179322 0.00876480140854264 -0.0422533575694065 -0.00630098606109935 0.00462004186066266 -0.00184169880813713 0.0120076159118765 -0.0344475575086681 -0.0259044946447544 -0.0215445098798978 0.0847607149261971 -0.00358977299213569 -0.0999129690596764 -0.0025393883357753 0.0256388150832419 0.0422795322838633 0.00249647042366491 -0.038667661175684 -0.0594903122792517 -0.00184707229344824 0.0231875242792856 0.00500355578282182 0.0174285490026581 -0.0247221749008214 0.0381087387846465 0.0651885711846456 -0.0201828076642566 -0.102379065325941 -0.0613212668244072 -0.0769530841360964 -0.00754907390749868 -0.00721265066093667 0.0341660102101642 0.0324629626283054 0.0781445448938625 -0.0499298587347465 -0.0647420942571524 0.0616160956544506 -0.0462380725926173 -0.00724278766724718 0.0209099979331816 -0.0672194271004286 -0.0253337043598737 -0.0387610188486571 -0.0261243408647545 0.100868563211666 0.0139206879946707 0.0280377603746164 0.124373272365651 0.00262467405664797 -0.0108298919678488 0.121467931999855 -0.11799537493624 -0.0898834548703263 -0.0182908603039986 0.0519662543645733 0.0213121339743543 0.10258129243322 0.0232987413633724 0.0871974260417139 -0.0620241839476147 -0.0278072786207308 0.0205548626376498 0.00842698753222575 0.00634782736992775 -0.000323723277797125 -0.0135295322525721 -0.0531324255186402 0.0616050594411241 -0.0415291714905977 -0.0330351208048202 0.00271223839271996 -0.0161728109117079 -0.0257617895900398 0.0531304944040345 -0.000898071490354605 0.0277379768074839 0.025760491589018 -0.0214048057075596 0.0218357969464296 -0.0274900220068941 0.0590872595169751 -0.0183884730400138 -0.0429301008542208 -0.0140570864334416 0.0614251603991743 0.0272501326274476 -0.0751306404601553 -0.0114025763964102 -0.0370243275439097 0.0469384464027468 -0.0874661829794661 -0.125199781431127 0.00949103091698922 -0.104964362749429 -0.0128372500025184 0.0628625633248372 0.0512191287212 0.0488629896422712 -0.0601806261355558 0.0702325422578396 -0.0457100874342766 0.0150136771132638 -0.0148784376946774 0.0391935706820174 -0.0429302699036352 0.0547951870985365 0.0229279477260116 -0.00305074821016826 -0.052612129155247 -0.0612380129030175 0.0291333969024028 -0.035766872379565 0.0515182429604698 0.0575007811914207 -0.0956391644257092 -0.0310621851330726 -0.0266861049440111 0.086429345789821 0.00612518264723043 0.0413867803216647 -0.111396981790242 0.0402579657238619 -0.0624434760713596 0.0283584330495578 -0.0464069850909755 0.0413615672394929 8.71151358336899e-06 0.0190079756262806 -0.0173238688585832 0.0373119045308184 0.0475573330043838 0.0159309668831553 -0.00724224453037836 0.00141311737007508 -0.00345470450991777 -0.0811766963978564 -0.018042837020344 -0.0216488820259622 -0.00112695746675114 -0.0311674309855105 0.0133222739740339 -0.0165907680226611 0.0675094413401446 -0.0478143403116901 0.0028291553755268 0.0643563519388242 -0.0547827569732861 0.0251257632796759 0.00180691780057035 0.0102767758220554 -0.0762073980308939 0.0166789016434843 0.00522402332046418 0.0865828730221598 -0.125955213847459 0.0579997141940636 0.00175363164745854 -0.0248436617079278 -0.0527063124468034 -0.0249139100479721 0.0125363398435478 0.00445924867400115 -0.00930802711067346 -0.0770688524047538 -0.0688127953953304 0.055641706709909 0.149614214022418 0.0351425967608936 -0.0176225208025626 -0.0873678386284293 0.0178862043627621 0.00818868897988604 0.00738843955582733 0.0199814049896221 -0.0539843674035435 -0.17596198603474 -0.0138426359171678 -0.0116143728111087 -0.0781671833404467 -0.0221919472134097 -0.0970326562498361 -0.0503689728542387 -0.0459153966223513 -0.128365270603902 0.000354679253809962 -0.0487408259663317 -0.0214678400359427 -0.101509439427172 -0.0338797882671905 -0.0249970414533509 0.00462077163238824 -0.012683998384258 0.0355538644954303 0.0382223359685665 0.0303739054565871 0.0558858899714574 0.057498775184361 0.0713630298436631 -0.0494491939481512 -0.00364379664703946 -0.0878598351347062 -0.0761179261427965 -0.0203467280893482 -0.0348615870835137 -0.0272857565412655 0.00233886450190081 0.103479389319469 -0.0124244024279008 -0.0162644568206392 -0.0392750181813102 0.00567775785918443
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