# r^2_VS measure

### Description

This function estimates the novel measure of linkage disequilibrium which is corrected by both the relatedness of genotyped individuals and the structure of the sample.

### Usage

1 | ```
Measure.R2VS(biloci, V, struc, na.presence=TRUE, V_inv=NULL)
``` |

### Arguments

`biloci` |
Numeric matrix (N x 2), where N is the number of genotypes (or haplotypes) Matrix values are the allelic doses: - (0,1,2) for genotypes. - (0,1) for haplotypes. Row names correspond to the ID of individuals. Column names correspond to the ID of markers. |

`V` |
Numeric matrix (N x N), where N is the number of genotypes (or haplotypes). Matrix values are coefficients of genetic variance-covariance for every pair of individuals. Row and column names must correspond to the ID of individuals and must be ranged as in the biloci matrix. No missing value. |

`struc` |
Numeric matrix (N x (P-1)), where N is the number of genotypes (or haplotypes) and P the number of sub-populations. Matrix values are the probabilities (between 0 and 1) for each genotypes (or haplotypes) to belong to each sub-populations. Row names must correspond to the ID of individuals and must be ranged as in the biloci matrix. Column names correspond to the ID of sub-populations. The matrix must be inversible, if the structure is with P sub-populations, only P-1 columns are expected. No missing value. |

`na.presence` |
Boolean indicating the presence of missing values in data. If na.presence=FALSE (no missing data), computation of By default, na.presence=TRUE. |

`V_inv` |
Should stay NULL |

### Value

The returned value is the estimated value of the linkage disequilibrium measure corrected by both the relatedness of genotyped individuals and the structure of the sample or NA if less than 5 individuals have non-missing data at both loci.

### Author(s)

David Desrousseaux, Florian Sandron, Aurelie Siberchicot, Christine Cierco-Ayrolles and Brigitte Mangin

### References

Mangin et al, 2012, Novel measures of linkage disequilibrium that correct for the bias due to population structure and relatedness, Heredity.