Learn R Programming

paramlink (version 1.1-0)

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, verbose=FALSE)

# S3 method for powres summary(object, threshold=NULL, …)

Arguments

x

a linkdat object with a valid model. (See setModel.)

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 numerical vector with sum 1; the population frequencies for the marker 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

NULL, or a single numeric. If numeric, the output includes the percentage of simulated markers having LOD larger than threshold.

seed

NULL, or a numeric seed for the random number generator.

verbose

a logical passed on to linkageSim. If TRUE, some details are shown during the marker simulation.

object

a powres object, normally produced by linkage.power.

not used.

Value

The function prints a summary and returns invisibly a powres object, which is a list with the following entries:

sim

A linkdat object with the simulated markers

lod

The LOD scores (computed with recombination fraction theta=0) of the simulated markers

maxlod

The highest LOD score of the simulated markers

elod

The average LOD score for the simulated markers

%The \code{power.varyPar} function creates a plot of the results and returns the maximum LOD score for each element of \code{values}.

References

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

See Also

linkdat, linkageSim

Examples

Run this code
# NOT RUN {
# Note: In the examples below N is set very low in order to reduce time consumption. 
# Increase N to get more interesting results.

x = nuclearPed(3)
x = swapAff(x, c(1,3,4))
x = setModel(x, 1) # Autosomal dominant
linkage.power(x, N=1)

# X-linked recessive example:
y = linkdat(Xped, model=4)
linkage.power(y, N=1)

# Power of homozygosity mapping:
z = addOffspring(cousinPed(1), father=7, mother=8, noffs=1, aff=2)
z = setModel(z, 2) # Autosomal recessive model
pow = linkage.power(z, N=1, loop_breaker=7, seed=123)
stopifnot(round(pow$maxlod, 1) == 1.2)
# }

Run the code above in your browser using DataLab