kin_adjust: Corrects genotypes, phenotypes, and covariates for kinship.

View source: R/kin_adjust.R

kin_adjustR Documentation

Corrects genotypes, phenotypes, and covariates for kinship.

Description

This function uses linear mixed models to adjust the genotype matrix, phenotype matrix, and covariate matrix for kinship based on the kinship matrix calculated by kinship.

Usage

kin_adjust(
  kin_obj,
  geno,
  chr1 = NULL,
  chr2 = NULL,
  phenoV = NULL,
  covarV = NULL,
  verbose = FALSE
)

Arguments

kin_obj

The kinship object calculated by kinship

geno

a genotype object.

chr1

The first of two chromosomes to leave out of the calculation, if any.

chr2

The second of two chromosomes to leave out of the calculation, if any.

phenoV

The phenotype vector

covarV

The covariate vector or matrix

verbose

A logical value indicating whether to print progress to the screen

Details

If using leave-one-chromosome-out (LOCO), chr1 and chr2 should have the same value. If chr1 and chr2 are different, both specified, leave-two-chromosomes-out (LTCO) will be used. After testing LTCO, we do not recommend using this method. We instead recommend always using the overall kinship correction. In this case, both chr1 and chr2 should be NULL, their default values.

Value

This function returns a list with the corrected phenotype, genotypes, and covariates. These are used in singlescan and pairscan_kin.


cape documentation built on May 29, 2024, 5:11 a.m.