familyave: Family average approach

Description Usage Arguments Details Value Author(s) References Examples

Description

This function implements the family-averaging algorithm, with loadings based on the combined data from singletons and family averages, then projected to all.

Usage

1
familyave(Xall,myfam, top = 5)

Arguments

Xall

The original input genotype dataset

myfam

The identified family IDs. Each singleton forms his/her own family.

top

The number ancestry scores desired.

Details

The function averages the genotype information in each family, re-inflates to have appropriate variability, andtreats as a 'singleton' for the purpose of loading calculation. Ancestry scores are obtained by projection to all.

Value

Output the top ancestry scores by combining family data with singletons

Author(s)

Yi-Hui Zhou

References

Computation of ancestry scores with mixed families and unrelated individuals. arXiv:1606.08416.

Examples

1
2
3
4
5
6
7
8
X <- matrix(rbinom(1000*20,2,0.4),1000,20)
X[,1]=X[,2]*0.9
X=rowscale(X)
Xresid=residualize(X)
corXresid=cor(Xresid)
myfam=findfamilies(corXresid,0.1)
K=3
familyave.result=familyave(X,myfam,top=K)

PCFAM documentation built on May 2, 2019, 2:37 a.m.