Announcement

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

  • Using postfile to store regression coefficients

    Getting this error:

    ( invalid name
    r(198);

    When running this:

    Code:
    postfile `sim' beta sd using dem, replace
    reg hpayday kids xtnw xtinc_pc
    post `sim' (_b[kids]) (_se[kids])
    Tried other possibilities, based on other posts, but same error:

    Code:
    postfile `sim' beta sd using dem, replace
    reg hpayday kids xtnw xtinc_pc
    post `sim' (`=_b[kids]') (`=_se[kids]')

  • #2
    1. You're in the wrong forum for this question
    2. You need to declare the temporary name `sim' before using it in -postfile-
    Code:
    tempname sim // <- this
    postfile `sim' beta sd using dem, replace
    . . .

    Comment

    Working...
    X