Announcement

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

  • How to regression with unbalance data table

    Dear stata users,

    I am searching for the right regression method for my panel data. As I am new to stata, it is not that easy for me to find the right solutions for my problems.

    FIRM YEAR I F C Group
    1 1935 317.6 3078.5 2.8 1
    1 1936 391.8 4661.7 52.6 3
    1 1937 410.6 5387.1 156.9 2
    1 1938 257.7 2792.2 209.2 1
    1 1939 330.8 4313.2 203.4 3
    1 1940 461.2 4643.9 207.2 1
    2 1935 209.9 1362.4 53.8 1
    2 1936 355.3 1807.1 50.5 3
    2 1937 469.9 2676.3 118.1 2
    2 1938 262.3 1801.9 260.2 3
    2 1939 230.4 1957.3 312.7 2
    2 1940 361.6 2202.9 254.2 3
    3 1935 33.1 1170.6 97.8 1
    3 1936 45 2015.8 104.4 3
    3 1937 77.2 2803.3 118 2
    3 1938 44.6 2039.7 156.2 3
    3 1939 48.1 2256.2 172.6 1
    3 1940 74.4 2132.2 186.6 1
    4 1935 40.29 417.5 10.5 2
    4 1936 72.76 837.8 10.2 3
    4 1937 66.26 883.9 34.7 3
    4 1938 51.6 437.9 51.8 3
    4 1939 52.41 679.7 64.3 3
    4 1940 69.41 727.8 67.1 1
    5 1935 39.68 157.7 183.2 3
    5 1936 50.73 167.9 204 1
    5 1937 74.24 192.9 236 3
    5 1938 53.51 156.7 291.7 1
    5 1939 42.65 191.4 323.1 3
    5 1940 46.48 185.5 344 1
    Suppose, I use the data set Grunfeld (balance data panel) and create 1 more dummy variable group (taken randomly with the value 1,2,3).
    Now, I want to regression with the groups but I have the data set unbalanced. Thus, how can I resolve my problem?
    FIRM YEAR I F C Group
    1 1935 317.6 3078.5 2.8 1
    1 1938 257.7 2792.2 209.2 1
    1 1940 461.2 4643.9 207.2 1
    2 1935 209.9 1362.4 53.8 1
    3 1935 33.1 1170.6 97.8 1
    3 1939 48.1 2256.2 172.6 1
    3 1940 74.4 2132.2 186.6 1
    4 1940 69.41 727.8 67.1 1
    5 1936 50.73 167.9 204 1
    5 1938 53.51 156.7 291.7 1
    5 1940 46.48 185.5 344 1
    1 1937 410.6 5387.1 156.9 2
    2 1937 469.9 2676.3 118.1 2
    2 1939 230.4 1957.3 312.7 2
    3 1937 77.2 2803.3 118 2
    4 1935 40.29 417.5 10.5 2
    1 1936 391.8 4661.7 52.6 3
    1 1939 330.8 4313.2 203.4 3
    2 1936 355.3 1807.1 50.5 3
    2 1938 262.3 1801.9 260.2 3
    2 1940 361.6 2202.9 254.2 3
    3 1936 45 2015.8 104.4 3
    3 1938 44.6 2039.7 156.2 3
    4 1936 72.76 837.8 10.2 3
    4 1937 66.26 883.9 34.7 3
    4 1938 51.6 437.9 51.8 3
    4 1939 52.41 679.7 64.3 3
    5 1935 39.68 157.7 183.2 3
    5 1937 74.24 192.9 236 3
    5 1939 42.65 191.4 323.1 3
    It would be a pleasure, if you could help me, since I haven't found any solution.
    Best Regards,

  • #2
    Van:
    welcome to this forum.
    Stata can handle both balanced and unbalanced panel datasets: hence, this is not an issue for your research.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Dear Carlo
      Thanks for your advice but I don't know how can I use the right model. I always use OLS, FEM, REM, 2SLS, GMM with panel data but when I use the command with IF, it becomes unbalanced do my results bias
      For example
      reg I F C if Group ==1
      xtreg I F C if Group ==1, re
      xtreg I F C if Group ==1, fe

      how can I resolve this issue? please give me advice.

      Comment


      • #4
        Van:
        unbalaced panel datasets are perfectly legal.
        Hence you can estimate their coefficients via -xtreg- if your regressand is continuous.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Dear Carlo
          I really appreciate your enthusiasm.
          Thanks.

          Comment

          Working...
          X