The mean and other location measures

TODO

  • link to npWilcoxon for wilcox.test()

Install required packages

DescTools, modeest, robustbase

Mean, weighted mean, geometric mean, harmonic mean, and mode

Mean

[1] 24.33333

Weighted mean

[1] 23.7037

Geometric mean

[1] 23.86509

Harmonic mean

[1] 23.38384

Mode

[1] 33
[1] 33

Robust location measures

Median

[1] 24

Quantiles

Default: Quartiles

   0%   25%   50%   75%  100% 
17.00 21.50 24.00 28.75 30.00 
 25%  50% 
21.5 24.0 

Set probabilities with option probs

33.33333% 66.66667% 
 22.33333  26.66667 

Trimmed mean

[1] 24.75

Winsorized mean

[1] 21 30 30 25 23 21
[1] 25

Huber-\(M\) estimator

[1] 24.33333

Hodges-Lehmann estimator (pseudo-median)

     est   lwr.ci   upr.ci 
23.99998 20.99997 27.50005 

Hodges-Lehmann estimator of difference between two location parameters

difference in location 
             -11.53899 

Detach (automatically) loaded packages (if possible)

Get the article source from GitHub

R markdown - markdown - R code - all posts