IBS_pseudo {LGRF}R Documentation

Generate IBS pseudo variables

Description

If users want to calculate the IBS similarity, this function creates the IBS pseudo variables. This is in order to calculate the IBS similarity in an efficient way.

Usage

IBS_pseudo(x)

Arguments

x

An n by q matrix of genetic variants.

Value

It returns an n by 3p matrix of pseudo variables for efficiently calculating IBS similarity.

Examples


library(LGRF)

# Load data example
# Z: genotype matrix, n by q matrix

data(LGRF.example)
Z<-LGRF.example$Z
A<-IBS_pseudo(Z)

# Then the IBS matrix can be calculated by K.IBS<-AA^T.


[Package LGRF version 1.0 Index]