Announcement

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

  • Storing 2 estadd scalars from same regression (using sum and lincomest), under common estimates store name

    I need to include values of both the scalars ymean and comcoef added to estimates under the name analysis1 (will be used later to estout). Hence, they should all show up together when I do ereturn list. I am able to store ymean, though as soon as I run lincomest the connection with "analysis1" breaks.

    Thank you in advance!

    Code:
    reg price rep78 mpg estimates store analysis1 summarize rep78 if price > 4000 estadd scalar ymean = r(mean) lincomest rep78 + mpg matrix im = e(b) estadd scalar comcoef = im[1,1] ereturn list

  • #2
    estout and lincomest are from SSC (FAQ Advice #12).

    Code:
    reg price rep78 mpg
    estimates store analysis1
    summarize rep78  if price > 4000
    estadd scalar ymean = r(mean
    lincomest rep78 + mpg
    matrix im = e(b)
    est restore analysis1
    estadd scalar comcoef = im[1,1]
    ereturn list

    Comment


    • #3
      Thank you very much Andrew! Its working now.

      Comment

      Working...
      X