Announcement

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

  • Calculating margins for regressions which uses plausible values and interactions

    Hi,

    I conducted a linear regression with interactions by use of Pisa data.
    My code to calculate them is
    pv, pv(pv*math) weight(w_fstuwt) brr rw(w_fsturwt*) fays(0.5): ///
    reg @pv c.escs##cnt_num i.spktestlang##cnt_num [aw=@w]
    escs is the socioeconomic status of an indivdiual
    cnt_num is the encoded country (5 countries in the sample)
    spktestlang states if the child speaks the language of assessment at home (dummy-variable)


    Now, I would like to calculate margins for the effects.

    But it does not work and I get an error code instead of a margins table.
    More specifically, I have tried different commands like
    margins dydx(i.spktestlang c.escs) moptions(atmeans)
    just margin and others
    But mostly I get this error:

    warning: cannot perform check for estimable functions.
    e(sample) does not identify the estimation sample


    I have also tried to include if e(sample) but it does not work either.

    Since Pisadata is a common dataset, I hope that you can help me.
    That would be great.

    Best,
    Hannah

  • #2
    have you looked at: search pisatools
    pisareg might work better.

    Comment

    Working...
    X