Announcement

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

  • note: continuous option implied because a factor with only one level was specified in the eydx() option

    I ran a ppmlhdfe regression on an unbalanced panel data looking at the citations received by individual sole-authored papers over time.
    Code:
    ppmlhdfe exclud_self   i.paper_age   i.dead_dumyA1    i.dead_dumyA1#c._2Year_citeAtDeath  i.dead_dumyA1#c.AuthorActiveAtDeathRel 1.dead_dumyA1#c._2Year_citeAtDeath#c._2Year_citeAtDeath, absorb(i.paper)  vce(cluster paper author_id) d
    Click image for larger version

Name:	Picture4.png
Views:	1
Size:	213.6 KB
ID:	1759746


    Then, to obtain the semielasticity, I run the following command, where dead_dumyA1 is a factor variable having two levels: equal to 1 if the author of a paper is dead in the particular year and 0 otherwise.
    Code:
    margins, eydx(i.dead_dumyA1)
    Click image for larger version

Name:	Picture3.png
Views:	1
Size:	24.2 KB
ID:	1759745


    As shown by the output above, the command runs and provides me with the semielasticity, but I am worried about the following warning message:
    “(note: continuous option implied because a factor with only one level was specified in the eydx() option)”
    I cannot understand this message. Why is Stata saying that this factor variable has only one level?
    I carefully checked this variable for the sample used in this regression, and there is no individual for which dead_dumyA1 is equal to 0 in all the years or all equal to 1 in all the years.
    I am worried because a “continuous option implied” means that Stata is calculating a derivative, but I need the calculation of the discrete difference because " dead_dumyA1” is a factor variable with two levels.
    I am using Stata MP 14.2.
    Any help is greatly appreciated.
    Last edited by Osiris Parcero; 25 Jul 2024, 07:17.

  • #2
    Later today I replicated the same regression followed by the same margins’ command but with only 9 papers (individuals) and 204 observations. In this new case, I am even surer that the dead_dumyA1 has both 0s and 1s for each single individual. However, the margins command continues giving the message:
    “(note: continuous option implied because a factor with only one level was specified in the eydx() option)”

    Comment


    • #3
      ppmlhdfe is from SSC (FAQ Advice #12). Look at your estimation command:

      ppmlhdfe exclud_self i.paper_age i.dead_dumyA1 i.dead_dumyA1#c._2Year_citeAtDeath i.dead_dumyA1#c.AuthorActiveAtDeathRel 1.dead_dumyA1#c._2Year_citeAtDeath#c._2Year_citeAtDeath, absorb(i.paper) vce(cluster paper author_id) d
      You are using "dead_dummy" both as a factor variable and a continuous variable. How do you expect margins to calculate the semi-elasticity? Change "1.dead_dumyA1" to "i.dead_dumyA1".

      Comment


      • #4
        Thank you so much Andrew for your precise and useful answer, as usual. This solves the problem.

        Comment

        Working...
        X