Announcement

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

  • How to identify countries based on their disclosure requirement status in a panel data set?

    Dear members

    I am assessing a country-level disclosure requirement on firm-level characteristics in an international sample study. The country-level disclosure requirement is a dummy variable equal to one if the country mandates firms to disclose certain information and zero otherwise. It is important to note that my sample period ranges from 2005-2020 and during this time, certain countries have been mandating firms to disclose, other countries have mandated the disclosure in different years during my sample, while other countries did not mandate disclosure from their public firms at all.

    My question is as follows I would like to identify 1- countries that have mandated the disclosure in all the sample period years
    2- countries that have mandated the disclosure during certain years within the sample period
    3- countries that did not mandate this disclosure during the sample period years.

    suppose that the country-disclosure dummy is named ( country_discloure_statuts), and I have coded countries by country_code.

    Thanks in advance for your help.

  • #2
    Code:
    by country_code (year), sort: egen disclosure_mandated_all_years ///
        = min(country_disclosure_status)
    by country_code (year): egen disclosure_never_mandated ///
        = min(!country_disclosure_status)
    by country_code (year): gen disclosure_sometimes_mandated ///
        = !disclosusre_mandated_all_years & !disclosure_never_mandated
    In the future, when asking for help with code, please use the -dataex- command and show example data. Although sometimes, as here, it is possible to give an answer that has a reasonable probability of being correct, this is usually not the case. Moreover, such answers are necessarily based on experience-based guesses or intuitions about the nature of your data. When those guesses are wrong, both you and the person trying to help you have wasted their time as you end up with useless code. To avoid this, a -dataex- based example provides all of the information needed to develop and test a solution.

    Because there was no example data to test the code on, it is not tested. It may contain typos or other errors, so check it carefully when you use it. If you require assistance in fixing errors that you find in it, be sure to include example data that illustrates the error(s) when you post back, and use the -dataex- command to do so.

    Comment


    • #3
      Thank you so much Clyde for your help; your code worked perfectly fine. Your suggestions are also noted. Thanks again.

      Comment

      Working...
      X