Learn R Programming

matie (version 1.2)

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

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

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
reps
no of repeats for the monte carlo simulation. defaults to 1000.

Value

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

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.

References

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

See Also

ma

Examples

Run this code
    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)

Run the code above in your browser using DataLab