2014-02-27 01:03:47 +00:00
|
|
|
# Covariance matrix using the component matrix M and V from QEE
|
|
|
|
#
|
|
|
|
# Author: Francois Pelletier
|
|
|
|
#
|
|
|
|
# LGPL-3.0
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
#' Covariance matrix using the component matrix M and V from QEE
|
|
|
|
#'
|
|
|
|
#' Covariance matrix using the component matrix M and V from QEE
|
|
|
|
#' @param M Gradient matrix
|
|
|
|
#' @param V Covariance matrix of equations
|
|
|
|
#' @param n Sample size
|
|
|
|
#' @return Weighted covariance matrix
|
2014-03-06 02:57:44 +00:00
|
|
|
#' @export covariance.QEE
|
2014-02-27 01:03:47 +00:00
|
|
|
#' @author François Pelletier
|
|
|
|
covariance.QEE <- function(M,V,n) ## Omega
|
|
|
|
{
|
|
|
|
ginv(M %*% ginv(V) %*% t(M))/n
|
|
|
|
}
|