Learn R Programming

selectiongain (version 2.0.6)

multistagegain: Function for calculating the multi-stage selection gain

Description

This is the main function of the package and calculates selection gain for a fixed correlation matrix and coordinates of the truncation points.

Usage

multistagegain(Q, corr, alg, lim.y, stages=FALSE)

Arguments

Q
Vector with length n. It refers to the coordinates of the truncation points Q, which is the output of the function multistagetp.
corr
(n+1)-dimensional matrix. It is the correlation matrix $\bm{\Sigma}^{*}$ of true value y and selection indices X. The correlation matrix must be symmetric and positive-definite. Before starting the calculations, the user is recommended to check the correl
alg
An object used to switch between two algorithms. If alg = GenzBretz(), which is by default, the quasi-Monte Carlo algorithm from Genz (1999) will be used. If alg = Miwa(), the program will use the Miwa algorithm, which an analytical solution of the MVN in
lim.y
The lower limit of y as double, and set to -200 as default, which is on the safe side.
stages
Logical. If TRUE, the Tallis' partial gain of deleting one stage from n stages, which are integrals with partial correlation matrix, will be shown (Tallis 1961). The sum of these partial gains will be equal to the selection gain. By default it equals FALS

Value

  • The value returned, is the gain of selection.

Details

This function calculates the selection gain $\Delta G(y)$, which is described by Cochran (1951). For one-stage selection the gain is defined as $\Delta G(y) = i \rho_{y} \rho_{1}$, where $i$ is the selection intensity, $\rho_{1}$ is the correlation between the true breeding value and the selection index $y$ (Utz 1969). The theory for multi-stage selection is based on the first moment (mathematical expectation) of the true value $y$ in the selected area Cochran (1951). The $\Delta G(y)$ is defined as the difference of the mathematical expectation of $y$ after selection and the corresponding value before selection. For simplicity, the variance of $y$ is set to $1$, i.e., $\sigma_{y}^2=1$. If $\sigma_{y}^2 \neq1$, the selection gain and the variance among the selected candidates have to be multiplied with $\sigma_{y}$ or $\sigma_{y}^2$, respectively. In order to calculate the expectation of $y$ after $n$ stages of selection, we have to determine the one-sided integral of $y$ over the right-sided area $\textbf{S}_{Q}={x_1>q_1,\ldots,x_n>q_n}$ defined by the truncation point $\textbf{Q}={q_1,q_2,\ldots,q_n}$. The value of $\Delta G_n(y)$ is noted as $E(Y;\textbf{S}_{Q})$. We have to distinguish it with $E(Y)=0$, which is the integral of $y$ over the whole area $\textbf{S}={x_1>-\infty,\ldots,x_n>-\infty}$ with $\textbf{Q}={-\infty,\ldots,-\infty}$ as the truncation point. Thus, the expectation of $y$ after $n$ stages of selection is, $$\Delta G_n(y, \textbf{S}_{Q}) = E(Y;\textbf{S}_{Q})= \alpha^{-1} \int_{-\infty} ^\infty \int_{q_{1}}^\infty\ldots\int_{q_{n}}^\infty y \, \phi_{n+1}(\textbf{x}^{*};\textbf{U}^{*}; \bm{\Sigma}^{*}) \, d \textbf{x}^*,$$ where $$\alpha = \Phi_n (\textbf{Q},\bm{\Sigma})= \int_{q_{1}}^\infty\ldots\int_{q_{n}}^\infty \phi_{n}(\textbf{x};\textbf{U}; \bm{\Sigma}) \, d \textbf{x}, \label{equ-alpha0}$$ and $\Phi_n$ is the distribution function of the MVN, $\phi_{n}$ is the density function of MVN, and $\bm{\Sigma}$ is the correlation matrix of $\textbf{X}$. $\bm{\Sigma}^{*}$ is the correlation matrix of $\textbf{X}^*={Y, X}$. It comprises $\bm{\Sigma}$, but has one dimension more pertaining to the correlations between $Y=X_0$ and the selection indices $\textbf{X}$. The mean vector $\textbf{U}^{*}={u_0,u_1,\ldots,u_n}$ of $\phi_{n+1}$ is omitted, assuming $\textbf{U}^{*}={0,0,\ldots,0}$ without loss of generality, and consequently, we write shortly $\phi_{n+1} (\textbf{x}^{*};\bm{\Sigma}^{*})$ and $\phi_{n} (\textbf{x};\bm{\Sigma})$. The selection gain is the first moment, while the selected fraction $\alpha$ over all $n$ stages of selection corresponds to the zero-th moment of the one-sided truncated MVN distribution of $\textbf{X}$.

References

Cochran, W.G. (1951). Improvement by Means of Selection. Proc. Second Berkeley Symp. on Math. Statist. and Prob., 449-470. University of California Press, Berkeley. Genz, A., Bretz F., Miwa, T., Mi, X., Leisch, F., Scheipl, F. and Hothorn, T. (2012) mvtnorm: Multivariate normal and t distributions, R package version 0.9-9994. Tallis, G.M. (1961) Moment generating function of truncated multi-normal distribution. Journal of the Royal Statistical Society, Series B, 23(1), 223-229. Mi, X., Miwa, T. and Hothorn T. (2009) Implement of Miwa's analytical algorithm of multi-normal distribution, R Journal, 1, 37-39. Mi, X., Utz, H.F. and Melchinger, A.E. (submitted). R Package selectiongain: Calculating and Optimizing Expected Gain from Multi-stage Selection. Journal of Statistical Software

See Also

pmvnorm

Examples

Run this code
Q=c(0.4308,0.9804,1.8603)

corr=matrix( c(1,       0.3508,0.3508,0.4979,
               0.3508  ,1,     0.3016,0.5630,
               0.3508,  0.3016,1     ,0.5630,
               0.4979,  0.5630,0.5630,1), 
              nrow=4  
)

multistagegain(Q=Q,corr=corr)

# code for partial gain

multistagegain(Q=Q,corr=corr,stages=TRUE)

Run the code above in your browser using DataLab