Announcement

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

  • Need help to check out my syntax [Fixed-effect model]

    I am not familier with STATA, so I need your help checking out my syntax.

    I would like to examine the changes in social exclusion over time (before and after the COVID-19 outbreak).
    I used a panel data from 2016 and 2020 wave and I created a long format dataset.
    Variables are listed below:
    id and individualid (exactly same variables, individualid was created when the long format dataset was made),
    year (0=2016, 1=2020),
    resources (sum of scores of resources indicators),
    participation (sum of scores of participation indicators),
    qol (sum of scores of quality of life indicators),
    health and living (sum of scores of each indicators; health + living = qol)
    socialexclusion (sum of scores of resources, participation and qol)

    Below is what I did.
    I would like to know if I correctly entered syntax and analyzed it.
    Again, the goal is to examine the changes in social exclusion over time (before and after the COVID-19 outbreak).
    If the syntax is correct, I will repeat the similar analyses using detailed domains (e.g., resources, participation, qol).




    . xtset id year, yearly

    Panel variable: id (strongly balanced)
    Time variable: year, 0 to 1
    Delta: 1 year

    . xtreg socialexclusion year, fe vce(robust)

    Fixed-effects (within) regression Number of obs = 1,498
    Group variable: id Number of groups = 749

    R-squared: Obs per group:
    Within = 0.1016 min = 2
    Between = . avg = 2.0
    Overall = 0.0149 max = 2

    F(1,748) = 84.57
    corr(u_i, Xb) = -0.0000 Prob > F = 0.0000

    (Std. err. adjusted for 749 clusters in id)
    ------------------------------------------------------------------------------
    | Robust
    socialexcl~n | Coefficient std. err. t P>|t| [95% conf. interval]
    -----------------+----------------------------------------------------------------
    year | .7676903 .0834783 9.20 0.000 .6038106 .9315699
    _cons | 5.405874 .0417391 129.52 0.000 5.323935 5.487814
    -------------+----------------------------------------------------------------
    sigma_u | 2.9112613
    sigma_e | 1.6149324
    rho | .76469358 (fraction of variance due to u_i)
    ------------------------------------------------------------------------------



    Thank you all.


  • #2
    Seems to be correct. You just want to model social exclusion as a function of before/after.

    Comment


    • #3
      Originally posted by Joro Kolev View Post
      Seems to be correct. You just want to model social exclusion as a function of before/after.
      Thank you so much!!

      Comment


      • #4
        Joonyup:
        a Within Raq = 0.1016 calls for a check of the functional form of the regressand.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment

        Working...
        X