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 computationFri, 19 Dec 2014 00:03:47 +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/2014/Dec/19/t14189474982zv8npnubaa1d6x.htm/, Retrieved Thu, 16 May 2024 18:05:39 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=271327, Retrieved Thu, 16 May 2024 18:05:39 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact137
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Central Tendency] [tendancy] [2014-12-19 00:03:47] [8aa9b0b9e9cdf95f84c1d02ac9593640] [Current]
Feedback Forum

Post a new message
Dataseries X:
110.316
-249.737
246.791
11.881
-216.583
-316.085
138.854
357.781
2.367
-0.0224593
-354.239
147.059
-201.928
0.205298
-0.316824
-138.528
107.574
-132.052
-0.765688
-249.865
337.059
0.112508
289.116
150.515
0.854861
0.951852
0.949235
-153.887
0.417425
-375.453
-0.384091
-109.766
0.874886
-0.777843
0.476312




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gertrude Mary Cox' @ cox.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 & 2 seconds \tabularnewline
R Server & 'Gertrude Mary Cox' @ cox.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=271327&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gertrude Mary Cox' @ cox.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=271327&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=271327&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 time2 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net







Central Tendency - Ungrouped Data
MeasureValueS.E.Value/S.E.
Arithmetic Mean-17.035272237142930.6046876900571-0.556622972587212
Geometric MeanNaN
Harmonic Mean-1.17833188827858
Quadratic Mean179.26571170415
Winsorized Mean ( 1 / 11 )-17.021215094285730.1919408310714-0.56376684061227
Winsorized Mean ( 2 / 11 )-17.580586522857128.5927428435954-0.614861841657668
Winsorized Mean ( 3 / 11 )-15.532443665714325.8433186559955-0.601023571023098
Winsorized Mean ( 4 / 11 )-26.520786522857122.9237044728402-1.15691539097787
Winsorized Mean ( 5 / 11 )-22.278215094285721.50127470273-1.03613462003056
Winsorized Mean ( 6 / 11 )-21.172500808571420.5174470121711-1.03192667177411
Winsorized Mean ( 7 / 11 )-17.271900808571416.8225018619619-1.02671415644932
Winsorized Mean ( 8 / 11 )-14.388015094285715.8578849071673-0.907309844819388
Winsorized Mean ( 9 / 11 )-37.3295293810.810669461084-3.45302661545412
Winsorized Mean ( 10 / 11 )-33.68038652285718.83548306371401-3.81194624900334
Winsorized Mean ( 11 / 11 )0.1282734485714290.1336140142271040.960029898910166
Trimmed Mean ( 1 / 11 )-17.532197827272728.2985163787584-0.619544770213919
Trimmed Mean ( 2 / 11 )-18.10911381612925.5379637469452-0.709105627824192
Trimmed Mean ( 3 / 11 )-18.428052722.8335865431455-0.807059051593976
Trimmed Mean ( 4 / 11 )-19.679241788888920.6520536060541-0.952895153396268
Trimmed Mean ( 5 / 11 )-17.28470113219.0338356470906-0.908103939346669
Trimmed Mean ( 6 / 11 )-15.764936013043517.2513591635274-0.913837330937582
Trimmed Mean ( 7 / 11 )-14.262834680952414.7985897501351-0.963796883471422
Trimmed Mean ( 8 / 11 )-13.470975173684212.9045711595161-1.04389173473234
Trimmed Mean ( 9 / 11 )-13.23497225294129.90032473114251-1.33682203486813
Trimmed Mean ( 10 / 11 )-6.988235227.34420565333715-0.951530437716515
Trimmed Mean ( 11 / 11 )0.1981132076923080.1733659032124761.14274608802113
Median0.205298
Midrange-8.83599999999998
Midmean - Weighted Average at Xnp-20.1956960166667
Midmean - Weighted Average at X(n+1)p-13.4709751736842
Midmean - Empirical Distribution Function-13.4709751736842
Midmean - Empirical Distribution Function - Averaging-13.4709751736842
Midmean - Empirical Distribution Function - Interpolation-13.2349722529412
Midmean - Closest Observation-20.1956960166667
Midmean - True Basic - Statistics Graphics Toolkit-13.4709751736842
Midmean - MS Excel (old versions)-13.4709751736842
Number of observations35

