Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_centraltendency.wasp
Title produced by softwareCentral Tendency
Date of computationFri, 01 Apr 2011 09:58:02 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Apr/01/t13016516984hfti2luof9ojpi.htm/, Retrieved Wed, 08 May 2024 20:06:26 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=119895, Retrieved Wed, 08 May 2024 20:06:26 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsKDGP1W52
Estimated Impact151
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Central Tendency] [Maandcijfers cola...] [2011-04-01 09:58:02] [efc14e9f026602d150a82e87225d5526] [Current]
Feedback Forum

Post a new message
Dataseries X:
189
229
249
289
260
431
660
777
915
613
485
277
244
296
319
370
313
556
831
960
1152
759
607
371
298
378
373
443
374
660
1004
1153
1388
904
715
441




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ www.wessa.org

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ www.wessa.org \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=119895&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ www.wessa.org[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=119895&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=119895&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ www.wessa.org







Central Tendency - Ungrouped Data
MeasureValueS.E.Value/S.E.
Arithmetic Mean563.41666666666751.696064984877110.8986373881936
Geometric Mean489.166361041437
Harmonic Mean428.242415628299
Quadratic Mean641.07351372522
Winsorized Mean ( 1 / 12 )55848.840443168432511.4249577563345
Winsorized Mean ( 2 / 12 )558.77777777777848.663896057975511.4823888558384
Winsorized Mean ( 3 / 12 )546.86111111111144.617868738414412.2565493730157
Winsorized Mean ( 4 / 12 )543.19444444444442.99289013654212.6345180033094
Winsorized Mean ( 5 / 12 )539.30555555555640.866503911826213.1967627257561
Winsorized Mean ( 6 / 12 )539.47222222222240.024942344745213.4784009824576
Winsorized Mean ( 7 / 12 )526.63888888888936.221741098664714.5393035485062
Winsorized Mean ( 8 / 12 )515.08333333333333.349314621357415.4450950246355
Winsorized Mean ( 9 / 12 )514.33333333333331.657768173298116.2466706597198
Winsorized Mean ( 10 / 12 )503.77777777777828.716349834117417.5432386319256
Winsorized Mean ( 11 / 12 )502.55555555555622.501585286108322.3342288627911
Winsorized Mean ( 12 / 12 )502.88888888888922.445552385038122.4048346087534
Trimmed Mean ( 1 / 12 )550.17647058823547.591200945822511.5604662133774
Trimmed Mean ( 2 / 12 )541.37545.704757949184611.8450468680287
Trimmed Mean ( 3 / 12 )530.93333333333342.986871380819412.3510578062267
Trimmed Mean ( 4 / 12 )524.10714285714341.516629526141512.6240291863561
Trimmed Mean ( 5 / 12 )517.540.041795471923912.9239958873187
Trimmed Mean ( 6 / 12 )510.95833333333338.666657881995513.2144426573586
Trimmed Mean ( 7 / 12 )503.18181818181836.639795527442513.7332048647745
Trimmed Mean ( 8 / 12 )497.1535.135322982045214.1495781966784
Trimmed Mean ( 9 / 12 )492.66666666666733.857062093376814.5513708575158
Trimmed Mean ( 10 / 12 )487.2532.086147062764215.1856811927865
Trimmed Mean ( 11 / 12 )48330.260226679278515.9615459963077
Trimmed Mean ( 12 / 12 )477.66666666666730.428090424288715.6982137231122
Median442
Midrange788.5
Midmean - Weighted Average at Xnp482.421052631579
Midmean - Weighted Average at X(n+1)p492.666666666667
Midmean - Empirical Distribution Function482.421052631579
Midmean - Empirical Distribution Function - Averaging492.666666666667
Midmean - Empirical Distribution Function - Interpolation492.666666666667
Midmean - Closest Observation482.421052631579
Midmean - True Basic - Statistics Graphics Toolkit492.666666666667
Midmean - MS Excel (old versions)497.15
Number of observations36

\begin{tabular}{lllllllll}
\hline
Central Tendency - Ungrouped Data \tabularnewline
Measure & Value & S.E. & Value/S.E. \tabularnewline
Arithmetic Mean & 563.416666666667 & 51.6960649848771 & 10.8986373881936 \tabularnewline
Geometric Mean & 489.166361041437 &  &  \tabularnewline
Harmonic Mean & 428.242415628299 &  &  \tabularnewline
Quadratic Mean & 641.07351372522 &  &  \tabularnewline
Winsorized Mean ( 1 / 12 ) & 558 & 48.8404431684325 & 11.4249577563345 \tabularnewline
Winsorized Mean ( 2 / 12 ) & 558.777777777778 & 48.6638960579755 & 11.4823888558384 \tabularnewline
Winsorized Mean ( 3 / 12 ) & 546.861111111111 & 44.6178687384144 & 12.2565493730157 \tabularnewline
Winsorized Mean ( 4 / 12 ) & 543.194444444444 & 42.992890136542 & 12.6345180033094 \tabularnewline
Winsorized Mean ( 5 / 12 ) & 539.305555555556 & 40.8665039118262 & 13.1967627257561 \tabularnewline
Winsorized Mean ( 6 / 12 ) & 539.472222222222 & 40.0249423447452 & 13.4784009824576 \tabularnewline
Winsorized Mean ( 7 / 12 ) & 526.638888888889 & 36.2217410986647 & 14.5393035485062 \tabularnewline
Winsorized Mean ( 8 / 12 ) & 515.083333333333 & 33.3493146213574 & 15.4450950246355 \tabularnewline
Winsorized Mean ( 9 / 12 ) & 514.333333333333 & 31.6577681732981 & 16.2466706597198 \tabularnewline
Winsorized Mean ( 10 / 12 ) & 503.777777777778 & 28.7163498341174 & 17.5432386319256 \tabularnewline
Winsorized Mean ( 11 / 12 ) & 502.555555555556 & 22.5015852861083 & 22.3342288627911 \tabularnewline
Winsorized Mean ( 12 / 12 ) & 502.888888888889 & 22.4455523850381 & 22.4048346087534 \tabularnewline
Trimmed Mean ( 1 / 12 ) & 550.176470588235 & 47.5912009458225 & 11.5604662133774 \tabularnewline
Trimmed Mean ( 2 / 12 ) & 541.375 & 45.7047579491846 & 11.8450468680287 \tabularnewline
Trimmed Mean ( 3 / 12 ) & 530.933333333333 & 42.9868713808194 & 12.3510578062267 \tabularnewline
Trimmed Mean ( 4 / 12 ) & 524.107142857143 & 41.5166295261415 & 12.6240291863561 \tabularnewline
Trimmed Mean ( 5 / 12 ) & 517.5 & 40.0417954719239 & 12.9239958873187 \tabularnewline
Trimmed Mean ( 6 / 12 ) & 510.958333333333 & 38.6666578819955 & 13.2144426573586 \tabularnewline
Trimmed Mean ( 7 / 12 ) & 503.181818181818 & 36.6397955274425 & 13.7332048647745 \tabularnewline
Trimmed Mean ( 8 / 12 ) & 497.15 & 35.1353229820452 & 14.1495781966784 \tabularnewline
Trimmed Mean ( 9 / 12 ) & 492.666666666667 & 33.8570620933768 & 14.5513708575158 \tabularnewline
Trimmed Mean ( 10 / 12 ) & 487.25 & 32.0861470627642 & 15.1856811927865 \tabularnewline
Trimmed Mean ( 11 / 12 ) & 483 & 30.2602266792785 & 15.9615459963077 \tabularnewline
Trimmed Mean ( 12 / 12 ) & 477.666666666667 & 30.4280904242887 & 15.6982137231122 \tabularnewline
Median & 442 &  &  \tabularnewline
Midrange & 788.5 &  &  \tabularnewline
Midmean - Weighted Average at Xnp & 482.421052631579 &  &  \tabularnewline
Midmean - Weighted Average at X(n+1)p & 492.666666666667 &  &  \tabularnewline
Midmean - Empirical Distribution Function & 482.421052631579 &  &  \tabularnewline
Midmean - Empirical Distribution Function - Averaging & 492.666666666667 &  &  \tabularnewline
Midmean - Empirical Distribution Function - Interpolation & 492.666666666667 &  &  \tabularnewline
Midmean - Closest Observation & 482.421052631579 &  &  \tabularnewline
Midmean - True Basic - Statistics Graphics Toolkit & 492.666666666667 &  &  \tabularnewline
Midmean - MS Excel (old versions) & 497.15 &  &  \tabularnewline
Number of observations & 36 &  &  \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=119895&T=1

[TABLE]
[ROW][C]Central Tendency - Ungrouped Data[/C][/ROW]
[ROW][C]Measure[/C][C]Value[/C][C]S.E.[/C][C]Value/S.E.[/C][/ROW]
[ROW][C]Arithmetic Mean[/C][C]563.416666666667[/C][C]51.6960649848771[/C][C]10.8986373881936[/C][/ROW]
[ROW][C]Geometric Mean[/C][C]489.166361041437[/C][C][/C][C][/C][/ROW]
[ROW][C]Harmonic Mean[/C][C]428.242415628299[/C][C][/C][C][/C][/ROW]
[ROW][C]Quadratic Mean[/C][C]641.07351372522[/C][C][/C][C][/C][/ROW]
[ROW][C]Winsorized Mean ( 1 / 12 )[/C][C]558[/C][C]48.8404431684325[/C][C]11.4249577563345[/C][/ROW]
[ROW][C]Winsorized Mean ( 2 / 12 )[/C][C]558.777777777778[/C][C]48.6638960579755[/C][C]11.4823888558384[/C][/ROW]
[ROW][C]Winsorized Mean ( 3 / 12 )[/C][C]546.861111111111[/C][C]44.6178687384144[/C][C]12.2565493730157[/C][/ROW]
[ROW][C]Winsorized Mean ( 4 / 12 )[/C][C]543.194444444444[/C][C]42.992890136542[/C][C]12.6345180033094[/C][/ROW]
[ROW][C]Winsorized Mean ( 5 / 12 )[/C][C]539.305555555556[/C][C]40.8665039118262[/C][C]13.1967627257561[/C][/ROW]
[ROW][C]Winsorized Mean ( 6 / 12 )[/C][C]539.472222222222[/C][C]40.0249423447452[/C][C]13.4784009824576[/C][/ROW]
[ROW][C]Winsorized Mean ( 7 / 12 )[/C][C]526.638888888889[/C][C]36.2217410986647[/C][C]14.5393035485062[/C][/ROW]
[ROW][C]Winsorized Mean ( 8 / 12 )[/C][C]515.083333333333[/C][C]33.3493146213574[/C][C]15.4450950246355[/C][/ROW]
[ROW][C]Winsorized Mean ( 9 / 12 )[/C][C]514.333333333333[/C][C]31.6577681732981[/C][C]16.2466706597198[/C][/ROW]
[ROW][C]Winsorized Mean ( 10 / 12 )[/C][C]503.777777777778[/C][C]28.7163498341174[/C][C]17.5432386319256[/C][/ROW]
[ROW][C]Winsorized Mean ( 11 / 12 )[/C][C]502.555555555556[/C][C]22.5015852861083[/C][C]22.3342288627911[/C][/ROW]
[ROW][C]Winsorized Mean ( 12 / 12 )[/C][C]502.888888888889[/C][C]22.4455523850381[/C][C]22.4048346087534[/C][/ROW]
[ROW][C]Trimmed Mean ( 1 / 12 )[/C][C]550.176470588235[/C][C]47.5912009458225[/C][C]11.5604662133774[/C][/ROW]
[ROW][C]Trimmed Mean ( 2 / 12 )[/C][C]541.375[/C][C]45.7047579491846[/C][C]11.8450468680287[/C][/ROW]
[ROW][C]Trimmed Mean ( 3 / 12 )[/C][C]530.933333333333[/C][C]42.9868713808194[/C][C]12.3510578062267[/C][/ROW]
[ROW][C]Trimmed Mean ( 4 / 12 )[/C][C]524.107142857143[/C][C]41.5166295261415[/C][C]12.6240291863561[/C][/ROW]
[ROW][C]Trimmed Mean ( 5 / 12 )[/C][C]517.5[/C][C]40.0417954719239[/C][C]12.9239958873187[/C][/ROW]
[ROW][C]Trimmed Mean ( 6 / 12 )[/C][C]510.958333333333[/C][C]38.6666578819955[/C][C]13.2144426573586[/C][/ROW]
[ROW][C]Trimmed Mean ( 7 / 12 )[/C][C]503.181818181818[/C][C]36.6397955274425[/C][C]13.7332048647745[/C][/ROW]
[ROW][C]Trimmed Mean ( 8 / 12 )[/C][C]497.15[/C][C]35.1353229820452[/C][C]14.1495781966784[/C][/ROW]
[ROW][C]Trimmed Mean ( 9 / 12 )[/C][C]492.666666666667[/C][C]33.8570620933768[/C][C]14.5513708575158[/C][/ROW]
[ROW][C]Trimmed Mean ( 10 / 12 )[/C][C]487.25[/C][C]32.0861470627642[/C][C]15.1856811927865[/C][/ROW]
[ROW][C]Trimmed Mean ( 11 / 12 )[/C][C]483[/C][C]30.2602266792785[/C][C]15.9615459963077[/C][/ROW]
[ROW][C]Trimmed Mean ( 12 / 12 )[/C][C]477.666666666667[/C][C]30.4280904242887[/C][C]15.6982137231122[/C][/ROW]
[ROW][C]Median[/C][C]442[/C][C][/C][C][/C][/ROW]
[ROW][C]Midrange[/C][C]788.5[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Weighted Average at Xnp[/C][C]482.421052631579[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Weighted Average at X(n+1)p[/C][C]492.666666666667[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function[/C][C]482.421052631579[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function - Averaging[/C][C]492.666666666667[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function - Interpolation[/C][C]492.666666666667[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Closest Observation[/C][C]482.421052631579[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - True Basic - Statistics Graphics Toolkit[/C][C]492.666666666667[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - MS Excel (old versions)[/C][C]497.15[/C][C][/C][C][/C][/ROW]
[ROW][C]Number of observations[/C][C]36[/C][C][/C][C][/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=119895&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=119895&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Central Tendency - Ungrouped Data
MeasureValueS.E.Value/S.E.
Arithmetic Mean563.41666666666751.696064984877110.8986373881936
Geometric Mean489.166361041437
Harmonic Mean428.242415628299
Quadratic Mean641.07351372522
Winsorized Mean ( 1 / 12 )55848.840443168432511.4249577563345
Winsorized Mean ( 2 / 12 )558.77777777777848.663896057975511.4823888558384
Winsorized Mean ( 3 / 12 )546.86111111111144.617868738414412.2565493730157
Winsorized Mean ( 4 / 12 )543.19444444444442.99289013654212.6345180033094
Winsorized Mean ( 5 / 12 )539.30555555555640.866503911826213.1967627257561
Winsorized Mean ( 6 / 12 )539.47222222222240.024942344745213.4784009824576
Winsorized Mean ( 7 / 12 )526.63888888888936.221741098664714.5393035485062
Winsorized Mean ( 8 / 12 )515.08333333333333.349314621357415.4450950246355
Winsorized Mean ( 9 / 12 )514.33333333333331.657768173298116.2466706597198
Winsorized Mean ( 10 / 12 )503.77777777777828.716349834117417.5432386319256
Winsorized Mean ( 11 / 12 )502.55555555555622.501585286108322.3342288627911
Winsorized Mean ( 12 / 12 )502.88888888888922.445552385038122.4048346087534
Trimmed Mean ( 1 / 12 )550.17647058823547.591200945822511.5604662133774
Trimmed Mean ( 2 / 12 )541.37545.704757949184611.8450468680287
Trimmed Mean ( 3 / 12 )530.93333333333342.986871380819412.3510578062267
Trimmed Mean ( 4 / 12 )524.10714285714341.516629526141512.6240291863561
Trimmed Mean ( 5 / 12 )517.540.041795471923912.9239958873187
Trimmed Mean ( 6 / 12 )510.95833333333338.666657881995513.2144426573586
Trimmed Mean ( 7 / 12 )503.18181818181836.639795527442513.7332048647745
Trimmed Mean ( 8 / 12 )497.1535.135322982045214.1495781966784
Trimmed Mean ( 9 / 12 )492.66666666666733.857062093376814.5513708575158
Trimmed Mean ( 10 / 12 )487.2532.086147062764215.1856811927865
Trimmed Mean ( 11 / 12 )48330.260226679278515.9615459963077
Trimmed Mean ( 12 / 12 )477.66666666666730.428090424288715.6982137231122
Median442
Midrange788.5
Midmean - Weighted Average at Xnp482.421052631579
Midmean - Weighted Average at X(n+1)p492.666666666667
Midmean - Empirical Distribution Function482.421052631579
Midmean - Empirical Distribution Function - Averaging492.666666666667
Midmean - Empirical Distribution Function - Interpolation492.666666666667
Midmean - Closest Observation482.421052631579
Midmean - True Basic - Statistics Graphics Toolkit492.666666666667
Midmean - MS Excel (old versions)497.15
Number of observations36



Parameters (Session):
Parameters (R input):
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('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('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('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('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('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('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('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('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('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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')