Announcement

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

  • groups within groups

    Dear all,

    I hope my post finds you well

    I have a question concerning panel data.

    I am currently working on my Master's thesis. I have a panel data with 53 cities in 1 country and 104 weeks (2 years) for every city (5,512 obs) and using STATA 15.1.

    I am using a fixed effect model with 53 cities and 104 weeks for every city. I would like to add the provinces of this country and declare my data set with a new panel which is province and same period 104 weeks, 24 months and 2 years. I have 13 provinces with different number of cities in every province. I already added the provinces and the periods (Week,Month,Year) and obviously there are repeated time values within panel every time I try to xtset Province week, month or year.

    Is it possible to make stata accepts that the provinces are the big groups and that the repeated time values are for every city but regrouped on province level?

    Thank you in advance

    Best regards,

  • #2
    Abboud:
    welcome to this forum.
    If you do not plan to use time series commands, such as lags and leads, you can -xtset- your dataset with your new -panelid- only:
    Code:
    xtset Province
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi, I am stuck with tetrachoric correlation. After giving the command in stata I have received the following result which is wrong.

      Matrix with tetrachoric correlations (firm performance measure)
      Variables (1) (2) (3) (4) (5) (6) (7) (8) (9)
      (1) ROA 1.000
      (2) A_ROA -1.000 1.000
      (3) ROE -1.000 -1.000 1.000
      (4)SalesGrowth -1.000 -1.000 -1.000 1.000
      (5) TobinsQ -1.000 -1.000 -1.000 -1.000 1.000
      (6)StockReturn -1.000 -1.000 -1.000 -1.000 -1.000 1.000
      (7) MTB -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 1.000
      (8) MV -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 1.000
      (9)AMmeasure -1.000 -1.000 -1.000 -1.000 1.000 1.000 1.000 1.000 1.000
      I am just wondering whether this result could be because of low number of observations. The number of observations with this result is 189.

      Thank you

      Comment


      • #4
        Fatematuz:
        welcome to this forum.
        Please, start a new thread as yours is not related to the original poster's subject. Thanks.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Hi Carlo,

          Actually I am unable to create a new thread. Could you please tell me where to post?

          Thank you for ur reply and sorry for bothering you

          Comment


          • #6
            Dear Carlo,

            Thank you for your reply.

            As I am studying the effect of the military foreign intervention by states and the effect on the number of battle death in 53 cities during 104 weeks (2 years). I am trying to run a new regression using a bigger group which is the provinces (#13) weekly, monthly and yearly, in order to control for endogeneity between the intervention (Independent variable) and the number of battle death (dependent variable) in every city during 104 week each. What I am trying to do now is to make the role of the intervention smaller by taking the provinces as the panel variable during 104 weeks for each. So, if I am able to run this regression I expect nothing significant as the role of the intervention is smaller. As mentioned before, I have different number of cities in every province, so for sure I would have an unbalanced data.

            Furthermore, I am trying to do so in order to control for the cities and the period. So, I would like to see what is the effect of intervention when I am taking the province as a panel during 104 weeks for every city. Is that possible to do that in one dataset? Or should I have one dataset City weekly and another one Province weekly or monthly?

            Thank you very much for your help.

            Best regrads,

            Comment


            • #7
              Dear Fatematuz Tamanna Ahamed,

              please use this link: https://www.statalist.org/forums/help

              Best regards,

              Comment


              • #8
                Since cities don't change provinces, a fixed effect estimator with fixed effects at the city level fully controls for any province effects that don't vary over time.

                Comment


                • #9
                  Thank you Phil

                  Comment

                  Working...
                  X