Announcement

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

  • Setting control variables for xtlogit or xtmlogit

    Dear Statalisters,

    I'm working on a dataset that contains closing data for companies and a binary variable for a few of them if the company was acquired.
    The data is in panel data.
    I want to use xtlogit or xtmlogit to check what data from the balance sheet is used by firms to decide whether to buy or not buy a firm.
    For all this I want to use a control variable for the year in which the closing data was released.
    But I don't understand how to do this.
    xtset panelvar timevar is what I use to define the panel data.

    Thanks for your help in advance.
    Last edited by Henry Selt; 15 Feb 2023, 09:40. Reason: panel data

  • #2
    is there a variable indicating when the closing data was released?

    Comment


    • #3
      Yes, the variable closing_year contains the year of the closing data.

      Comment


      • #4
        "For all this I want to use a control variable for the year in which the closing data was released."
        I'm not exactly sure what you mean. You have a variable indicating the control year and it is a variable.

        Comment


        • #5
          Sorry for my bad description. I want to control my study for the effect of a different closing year. Because the closing year is not of interest to my study's objectives, but I want to control it because it could influence the outcomes.
          Do you understand this explanation?

          Comment


          • #6
            can you just add closing_year as a regressor? or do you want a dummy for closing year?

            Comment


            • #7
              I don't know which possibility is better. But I prefer a dummy variable.

              Comment


              • #8
                dummy is just
                bys id: g close_dummy = year==close_year

                or if you want all years after close_year
                bys id: g close_dummy = year>=close_year

                Comment


                • #9
                  Okay thanks a lot George!

                  Comment

                  Working...
                  X