\begin{tabular}{lllllllll}
\hline
Central Tendency - Ungrouped Data \tabularnewline
Measure & Value & S.E. & Value/S.E. \tabularnewline
Arithmetic Mean & -17.0352722371429 & 30.6046876900571 & -0.556622972587212 \tabularnewline
Geometric Mean & NaN &  &  \tabularnewline
Harmonic Mean & -1.17833188827858 &  &  \tabularnewline
Quadratic Mean & 179.26571170415 &  &  \tabularnewline
Winsorized Mean ( 1 / 11 ) & -17.0212150942857 & 30.1919408310714 & -0.56376684061227 \tabularnewline
Winsorized Mean ( 2 / 11 ) & -17.5805865228571 & 28.5927428435954 & -0.614861841657668 \tabularnewline
Winsorized Mean ( 3 / 11 ) & -15.5324436657143 & 25.8433186559955 & -0.601023571023098 \tabularnewline
Winsorized Mean ( 4 / 11 ) & -26.5207865228571 & 22.9237044728402 & -1.15691539097787 \tabularnewline
Winsorized Mean ( 5 / 11 ) & -22.2782150942857 & 21.50127470273 & -1.03613462003056 \tabularnewline
Winsorized Mean ( 6 / 11 ) & -21.1725008085714 & 20.5174470121711 & -1.03192667177411 \tabularnewline
Winsorized Mean ( 7 / 11 ) & -17.2719008085714 & 16.8225018619619 & -1.02671415644932 \tabularnewline
Winsorized Mean ( 8 / 11 ) & -14.3880150942857 & 15.8578849071673 & -0.907309844819388 \tabularnewline
Winsorized Mean ( 9 / 11 ) & -37.32952938 & 10.810669461084 & -3.45302661545412 \tabularnewline
Winsorized Mean ( 10 / 11 ) & -33.6803865228571 & 8.83548306371401 & -3.81194624900334 \tabularnewline
Winsorized Mean ( 11 / 11 ) & 0.128273448571429 & 0.133614014227104 & 0.960029898910166 \tabularnewline
Trimmed Mean ( 1 / 11 ) & -17.5321978272727 & 28.2985163787584 & -0.619544770213919 \tabularnewline
Trimmed Mean ( 2 / 11 ) & -18.109113816129 & 25.5379637469452 & -0.709105627824192 \tabularnewline
Trimmed Mean ( 3 / 11 ) & -18.4280527 & 22.8335865431455 & -0.807059051593976 \tabularnewline
Trimmed Mean ( 4 / 11 ) & -19.6792417888889 & 20.6520536060541 & -0.952895153396268 \tabularnewline
Trimmed Mean ( 5 / 11 ) & -17.284701132 & 19.0338356470906 & -0.908103939346669 \tabularnewline
Trimmed Mean ( 6 / 11 ) & -15.7649360130435 & 17.2513591635274 & -0.913837330937582 \tabularnewline
Trimmed Mean ( 7 / 11 ) & -14.2628346809524 & 14.7985897501351 & -0.963796883471422 \tabularnewline
Trimmed Mean ( 8 / 11 ) & -13.4709751736842 & 12.9045711595161 & -1.04389173473234 \tabularnewline
Trimmed Mean ( 9 / 11 ) & -13.2349722529412 & 9.90032473114251 & -1.33682203486813 \tabularnewline
Trimmed Mean ( 10 / 11 ) & -6.98823522 & 7.34420565333715 & -0.951530437716515 \tabularnewline
Trimmed Mean ( 11 / 11 ) & 0.198113207692308 & 0.173365903212476 & 1.14274608802113 \tabularnewline
Median & 0.205298 &  &  \tabularnewline
Midrange & -8.83599999999998 &  &  \tabularnewline
Midmean - Weighted Average at Xnp & -20.1956960166667 &  &  \tabularnewline
Midmean - Weighted Average at X(n+1)p & -13.4709751736842 &  &  \tabularnewline
Midmean - Empirical Distribution Function & -13.4709751736842 &  &  \tabularnewline
Midmean - Empirical Distribution Function - Averaging & -13.4709751736842 &  &  \tabularnewline
Midmean - Empirical Distribution Function - Interpolation & -13.2349722529412 &  &  \tabularnewline
Midmean - Closest Observation & -20.1956960166667 &  &  \tabularnewline
Midmean - True Basic - Statistics Graphics Toolkit & -13.4709751736842 &  &  \tabularnewline
Midmean - MS Excel (old versions) & -13.4709751736842 &  &  \tabularnewline
Number of observations & 35 &  &  \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=271327&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]-17.0352722371429[/C][C]30.6046876900571[/C][C]-0.556622972587212[/C][/ROW]
[ROW][C]Geometric Mean[/C][C]NaN[/C][C][/C][C][/C][/ROW]
[ROW][C]Harmonic Mean[/C][C]-1.17833188827858[/C][C][/C][C][/C][/ROW]
[ROW][C]Quadratic Mean[/C][C]179.26571170415[/C][C][/C][C][/C][/ROW]
[ROW][C]Winsorized Mean ( 1 / 11 )[/C][C]-17.0212150942857[/C][C]30.1919408310714[/C][C]-0.56376684061227[/C][/ROW]
[ROW][C]Winsorized Mean ( 2 / 11 )[/C][C]-17.5805865228571[/C][C]28.5927428435954[/C][C]-0.614861841657668[/C][/ROW]
[ROW][C]Winsorized Mean ( 3 / 11 )[/C][C]-15.5324436657143[/C][C]25.8433186559955[/C][C]-0.601023571023098[/C][/ROW]
[ROW][C]Winsorized Mean ( 4 / 11 )[/C][C]-26.5207865228571[/C][C]22.9237044728402[/C][C]-1.15691539097787[/C][/ROW]
[ROW][C]Winsorized Mean ( 5 / 11 )[/C][C]-22.2782150942857[/C][C]21.50127470273[/C][C]-1.03613462003056[/C][/ROW]
[ROW][C]Winsorized Mean ( 6 / 11 )[/C][C]-21.1725008085714[/C][C]20.5174470121711[/C][C]-1.03192667177411[/C][/ROW]
[ROW][C]Winsorized Mean ( 7 / 11 )[/C][C]-17.2719008085714[/C][C]16.8225018619619[/C][C]-1.02671415644932[/C][/ROW]
[ROW][C]Winsorized Mean ( 8 / 11 )[/C][C]-14.3880150942857[/C][C]15.8578849071673[/C][C]-0.907309844819388[/C][/ROW]
[ROW][C]Winsorized Mean ( 9 / 11 )[/C][C]-37.32952938[/C][C]10.810669461084[/C][C]-3.45302661545412[/C][/ROW]
[ROW][C]Winsorized Mean ( 10 / 11 )[/C][C]-33.6803865228571[/C][C]8.83548306371401[/C][C]-3.81194624900334[/C][/ROW]
[ROW][C]Winsorized Mean ( 11 / 11 )[/C][C]0.128273448571429[/C][C]0.133614014227104[/C][C]0.960029898910166[/C][/ROW]
[ROW][C]Trimmed Mean ( 1 / 11 )[/C][C]-17.5321978272727[/C][C]28.2985163787584[/C][C]-0.619544770213919[/C][/ROW]
[ROW][C]Trimmed Mean ( 2 / 11 )[/C][C]-18.109113816129[/C][C]25.5379637469452[/C][C]-0.709105627824192[/C][/ROW]
[ROW][C]Trimmed Mean ( 3 / 11 )[/C][C]-18.4280527[/C][C]22.8335865431455[/C][C]-0.807059051593976[/C][/ROW]
[ROW][C]Trimmed Mean ( 4 / 11 )[/C][C]-19.6792417888889[/C][C]20.6520536060541[/C][C]-0.952895153396268[/C][/ROW]
[ROW][C]Trimmed Mean ( 5 / 11 )[/C][C]-17.284701132[/C][C]19.0338356470906[/C][C]-0.908103939346669[/C][/ROW]
[ROW][C]Trimmed Mean ( 6 / 11 )[/C][C]-15.7649360130435[/C][C]17.2513591635274[/C][C]-0.913837330937582[/C][/ROW]
[ROW][C]Trimmed Mean ( 7 / 11 )[/C][C]-14.2628346809524[/C][C]14.7985897501351[/C][C]-0.963796883471422[/C][/ROW]
[ROW][C]Trimmed Mean ( 8 / 11 )[/C][C]-13.4709751736842[/C][C]12.9045711595161[/C][C]-1.04389173473234[/C][/ROW]
[ROW][C]Trimmed Mean ( 9 / 11 )[/C][C]-13.2349722529412[/C][C]9.90032473114251[/C][C]-1.33682203486813[/C][/ROW]
[ROW][C]Trimmed Mean ( 10 / 11 )[/C][C]-6.98823522[/C][C]7.34420565333715[/C][C]-0.951530437716515[/C][/ROW]
[ROW][C]Trimmed Mean ( 11 / 11 )[/C][C]0.198113207692308[/C][C]0.173365903212476[/C][C]1.14274608802113[/C][/ROW]
[ROW][C]Median[/C][C]0.205298[/C][C][/C][C][/C][/ROW]
[ROW][C]Midrange[/C][C]-8.83599999999998[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Weighted Average at Xnp[/C][C]-20.1956960166667[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Weighted Average at X(n+1)p[/C][C]-13.4709751736842[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function[/C][C]-13.4709751736842[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function - Averaging[/C][C]-13.4709751736842[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function - Interpolation[/C][C]-13.2349722529412[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Closest Observation[/C][C]-20.1956960166667[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - True Basic - Statistics Graphics Toolkit[/C][C]-13.4709751736842[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - MS Excel (old versions)[/C][C]-13.4709751736842[/C][C][/C][C][/C][/ROW]
[ROW][C]Number of observations[/C][C]35[/C][C][/C][C][/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=271327&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=271327&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 Mean-17.035272237142930.6046876900571-0.556622972587212
Geometric MeanNaN
Harmonic Mean-1.17833188827858
Quadratic Mean179.26571170415
Winsorized Mean ( 1 / 11 )-17.021215094285730.1919408310714-0.56376684061227
Winsorized Mean ( 2 / 11 )-17.580586522857128.5927428435954-0.614861841657668
Winsorized Mean ( 3 / 11 )-15.532443665714325.8433186559955-0.601023571023098
Winsorized Mean ( 4 / 11 )-26.520786522857122.9237044728402-1.15691539097787
Winsorized Mean ( 5 / 11 )-22.278215094285721.50127470273-1.03613462003056
Winsorized Mean ( 6 / 11 )-21.172500808571420.5174470121711-1.03192667177411
Winsorized Mean ( 7 / 11 )-17.271900808571416.8225018619619-1.02671415644932
Winsorized Mean ( 8 / 11 )-14.388015094285715.8578849071673-0.907309844819388
Winsorized Mean ( 9 / 11 )-37.3295293810.810669461084-3.45302661545412
Winsorized Mean ( 10 / 11 )-33.68038652285718.83548306371401-3.81194624900334
Winsorized Mean ( 11 / 11 )0.1282734485714290.1336140142271040.960029898910166
Trimmed Mean ( 1 / 11 )-17.532197827272728.2985163787584-0.619544770213919
Trimmed Mean ( 2 / 11 )-18.10911381612925.5379637469452-0.709105627824192
Trimmed Mean ( 3 / 11 )-18.428052722.8335865431455-0.807059051593976
Trimmed Mean ( 4 / 11 )-19.679241788888920.6520536060541-0.952895153396268
Trimmed Mean ( 5 / 11 )-17.28470113219.0338356470906-0.908103939346669
Trimmed Mean ( 6 / 11 )-15.764936013043517.2513591635274-0.913837330937582
Trimmed Mean ( 7 / 11 )-14.262834680952414.7985897501351-0.963796883471422
Trimmed Mean ( 8 / 11 )-13.470975173684212.9045711595161-1.04389173473234
Trimmed Mean ( 9 / 11 )-13.23497225294129.90032473114251-1.33682203486813
Trimmed Mean ( 10 / 11 )-6.988235227.34420565333715-0.951530437716515
Trimmed Mean ( 11 / 11 )0.1981132076923080.1733659032124761.14274608802113
Median0.205298
Midrange-8.83599999999998
Midmean - Weighted Average at Xnp-20.1956960166667
Midmean - Weighted Average at X(n+1)p-13.4709751736842
Midmean - Empirical Distribution Function-13.4709751736842
Midmean - Empirical Distribution Function - Averaging-13.4709751736842
Midmean - Empirical Distribution Function - Interpolation-13.2349722529412
Midmean - Closest Observation-20.1956960166667
Midmean - True Basic - Statistics Graphics Toolkit-13.4709751736842
Midmean - MS Excel (old versions)-13.4709751736842
Number of observations35



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