R/vech.r

Defines functions vech

########## R function: vech ##########

# Obtains the vectorisation-half of a matrix.

# Last changed: 08 JAN 2018

vech <- function(A)
{
   if (nrow(A) != ncol(A))
      stop("A must be a square matrix")
   return(A[row(A) >= col(A)])
}

############ End of vech ############

Try the glmmEP package in your browser

Any scripts or data that you put into this service are public.

glmmEP documentation built on Oct. 30, 2019, 9:39 a.m.