Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_centraltendency.wasp
Title produced by softwareCentral Tendency
Date of computationMon, 24 Feb 2014 06:14:27 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2014/Feb/24/t1393240507lvprg2fta9b4mqt.htm/, Retrieved Thu, 16 May 2024 07:44:01 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=233994, Retrieved Thu, 16 May 2024 07:44:01 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact89
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Central Tendency] [OP5-OEF2-Benjamin...] [2014-02-24 11:14:27] [bde58939c1a4c9e8add61ba7c57eaa76] [Current]
Feedback Forum

Post a new message
Dataseries X:
1029,98
1013,08
1013,08
996,04
975,02
951,89
944,4
932,47
932,47
920,44
900,18
886,9
869,74
859,03
859,03
844,99
834,82
825,62
816,92
813,21
813,21
811,03
804,16
788,62
778,76
765,91
765,91
753,85
742,22
732,11
729,94
731,22
731,22
729,11
726,94
720,52
709,36
703,21




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

\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 & 3 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=233994&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=233994&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=233994&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 time3 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net







Central Tendency - Ungrouped Data
MeasureValueS.E.Value/S.E.
Arithmetic Mean835.70026315789515.857595294329952.7003147480192
Geometric Mean830.278652709519
Harmonic Mean825.021511935761
Quadratic Mean841.248520353747
Winsorized Mean ( 1 / 12 )835.41736842105315.67997758186853.2792450792222
Winsorized Mean ( 2 / 12 )836.00473684210515.557225298724853.7373934483439
Winsorized Mean ( 3 / 12 )835.16631578947415.055745184996455.4716027355292
Winsorized Mean ( 4 / 12 )833.18210526315814.396611375029457.8734872782836
Winsorized Mean ( 5 / 12 )830.24789473684213.600982158273961.0432309281263
Winsorized Mean ( 6 / 12 )829.26736842105313.279126636285462.4489389351154
Winsorized Mean ( 7 / 12 )827.06973684210512.776406150530264.7341456664465
Winsorized Mean ( 8 / 12 )827.25710526315812.738498496344864.9414925550708
Winsorized Mean ( 9 / 12 )826.80236842105311.632946244453571.0742017582401
Winsorized Mean ( 10 / 12 )824.5313157894749.9039840049773283.2524886323624
Winsorized Mean ( 11 / 12 )824.1781578947378.4584747779808897.4381528027061
Winsorized Mean ( 12 / 12 )818.7592105263167.40898990070381110.508884679211
Trimmed Mean ( 1 / 12 )833.98388888888915.382764526850754.2154752114398
Trimmed Mean ( 2 / 12 )832.38176470588214.94074147681855.7122125429586
Trimmed Mean ( 3 / 12 )830.23062514.380567455782257.732813920787
Trimmed Mean ( 4 / 12 )828.14666666666713.848703249251359.7995820808304
Trimmed Mean ( 5 / 12 )826.43821428571413.38247699382961.7552501429149
Trimmed Mean ( 6 / 12 )825.32461538461513.027206055385363.3539234641518
Trimmed Mean ( 7 / 12 )824.28416666666712.57223020921865.5638779237669
Trimmed Mean ( 8 / 12 )823.59681818181812.031177866688668.455210895199
Trimmed Mean ( 9 / 12 )822.727511.078170494858774.2656470562375
Trimmed Mean ( 10 / 12 )821.7716666666679.9983972653529382.1903395971593
Trimmed Mean ( 11 / 12 )821.116259.0880185260136190.3515158612002
Trimmed Mean ( 12 / 12 )820.3607142857148.267132026209399.2315970865015
Median815.065
Midrange866.595
Midmean - Weighted Average at Xnp817.584736842105
Midmean - Weighted Average at X(n+1)p822.7275
Midmean - Empirical Distribution Function822.7275
Midmean - Empirical Distribution Function - Averaging822.7275
Midmean - Empirical Distribution Function - Interpolation821.771666666667
Midmean - Closest Observation822.7275
Midmean - True Basic - Statistics Graphics Toolkit822.7275
Midmean - MS Excel (old versions)822.7275
Number of observations38

