Learn R Programming

paramlink (version 0.8-3)

linkage.power: Power of a linkage study

Description

Power analysis of parametric linkage studies

Usage

linkage.power(x, N=100, available=x$available, afreq=c(0.5, 0.5), loop_breakers=NULL, threshold=NULL, seed=NULL)

Arguments

x
a linkdat object.
N
an integer; the number of markers to simulate.
available
a vector containing IDs of the available individuals, i.e. those whose genotypes should be simulated.
afreq
a vector of length 2 containing the population frequencies for the SNP alleles.
loop_breakers
a numeric containing IDs of individuals to be used as loop breakers. Relevant only if the pedigree has loops. See breakLoops.
threshold
a numeric of length 1, or NULL. If not NULL, and if maxonly=FALSE, the output includes the percentage of simulated markers having LOD larger than threshold.
seed
NULL, or a numeric seed for the random number generator.

Value

  • A linkres object, which is returned invisibly after a summary is printed

References

The marker simulation takes place in SNPsim, which implements the algorithm used by SLINK: http://linkage.rockefeller.edu/ott/SLINK.htm

See Also

SNPsim, summary.linkres

Examples

Run this code
# Note: In the cases below, N is set very low. Increase to get more interesting results.
data(toyped)
x = linkdat(toyped, model=1)
linkage.power(x, N=5)
# X-linked example:
data(Xped)
y = linkdat(Xped, model=4)
linkage.power(y, N=1)

# Loop example:
z = addOffspring(cousinPed(1), father=7, mother=8, noffs=1, aff=2)
z = setModel(z, 2)
linkage.power(z, N=1, loop_breaker=7)

Run the code above in your browser using DataLab