Learn R Programming

paramlink (version 0.3-1)

linkage.power: Power of a linkage study

Description

Power analysis of parametric linkage studies

Usage

linkage.power(x, N=100, all=FALSE, threshold=NULL, seed=NULL)

power.varyPar(x, N=100, all=FALSE, varyPar, values, seed=NULL)

Arguments

x
a linkdat object.
N
an integer; the number of markers to simulate.
all
a logical indicating whether markers should be simulated for all pedigree members. If FALSE, the simulation status vector x$sim will be used. If x has existing marker data, the default is to simulate only the genotyped individuals.
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.
varyPar
a character indicating the parameter to vary. For autosomal models either 'f0', 'f1', 'f2', 'dfreq' or 'afreq'. For X-linked models either 'f0_m' (f0 for males), 'f1_m', 'f0_f', 'f1_f', 'f2_f', 'dfreq' or 'afreq'.
values
a numeric vector containing values for the varying parameter.

Value

  • A linkres object, which is returned invisibly after a summary is printed The power.varyPar function creates a plot of the results and returns the maximum LOD score for each element of values.

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
data(toyped)
x=linkdat(toyped, model=1)
linkage.power(x, N=5)

power.varyPar(x, N=20, varyPar="f1", values=seq(0,1,length=11))

#X-linked example - increase N to make interesting:
data(Xped)
y = linkdat(Xped, model=4)
linkage.power(y, N=1)

Run the code above in your browser using DataLab