Multivariate Statistical Techniques
Vector Operations in Stata


Technically, Stata does not have any dedicated vector commands, it merely treats vectors as matrices with one column or one row. Thus, there are no commands for dot product or vector norm. We can still get the results we need using matrix commands.

The Vector

"Transpose" of a Vector

Adding Vectors

Subtracting Vectors

Multiplication by a Scalar

Vector Dot Product

Length of a Vector

Unit Length Vector

The Unit Vector


Multivariate Course Page

Phil Ender, 12feb05