File: vech.Rd

package info (click to toggle)
r-cran-matrixcalc 1.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 552 kB
  • sloc: makefile: 2
file content (31 lines) | stat: -rw-r--r-- 742 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
\name{vech}
\alias{vech}
\title{ Vectorize a matrix }
\description{
  This function returns a stack of the lower triangular matrix of a square matrix as a matrix with 1 column
  and n * ( n + 1 ) / 2 rows
}
\usage{
vech(x)
}
\arguments{
  \item{x}{ a matrix }
}
\value{
  A matrix with \eqn{\frac{1}{2}n\left( {n + 1} \right)} rows and one column.
}
\references{
  Magnus, J. R. and H. Neudecker (1999) \emph{Matrix Differential Calculus with Applications in Statistics and Econometrics},
  Second Edition, John Wiley.
}
\author{ Frederick Novomestky \email{fnovomes@poly.edu} }
\seealso{
  \code{\link{is.square.matrix}}
}
\examples{
x <- matrix( seq( 1, 16, 1 ), nrow=4, byrow=TRUE )
print( x )
y <- vech( x )
print( y )
}
\keyword{ math }