Home » date » 2007 » Oct » 21 » attachments

WS2Q9TOTWERKLOOSHEID

R Software Module: rwasp_centraltendency.wasp (opens new window with default values)
Title produced by software: Central Tendency
Date of computation: Sun, 21 Oct 2007 05:52:56 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2007/Oct/21/vvkfqcqi97r8d6a1192971316.htm/, Retrieved Sun, 21 Oct 2007 14:55:19 +0200
 
User-defined keywords:
WS2Q9TOTWERKLOOSHEID
 
Dataseries X:
» Textbox « » Textfile « » CSV «
467,037 460,07 447,988 442,867 436,087 431,328 484,015 509,673 512,927 502,831 470,984 471,067 476,049 474,605 470,439 461,251 454,724 455,626 516,847 525,192 522,975 518,585 509,239 512,238 519,164 517,009 509,933 509,127 500,857 506,971 569,323 579,714 577,992 565,464 547,344 554,788 562,325 560,854 555,332 543,599 536,662 542,722 593,53 610,763 612,613 611,324 594,167 595,454 590,865 589,379 584,428 573,1 567,456 569,028 620,735 628,884 628,232 612,117 595,404 597,141 593,408 590,072 579,799 574,205 572,775 572,942 619,567 625,809 619,916 587,625 565,742 557,274
 
Text written by user:
 
Output produced by software:


Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Central Tendency - Ungrouped Data
MeasureValueS.E.Value/S.E.
Arithmetic Mean543.4385833333336.5118550090087983.4537290190761
Geometric Mean540.583977041319
Harmonic Mean537.651489721945
Quadratic Mean546.20160747391
Winsorized Mean ( 1 / 24 )543.4956256.4944737626094783.6858604509358
Winsorized Mean ( 2 / 24 )543.6166527777786.4395488846424284.4184371477078
Winsorized Mean ( 3 / 24 )543.6186111111116.3563541655263385.5236503433722
Winsorized Mean ( 4 / 24 )543.9473333333336.2714287225969186.7341968463117
Winsorized Mean ( 5 / 24 )543.9857361111116.2547914103703786.9710435441842
Winsorized Mean ( 6 / 24 )543.7765694444446.0865582266251289.3405680513727
Winsorized Mean ( 7 / 24 )543.8431666666676.0567428077281989.7913588096794
Winsorized Mean ( 8 / 24 )544.3979444444445.9218249754829791.9307724727283
Winsorized Mean ( 9 / 24 )544.7530694444445.833375135139593.3855712729534
Winsorized Mean ( 10 / 24 )542.9368194444445.5379571634264398.039187271091
Winsorized Mean ( 11 / 24 )542.6917638888895.5004571971907298.6630282599165
Winsorized Mean ( 12 / 24 )543.2730972222225.3923615153756100.748641513213
Winsorized Mean ( 13 / 24 )543.3104722222225.31549043308318102.212670507448
Winsorized Mean ( 14 / 24 )544.7355555555555.02876963304713108.323823779034
Winsorized Mean ( 15 / 24 )548.2188888888894.46246028890225122.851264413996
Winsorized Mean ( 16 / 24 )548.0924444444444.31754249325921126.945466153525
Winsorized Mean ( 17 / 24 )548.8827083333334.14964931364417132.272070926232
Winsorized Mean ( 18 / 24 )549.2484583333334.04949364127887135.633861165880
Winsorized Mean ( 19 / 24 )548.8151527777783.98128079048093137.848893775584
Winsorized Mean ( 20 / 24 )548.0476527777783.84418693293346142.565297249884
Winsorized Mean ( 21 / 24 )546.7733611111113.65754349416383149.491964205914
Winsorized Mean ( 22 / 24 )547.4516944444443.55513433236242153.989031992684
Winsorized Mean ( 23 / 24 )547.1217083333333.45466168504998158.372008090111
Winsorized Mean ( 24 / 24 )547.1660416666673.11733919399316175.523421615783
Trimmed Mean ( 1 / 24 )543.8195142857146.3846784642469785.1757088992037
Trimmed Mean ( 2 / 24 )544.1624558823536.2531982234453987.0214626880212
Trimmed Mean ( 3 / 24 )544.4601666666676.1302520546020588.8152985908523
Trimmed Mean ( 4 / 24 )544.775756.0192946852135890.5049143611865
Trimmed Mean ( 5 / 24 )545.0162580645165.915143244041892.1391478749902
Trimmed Mean ( 6 / 24 )545.2635833333335.7924554566849294.1334098139778
Trimmed Mean ( 7 / 24 )545.571241379315.6884375543399595.9088038090654
Trimmed Mean ( 8 / 24 )545.8886428571435.5663859302337598.0687738326148
Trimmed Mean ( 9 / 24 )546.1370925925935.44748219944365100.254956803415
Trimmed Mean ( 10 / 24 )546.3500192307695.3186884733493102.722696012072
Trimmed Mean ( 11 / 24 )546.841525.21963023221111104.766333183021
Trimmed Mean ( 12 / 24 )547.4073958333335.0978371586956107.380322044928
Trimmed Mean ( 13 / 24 )547.9466521739134.96419846503039110.379682849880
Trimmed Mean ( 14 / 24 )548.5302272727274.80546420131611114.147188344988
Trimmed Mean ( 15 / 24 )548.9948809523814.66625528187601117.652131696418
Trimmed Mean ( 16 / 24 )549.0884.61356655211228119.015948680442
Trimmed Mean ( 17 / 24 )549.2058947368424.56648673357254120.268803301040
Trimmed Mean ( 18 / 24 )549.2439166666674.5307732085442121.225206247555
Trimmed Mean ( 19 / 24 )549.2433823529414.49251402151822122.257466470261
Trimmed Mean ( 20 / 24 )549.294093754.44175885960208123.665897026929
Trimmed Mean ( 21 / 24 )549.4436666666674.38996954832822125.158878807236
Trimmed Mean ( 22 / 24 )549.7706428571434.34628129293152126.492190864694
Trimmed Mean ( 23 / 24 )550.0625384615384.29193206958601128.161986150586
Trimmed Mean ( 24 / 24 )550.4461254.21582771039578130.566560782989
Median556.303
Midrange530.106
Midmean - Weighted Average at Xnp548.101405405405
Midmean - Weighted Average at X(n+1)p549.243916666667
Midmean - Empirical Distribution Function548.101405405405
Midmean - Empirical Distribution Function - Averaging549.243916666667
Midmean - Empirical Distribution Function - Interpolation549.243916666667
Midmean - Closest Observation548.101405405405
Midmean - True Basic - Statistics Graphics Toolkit549.243916666667
Midmean - MS Excel (old versions)549.205894736842
Number of observations72
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Oct/21/vvkfqcqi97r8d6a1192971316/1ilvq1192971173.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Oct/21/vvkfqcqi97r8d6a1192971316/1ilvq1192971173.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Oct/21/vvkfqcqi97r8d6a1192971316/2xk8l1192971173.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Oct/21/vvkfqcqi97r8d6a1192971316/2xk8l1192971173.ps (open in new window)


 
Parameters:
 
R code (references can be found in the software module):
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')
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by