Announcement

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

  • panel data - generate variable that shows variation

    Hey everyone,

    for my bachelor thesis i am doing a logit regression. i have a panel dataset. the survey was conducted 5 times.
    as i tried to do a fixed effects regression i realized that there isn't enough variation in y as almost all observations had to be dropped because of that. (only 30 out of 330 remained)
    I am doing a random effects regression now.

    Since i have to explain why i didn't choose the fixed model i want to illustrate it. i thought that generating a variable a=1 if the person changed his/her mind during the survey waves and a=0 if the person didn't change his/ her mind.

    i have a unbalanced panel so it is possible that a person only answered 3/5 surveys but nontheless a=0 if the ansers are the same.

    Any ideas?

    Thank you!
    Best Katharina

  • #2
    See xtsum, which decomposes the variation of variables into between- and within-variation.

    Best
    Daniel

    Comment


    • #3
      Also an FAQ

      http://www.stata.com/support/faqs/da...ions-in-group/

      Comment


      • #4
        As far as the theoretical underpins are concerned, Katharina may also want to take a look at Paul Allison's textbook on this topic http://www.stata.com/bookstore/fixed...els/index.html.
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment

        Working...
        X