R: Independent samples t-tests on robust location measures...

yuen {WRS2} | R Documentation

## Independent samples t-tests on robust location measures including effect sizes.

### Description

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 t-test based on various robust estimators, `medpb2` compares two independent groups using medians, and `qcomhd` compares arbitrary quantiles.

### Usage

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

### Arguments

`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` | `side = TRUE` indicates two-sided method using absolute value of the test statistics within the bootstrap; otherwise the equal-tailed method is used.
`est` | estimate to be used for the group comparisons: either `"onestep"` for one-step M-estimator of location using Huber's Psi, `"mom"` for the modified one-step (MOM) estimator of location based on Huber's Psi, or `"median"`, `"mean"`.
`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.

### Details

If `yuenbt` is used, p-value computed only when `side = TRUE`. `medpb2` is just a wrapper function for `pb2gen` with the median as M-estimator. It is the only known method to work well in simulations when tied values are likely to occur.`qcomhd` returns p-values and critical p-values based on Hochberg's method.

### Value

Returns objects of classes `"yuen"` or `"pb2"` containing:

`test` | value of the test statistic (t-statistic)
`p.value` | p-value
`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

### References

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 xase. Psychological Methods, 10, 317-328.

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, 1359-1368.

Yuen, K. K. (1974). The two sample trimmed t for unequal population variances. Biometrika, 61, 165-170.

### See Also

`t1way`,`t1waybt`

### Examples

    ## 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 M-estimator
    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)

[Package WRS2 version 0.9-2 Index]