Stata 15 help for _get_eformopts

Title

[P] _get_eformopts -- Parsing utility

Syntax

_get_eformopts [, eformopts(eform_options) allowed(allow_options)]

_get_eformopts , soptions [eformopts(options) allowed(allow_options)]

where eform_options is at most one of

eform(string) eform hr irr or rrr

allow_options is either __all__ or an option specification allowed by the syntax command, such as

hr IRr or RRr

(EForm is implied) and options is any collection of options, including eform_options.

Description

_get_eformopts is a parsing tool, written to help parse the multiple forms of the eform() option.

If more than one of the eform_options are supplied, _get_eformopts will produce an error.

Options

eformopts(eform_options) contain options to be parsed. When soptions is also specified, _get_eformopts allows other options besides eform_options within eformopts(), and will place them in s(options).

allowed(allow_options) accepts option specifications allowed by syntax to identify which shortcuts to the eform() option are allowed. Usually only one of the following is specified:

EForm hr IRr or RRr

soptions indicates that _get_eformopts allows other options besides eform_options within eformopts(), and will place them in s(options).

Examples

. _get_eformopts, eformopts(eform(Some string)) . sreturn list

macros: s(eform) : "eform(`"Some string"')" s(str) : "Some string"

. _get_eformopts, eformopts(or) allowed(__all__) . sreturn list

macros: s(eform_cons_ti) : "Odds" s(eform) : "eform(`"Odds Ratio"')" s(str) : "Odds Ratio" s(opt) : "or"

. _get_eformopts, eformopts(or junk) soptions allowed(__all__) . sreturn list

macros: s(eform_cons_ti) : "Odds" s(eform) : "eform(`"Odds Ratio"')" s(str) : "Odds Ratio" s(opt) : "or" s(options) : "junk"

. _get_eformopts, eformopts(or junk) allowed(__all__) option junk not allowed r(198);

. _get_eformopts, eformopts(eform or) allowed(__all__) only one of eform or or is allowed r(198);

Stored results

_get_eformopts stores the following in s():

Macros:

s(opt) "", or one of eform, hr, irr, or, rrr s(str) contents of the eform() option s(eform) equivalent eform() option to the one supplied s(eform_cons_ti) coefficient title for the constant-only model s(options) any other options


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