yuen  R Documentation 
The function yuen
performs Yuen's test for trimmed means, yuenbt
is a bootstrap version of it. akp.effect
and yuen.effect.ci
can be used for effect size computation. The pb2gen
function performs a ttest based on various robust estimators, medpb2
compares two independent groups using medians, and qcomhd
compares arbitrary quantiles.
yuen(formula, data, tr = 0.2, ...)
yuenbt(formula, data, tr = 0.2, nboot = 599, side = TRUE, ...)
akp.effect(formula, data, EQVAR = TRUE, tr = 0.2, nboot = 200, alpha = 0.05, ...)
yuen.effect.ci(formula, data, tr = 0.2, nboot = 400, alpha = 0.05, ...)
pb2gen(formula, data, est = "mom", nboot = 599, ...)
medpb2(formula, data, nboot = 2000, ...)
qcomhd(formula, data, q = c(0.1, 0.25, 0.5, 0.75, 0.9),
nboot = 2000, alpha = 0.05, ADJ.CI = TRUE, ...)
formula 
an object of class formula. 
data 
an optional data frame for the input data. 
tr 
trim level for the mean. 
nboot 
number of bootstrap samples. 
side 

est 
estimate to be used for the group comparisons: either 
q 
quantiles to be used for comparison. 
alpha 
alpha level. 
ADJ.CI 
whether CIs should be adjusted. 
EQVAR 
whether variances are assumed to be equal across groups. 
... 
currently ignored. 
If yuenbt
is used, pvalue computed only when side = TRUE
. medpb2
is just a wrapper function for pb2gen
with the median
as Mestimator. It is the only known method to work well in simulations when tied values are likely to occur.qcomhd
returns pvalues and critical pvalues based on Hochberg's method.
Returns objects of classes "yuen"
or "pb2"
containing:
test 
value of the test statistic (tstatistic) 
p.value 
pvalue 
conf.int 
confidence interval 
df 
degress of freedom 
diff 
trimmed mean difference 
effsize 
explanatory measure of effect size 
call 
function call 
qcomhd
returns an object of class "robtab"
containing:
partable 
parameter table 
Algina, J., Keselman, H.J., & Penfield, R.D. (2005). An alternative to Cohen's standardized mean difference effect size: A robust parameter and confidence interval in the two independent groups case. Psychological Methods, 10, 317328.
Wilcox, R. (2012). Introduction to Robust Estimation and Hypothesis Testing (3rd ed.). Elsevier.
Wilcox, R., & Tian, T. (2011). Measuring effect size: A robust heteroscedastic approach for two or more groups. Journal of Applied Statistics, 38, 13591368.
Yuen, K. K. (1974). The two sample trimmed t for unequal population variances. Biometrika, 61, 165170.
t1way
,t1waybt
set.seed(123)
## Yuen's test
yuen(Anxiety ~ Group, data = spider)
## Bootstrap version of Yuen's test (symmetric CIs)
yuenbt(Anxiety ~ Group, data = spider)
## Robust Cohen's delta
akp.effect(Anxiety ~ Group, data = spider)
## Using an Mestimator
pb2gen(Anxiety ~ Group, data = spider, est = "mom")
pb2gen(Anxiety ~ Group, data = spider, est = "mean")
pb2gen(Anxiety ~ Group, data = spider, est = "median")
## Using the median
medpb2(Anxiety ~ Group, data = spider)
## Quantiles
set.seed(123)
qcomhd(Anxiety ~ Group, data = spider, q = c(0.8, 0.85, 0.9), nboot = 500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.