familyave {PCFAM} | R Documentation |
Family average approach
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
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
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)
[Package PCFAM version 1.0 Index]