Stata 15 help for _mgarch_p_names

Title

[P] _mgarch_p_names -- Parse new variable lists for mgarch postestimation

Syntax

_mgarch_p_names new_var_spec, suffix(varlist) stat(statistic) [equation(eqnames)]

where new_var_spec is either newvarlist or stub*; see newvarlist.

Description

_mgarch_p_names is a modification of _stubstar2names and is used for generating a list of new variables for predict after mgarch. _mgarch_p_names will turn stub* into a list of names that begin with stub and are indexed by variable names provided in option suffix().

Options

suffix(varlist) is required and contains the names of the dependent variables in the model. The returned newvarlist will be of the form stub_varname1, stub_varname2, .... Time-series operators will be converted to legal variable names.

stat(statistic) is required and is one of xb, residuals, or variance. If the statistic is variance, the returned newvarlist will contain 0.5*k(k+1) variable names generated in vech order.

equation(eqnames) specifies the names of equations for which predictions are made.

Examples

. _mgarch_p_names xb*, suffix(y1 y2 y3) stat(xb) . sreturn list

macros: s(stub) : "1" s(typlist) : "float float float" s(newvarlist) : "xb_y1 xb_y2 xb_y3" s(lablist) : "(y1) (y2) (y3)" s(depvars) : "y1 y2 y3"

. _mgarch_p_names v*, suffix(y1 y2 y3) stat(var) . sreturn list

macros: s(stub) : "1" s(typlist) : "float float float float float float" s(newvarlist) : "v_y1_y1 v_y2_y1 v_y3_y1 v_y2_y2 v_y3_y2 v_y3_y3" s(lablist) : "(y1,y1) (y2,y1) (y3,y1) (y2,y2) (y3,y2) (y3,y3)" s(depvars) : "y1 y2 y3"

. _mgarch_p_names v23, suffix(y1 y2 y3) stat(var) eq(y2,y3) . sreturn list

macros: s(stub) : "0" s(typlist) : "float" s(newvarlist) : "v23" s(lablist) : "(y2,y3)" s(depvars) : "y1 y2 y3" s(ix1) : "2" s(ix2) : "3"

. _mgarch_p_names e3, suffix(y1 y2 y3) stat(res) eq(y3) . sreturn list

macros: s(stub) : "0" s(typlist) : "float" s(newvarlist) : "e3" s(lablist) : "(y3)" s(depvars) : "y3" s(ix1) : "3"

Stored results

_mgarch_p_names stores the following in s():

Macros s(newvarlist) list of new variable names s(typlist) list of types for the new variables s(lablist) list of parenthesized equation names s(depvars) names of equations predict will use s(stub) 0 or 1; indicator for stub* in new_var_spec s(ix1) index of first equation s(ix2) index of second equation


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