tdt.quad: TDT tests for extended haplotypes

tdt.quadR Documentation

TDT tests for extended haplotypes

Description

The function calculates the test statistic and then simulates its distribution under the null hypothesis by randomly transmitting parental haplotypes with probability 0.5. The test statistic is recalculated for each simulated dataset. For Geary-Moran tests in particular this can be quite slow.

Usage

tdt.quad(hap, nsim=5000, funct=FALSE, keep=TRUE, seeds=c(0, 0, 0))

Arguments

hap

A list containing the transmitted and untransmitted haplotypes. This would normally be computed using tdt.select.

nsim

The number of Monte Carlo simulations from the null hypothesis.

funct

If T, a similarity function is used and the test is a Geary-Moran test. Otherwise, the Pearsonian test, Sum (O-E)^2/E, is used.

keep

If TRUE, all simulated values of the test statistic are kept. Otherwise only the realised value of the test statistic and the p-value are returned.

seeds

Three numbers to seed the random number generator. The default is to use a different three random numbers each time.

Value

A list containing, the number of distinct haplotypes (n.hap), the number of informative transmissions (n.trans), the test statistic (test), the p-value (p.value) and, optionally, all the simulated values of the test statistic under the null hypothesis (sim).

References

Clayton, D. and Jones, H. (1999) Transmission/disequilibrium tests for extended marker haplotypes. Am.J.Hum.Gen., 65:1161-1169.

See Also

hap.transmit, tdt.select, tdt.rr, set.similarity, get.similarity

Examples

## Not run: 
#  Do a Pearsonian test using 10000 simulations and summarise the distribution
#  of the statistic under the null hypothesis


	test <- tdt.quad(hap.use, nsim=10000, keep=T)
	test
	summary(test$sim)

## End(Not run)

tdthap documentation built on May 29, 2024, 7:22 a.m.