crossmatchdist: The Exact Null Distribution Of The Cross-match Statistic...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/crossmatchdist.R

Description

The exact null distribution of the number of crossmatches for bigN>=4 cases, n>=2 from one type and N-n>=2 from another type.

Usage

1
crossmatchdist(bigN, n)

Arguments

bigN

The total number of observations

n

The number of cases from one type

Details

bigN is even. Let a1 be the number of cross-matches pairs. Then a2=(n-a1)/2 and a0=bigN/2-(n+a1)/2 are the number of pairs both of one type and the other type respectively.

Value

dist

A matrix with rows a0, a1, a2, Pr(A1=a1) and Pr(A1<=a1).

Author(s)

Ruth Heller

References

Rosenbaum, P.R. (2005), An exact distribution-free test comparing two multivariate distributions based on adjacency, Journal of the Royal Statistical Society: Series B (Statistical Methodology), 67, 4, 515-530.

Examples

1

Example output

Loading required package: survival
Loading required package: nbpMatching
Notice:
Formerly the gendistance() function scaled the Mahalanobis distances into large
integers, as required by the nonbimatch() function. Starting in version 1.5.0,
gendistance() will return unscaled distances. This facilitates comparison to an
appropriate F distribution for multivariate normal data. Any required scaling
will happen invisibly within nonbimatch(). This notice will be removed in a
future version of nbpMatching.
           [,1]      [,2]      [,3]      [,4]       [,5]
[1,] 4.00000000 3.0000000 2.0000000 1.0000000 0.00000000
[2,] 1.00000000 3.0000000 5.0000000 7.0000000 9.00000000
[3,] 4.00000000 3.0000000 2.0000000 1.0000000 0.00000000
[4,] 0.02591526 0.2764295 0.4975730 0.1895516 0.01053065
[5,] 0.02591526 0.3023447 0.7999177 0.9894694 1.00000000

crossmatch documentation built on May 2, 2019, 8:19 a.m.