Stata 15 help for _get_offopt

Title

[P] _get_offopt -- Parsing tool for getting offset option specification

Syntax

Standard offset variable syntax:

_get_offopt [varname] [, noconfirm]

Exposure variable syntax (also known as log offset):

_get_offopt [ln(varname)] [, noconfirm]

Description

_get_offopt is a programming tool that helps identify which option was used to specify an offset in an estimation command, based on what is typically put in e(offset). Basically, _get_offopt looks at the supplied argument and returns the associated option in s(offopt). varname is returned in s(offvar).

Option

noconfirm prevents _get_offopt from confirming that varname exists.

Examples

. sysuse auto, clear (1978 Automobile Data)

. quietly poisson mpg turn trunk, exposure(gear) . di "`e(offset)'" ln(gear_ratio) . _get_offopt `e(offset)' . sreturn list

macros: s(offvar) : "gear_ratio" s(offopt) : "exposure(gear_ratio)"


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