Dear Statalist,
I'm having difficulties with reshaping my paneldata. I have estimated betas of 500 companies over 15 years from a first regression. I only want to include significant betas in my second stage that is why I have an unbalanced Panel.
The way that I have now arranged them is(in short):

I want to reshape the data to become like this for a fixed effects regression:
I tried to orientate on the example of Tom regt and the advice of Nick Cox here:
http://www.statalist.org/forums/foru...ing-panel-data
I used the code:
But stata showed up with a error r(498) "_j contains all missing values"
Have I done something wrong?
Is there a better way to organize my panel data structure?
Any help is appreciated!
Tom
I'm having difficulties with reshaping my paneldata. I have estimated betas of 500 companies over 15 years from a first regression. I only want to include significant betas in my second stage that is why I have an unbalanced Panel.
The way that I have now arranged them is(in short):
I want to reshape the data to become like this for a fixed effects regression:
State | Year | company |
beta | 1999 | 1 |
beta | 1999 | 2 |
beta | 1999 | 3 |
beta | 1999 | 4 |
beta | 1999 | 5 |
beta | 2000 | 1 |
beta | 2000 | 2 |
beta | 2000 | 3 |
beta | 2000 | 4 |
beta | 2000 | 5 etc. |
http://www.statalist.org/forums/foru...ing-panel-data
I used the code:
Code:
reshape long company, i(state year)
Have I done something wrong?
Is there a better way to organize my panel data structure?
Any help is appreciated!
Tom
Comment