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 computationWed, 21 Oct 2009 11:31:55 -0600
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2009/Oct/21/t1256146401xfvvxgpu2hl0dk0.htm/, Retrieved Thu, 02 May 2024 02:27:39 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=49526, Retrieved Thu, 02 May 2024 02:27:39 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsWorkshop 3, Part 3
Estimated Impact94
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Bivariate Data Series] [Bivariate dataset] [2008-01-05 23:51:08] [74be16979710d4c4e7c6647856088456]
F RMPD  [Univariate Explorative Data Analysis] [Colombia Coffee] [2008-01-07 14:21:11] [74be16979710d4c4e7c6647856088456]
F RMPD    [Univariate Data Series] [] [2009-10-14 08:30:28] [74be16979710d4c4e7c6647856088456]
-   PD      [Univariate Data Series] [Workshop 3, Part ...] [2009-10-21 16:48:55] [aba88da643e3763d32ff92bd8f92a385]
- RM D          [Central Tendency] [Workshop 3, Part 3] [2009-10-21 17:31:55] [a53416c107f5e7e1e12bb9940270d09d] [Current]
Feedback Forum

Post a new message
Dataseries X:
-6,54
-6,48
-6,47
-6,48
-6,52
-6,53
-6,54
-6,53
-6,54
-6,57
-6,62
-6,63
-6,61
-6,58
-6,53
-6,52
-6,53
-6,54
-6,53
-6,53
-6,51
-6,56
-6,61
-6,62
-6,60
-6,55
-6,51
-6,50
-6,49
-6,48
-6,46
-6,44
-6,47
-6,54
-6,65
-6,69




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'George Udny Yule' @ 72.249.76.132

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

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







Central Tendency - Ungrouped Data
MeasureValueS.E.Value/S.E.
Arithmetic Mean-6.541666666666670.00959910710133277-681.486996405989
Geometric MeanNaN
Harmonic Mean-6.54117605094184
Quadratic Mean6.541913158838
Winsorized Mean ( 1 / 12 )-6.541111111111110.00900421222220492-726.450126861775
Winsorized Mean ( 2 / 12 )-6.540555555555550.00850718132161298-768.827571470577
Winsorized Mean ( 3 / 12 )-6.539722222222220.00826626449781251-791.13391834399
Winsorized Mean ( 4 / 12 )-6.540833333333330.00801164826590058-816.415438652322
Winsorized Mean ( 5 / 12 )-6.539444444444450.00763185101478118-856.862172987787
Winsorized Mean ( 6 / 12 )-6.539444444444440.00763185101478118-856.862172987786
Winsorized Mean ( 7 / 12 )-6.539444444444440.00670162790510506-975.799393377679
Winsorized Mean ( 8 / 12 )-6.537222222222220.00512713155225655-1275.02525644092
Winsorized Mean ( 9 / 12 )-6.537222222222220.00403577476504139-1619.81839988912
Winsorized Mean ( 10 / 12 )-6.534444444444440.0034143591381861-1913.81286501569
Winsorized Mean ( 11 / 12 )-6.534444444444440.00216187912252005-3022.576228419
Winsorized Mean ( 12 / 12 )-6.531111111111110.00153156097245450-4264.34939814656
Trimmed Mean ( 1 / 12 )-6.540294117647060.0086369154859753-757.248826651973
Trimmed Mean ( 2 / 12 )-6.5393750.00810636821549338-806.696022949162
Trimmed Mean ( 3 / 12 )-6.538666666666670.00774200861004479-844.569800424032
Trimmed Mean ( 4 / 12 )-6.538214285714290.0073472733924807-889.883081308175
Trimmed Mean ( 5 / 12 )-6.53730769230770.00687375593908157-951.05321606475
Trimmed Mean ( 6 / 12 )-6.536666666666670.0063321890652039-1032.29177135383
Trimmed Mean ( 7 / 12 )-6.535909090909090.00541199129195485-1207.67176780661
Trimmed Mean ( 8 / 12 )-6.5350.00438298144141514-1490.99422102276
Trimmed Mean ( 9 / 12 )-6.534444444444440.00363553829677737-1797.38017069900
Trimmed Mean ( 10 / 12 )-6.533750.00301039864469807-2170.39361597749
Trimmed Mean ( 11 / 12 )-6.533571428571430.00225006540982894-2903.72510951499
Trimmed Mean ( 12 / 12 )-6.533333333333330.00188025358272590-3474.70862087743
Median-6.53
Midrange-6.565
Midmean - Weighted Average at Xnp-6.53684210526316
Midmean - Weighted Average at X(n+1)p-6.53444444444444
Midmean - Empirical Distribution Function-6.53684210526316
Midmean - Empirical Distribution Function - Averaging-6.53444444444444
Midmean - Empirical Distribution Function - Interpolation-6.53444444444444
Midmean - Closest Observation-6.53684210526316
Midmean - True Basic - Statistics Graphics Toolkit-6.53444444444444
Midmean - MS Excel (old versions)-6.535
Number of observations36

