Calculate Quade's statistic and one-sided p-value.

Share:

Description

Calculates Quade's statistic and exact one-sided p-value for a stratified completely randomized design with arbitrary probability of treatment assignment.

Usage

1
quade(obj)

Arguments

obj

an object of class "matchedSets".

Value

quade returns an object of class "quade", which consists of the following components:

Qobs

observed test statistic.

permutations

a permutation matrix of possible test statistics and associated probabilities.

pval

p-value.

sets

the "matchedSets" object input into the function.

Author(s)

Konstantin Kashin kkashin@fas.harvard.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(pluralityPairs)
between.ranks <- c(3,4,2,1)
dat <- quade.prep(data=pluralityPairs, set="pair", treatment="plurality", 
withinRank="OppHarRank", unit="country", betweenRank=between.ranks)
qout <- quade(dat)
qout

data(pluralitySets)
between.ranks <- c(2,3,1)
dat <- quade.prep(data=pluralitySets, set="set", treatment="plurality", 
withinRank="OppHarRank", unit="country", betweenRank=between.ranks)
qout <- quade(dat)
qout
head(qout$permutations)