Hi All,
I just transformed some wide panel data into long form panel data so that I could carry out fixed effect analysis easily.
Before I had columns representing variables by year so e.g. profit21, profit20, profit19,......, employees21, employees20,..... and so on
now it looks more like:
and so on. Sorry if this was obvious i am still fairly new to stata
now my question is
before I could regress:
reg profit21 employees19 debt20 ......
but now how can i regress combination of different years like I did when it was in wide form?
I've been making new variables but its starting to look like wide form again which seems like a waste of time and generally wrong.
Any help is appreciated
I just transformed some wide panel data into long form panel data so that I could carry out fixed effect analysis easily.
Before I had columns representing variables by year so e.g. profit21, profit20, profit19,......, employees21, employees20,..... and so on
now it looks more like:
yr | profit | employees | debt |
17 | value for 2017 | data | .... |
18 | value for 2018 | data | .... |
19 | value for 2019 .... | data | ... |
20 | ..... | data | .... |
now my question is
before I could regress:
reg profit21 employees19 debt20 ......
but now how can i regress combination of different years like I did when it was in wide form?
I've been making new variables but its starting to look like wide form again which seems like a waste of time and generally wrong.
Any help is appreciated
Comment