med2way: A two-way ANOVA for medians.

Description Usage Arguments Details Value References See Also Examples

View source: R/med2way.R

Description

This function computes a two-way ANOVA medians with interactions effects.

Usage

1

Arguments

formula

an object of class formula.

data

an optional data frame for the input data.

...

currently ignored.

Details

There should not be too many ties in the data. The test statistics for the main effects in med2way are F-distributed, the (heteroscedastic) test for the interaction is chi-square distributed. Post hoc tests can be performed using mcp2a.

Value

Returns an object of class t2way containing:

Qa

first main effect

A.p.value

p-value first main effect

Qb

second main effect

B.p.value

p-value second main effect

Qab

interaction effect

AB.p.value

p-value interaction effect

call

function call

varnames

variable names

dim

design dimensions

References

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

See Also

t2way, med1way

Examples

1
2
med2way(attractiveness ~ gender*alcohol, data = goggles)
mcp2a(attractiveness ~ gender*alcohol, data = goggles, est = "median")

Example output

Call:
med2way(formula = attractiveness ~ gender * alcohol, data = goggles)

                value p.value
gender         0.5587  0.4548
alcohol        9.1983  0.0001
gender:alcohol 9.6640  0.0080

Call:
mcp2a(formula = attractiveness ~ gender * alcohol, data = goggles, 
    est = "median")

                 psihat ci.lower ci.upper p-value
gender1            10.0    -10.0     27.5 0.17863
alcohol1           -2.5    -20.0     12.5 0.38898
alcohol2           40.0     20.0     52.5 0.00000
alcohol3           42.5     20.0     52.5 0.00000
gender1:alcohol1   -2.5    -20.0     12.5 0.24708
gender1:alcohol2  -30.0    -42.5    -12.5 0.00000
gender1:alcohol3  -27.5    -42.5    -10.0 0.00000

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

Related to med2way in WRS2...