Skip to contents

$$G = \sum_j w_j z_j z_j^T / (2 \sum_j w_j p_j(1-p_j))$$ The default weights are VanRaden's reciprocal marker variances, \(w_j = 1/(2p_j(1-p_j))\), which give rare markers more influence. Unit weights reproduce method 1 exactly.

Usage

Vanr2(marker_matrix, weights = NULL, freq = NULL)

Arguments

marker_matrix

Lines by markers, coded 0, 1, 2.

weights

Optional per-marker weights.

freq

Optional allele frequencies.

Value

Named list with estimate, G, freq, weights, denominator, n_lines, n_markers, method.

References

VanRaden (2008) J Dairy Sci 91:4414-4423.

Examples

Vanr2(matrix(c(1, 0, 0, 1, 2, 1), nrow = 2))
#> $estimate
#> [1] 0.6666667
#> 
#> $G
#>            [,1]       [,2]
#> [1,]  0.6666667 -0.6666667
#> [2,] -0.6666667  0.6666667
#> 
#> $freq
#> [1] 0.25 0.25 0.75
#> 
#> $weights
#> [1] 2.666667 2.666667 2.666667
#> 
#> $denominator
#> [1] 3
#> 
#> $n_lines
#> [1] 2
#> 
#> $n_markers
#> [1] 3
#> 
#> $method
#> [1] "VanRaden (2008) method 2 weighted relationship matrix"
#>