Announcement

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

  • NA's in sureg()

    Hi,

    How are NAs in the dependent variable column dealt for in sureg()?
    I want to estimate a system of 4 equations using sureg(), where all the Y-variables have some NA values, and they sum to 1 approximately.

    Thank you so much in advance!
    Last edited by Anisha Garg; 30 Jul 2021, 04:48. Reason: sureg

  • #2
    If an observation has a missing value on any of the variables used in your model, then the entire observation is ignored.

    How approximate is approximate? Should they add up to one, but computer precision gets in the way, or is it more approximate than that? If it is just a computer precision problem, then you could look at fmlogit (see ssc desc fmlogit) or dirifit (see ssc desc dirifit).
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      If your question is really about the sureg() function in R, then I would ask in an R forum. NA is at best translatable as meaning numeric missing in this context, but it's not part of Stata syntax.

      Comment


      • #4
        Hi Maarten and Nick,

        Thank you for your responses!

        I am trying to estimate vote shares of different parties. So, I have 4 parties, each having its own column in the data set. Hence, the sum would be tending to 1. Now, if a party does not contest in a particular area, then the vote share for that area is '.'.
        So, I have 4 equations - sureg (voteshare_party1 voteshare_party2 voteshare_party3 vote share_party4 = X_variables i.fixedeffectvariable1 i.fixedeffectvariable2).
        So, according to what you are saying, and if I am understanding it correctly, all the rows, wherever any party's vote share is NA, will get dropped, and hence my dataset will reduce.

        What I want to do is remove NAs separately for each equation, like it would have happened in reghdfe(). But I need to use sureg() because the error terms are correlated. Do you have any suggestions for this? Or any research paper which did something similar?

        I am using Stata. In R, I used systemfit() but the estimates I am getting from Stata and R vary widely.

        I really appreciate any suggestions on this. And am happy to share more context.

        Comment


        • #5
          It's already proved confusing, so let me strengthen an implication of #3 about the way you discuss Stata,

          In references to Stata functions it's common and helpful to use parentheses: indeed Stata itself respects such a convention is that (e.g.)

          Code:
          help sqrt()
          takes you straight to the help for that function. Otherwise, there is no point to -- and some distraction in -- referring to Stata commands with added parentheses.

          The underlying distinction of importance is that in Stata commands and functions are quite separate. The terms are not synonyms and the ideas are distinct.

          That is likely to be a novelty or a source of puzzlement to anyone new to Stata -- or anyone with more experience or expertise in other software -- but it's Stata's own and absolute distinction. It follows that appreciating and maintaining the distinction is helpful, whether you're learning, asking about or explaining the use of Stata.

          I don't have suggestions on your main question.
          Last edited by Nick Cox; 30 Jul 2021, 08:44.

          Comment


          • #6
            Thank you so much! I understand now, and will be careful from now onwards.

            Comment

            Working...
            X