Announcement

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

  • estimate and predict using other sample?

    Dear All, I have this data set test.dta (for completeness, I do not use dataex) and run the following command
    Code:
    reg y z x i.type ib2012.year i.asset2 if split==0
    i.e., using subsample split==0. Now, I have the estimated coefficients. However, I'd like to use subsample split==1 and the estimated coefficients above to obtain predicted yy for split==1. Any suggestions? Thanks.
    Ho-Chuan (River) Huang
    Stata 17.0, MP(4)

  • #2
    Very straightforward.

    Code:
    reg y z x i.type ib2012.year i.asset2 if split == 0
    
    predict yy if split == 1, xb

    Comment


    • #3
      Dear Clyde, So easy? Thanks a lot.
      Ho-Chuan (River) Huang
      Stata 17.0, MP(4)

      Comment

      Working...
      X