Computes the Smith (1936) and Hazel (1943) index given economic weights and phenotypic and genotypic variance-covariance matrices. The Smith-Hazel index is computed as follows: \[\bf{b = P^{-1}Aw}\]

where \(\bf{P}\) and \(\bf{G}\) are phenotypic and genetic covariance matrices, respectively, and \(\bf{b}\) and \(\bf{w}\) are vectors of index coefficients and economic weightings, respectively.

The genetic worth \(I\) of an individual
genotype based on traits *x*, *y*, ..., *n*, is calculated as:

\[I = b_xG_x + b_yG_y + ... + b_nG_n\]

where *b* the index coefficient for the traits *x*, *y*, ...,
*n*, respectively, and *G* is the individual genotype BLUPs for the
traits *x*, *y*, ..., *n*, respectively.

## Arguments

- .data
The input data. It can be either a two-way table with genotypes in rows and traits in columns, or an object fitted with the function

`gamem()`

. Please, see**Details**for more details.- use_data
Define which data to use If

`.data`

is an object of class`gamem`

. Defaults to`"blup"`

(the BLUPs for genotypes). Use`"pheno"`

to use phenotypic means instead BLUPs for computing the index.- pcov, gcov
The phenotypic and genotypic variance-covariance matrix, respectively. Defaults to

`NULL`

. If a two-way table is informed in`.data`

these matrices are mandatory.- SI
The selection intensity (percentage). Defaults to

`20`

- weights
The vector of economic weights. Defaults to a vector of 1s with the same length of the number of traits.

## Value

An object of class `hz`

containing:

**b**: the vector of index coefficient.**index**: The genetic worth.**sel_dif_trait**: The selection differencial.**sel_gen**: The selected genotypes.**gcov**: The genotypic variance-covariance matrix**pcov**: The phenotypic variance-covariance matrix

## Details

When using the phenotypic means in `.data`

, be sure the genotype's code
are in rownames. If `.data`

is an object of class `gamem`

them the
BLUPs for each genotype are used to compute the index. In this case, the
genetic covariance components are estimated by mean cross products.

## References

Smith, H.F. 1936. A discriminant function for plant selection. Ann. Eugen. 7:240-250. doi:10.1111/j.1469-1809.1936.tb02143.x

Hazel, L.N. 1943. The genetic basis for constructing selection indexes. Genetics 28:476-90. https://www.genetics.org/content/28/6/476.short

## Author

Tiago Olivoto tiagoolivoto@gmail.com

## Examples

```
# \donttest{
vcov <- covcor_design(data_g, GEN, REP, everything())
means <- as.matrix(vcov$means)
pcov <- vcov$phen_cov
gcov <- vcov$geno_cov
index <- Smith_Hazel(means, pcov = pcov, gcov = gcov, weights = rep(1, 15))
# }
```