Announcement

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

  • marginsplot after xthtaylor command

    Dear all,

    I am currently using Hausman-Taylor model to test the the relationship of deforestation (independent variable) and informal employment (dependent variable). In the model, I also add the squared term of deforestation rate which is calculated manually as deforestation * deforestation. When it comes to the marginsplot, I seems to obtain the linear graph although the regression estimates show that the deforestation and squared deforestation have positive and negative effect on informal employment, repsectively.

    But if I used the random effect model by using the ## function as follow: xtreg informal deforestation c.deforestation##c.deforestation, re

    The marginsplot commands seems to produce the right graph.

    Could anyone suggest how to generate the predictive margin plot after the xthtaylor command?

    Thank you very much,
    Rattiya

  • #2
    margins does not know that \(deforestation\) and \(deforestation^2\) are related as xthtaylor does not support factor variables. FernandoRios wrote a command f_able which you can download from SSC that will make this relationship apparent.
    Last edited by Andrew Musau; 19 Jan 2023, 10:10.

    Comment


    • #3
      Originally posted by Andrew Musau View Post
      margins does not know that \(deforestation\) and \(deforestation^2\) are related as xthtaylor does not support factor variables. FernandoRios wrote a command f_able which you can download from SSC that will make this relationship apparent.
      Thanks a lot !

      Comment


      • #4
        If interested, see https://www.statalist.org/forums/for...tic-regression

        Comment

        Working...
        X