Learn R Programming

sstvars (version 1.1.6)

Wvec: Vectorization operator that removes zeros

Description

Wvec stacks columns of the given matrix to form a vector and removes elements that are zeros.

Usage

Wvec(W)

Value

a vector of length \(d^2 - n_zeros\) where \(n_zeros\) is the number of zero entries in the matrix W.

Arguments

W

a size \((dxd)\) square matrix to be vectorized.