#' A multivariate Qst analysis
#'
#'
#' @param B A covariance matrix between population means.
#' @param G A genetic covariance matrix.
#'
#' @export
#' @importFrom expm sqrtm
#' @author Fabio Andrade Machado
eigenQst<-function(B,G){
mQst<-solve(sqrtm(B+2*G)) %*% B %*% solve(sqrtm(B+2*G))
eQst<-eigen(mQst)
globalQst<-mean(eQst$values)
list('Global Qst'=globalQst,
'Axes Qst'= eQst$values,
'Axes of most selection'= eQst$vector,
'FSTq'=mQst)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.