Matrix Function Summary
Matrix Utility
@capplyranks Reorder the rows of the matrix using a vector of ranks.
@columns Number of columns in matrix object or group.
@convert Converts series or group to a vector or matrix after removing NAs.
@eqna Test for equality of data objects, treating NAs and null strings as ordinary and not missing values.
@explode Square matrix from a sym matrix object.
@fill Vector initialized from a list of values.
@grid Vector containing equally spaced grid of values.
@hcat Vertically concatenate matrices.
@implode Creates sym from lower triangle of square matrix.
@implodeu Creates sym from upper triangle of square matrix.
@isna Test for missing values.
@lower Lowercase representation of a string, or lower triangular matrix of a matrix.
@mnrnd Matrix of normal random numbers.
@neqna Inequality test (NAs and blanks treated as values, not missing values).
@ones Matrix or vector of ones.
@range Vector of sequential integers.
@rapplyranks Reorder the columns of a matrix using a vector of ranks.
@resample Randomly draw from the rows of the matrix.
@rmvnorm Multivariate normal random draws.
@scale Scale rows or columns of matrix.
@seq Vector containing arithmetic sequence.
@seqm Vector containing geometric sequence.
@sfill Create a string vector from a list of strings.
@sort Sort elements of data object.
@unvec Unstack vector into a matrix.
@unvech Unstack vector into lower triangle of sym.
@uniquevals Vector or svector of unique values of object.
@upper Uppercase representation of a string; or upper triangular matrix of a matrix.
@vcat Vertically concatenate matrices.
@vec Vectorize (stack columns of) matrix.
@vech Vectorize (stack columns of) lower triangle of matrix.
@zeros Matrix or vector of zeros.
Matrix Algebra
@cond Condition number of square matrix or sym.
@det Determinant of matrix.
@eigenvectors Matrix whose columns contain the eigenvectors of a matrix.
@lu LU decomposition of a matrix.
@norm Norm of series or matrix object.
@outer Outer product of vectors or series.
@pinverse Moore-Penrose pseudo-inverse of matrix.
@svd Singular value decomposition (economy) of matrix.
@svdfull Singular value decomposition (full) of matrix.
@trace Computes the trace of a square matrix or sym.
@unvec Unstack vector into a matrix.
@unvech Unstack vector into lower triangle of sym.
@vec Vectorize (stack columns of) matrix.
@vech Vectorize (stack columns of) lower triangle of matrix.
Matrix Statistics
@columns Number of columns in matrix object or group.
@cor Correlation of two vectors or series, or between the columns of a matrix or series in a group.
@cov Covariance (non-d.f.corrected) of two vectors or series, or between the columns of a matrix or series in a group.
@covp Covariance (non-d.f. corrected) of two vectors or series, or between the columns of a matrix or series in a group.
@covs Covariance (d.f. corrected) of two vectors or series, or between the columns of a matrix or series in a group.
@first The first non-missing value in the vector or series.
@ifirst Index of the first non-missing value in the vector or series.
@ilast Index of the last non-missing value in the vector or series.
@imax Index of maximum value.
@imaxes Indices of maximum value (multiple).
@imin Index of minimum value.
@imins Indices of minimum value (multiple).
@last The last non-missing value in the vector or series.
@mae Mean of absolute error (difference) between series.
@mape Mean absolute percentage error (difference) between series.
@maxes Maximum values (multiple).
@mins Minimum values (multiple).
@mse Mean of square error (difference) between series.
@nas Number of missing observations.
@norm Norm of series or matrix object.
@obs Number of observations.
@regress Perform an OLS regression on the first column of a matrix versus the remaining columns.
@rmse Root of the mean of square error (difference) between series.
@smape Symmetric mean absolute percentage error (difference) between series.
@stdev Sample standard deviation (d.f. adjusted).
@stdevp Population standard deviation (no d.f. adjustment).
@stdevs Sample standard deviation (d.f. adjusted).
@stdize Standardized data (using sample standard deviation).
@stdizep Standardized data (using population standard deviation).
@sumsq Arithmetic sum of squares.
@theil Theil inequality coefficient (difference) between series.
@trendcoef Trend coefficient from detrending regression.
@uniquevals Vector or svector of unique values of object.
@var Population variance (no d.f. adjustment).
@varp Population variance (no d.f. adjustment).
@vars Sample variance (d.f. adjusted).
Matrix Column Statistics
@cfirst First non-missing value in each column of a matrix.
@cifirst Index of the first non-missing value in each column of a matrix.
@cilast Index of the last non-missing value in each column of a matrix.
@cimax Index of the maximal value in each column of a matrix.
@cimin Index of the maximal value in each column of a matrix.
@cintercept Intercept from a trend regression performed on each column of a matrix.
@clast Last non-missing value in each column of the matrix.
@cmax Maximal value in each column of a matrix.
@cmean Mean in each column of a matrix.
@cmedian Median of each column of a matrix.
@cmin Minimal value for each column of the matrix.
@cnas Number of NA values in each column of a matrix.
@cobs Number of non-NA values in each column of a matrix.
@cprod Product of elements in each column of a matrix.
@cstdev Sample standard deviation (d.f. corrected) of each column of a matrix.
@cstdevp Population standard deviation (non-d.f. corrected) of each column of a matrix.
@cstdevs Sample standard deviation (non-d.f. corrected) of each column of a matrix.
@csum Sum of the values in each column of a matrix.
@csumsq Sum of the squared values in each column of a matrix.
@ctrendcoef Slope from a trend regression on each column of a matrix.
@ctrmean Trimmed mean of each column of a matrix .
@cvar Population variance of each column of a matrix.
@cvarp Population variance of each column of a matrix.
@cvars Sample variance of each column of a matrix.
Matrix Element
@ediv Element by element division of two matrices.
@eeq Element by element equality comparison of two data objects.
@eeqna Element by element equality comparison of two data objects with NAs treated as ordinary value for comparison.
@ege Element by element tests for whether the elements in the data objects are greater than or equal to corresponding elements in another data object.
@egt Element by element tests for whether the elements in the data object strictly greater than corresponding elements in another data object.
@einv Element by element inverses of a matrix.
@ele Element by element tests for whether the elements in the data object are less than or equal to corresponding elements in another data object.
@elt Element by element tests for whether the elements in the data object are strictly less than corresponding elements in another data object.
@emax Element by element maximums of two conformable data objects.
@emin Element by element minimums of two conformable data objects.
@emult Element by element multiplication of two matrix objects.
@eneq Element by element inequality comparison of two data objects.
@eneqna Element by element inequality comparison of two data objects with NAs treated as ordinary value for comparison.
@epow Raises each element in a matrix to a power.
@erecode Element by element recode of data objects.
Matrix Transformation
Overall Transformations
@capplyranks Reorder the rows of the matrix using a vector of ranks.
@demean Compute deviations from the mean of the data object.
@detrend Compute deviations from the trend of the data object.
@dupselem Identifier for the observation within the set of duplicates.
@dupsid Identifier for the duplicates group for the observation.
@dupsobs Number of observations in the corresponding duplicates group.
@rapplyranks Reorder the columns of a matrix using a vector of ranks.
@resample Randomly draw from the rows of the matrix.
By-Column Transformations
@colcumprod Cumulative products for each column of a matrix.
@colcumsum Cumulative sums for each column of a matrix.
@colpctiles Percentile values for each column of a matrix.
@colranks Ranks of each column of the matrix.
@colsort Sort each column of the matrix.
@colstdize Standardize each column using the sample (d.f. corrected) standard deviation.
@colstdizep Standardize each column using the population (non-d.f. corrected) standard deviation.
By-Row Transformations
@rowranks Matrix where each row contains ranks of the column values.
@rowsort Matrix where each row contains sorted columns.