\begin{tabular}{lllllllll}
\hline
Central Tendency - Ungrouped Data \tabularnewline
Measure & Value & S.E. & Value/S.E. \tabularnewline
Arithmetic Mean & 835.700263157895 & 15.8575952943299 & 52.7003147480192 \tabularnewline
Geometric Mean & 830.278652709519 &  &  \tabularnewline
Harmonic Mean & 825.021511935761 &  &  \tabularnewline
Quadratic Mean & 841.248520353747 &  &  \tabularnewline
Winsorized Mean ( 1 / 12 ) & 835.417368421053 & 15.679977581868 & 53.2792450792222 \tabularnewline
Winsorized Mean ( 2 / 12 ) & 836.004736842105 & 15.5572252987248 & 53.7373934483439 \tabularnewline
Winsorized Mean ( 3 / 12 ) & 835.166315789474 & 15.0557451849964 & 55.4716027355292 \tabularnewline
Winsorized Mean ( 4 / 12 ) & 833.182105263158 & 14.3966113750294 & 57.8734872782836 \tabularnewline
Winsorized Mean ( 5 / 12 ) & 830.247894736842 & 13.6009821582739 & 61.0432309281263 \tabularnewline
Winsorized Mean ( 6 / 12 ) & 829.267368421053 & 13.2791266362854 & 62.4489389351154 \tabularnewline
Winsorized Mean ( 7 / 12 ) & 827.069736842105 & 12.7764061505302 & 64.7341456664465 \tabularnewline
Winsorized Mean ( 8 / 12 ) & 827.257105263158 & 12.7384984963448 & 64.9414925550708 \tabularnewline
Winsorized Mean ( 9 / 12 ) & 826.802368421053 & 11.6329462444535 & 71.0742017582401 \tabularnewline
Winsorized Mean ( 10 / 12 ) & 824.531315789474 & 9.90398400497732 & 83.2524886323624 \tabularnewline
Winsorized Mean ( 11 / 12 ) & 824.178157894737 & 8.45847477798088 & 97.4381528027061 \tabularnewline
Winsorized Mean ( 12 / 12 ) & 818.759210526316 & 7.40898990070381 & 110.508884679211 \tabularnewline
Trimmed Mean ( 1 / 12 ) & 833.983888888889 & 15.3827645268507 & 54.2154752114398 \tabularnewline
Trimmed Mean ( 2 / 12 ) & 832.381764705882 & 14.940741476818 & 55.7122125429586 \tabularnewline
Trimmed Mean ( 3 / 12 ) & 830.230625 & 14.3805674557822 & 57.732813920787 \tabularnewline
Trimmed Mean ( 4 / 12 ) & 828.146666666667 & 13.8487032492513 & 59.7995820808304 \tabularnewline
Trimmed Mean ( 5 / 12 ) & 826.438214285714 & 13.382476993829 & 61.7552501429149 \tabularnewline
Trimmed Mean ( 6 / 12 ) & 825.324615384615 & 13.0272060553853 & 63.3539234641518 \tabularnewline
Trimmed Mean ( 7 / 12 ) & 824.284166666667 & 12.572230209218 & 65.5638779237669 \tabularnewline
Trimmed Mean ( 8 / 12 ) & 823.596818181818 & 12.0311778666886 & 68.455210895199 \tabularnewline
Trimmed Mean ( 9 / 12 ) & 822.7275 & 11.0781704948587 & 74.2656470562375 \tabularnewline
Trimmed Mean ( 10 / 12 ) & 821.771666666667 & 9.99839726535293 & 82.1903395971593 \tabularnewline
Trimmed Mean ( 11 / 12 ) & 821.11625 & 9.08801852601361 & 90.3515158612002 \tabularnewline
Trimmed Mean ( 12 / 12 ) & 820.360714285714 & 8.2671320262093 & 99.2315970865015 \tabularnewline
Median & 815.065 &  &  \tabularnewline
Midrange & 866.595 &  &  \tabularnewline
Midmean - Weighted Average at Xnp & 817.584736842105 &  &  \tabularnewline
Midmean - Weighted Average at X(n+1)p & 822.7275 &  &  \tabularnewline
Midmean - Empirical Distribution Function & 822.7275 &  &  \tabularnewline
Midmean - Empirical Distribution Function - Averaging & 822.7275 &  &  \tabularnewline
Midmean - Empirical Distribution Function - Interpolation & 821.771666666667 &  &  \tabularnewline
Midmean - Closest Observation & 822.7275 &  &  \tabularnewline
Midmean - True Basic - Statistics Graphics Toolkit & 822.7275 &  &  \tabularnewline
Midmean - MS Excel (old versions) & 822.7275 &  &  \tabularnewline
Number of observations & 38 &  &  \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=233994&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]835.700263157895[/C][C]15.8575952943299[/C][C]52.7003147480192[/C][/ROW]
[ROW][C]Geometric Mean[/C][C]830.278652709519[/C][C][/C][C][/C][/ROW]
[ROW][C]Harmonic Mean[/C][C]825.021511935761[/C][C][/C][C][/C][/ROW]
[ROW][C]Quadratic Mean[/C][C]841.248520353747[/C][C][/C][C][/C][/ROW]
[ROW][C]Winsorized Mean ( 1 / 12 )[/C][C]835.417368421053[/C][C]15.679977581868[/C][C]53.2792450792222[/C][/ROW]
[ROW][C]Winsorized Mean ( 2 / 12 )[/C][C]836.004736842105[/C][C]15.5572252987248[/C][C]53.7373934483439[/C][/ROW]
[ROW][C]Winsorized Mean ( 3 / 12 )[/C][C]835.166315789474[/C][C]15.0557451849964[/C][C]55.4716027355292[/C][/ROW]
[ROW][C]Winsorized Mean ( 4 / 12 )[/C][C]833.182105263158[/C][C]14.3966113750294[/C][C]57.8734872782836[/C][/ROW]
[ROW][C]Winsorized Mean ( 5 / 12 )[/C][C]830.247894736842[/C][C]13.6009821582739[/C][C]61.0432309281263[/C][/ROW]
[ROW][C]Winsorized Mean ( 6 / 12 )[/C][C]829.267368421053[/C][C]13.2791266362854[/C][C]62.4489389351154[/C][/ROW]
[ROW][C]Winsorized Mean ( 7 / 12 )[/C][C]827.069736842105[/C][C]12.7764061505302[/C][C]64.7341456664465[/C][/ROW]
[ROW][C]Winsorized Mean ( 8 / 12 )[/C][C]827.257105263158[/C][C]12.7384984963448[/C][C]64.9414925550708[/C][/ROW]
[ROW][C]Winsorized Mean ( 9 / 12 )[/C][C]826.802368421053[/C][C]11.6329462444535[/C][C]71.0742017582401[/C][/ROW]
[ROW][C]Winsorized Mean ( 10 / 12 )[/C][C]824.531315789474[/C][C]9.90398400497732[/C][C]83.2524886323624[/C][/ROW]
[ROW][C]Winsorized Mean ( 11 / 12 )[/C][C]824.178157894737[/C][C]8.45847477798088[/C][C]97.4381528027061[/C][/ROW]
[ROW][C]Winsorized Mean ( 12 / 12 )[/C][C]818.759210526316[/C][C]7.40898990070381[/C][C]110.508884679211[/C][/ROW]
[ROW][C]Trimmed Mean ( 1 / 12 )[/C][C]833.983888888889[/C][C]15.3827645268507[/C][C]54.2154752114398[/C][/ROW]
[ROW][C]Trimmed Mean ( 2 / 12 )[/C][C]832.381764705882[/C][C]14.940741476818[/C][C]55.7122125429586[/C][/ROW]
[ROW][C]Trimmed Mean ( 3 / 12 )[/C][C]830.230625[/C][C]14.3805674557822[/C][C]57.732813920787[/C][/ROW]
[ROW][C]Trimmed Mean ( 4 / 12 )[/C][C]828.146666666667[/C][C]13.8487032492513[/C][C]59.7995820808304[/C][/ROW]
[ROW][C]Trimmed Mean ( 5 / 12 )[/C][C]826.438214285714[/C][C]13.382476993829[/C][C]61.7552501429149[/C][/ROW]
[ROW][C]Trimmed Mean ( 6 / 12 )[/C][C]825.324615384615[/C][C]13.0272060553853[/C][C]63.3539234641518[/C][/ROW]
[ROW][C]Trimmed Mean ( 7 / 12 )[/C][C]824.284166666667[/C][C]12.572230209218[/C][C]65.5638779237669[/C][/ROW]
[ROW][C]Trimmed Mean ( 8 / 12 )[/C][C]823.596818181818[/C][C]12.0311778666886[/C][C]68.455210895199[/C][/ROW]
[ROW][C]Trimmed Mean ( 9 / 12 )[/C][C]822.7275[/C][C]11.0781704948587[/C][C]74.2656470562375[/C][/ROW]
[ROW][C]Trimmed Mean ( 10 / 12 )[/C][C]821.771666666667[/C][C]9.99839726535293[/C][C]82.1903395971593[/C][/ROW]
[ROW][C]Trimmed Mean ( 11 / 12 )[/C][C]821.11625[/C][C]9.08801852601361[/C][C]90.3515158612002[/C][/ROW]
[ROW][C]Trimmed Mean ( 12 / 12 )[/C][C]820.360714285714[/C][C]8.2671320262093[/C][C]99.2315970865015[/C][/ROW]
[ROW][C]Median[/C][C]815.065[/C][C][/C][C][/C][/ROW]
[ROW][C]Midrange[/C][C]866.595[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Weighted Average at Xnp[/C][C]817.584736842105[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Weighted Average at X(n+1)p[/C][C]822.7275[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function[/C][C]822.7275[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function - Averaging[/C][C]822.7275[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function - Interpolation[/C][C]821.771666666667[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Closest Observation[/C][C]822.7275[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - True Basic - Statistics Graphics Toolkit[/C][C]822.7275[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - MS Excel (old versions)[/C][C]822.7275[/C][C][/C][C][/C][/ROW]
[ROW][C]Number of observations[/C][C]38[/C][C][/C][C][/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=233994&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=233994&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 Mean835.70026315789515.857595294329952.7003147480192
Geometric Mean830.278652709519
Harmonic Mean825.021511935761
Quadratic Mean841.248520353747
Winsorized Mean ( 1 / 12 )835.41736842105315.67997758186853.2792450792222
Winsorized Mean ( 2 / 12 )836.00473684210515.557225298724853.7373934483439
Winsorized Mean ( 3 / 12 )835.16631578947415.055745184996455.4716027355292
Winsorized Mean ( 4 / 12 )833.18210526315814.396611375029457.8734872782836
Winsorized Mean ( 5 / 12 )830.24789473684213.600982158273961.0432309281263
Winsorized Mean ( 6 / 12 )829.26736842105313.279126636285462.4489389351154
Winsorized Mean ( 7 / 12 )827.06973684210512.776406150530264.7341456664465
Winsorized Mean ( 8 / 12 )827.25710526315812.738498496344864.9414925550708
Winsorized Mean ( 9 / 12 )826.80236842105311.632946244453571.0742017582401
Winsorized Mean ( 10 / 12 )824.5313157894749.9039840049773283.2524886323624
Winsorized Mean ( 11 / 12 )824.1781578947378.4584747779808897.4381528027061
Winsorized Mean ( 12 / 12 )818.7592105263167.40898990070381110.508884679211
Trimmed Mean ( 1 / 12 )833.98388888888915.382764526850754.2154752114398
Trimmed Mean ( 2 / 12 )832.38176470588214.94074147681855.7122125429586
Trimmed Mean ( 3 / 12 )830.23062514.380567455782257.732813920787
Trimmed Mean ( 4 / 12 )828.14666666666713.848703249251359.7995820808304
Trimmed Mean ( 5 / 12 )826.43821428571413.38247699382961.7552501429149
Trimmed Mean ( 6 / 12 )825.32461538461513.027206055385363.3539234641518
Trimmed Mean ( 7 / 12 )824.28416666666712.57223020921865.5638779237669
Trimmed Mean ( 8 / 12 )823.59681818181812.031177866688668.455210895199
Trimmed Mean ( 9 / 12 )822.727511.078170494858774.2656470562375
Trimmed Mean ( 10 / 12 )821.7716666666679.9983972653529382.1903395971593
Trimmed Mean ( 11 / 12 )821.116259.0880185260136190.3515158612002
Trimmed Mean ( 12 / 12 )820.3607142857148.267132026209399.2315970865015
Median815.065
Midrange866.595
Midmean - Weighted Average at Xnp817.584736842105
Midmean - Weighted Average at X(n+1)p822.7275
Midmean - Empirical Distribution Function822.7275
Midmean - Empirical Distribution Function - Averaging822.7275
Midmean - Empirical Distribution Function - Interpolation821.771666666667
Midmean - Closest Observation822.7275
Midmean - True Basic - Statistics Graphics Toolkit822.7275
Midmean - MS Excel (old versions)822.7275
Number of observations38



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')