binband: Comparison of discrete distributions

Description Usage Arguments Value References See Also Examples

Description

binband compares two independent variables in terms of their probability function. discANOVA Tests the global hypothesis that for two or more independent groups, the corresponding discrete distributions are identical. That is, test the hypothesis that independent groups have identical multinomial distributions. discmcp provides multiple comparisons for J independent groups having discrete distributions. discstep implements the step-down multiple comparison procedure for comparing J independent discrete random variables.

Usage

1
2
3
4
binband(x, y, KMS = FALSE, alpha = 0.05, ADJ.P = FALSE)
discANOVA(formula, data, nboot = 500)
discmcp(formula, data, alpha = 0.05, nboot = 500)
discstep(formula, data, nboot = 500, alpha = 0.05)

Arguments

x

an numeric vector of data values for group 1.

y

an numeric vector of data values for group 2.

formula

an object of class formula.

data

an optional data frame for the input data.

nboot

number of bootstrap samples.

alpha

alpha level.

KMS

whether the Kulinskaya-Morgenthaler-Staudte method for comparing binomials should be used.

ADJ.P

whether the critical p-value should be adjusted to control FWE when the sample size is small (<50)

Value

discANOVA returns an object of class "med1way" containing:

test

value of the test statistic

crit.val

critical value

p.value

p-value

call

function call

The remaining functions return an object of class "robtab" containing:

partable

parameter table

References

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

Kulinskaya, E., Morgenthaler, S. and Staudte, R. (2010). Variance stabilizing the difference of two binomial proportions. American Statistician, 64, p. 350-356.

See Also

t1way, Qanova

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Consider a study aimed at comparing two methods for reducing shoulder pain after surgery. 
## For the first method, the shoulder pain measures are:
x1 <- c(2, 4, 4, 2, 2, 2, 4, 3, 2, 4, 2, 3, 2, 4, 3, 2, 2, 3, 5, 5, 2, 2)
## and for the second method they are:
x2 <- c(5, 1, 4, 4, 2, 3, 3, 1, 1, 1, 1, 2, 2, 1, 1, 5, 3, 5)

fit1 <- binband(x1, x2)
fit1

fit2 <- binband(x1, x2, KMS = TRUE, alpha = 0.01)
fit2

## More than two groups: 
discANOVA(libido ~ dose, viagra, nboot = 200)

## Multiple comparisons:
discmcp(libido ~ dose, viagra)

discstep(libido ~ dose, viagra)

WRS2 documentation built on May 2, 2019, 4:46 p.m.