yuend: Paired samples robust t-tests.

Description Usage Arguments Details Value References See Also Examples

View source: R/yuend.R

Description

The function yuend performs Yuen's test on trimmed means for dependent samples. Dqcomhd compares the quantiles of the marginal distributions associated with two dependent groups via hd estimator. Tied values are allowed. dep.effect computes various effect sizes and confidence intervals for two dependent samples (see Details).

Usage

1
2
3
yuend(x, y, tr = 0.2, ...)
Dqcomhd(x, y, q = c(1:9)/10, nboot = 1000, na.rm = TRUE, ...)
dep.effect(x, y, tr = 0.2, nboot = 1000, ...)

Arguments

x

an numeric vector of data values (e.g. for time 1).

y

an numeric vector of data values (e.g. for time 2).

tr

trim level for the means.

q

quantiles to be compared.

nboot

number of bootstrap samples.

na.rm

whether missing values should be removed.

...

currently ignored.

Details

The test statistic is a paired samples generalization of Yuen's independent samples t-test on trimmed means.

dep.effect computes the following effect sizes:

AKP: robust standardized difference similar to Cohen's d

QS: Quantile shift based on the median of the distribution of difference scores,

QStr: Quantile shift based on the trimmed mean of the distribution of X-Y

SIGN: P(X<Y), probability that for a random pair, the first is less than the second.

Value

yuend returns an object of class "yuen" 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

call

function call

Dqcomhd returns an object of class "robtab" containing:

partable

parameter table

dep.effect returns a matrix with the null value of the effect size, the estimated effect size, small/medium/large conventions, and lower/upper CI bounds.

References

Wilcox, R. (2012). Introduction to Robust Estimation and Hypothesis Testing (3rd ed.). Elsevier.

See Also

yuen, qcomhd

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Cholesterol data from Wilcox (2012, p. 197)
before <- c(190, 210, 300,240, 280, 170, 280, 250, 240, 220)
after <- c(210, 210, 340, 190, 260, 180, 200, 220, 230, 200)
yuend(before, after)

set.seed(123)
Dqcomhd(before, after, nboot = 200, q = c(0.25, 0.5, 0.75))

set.seed(123)
dep.effect(before, after)

Example output

Call:
yuend(x = before, y = after)

Test statistic: 1.9886 (df = 5), p-value = 0.10343

Trimmed mean difference:  28.33333 
95 percent confidence interval:
-8.2918     64.9585 

Explanatory measure of effect size: 0.52 

Call:
Dqcomhd(x = before, y = after, q = c(0.25, 0.5, 0.75), nboot = 200)

Parameter table: 
     q n1 n2     est1     est2 est1-est.2   ci.low   ci.up p.crit p.value
1 0.25 10 10 205.9676 196.4354     9.5322  -9.9688 36.4466 0.0500    0.43
2 0.50 10 10 238.8929 211.2158    27.6770   2.4674 47.3345 0.0167    0.03
3 0.75 10 10 271.0781 245.3351    25.7431 -20.9178 52.2341 0.0250    0.27

            NULL       Est    S    M    L     ci.low    ci.up
AKP          0.0 0.4331978 0.10 0.30 0.50 -0.2978559 2.071852
QS (median)  0.5 0.8000000 0.54 0.62 0.69  0.3000000 1.000000
QStr         0.5 0.7000000 0.54 0.62 0.69  0.4000000 1.000000
SIGN         0.5 0.3333333 0.46 0.38 0.31  0.0870000 0.619000

WRS2 documentation built on July 20, 2021, 9:06 a.m.

Related to yuend in WRS2...