📄 vec.rd
字号:
\name{vec, vech, invvec, invvech}\alias{vec}\alias{vech}\alias{invvec}\alias{invvech}\title{Vector and vector half operators}\description{The vec (vector) operator takes a \eqn{d \times d}{d x d} matrix and stacks thecolumns into a single vector of length \eqn{d^2}{d^2}. The vech (vectorhalf) operatortakes a symmetric \eqn{d \times d}{d x d} matrix and stacks the lowertriangular half into a single vector of length \eqn{d(d+1)/2}{d(d+1)/2}.The functions invvec and invvech are the inverses of vec andvech i.e. they form matrices from vectors. }\usage{vec(x, byrow = FALSE)vech(x)invvec(x, ncol, nrow, byrow = FALSE)invvech(x)}\arguments{ \item{x}{vector or matrix} \item{ncol,nrow}{number of columns and rows for inverse of vech} \item{byrow}{flag for stacking row-wise or column-wise (default)} } %\value{}%\details{}\references{ Magnus, J.R. \& Neudecker H.M. (1999) \emph{Matrix Differential Calculus with Applications in Statistiscs and Econometrics (revised edition)}, Wiley \& Sons. Chichester.}\examples{x <- matrix(1:9, nrow=3, ncol=3)y <- (x + t(x))/2vec(x)vech(y)invvec(vec(x))invvech(vech(y))}\keyword{algebra}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -