Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_centraltendency.wasp
Title produced by softwareCentral Tendency
Date of computationSun, 21 Dec 2008 06:16:25 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2008/Dec/21/t1229865459y1fno3bzpth6jmb.htm/, Retrieved Fri, 17 May 2024 04:43:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35558, Retrieved Fri, 17 May 2024 04:43:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact175
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Standard Deviation-Mean Plot] [dollarkoers] [2007-11-29 14:04:00] [707a919fab5d6f3020ea3c395672cd86]
- RMPD    [Central Tendency] [] [2008-12-21 13:16:25] [e7fa5259715477c9f32960f5b339b707] [Current]
Feedback Forum

Post a new message
Dataseries X:
98,6
98
106,8
96,6
100,1
107,7
91,5
97,8
107,4
117,5
105,6
97,4
99,5
98
104,3
100,6
101,1
103,9
96,9
95,5
108,4
117
103,8
100,8
110,6
104
112,6
107,3
98,9
109,8
104,9
102,2
123,9
124,9
112,7
121,9




Summary of computational 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

\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' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35558&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' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35558&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35558&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' @ 72.249.127.135







Central Tendency - Ungrouped Data
MeasureValueS.E.Value/S.E.
Arithmetic Mean105.2361111111111.3671088296211976.977127812327
Geometric Mean104.936370564325
Harmonic Mean104.647350867545
Quadratic Mean105.546452385247
Winsorized Mean ( 1 / 12 )105.3194444444441.3281017569809779.3007342177271
Winsorized Mean ( 2 / 12 )105.2694444444441.2727100160022582.7128278404766
Winsorized Mean ( 3 / 12 )104.9277777777781.1410216190313891.9595001774385
Winsorized Mean ( 4 / 12 )104.9277777777781.1127087720007894.2994073724301
Winsorized Mean ( 5 / 12 )104.3861111111110.931589806675253112.051581461217
Winsorized Mean ( 6 / 12 )104.4027777777780.920666477975836113.399130168523
Winsorized Mean ( 7 / 12 )104.0138888888890.826660452912301125.824198463167
Winsorized Mean ( 8 / 12 )103.9694444444440.759561480049712136.880880844089
Winsorized Mean ( 9 / 12 )103.6944444444440.670665914565095154.614156158043
Winsorized Mean ( 10 / 12 )103.6666666666670.59880834043242173.121614491551
Winsorized Mean ( 11 / 12 )103.7583333333330.545419235870118190.235925888836
Winsorized Mean ( 12 / 12 )103.8916666666670.507614636360713204.666412717148
Trimmed Mean ( 1 / 12 )105.0617647058821.2590281082201783.446718957215
Trimmed Mean ( 2 / 12 )104.7718751.1576989341260690.500104916389
Trimmed Mean ( 3 / 12 )104.4733333333331.0541209044630899.1094407586458
Trimmed Mean ( 4 / 12 )104.2785714285710.988429853458434105.499212780461
Trimmed Mean ( 5 / 12 )104.0538461538460.901404558183945115.435234056818
Trimmed Mean ( 6 / 12 )103.9541666666670.866066803969069120.030194195481
Trimmed Mean ( 7 / 12 )103.8318181818180.81052028514094128.105144418147
Trimmed Mean ( 8 / 12 )103.7850.767164121602206135.28395955646
Trimmed Mean ( 9 / 12 )103.7388888888890.724326998379167143.221071589250
Trimmed Mean ( 10 / 12 )103.750.693421468757158149.620403570652
Trimmed Mean ( 11 / 12 )103.7714285714290.670117963326138154.855464635447
Trimmed Mean ( 12 / 12 )103.7750.645981165876117160.647098525318
Median103.95
Midrange108.2
Midmean - Weighted Average at Xnp103.468421052632
Midmean - Weighted Average at X(n+1)p103.738888888889
Midmean - Empirical Distribution Function103.468421052632
Midmean - Empirical Distribution Function - Averaging103.738888888889
Midmean - Empirical Distribution Function - Interpolation103.738888888889
Midmean - Closest Observation103.468421052632
Midmean - True Basic - Statistics Graphics Toolkit103.738888888889
Midmean - MS Excel (old versions)103.785
Number of observations36

