ma.test: p-value for an association score.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function computes the p-value for an association score using interpolation from a precomputed table (fast - only available for the bivariate case) or using a permutation test.

Usage

1
ma.test(d, maStruct, permPartition, lookup, reps)

Arguments

d

the data set

maStruct

the structure returned by a call to ma. Must be provided. No default.

permPartition

a permutation partition for the data set depending on the statistical question being asked. Defaults to the partition returned by the call to ma.

lookup

logical, if TRUE then a p-value is interpolated from a table of precomputed p-values. If FALSE then a monte carlo simulation is carried out. Table lookup is only accurate for associations on bivariate data with number of samples <= 400. By default, lookup is TRUE.

reps

no of repeats for the monte carlo simulation. defaults to 1000.

Details

Computes a p value for an association from the likelihood ratio statistic computed by ma. Uses interpolation by default for bivariate associations, and permutation testing for multivariate associations.

Value

Returns a real number in the range [0,1].

Author(s)

Ben Murrell, Dan Murrell & Hugh Murrell.

References

Discovering general multidimensional associations, http://arxiv.org/abs/1303.1828

See Also

ma

Examples

1
2
3
4
5
    d <- shpd(n=100,m=2,Rsq=0.2)
    aScore <- ma(d)
    ma.test(d, aScore)
    # or set lookup to FALSE if you have computing time available
    # ma.test(d, aScore, lookup=FALSE, reps=10000)

matie documentation built on May 2, 2019, 3:52 a.m.