vec.rd
来自「r软件 另一款可以计算核估计的软件包 需安装r软件」· RD 代码 · 共 57 行
RD
57 行
\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 + =
减小字号Ctrl + -
显示快捷键?