Learn R Programming

selectiongain (version 2.0.1)

multistagegain: Function for calculating the multi-stage selection gain

Description

This is the main function of the package and uses following equation given by Tallis(1965): $\frac{\partial m(\textbf{t})}{\partial t_i}|_{\textbf{t}=\textbf{0}}= E(X_i) =\frac{1}{\alpha} \sum_{k=0}^{n} \rho_{i,k} \, \phi_1(q_k) \, \Phi_{n} (A_{k,s};R_k)$ to calculate selection gain for given correlation matrix and coordinates of the truncation points.

Usage

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

Arguments

Q
(length n) refers to the coordinates of the truncation points Q, which is the output of the next function (multistagetp) that we are going to introduced.
corr
(n+1-dimensional matrix) is the correlation matrix of y and X. The correlation matrix must be symmetric and positive-definite. Before starting the calculations, the user is recommended to check the correlation matrix, which is usually obtained by analysis
alg
is 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 (Mi2009), which an analytical solution of the MVN i
lim.y
is the lower limit of y and is set to -200 as default, which is on the safe side.
stages
If = TRUE, the gain from each stages will be shown.

Value

  • The value returned, is the gain of selection.

Details

This function calculates the well-known 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). More details are in the JSS paper section 3.1.

References

A. Genz and F. Bretz. Computation of Multivariate Normal and t Probabilities. Lecture Notes in Statistics, Vol. 195, Springer-Verlag, Heidelberg, 2009. A. Genz, F. Bretz, T. Miwa, X. Mi, F. Leisch, F. Scheipl and T. Hothorn. mvtnorm: Multivariate normal and t distributions. R package version 0.9-9, 2010. G.M. Tallis. Moment generating function of truncated multi-normal distribution. Journal of the Royal Statistical Society, Series B, 23(1):223-229, 1961. H.F. Utz. Mehrstufenselecktion in der Pflanzenzuechtung. Doctor thesis, University Hohenheim, 1969. W.G. Cochran. Improvent by means of selection. In: Proceedings Second Berkeley Symposium on Math Stat Prof, pp449-470, 1951. X. Mi, T. Miwa and T. Hothorn. Implement of Miwa's analytical algorithm of multi-normal distribution, R Journal, 1:37-39, 2009. X. Mi, H.F. Utz. and A.E. Melchinger. R package selectiongain: A tool for efficient calculation and optimization of the expected gain from multi-stage selection. J Stat Softw. (submitted)

See Also

No link

Examples

Run this code
k=c(-200,0.4308,0.9804,1.8603)
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 testing the parameter stages
#####

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

Run the code above in your browser using DataLab