Announcement

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

  • Fixed effects analysis using cross sectional data

    Dear all,

    I have a cross sectional data that has a variable which identifies the family that each individual in the sample belongs to. I want to run a family fixed effects analysis using the cross sectional data. Could someone please help with the code for this.

    I tried
    xtset family
    xtlogit y x, fe
    it gives an unending result as below and i had to end it as it wouldnt stop
    Iteration 0: log likelihood = -3.4657359 (not concave)
    Iteration 1: log likelihood = 0 (not concave)
    Iteration 2: log likelihood = 0 (not concave)
    Iteration 3: log likelihood = 0 (not concave)
    Iteration 4: log likelihood = 0 (not concave

    Iteration 48: log likelihood = 0 (not concave)
    Iteration 49: log likelihood = 0 (not concave)
    Iteration 50: log likelihood = 0 (not concave)
    Iteration 51: log likelihood = 0 (not concave)

    I also have another cross sectional data which consists on a country identifier, i will like to estimate a country fixed effects. Please how do i go about this using a cross sectional data (whats the code needed please)?

    Thanks.

  • #2
    Adeola:
    I'm not clear with your using an -xt- commands for analyzing cross-sectional data.
    Why not using -logit- or -logistic- instead?
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Many thank, but i have family unique ID and i will want to do a family fixed effects using the cross sectional data. Please how do i go about this?

      Comment


      • #4
        If i understood correctly, you have individuals nested within families, but you do not have a time dimension. Then this should not be estimated using a fe but using a re. Actually you have a multilevel model. Hence, you can use xtlogit with re option or the command mixed of you want to estimate an intercept random multilevel model. Instead, if you want to consider also the possibility that the coefficient of x will change on the basis of your multilevel structure, so you estimate a random slope model, then you should use only the command mixed.

        Comment


        • #5
          Many thanks for your comment. Could you please help with the code for the mixed command.

          I have also seen where in a cross sectional model there is a country identifier and this was used for country effects, how then was this done?

          Comment


          • #6
            It's fine to use xtlogit, fe with cross-sectional data. What you did should have worked, so I suspect there is a problem with your data. Do you have variation in both your x and y variable within family? If you show an example of your data it would help a lot.

            Using random effects for the kind of data structure you have will impose strong assumptions on exogeneity of x. If x never varies within family then you can't use FE and you'll have to use an RE approach.

            Comment


            • #7
              Many thanks for your reply @ Jeff Woolridge. For the particular outcome i had issues with, i think it didn't vary in x and y within family. The method worked with other outcomes.

              Comment


              • #8
                The method you have used is correct, it is just a problem that in general you cannot use fixed effects methods on variables which do not change within the panel.

                Comment

                Working...
                X