Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Undocumented option lnoffset in glm

    I can use the lnoffset option with glm but it does not appear in the help glm display. Is this an oversight? I found an example using lnoffset on the UCLA site at: http://www.ats.ucla.edu/stat/stata/e...da/icdast4.htm

  • #2
    Isn't lnoffset the same as exposure, which is documented?

    Code:
    webuse dollhill3, clear
    glm deaths smokes i.agecat, family(poisson) link(log) exposure(pyears)
    glm deaths smokes i.agecat, family(poisson) link(log) lnoffset(pyears)
    I am guessing the option got renamed at some point and the old name still works.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    Stata Version: 17.0 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #3
      Richard,

      Based on the glm.ado code, your guess appears to be correct. If exposure(varname) is specified, the variable name is assigned to the lnoffset macro, which is used thereafter. For (presumably) backward compatibility as well as minimal programming changes, the lnoffset(varname) option is still allowed.

      Regards,
      Joe

      Comment


      • #4
        I dug out my trusty old versions of Stata. lnoffset was used in Stata 7 & 8. Starting in Stata 9 the option was called exposure. Stata 9 seems to be the version in which all sorts of names for different things got tidied up. I don't see anything in -help whatsnew- that documents the name change. Poisson in Stata 7 was using the term exposure so maybe the change was done for internal consistency.

        Both names make sense. lnoffset describes what is being done to the variable: you are takings its log and then using it as an offset variable (with coefficient equal to 1).

        The term exposure makes clear what the function of the variable is. It measures differences in exposure to risk, i.e. different individuals have had different amounts of time to do whatever it is the dependent variable is measuring.

        Kind of like the difference, I guess, between labeling something as the odds ratio as opposed to labeling it as the exponentiated coefficient.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        Stata Version: 17.0 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://www3.nd.edu/~rwilliam

        Comment


        • #5
          Thanks for taking the time to research this. It makes sense now. - Guest
          Last edited by sladmin; 01 Aug 2018, 10:23. Reason: anonymize user

          Comment

          Working...
          X