Learn R Programming

QTLRel (version 0.2-15)

cic: Calculate Jacquard condensed identity coefficients

Description

Calculate Jacquard condensed identity coefficients from a pedigree.

Usage

cic(ped,ids,inter,df=3,ask=FALSE,verbose=FALSE)

Arguments

ped

a pedigree, which is a data frame (id, sire, dam, ...). If given, "generation" can be numeric 0, 1, 2, ... or non-numeric "F0", "F1", "F2", ... If "sex" is included, male should be "M", "Male" or 1, and female should be "F", "Female" or 2 (other than 0 and 1). Note that 0 is reserved for missing values.

ids

IDs of the individuals for which to calculate the Jacquard condensed identity coefficients. If missing, all individuals in the pedigree ped will be considered.

inter

if given, it should indicate intermediate generations.

df

if inter is missing, df is used to derive (optimal) inter. If df = 0, then there will no intermediate generations. If df is large, then all generations will be used as intermediate generations.

ask

if true, users will be asked whether to proceed.

verbose

if true, will print out some messages.

Value

A matrix G with G[,j] being the j-th Jacquard identity coefficients.

Details

The coefficients will be calculated for individuals with IDs specified by ids. All individuals will be considered if ids is missing. This is not recommended if the total number of individuals in the pedigree is large. Instead, it is recommended that ids is specified for interested individuals only

df is a tuning parameter. It should not be 0 (or smaller than 1) if the pedigree is large in depth (many generations) but the number of individuals is not small; otherwise, it can take forever to finish. It should not be Inf (or a large number) if the number of individuals in certain intermediate generation is very large.

References

Abney, M., M. S. McPeek, and C. Ober (2000). Estimation of variance components of quantitative traits in inbred populations. Am. J. Hum. Genet. 141, 629-650.

Examples

Run this code
# NOT RUN {
data(miscEx)

ids<- sample(pedF8$id[300:500],20)

# }
# NOT RUN {
# run 'cic' for the sampled individuals
# top-down
oo<- cic(pedF8, ids=ids, df=Inf, verbose=TRUE)
# bottom-up
o0<- cic(pedF8, ids=ids, df=0, verbose=TRUE)
# hybrid of top-down and bottom-up
o2<- cic(pedF8, ids=ids, ask=TRUE, verbose=TRUE)
# same results
c(sum(abs(oo-o0) >1e-7),sum(abs(o2-o0) >1e-7))
# }

Run the code above in your browser using DataLab