Learn R Programming

OmicKriging (version 1.0)

okriging: predict the phenotype of an individual using the remaining individuals

Description

Given "omics" correlation matrices, matrix weights, and covariates, okriging predicts the phenotype of an individual by using the phenotypes of the remaining individuals.

Usage

okriging(idtest, idtrain = NULL, corlist, H2vec, 
pheno, phenoname, Xcova = NULL)

Arguments

idtest
IID of individual(s) in the test set for phenotype prediction
idtrain
IID list of the remaining individuals in the training set for phenotype prediction
corlist
list of correlation matrices (rownames and colnames should be the IID list and include idtest and idtrain
H2vec
list same length as corlist of weights for each correlation matrix, sum should equal 1
pheno
data.frame of the phenotype (rownames should be the IID list and colnames should be: FID, IID, phenoname)
phenoname
name of the phenotype
Xcova
matrix of covariates with the IID list as the rownames

References

Wheeler HE, et al. (2013) Poly-Omic Prediction of Complex Traits: OmicKriging. arXiv:1303.1788 http://arxiv.org/abs/1303.1788

Cressie, N. (1993) Statistics for Spatial Data, Wiley, New York. p.154

Stein, M. L. (1999) Interpolation of Spatial Data: Some Theory for Kriging, Springer, New York.

See Also

readcorlist grm2mat

Examples

Run this code
data(iddata)
data(corlist)
data(H2vec)
data(pheno)
data(phenoname)
data(Xcovamat)

idfamilylist=unique(iddata$FID)
pred = data.frame()
for(idtrio in idfamilylist){
  idtest = iddata$IID[iddata$FID ==idtrio]
  idtrain = iddata$IID[!(iddata$IID %in% idtest)]
  res = okriging(idtest,idtrain,corlist,H2vec,pheno,phenoname,Xcova = Xcovamat)
  pred = rbind(pred,res)
  print(res)
}
summary(lm(Ypred~Ytest,data=pred))

Run the code above in your browser using DataLab