Stata 15 help for mf_st_ms_utils

Title

[M-5] st_ms_utils() -- Matrix stripe utilities

Syntax

string matrix st_matrixrowstripe_split(name, width, colon)

string matrix st_matrixcolstripe_split(name, width, colon)

real matrix st_matrixrowstripe_fvinfo(name)

real matrix st_matrixcolstripe_fvinfo(name)

void st_matrixrowstripe_fvinfo(name, info)

void st_matrixcolstripe_fvinfo(name, info)

real colvector st_matrixrownumb(name, S)

real colvector st_matrixcolnumb(name, S)

real colvector st_matrixroweqnumb(name, S)

real colvector st_matrixcoleqnumb(name, S)

real scalar st_matrixrownfreeparms(name)

real scalar st_matrixcolnfreeparms(name)

real scalar st_matrixrownlfs(name)

real scalar st_matrixcolnlfs(name)

real colvector st_matrixrowfreeparm(name)

real colvector st_matrixcolfreeparm(name)

where

name: string scalar width: real scalar colon: real scalar (optional) info: real matrix S: string matrix

Description

st_matrixrowstripe_split(name, width) returns a string matrix, S, whose elements are made up of the row stripes of the Stata matrix name. The first column of S contains the equation names; the remaining columns are split according to standard splitting rules for factor variables, interactions, and time-series operators. width specifies the maximum number of characters that each element of S is allowed to contain. st_matrixrowstripe_split(name, width, 0) will suppress the colon from the equation names in the first column of S; the default is to append a colon to the nonempty equation names in the first column of S.

st_matrixcolstripe_split(name, width) returns a string matrix, S, whose elements are made up of the column names of the Stata matrix name. The columns are split according to standard splitting rules for factor variables, interactions, and time-series operators. width specifies the maximum number of characters that each element of S is allowed to contain. st_matrixcolstripe_split(name, width, 0) will suppress the colon from the equation names in the first column of S; the default is to append a colon to the nonempty equation names in the first column of S.

st_matrixrowstripe_fvinfo(name) returns factor-variables information hidden in the row stripe of Stata matrix name.

st_matrixcolstripe_fvinfo(name) returns factor-variables information hidden in the column stripe of Stata matrix name.

st_matrixrowstripe_fvinfo(name, info) sets the hidden factor-variables information for the row stripe of Stata matrix name.

st_matrixcolstripe_fvinfo(name, info) sets the hidden factor-variables information for the column stripe of Stata matrix name.

st_matrixrownumb(name, S) returns the row numbers of Stata matrix name associated with the stripe specifications in matrix S.

st_matrixcolnumb(name, S) returns the column numbers of Stata matrix name associated with the stripe specifications in matrix S.

st_matrixroweqnumb(name, S) returns the row equation indices of Stata matrix name associated with the equation specifications in row vector S.

st_matrixcoleqnumb(name, S) returns the column equation indices of Stata matrix name associated with the equation specifications in column vector S.

st_matrixrownfreeparms(name) returns the number of free parameter rows of Stata matrix name.

st_matrixcolnfreeparms(name) returns the number of free parameter columns of Stata matrix name.

st_matrixrownlfs(name) returns the number of linear forms among the rows of Stata matrix name.

st_matrixcolnlfs(name) returns the number of linear forms among the columns of Stata matrix name.

st_matrixrowfreeparm(name) returns a vector indicating where the free parameters are among the rows of Stata matrix name.

st_matrixcolfreeparm(name) returns a vector indicating where the free parameters are among the columns of Stata matrix name.

Conformability

st_matrixrowstripe_split(name, width, colon): name: 1 x 1 width: 1 x 1 colon: 1 x 1 (optional) result: n x m (0 x 2 if not found)

st_matrixcolstripe_split(name, width, colon): name: 1 x 1 width: 1 x 1 colon: 1 x 1 (optional) result: n x m (0 x 2 if not found)

st_matrixrowstripe_fvinfo(name): name: 1 x 1 result: n x 2 (0 x 2 if not found)

st_matrixcolstripe_fvinfo(name): name: 1 x 1 result: n x 2 (0 x 2 if not found)

st_matrixrowstripe_fvinfo(name, info): name: 1 x 1 info: n x 2 result: void

st_matrixcolstripe_fvinfo(name, info): name: 1 x 1 info: n x 2 result: void

st_matrixrownumb(name, S): name: 1 x 1 S: n x 2 result: n x 1

st_matrixcolnumb(name, S): name: 1 x 1 S: n x 2 result: n x 1

st_matrixroweqnumb(name, S): name: 1 x 1 S: n x 1 result: n x 1

st_matrixcoleqnumb(name, S): name: 1 x 1 S: n x 1 result: n x 1

st_matrixrownfreeparms(name): name: 1 x 1 result: 1 x 1

st_matrixcolnfreeparms(name): name: 1 x 1 result: 1 x 1

st_matrixrownlfs(name): name: 1 x 1 result: 1 x 1

st_matrixcolnlfs(name): name: 1 x 1 result: 1 x 1

st_matrixrowfreeparm(name): name: 1 x 1 result: n x 1

st_matrixcolfreeparm(name): name: 1 x 1 result: n x 1

Diagnostics

st_matrixrowstripe_split(name, width, colon) and st_matrixcolstripe_split(name, width, colon) abort with error if any of the arguments are malformed. These functions return J(0,2,"") if Stata matrix name does not exist. width is assumed to be 12 if width<5 or missing. colon indicates whether to include a colon in the equation name; the default is colon=1.

st_matrixrowstripe_fvinfo(name) and st_matrixcolstripe_fvinfo(name) abort with error if name is malformed. These functions return J(0,2,.) if Stata matrix name does not exist.

st_matrixrowstripe_fvinfo(name, info) and st_matrixcolstripe_fvinfo(name, info) abort with error if any of the arguments are malformed. These functions also abort with error if info is not conformable with the corresponding stripe's dimension.

st_matrixrownumb(name, S) and st_matrixcolnumb(name, S) abort with error if any of the arguments are malformed.

st_matrixroweqnumb(name, S) and st_matrixcoleqnumb(name, S) abort with error if any of the arguments are malformed.

Source code

Functions are built in.


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index