\begin{tabular}{lllllllll}
\hline
Central Tendency - Ungrouped Data \tabularnewline
Measure & Value & S.E. & Value/S.E. \tabularnewline
Arithmetic Mean & 105.236111111111 & 1.36710882962119 & 76.977127812327 \tabularnewline
Geometric Mean & 104.936370564325 &  &  \tabularnewline
Harmonic Mean & 104.647350867545 &  &  \tabularnewline
Quadratic Mean & 105.546452385247 &  &  \tabularnewline
Winsorized Mean ( 1 / 12 ) & 105.319444444444 & 1.32810175698097 & 79.3007342177271 \tabularnewline
Winsorized Mean ( 2 / 12 ) & 105.269444444444 & 1.27271001600225 & 82.7128278404766 \tabularnewline
Winsorized Mean ( 3 / 12 ) & 104.927777777778 & 1.14102161903138 & 91.9595001774385 \tabularnewline
Winsorized Mean ( 4 / 12 ) & 104.927777777778 & 1.11270877200078 & 94.2994073724301 \tabularnewline
Winsorized Mean ( 5 / 12 ) & 104.386111111111 & 0.931589806675253 & 112.051581461217 \tabularnewline
Winsorized Mean ( 6 / 12 ) & 104.402777777778 & 0.920666477975836 & 113.399130168523 \tabularnewline
Winsorized Mean ( 7 / 12 ) & 104.013888888889 & 0.826660452912301 & 125.824198463167 \tabularnewline
Winsorized Mean ( 8 / 12 ) & 103.969444444444 & 0.759561480049712 & 136.880880844089 \tabularnewline
Winsorized Mean ( 9 / 12 ) & 103.694444444444 & 0.670665914565095 & 154.614156158043 \tabularnewline
Winsorized Mean ( 10 / 12 ) & 103.666666666667 & 0.59880834043242 & 173.121614491551 \tabularnewline
Winsorized Mean ( 11 / 12 ) & 103.758333333333 & 0.545419235870118 & 190.235925888836 \tabularnewline
Winsorized Mean ( 12 / 12 ) & 103.891666666667 & 0.507614636360713 & 204.666412717148 \tabularnewline
Trimmed Mean ( 1 / 12 ) & 105.061764705882 & 1.25902810822017 & 83.446718957215 \tabularnewline
Trimmed Mean ( 2 / 12 ) & 104.771875 & 1.15769893412606 & 90.500104916389 \tabularnewline
Trimmed Mean ( 3 / 12 ) & 104.473333333333 & 1.05412090446308 & 99.1094407586458 \tabularnewline
Trimmed Mean ( 4 / 12 ) & 104.278571428571 & 0.988429853458434 & 105.499212780461 \tabularnewline
Trimmed Mean ( 5 / 12 ) & 104.053846153846 & 0.901404558183945 & 115.435234056818 \tabularnewline
Trimmed Mean ( 6 / 12 ) & 103.954166666667 & 0.866066803969069 & 120.030194195481 \tabularnewline
Trimmed Mean ( 7 / 12 ) & 103.831818181818 & 0.81052028514094 & 128.105144418147 \tabularnewline
Trimmed Mean ( 8 / 12 ) & 103.785 & 0.767164121602206 & 135.28395955646 \tabularnewline
Trimmed Mean ( 9 / 12 ) & 103.738888888889 & 0.724326998379167 & 143.221071589250 \tabularnewline
Trimmed Mean ( 10 / 12 ) & 103.75 & 0.693421468757158 & 149.620403570652 \tabularnewline
Trimmed Mean ( 11 / 12 ) & 103.771428571429 & 0.670117963326138 & 154.855464635447 \tabularnewline
Trimmed Mean ( 12 / 12 ) & 103.775 & 0.645981165876117 & 160.647098525318 \tabularnewline
Median & 103.95 &  &  \tabularnewline
Midrange & 108.2 &  &  \tabularnewline
Midmean - Weighted Average at Xnp & 103.468421052632 &  &  \tabularnewline
Midmean - Weighted Average at X(n+1)p & 103.738888888889 &  &  \tabularnewline
Midmean - Empirical Distribution Function & 103.468421052632 &  &  \tabularnewline
Midmean - Empirical Distribution Function - Averaging & 103.738888888889 &  &  \tabularnewline
Midmean - Empirical Distribution Function - Interpolation & 103.738888888889 &  &  \tabularnewline
Midmean - Closest Observation & 103.468421052632 &  &  \tabularnewline
Midmean - True Basic - Statistics Graphics Toolkit & 103.738888888889 &  &  \tabularnewline
Midmean - MS Excel (old versions) & 103.785 &  &  \tabularnewline
Number of observations & 36 &  &  \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35558&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]105.236111111111[/C][C]1.36710882962119[/C][C]76.977127812327[/C][/ROW]
[ROW][C]Geometric Mean[/C][C]104.936370564325[/C][C][/C][C][/C][/ROW]
[ROW][C]Harmonic Mean[/C][C]104.647350867545[/C][C][/C][C][/C][/ROW]
[ROW][C]Quadratic Mean[/C][C]105.546452385247[/C][C][/C][C][/C][/ROW]
[ROW][C]Winsorized Mean ( 1 / 12 )[/C][C]105.319444444444[/C][C]1.32810175698097[/C][C]79.3007342177271[/C][/ROW]
[ROW][C]Winsorized Mean ( 2 / 12 )[/C][C]105.269444444444[/C][C]1.27271001600225[/C][C]82.7128278404766[/C][/ROW]
[ROW][C]Winsorized Mean ( 3 / 12 )[/C][C]104.927777777778[/C][C]1.14102161903138[/C][C]91.9595001774385[/C][/ROW]
[ROW][C]Winsorized Mean ( 4 / 12 )[/C][C]104.927777777778[/C][C]1.11270877200078[/C][C]94.2994073724301[/C][/ROW]
[ROW][C]Winsorized Mean ( 5 / 12 )[/C][C]104.386111111111[/C][C]0.931589806675253[/C][C]112.051581461217[/C][/ROW]
[ROW][C]Winsorized Mean ( 6 / 12 )[/C][C]104.402777777778[/C][C]0.920666477975836[/C][C]113.399130168523[/C][/ROW]
[ROW][C]Winsorized Mean ( 7 / 12 )[/C][C]104.013888888889[/C][C]0.826660452912301[/C][C]125.824198463167[/C][/ROW]
[ROW][C]Winsorized Mean ( 8 / 12 )[/C][C]103.969444444444[/C][C]0.759561480049712[/C][C]136.880880844089[/C][/ROW]
[ROW][C]Winsorized Mean ( 9 / 12 )[/C][C]103.694444444444[/C][C]0.670665914565095[/C][C]154.614156158043[/C][/ROW]
[ROW][C]Winsorized Mean ( 10 / 12 )[/C][C]103.666666666667[/C][C]0.59880834043242[/C][C]173.121614491551[/C][/ROW]
[ROW][C]Winsorized Mean ( 11 / 12 )[/C][C]103.758333333333[/C][C]0.545419235870118[/C][C]190.235925888836[/C][/ROW]
[ROW][C]Winsorized Mean ( 12 / 12 )[/C][C]103.891666666667[/C][C]0.507614636360713[/C][C]204.666412717148[/C][/ROW]
[ROW][C]Trimmed Mean ( 1 / 12 )[/C][C]105.061764705882[/C][C]1.25902810822017[/C][C]83.446718957215[/C][/ROW]
[ROW][C]Trimmed Mean ( 2 / 12 )[/C][C]104.771875[/C][C]1.15769893412606[/C][C]90.500104916389[/C][/ROW]
[ROW][C]Trimmed Mean ( 3 / 12 )[/C][C]104.473333333333[/C][C]1.05412090446308[/C][C]99.1094407586458[/C][/ROW]
[ROW][C]Trimmed Mean ( 4 / 12 )[/C][C]104.278571428571[/C][C]0.988429853458434[/C][C]105.499212780461[/C][/ROW]
[ROW][C]Trimmed Mean ( 5 / 12 )[/C][C]104.053846153846[/C][C]0.901404558183945[/C][C]115.435234056818[/C][/ROW]
[ROW][C]Trimmed Mean ( 6 / 12 )[/C][C]103.954166666667[/C][C]0.866066803969069[/C][C]120.030194195481[/C][/ROW]
[ROW][C]Trimmed Mean ( 7 / 12 )[/C][C]103.831818181818[/C][C]0.81052028514094[/C][C]128.105144418147[/C][/ROW]
[ROW][C]Trimmed Mean ( 8 / 12 )[/C][C]103.785[/C][C]0.767164121602206[/C][C]135.28395955646[/C][/ROW]
[ROW][C]Trimmed Mean ( 9 / 12 )[/C][C]103.738888888889[/C][C]0.724326998379167[/C][C]143.221071589250[/C][/ROW]
[ROW][C]Trimmed Mean ( 10 / 12 )[/C][C]103.75[/C][C]0.693421468757158[/C][C]149.620403570652[/C][/ROW]
[ROW][C]Trimmed Mean ( 11 / 12 )[/C][C]103.771428571429[/C][C]0.670117963326138[/C][C]154.855464635447[/C][/ROW]
[ROW][C]Trimmed Mean ( 12 / 12 )[/C][C]103.775[/C][C]0.645981165876117[/C][C]160.647098525318[/C][/ROW]
[ROW][C]Median[/C][C]103.95[/C][C][/C][C][/C][/ROW]
[ROW][C]Midrange[/C][C]108.2[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Weighted Average at Xnp[/C][C]103.468421052632[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Weighted Average at X(n+1)p[/C][C]103.738888888889[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function[/C][C]103.468421052632[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function - Averaging[/C][C]103.738888888889[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function - Interpolation[/C][C]103.738888888889[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Closest Observation[/C][C]103.468421052632[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - True Basic - Statistics Graphics Toolkit[/C][C]103.738888888889[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - MS Excel (old versions)[/C][C]103.785[/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=35558&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35558&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 Mean105.2361111111111.3671088296211976.977127812327
Geometric Mean104.936370564325
Harmonic Mean104.647350867545
Quadratic Mean105.546452385247
Winsorized Mean ( 1 / 12 )105.3194444444441.3281017569809779.3007342177271
Winsorized Mean ( 2 / 12 )105.2694444444441.2727100160022582.7128278404766
Winsorized Mean ( 3 / 12 )104.9277777777781.1410216190313891.9595001774385
Winsorized Mean ( 4 / 12 )104.9277777777781.1127087720007894.2994073724301
Winsorized Mean ( 5 / 12 )104.3861111111110.931589806675253112.051581461217
Winsorized Mean ( 6 / 12 )104.4027777777780.920666477975836113.399130168523
Winsorized Mean ( 7 / 12 )104.0138888888890.826660452912301125.824198463167
Winsorized Mean ( 8 / 12 )103.9694444444440.759561480049712136.880880844089
Winsorized Mean ( 9 / 12 )103.6944444444440.670665914565095154.614156158043
Winsorized Mean ( 10 / 12 )103.6666666666670.59880834043242173.121614491551
Winsorized Mean ( 11 / 12 )103.7583333333330.545419235870118190.235925888836
Winsorized Mean ( 12 / 12 )103.8916666666670.507614636360713204.666412717148
Trimmed Mean ( 1 / 12 )105.0617647058821.2590281082201783.446718957215
Trimmed Mean ( 2 / 12 )104.7718751.1576989341260690.500104916389
Trimmed Mean ( 3 / 12 )104.4733333333331.0541209044630899.1094407586458
Trimmed Mean ( 4 / 12 )104.2785714285710.988429853458434105.499212780461
Trimmed Mean ( 5 / 12 )104.0538461538460.901404558183945115.435234056818
Trimmed Mean ( 6 / 12 )103.9541666666670.866066803969069120.030194195481
Trimmed Mean ( 7 / 12 )103.8318181818180.81052028514094128.105144418147
Trimmed Mean ( 8 / 12 )103.7850.767164121602206135.28395955646
Trimmed Mean ( 9 / 12 )103.7388888888890.724326998379167143.221071589250
Trimmed Mean ( 10 / 12 )103.750.693421468757158149.620403570652
Trimmed Mean ( 11 / 12 )103.7714285714290.670117963326138154.855464635447
Trimmed Mean ( 12 / 12 )103.7750.645981165876117160.647098525318
Median103.95
Midrange108.2
Midmean - Weighted Average at Xnp103.468421052632
Midmean - Weighted Average at X(n+1)p103.738888888889
Midmean - Empirical Distribution Function103.468421052632
Midmean - Empirical Distribution Function - Averaging103.738888888889
Midmean - Empirical Distribution Function - Interpolation103.738888888889
Midmean - Closest Observation103.468421052632
Midmean - True Basic - Statistics Graphics Toolkit103.738888888889
Midmean - MS Excel (old versions)103.785
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')