\begin{tabular}{lllllllll}
\hline
Central Tendency - Ungrouped Data \tabularnewline
Measure & Value & S.E. & Value/S.E. \tabularnewline
Arithmetic Mean & -6.54166666666667 & 0.00959910710133277 & -681.486996405989 \tabularnewline
Geometric Mean & NaN &  &  \tabularnewline
Harmonic Mean & -6.54117605094184 &  &  \tabularnewline
Quadratic Mean & 6.541913158838 &  &  \tabularnewline
Winsorized Mean ( 1 / 12 ) & -6.54111111111111 & 0.00900421222220492 & -726.450126861775 \tabularnewline
Winsorized Mean ( 2 / 12 ) & -6.54055555555555 & 0.00850718132161298 & -768.827571470577 \tabularnewline
Winsorized Mean ( 3 / 12 ) & -6.53972222222222 & 0.00826626449781251 & -791.13391834399 \tabularnewline
Winsorized Mean ( 4 / 12 ) & -6.54083333333333 & 0.00801164826590058 & -816.415438652322 \tabularnewline
Winsorized Mean ( 5 / 12 ) & -6.53944444444445 & 0.00763185101478118 & -856.862172987787 \tabularnewline
Winsorized Mean ( 6 / 12 ) & -6.53944444444444 & 0.00763185101478118 & -856.862172987786 \tabularnewline
Winsorized Mean ( 7 / 12 ) & -6.53944444444444 & 0.00670162790510506 & -975.799393377679 \tabularnewline
Winsorized Mean ( 8 / 12 ) & -6.53722222222222 & 0.00512713155225655 & -1275.02525644092 \tabularnewline
Winsorized Mean ( 9 / 12 ) & -6.53722222222222 & 0.00403577476504139 & -1619.81839988912 \tabularnewline
Winsorized Mean ( 10 / 12 ) & -6.53444444444444 & 0.0034143591381861 & -1913.81286501569 \tabularnewline
Winsorized Mean ( 11 / 12 ) & -6.53444444444444 & 0.00216187912252005 & -3022.576228419 \tabularnewline
Winsorized Mean ( 12 / 12 ) & -6.53111111111111 & 0.00153156097245450 & -4264.34939814656 \tabularnewline
Trimmed Mean ( 1 / 12 ) & -6.54029411764706 & 0.0086369154859753 & -757.248826651973 \tabularnewline
Trimmed Mean ( 2 / 12 ) & -6.539375 & 0.00810636821549338 & -806.696022949162 \tabularnewline
Trimmed Mean ( 3 / 12 ) & -6.53866666666667 & 0.00774200861004479 & -844.569800424032 \tabularnewline
Trimmed Mean ( 4 / 12 ) & -6.53821428571429 & 0.0073472733924807 & -889.883081308175 \tabularnewline
Trimmed Mean ( 5 / 12 ) & -6.5373076923077 & 0.00687375593908157 & -951.05321606475 \tabularnewline
Trimmed Mean ( 6 / 12 ) & -6.53666666666667 & 0.0063321890652039 & -1032.29177135383 \tabularnewline
Trimmed Mean ( 7 / 12 ) & -6.53590909090909 & 0.00541199129195485 & -1207.67176780661 \tabularnewline
Trimmed Mean ( 8 / 12 ) & -6.535 & 0.00438298144141514 & -1490.99422102276 \tabularnewline
Trimmed Mean ( 9 / 12 ) & -6.53444444444444 & 0.00363553829677737 & -1797.38017069900 \tabularnewline
Trimmed Mean ( 10 / 12 ) & -6.53375 & 0.00301039864469807 & -2170.39361597749 \tabularnewline
Trimmed Mean ( 11 / 12 ) & -6.53357142857143 & 0.00225006540982894 & -2903.72510951499 \tabularnewline
Trimmed Mean ( 12 / 12 ) & -6.53333333333333 & 0.00188025358272590 & -3474.70862087743 \tabularnewline
Median & -6.53 &  &  \tabularnewline
Midrange & -6.565 &  &  \tabularnewline
Midmean - Weighted Average at Xnp & -6.53684210526316 &  &  \tabularnewline
Midmean - Weighted Average at X(n+1)p & -6.53444444444444 &  &  \tabularnewline
Midmean - Empirical Distribution Function & -6.53684210526316 &  &  \tabularnewline
Midmean - Empirical Distribution Function - Averaging & -6.53444444444444 &  &  \tabularnewline
Midmean - Empirical Distribution Function - Interpolation & -6.53444444444444 &  &  \tabularnewline
Midmean - Closest Observation & -6.53684210526316 &  &  \tabularnewline
Midmean - True Basic - Statistics Graphics Toolkit & -6.53444444444444 &  &  \tabularnewline
Midmean - MS Excel (old versions) & -6.535 &  &  \tabularnewline
Number of observations & 36 &  &  \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=49526&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]-6.54166666666667[/C][C]0.00959910710133277[/C][C]-681.486996405989[/C][/ROW]
[ROW][C]Geometric Mean[/C][C]NaN[/C][C][/C][C][/C][/ROW]
[ROW][C]Harmonic Mean[/C][C]-6.54117605094184[/C][C][/C][C][/C][/ROW]
[ROW][C]Quadratic Mean[/C][C]6.541913158838[/C][C][/C][C][/C][/ROW]
[ROW][C]Winsorized Mean ( 1 / 12 )[/C][C]-6.54111111111111[/C][C]0.00900421222220492[/C][C]-726.450126861775[/C][/ROW]
[ROW][C]Winsorized Mean ( 2 / 12 )[/C][C]-6.54055555555555[/C][C]0.00850718132161298[/C][C]-768.827571470577[/C][/ROW]
[ROW][C]Winsorized Mean ( 3 / 12 )[/C][C]-6.53972222222222[/C][C]0.00826626449781251[/C][C]-791.13391834399[/C][/ROW]
[ROW][C]Winsorized Mean ( 4 / 12 )[/C][C]-6.54083333333333[/C][C]0.00801164826590058[/C][C]-816.415438652322[/C][/ROW]
[ROW][C]Winsorized Mean ( 5 / 12 )[/C][C]-6.53944444444445[/C][C]0.00763185101478118[/C][C]-856.862172987787[/C][/ROW]
[ROW][C]Winsorized Mean ( 6 / 12 )[/C][C]-6.53944444444444[/C][C]0.00763185101478118[/C][C]-856.862172987786[/C][/ROW]
[ROW][C]Winsorized Mean ( 7 / 12 )[/C][C]-6.53944444444444[/C][C]0.00670162790510506[/C][C]-975.799393377679[/C][/ROW]
[ROW][C]Winsorized Mean ( 8 / 12 )[/C][C]-6.53722222222222[/C][C]0.00512713155225655[/C][C]-1275.02525644092[/C][/ROW]
[ROW][C]Winsorized Mean ( 9 / 12 )[/C][C]-6.53722222222222[/C][C]0.00403577476504139[/C][C]-1619.81839988912[/C][/ROW]
[ROW][C]Winsorized Mean ( 10 / 12 )[/C][C]-6.53444444444444[/C][C]0.0034143591381861[/C][C]-1913.81286501569[/C][/ROW]
[ROW][C]Winsorized Mean ( 11 / 12 )[/C][C]-6.53444444444444[/C][C]0.00216187912252005[/C][C]-3022.576228419[/C][/ROW]
[ROW][C]Winsorized Mean ( 12 / 12 )[/C][C]-6.53111111111111[/C][C]0.00153156097245450[/C][C]-4264.34939814656[/C][/ROW]
[ROW][C]Trimmed Mean ( 1 / 12 )[/C][C]-6.54029411764706[/C][C]0.0086369154859753[/C][C]-757.248826651973[/C][/ROW]
[ROW][C]Trimmed Mean ( 2 / 12 )[/C][C]-6.539375[/C][C]0.00810636821549338[/C][C]-806.696022949162[/C][/ROW]
[ROW][C]Trimmed Mean ( 3 / 12 )[/C][C]-6.53866666666667[/C][C]0.00774200861004479[/C][C]-844.569800424032[/C][/ROW]
[ROW][C]Trimmed Mean ( 4 / 12 )[/C][C]-6.53821428571429[/C][C]0.0073472733924807[/C][C]-889.883081308175[/C][/ROW]
[ROW][C]Trimmed Mean ( 5 / 12 )[/C][C]-6.5373076923077[/C][C]0.00687375593908157[/C][C]-951.05321606475[/C][/ROW]
[ROW][C]Trimmed Mean ( 6 / 12 )[/C][C]-6.53666666666667[/C][C]0.0063321890652039[/C][C]-1032.29177135383[/C][/ROW]
[ROW][C]Trimmed Mean ( 7 / 12 )[/C][C]-6.53590909090909[/C][C]0.00541199129195485[/C][C]-1207.67176780661[/C][/ROW]
[ROW][C]Trimmed Mean ( 8 / 12 )[/C][C]-6.535[/C][C]0.00438298144141514[/C][C]-1490.99422102276[/C][/ROW]
[ROW][C]Trimmed Mean ( 9 / 12 )[/C][C]-6.53444444444444[/C][C]0.00363553829677737[/C][C]-1797.38017069900[/C][/ROW]
[ROW][C]Trimmed Mean ( 10 / 12 )[/C][C]-6.53375[/C][C]0.00301039864469807[/C][C]-2170.39361597749[/C][/ROW]
[ROW][C]Trimmed Mean ( 11 / 12 )[/C][C]-6.53357142857143[/C][C]0.00225006540982894[/C][C]-2903.72510951499[/C][/ROW]
[ROW][C]Trimmed Mean ( 12 / 12 )[/C][C]-6.53333333333333[/C][C]0.00188025358272590[/C][C]-3474.70862087743[/C][/ROW]
[ROW][C]Median[/C][C]-6.53[/C][C][/C][C][/C][/ROW]
[ROW][C]Midrange[/C][C]-6.565[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Weighted Average at Xnp[/C][C]-6.53684210526316[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Weighted Average at X(n+1)p[/C][C]-6.53444444444444[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function[/C][C]-6.53684210526316[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function - Averaging[/C][C]-6.53444444444444[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function - Interpolation[/C][C]-6.53444444444444[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Closest Observation[/C][C]-6.53684210526316[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - True Basic - Statistics Graphics Toolkit[/C][C]-6.53444444444444[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - MS Excel (old versions)[/C][C]-6.535[/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=49526&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=49526&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-6.541666666666670.00959910710133277-681.486996405989
Geometric MeanNaN
Harmonic Mean-6.54117605094184
Quadratic Mean6.541913158838
Winsorized Mean ( 1 / 12 )-6.541111111111110.00900421222220492-726.450126861775
Winsorized Mean ( 2 / 12 )-6.540555555555550.00850718132161298-768.827571470577
Winsorized Mean ( 3 / 12 )-6.539722222222220.00826626449781251-791.13391834399
Winsorized Mean ( 4 / 12 )-6.540833333333330.00801164826590058-816.415438652322
Winsorized Mean ( 5 / 12 )-6.539444444444450.00763185101478118-856.862172987787
Winsorized Mean ( 6 / 12 )-6.539444444444440.00763185101478118-856.862172987786
Winsorized Mean ( 7 / 12 )-6.539444444444440.00670162790510506-975.799393377679
Winsorized Mean ( 8 / 12 )-6.537222222222220.00512713155225655-1275.02525644092
Winsorized Mean ( 9 / 12 )-6.537222222222220.00403577476504139-1619.81839988912
Winsorized Mean ( 10 / 12 )-6.534444444444440.0034143591381861-1913.81286501569
Winsorized Mean ( 11 / 12 )-6.534444444444440.00216187912252005-3022.576228419
Winsorized Mean ( 12 / 12 )-6.531111111111110.00153156097245450-4264.34939814656
Trimmed Mean ( 1 / 12 )-6.540294117647060.0086369154859753-757.248826651973
Trimmed Mean ( 2 / 12 )-6.5393750.00810636821549338-806.696022949162
Trimmed Mean ( 3 / 12 )-6.538666666666670.00774200861004479-844.569800424032
Trimmed Mean ( 4 / 12 )-6.538214285714290.0073472733924807-889.883081308175
Trimmed Mean ( 5 / 12 )-6.53730769230770.00687375593908157-951.05321606475
Trimmed Mean ( 6 / 12 )-6.536666666666670.0063321890652039-1032.29177135383
Trimmed Mean ( 7 / 12 )-6.535909090909090.00541199129195485-1207.67176780661
Trimmed Mean ( 8 / 12 )-6.5350.00438298144141514-1490.99422102276
Trimmed Mean ( 9 / 12 )-6.534444444444440.00363553829677737-1797.38017069900
Trimmed Mean ( 10 / 12 )-6.533750.00301039864469807-2170.39361597749
Trimmed Mean ( 11 / 12 )-6.533571428571430.00225006540982894-2903.72510951499
Trimmed Mean ( 12 / 12 )-6.533333333333330.00188025358272590-3474.70862087743
Median-6.53
Midrange-6.565
Midmean - Weighted Average at Xnp-6.53684210526316
Midmean - Weighted Average at X(n+1)p-6.53444444444444
Midmean - Empirical Distribution Function-6.53684210526316
Midmean - Empirical Distribution Function - Averaging-6.53444444444444
Midmean - Empirical Distribution Function - Interpolation-6.53444444444444
Midmean - Closest Observation-6.53684210526316
Midmean - True Basic - Statistics Graphics Toolkit-6.53444444444444
Midmean - MS Excel (old versions)-6.535
Number of observations36



Parameters (Session):
par1 = Werkloosheid ; par2 = Belgostat ; par3 = Werkloosheid Mannen E(t) ;
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')