Dear Stata Users
Yesterday I posted a question under the head, "Regression-based on different time periods", that didn't elicit any response from the community. I am extremely sorry if my question was vague. I am reproducing my example using a sample table to elaborate my question.
firm year IPO year inv ta cf
a 1991 1992 115 200 60
a 1992 270 350 85
a 1993 330 490 96
a 1994 550 610 70
b 1991 1991 450 1500 455
b 1992 900 1150 328
b 1993 2000 3500 600
b 1994 1575 4500 1500
c 1991 1993 380 650 790
c 1992 298 750 350
c 1993 156 890 110
c 1994 605 910 205
In the above table, I have 3 firms which went for IPO during three different time periods. I would like to run a regression based on this IPO year(condition). That is firm "a" went for IPO on 1992, I would like to run a regression with data that includes IPO year and IPO year+1. Hence the data based on the IPO year 1991 for running regression will be
firm year IPO year inv ta cf
a 1992 270 350 85
a 1993 330 490 96
Similarly, for the firm "b", the IPO year is 1991 and therefore, the data for regression must include years 1991 and 1992 and the table will look like
firm year IPO year inv ta cf
b 1991 1991 450 1500 455
b 1992 900 1150 328
Similarly, for C the data includes IPO year and the subsequent year, and data for "c" will be as follows
firm year IPO year inv ta cf
c 1993 156 890 110
c 1994 605 910 205
So the final data set for running regression that meets the criteria based on the IPO year and IPO year+1 will be
firm year inv ta cf
a 1992 270 350 85
a 1993 330 490 96
b 1991 450 1500 455
b 1992 900 1150 328
c 1993 156 890 110
c 1994 605 910 205
How to tell Stata to perform a regression based on the above condition, where the condition is to run a panel regression with the data based on IPO year and IP year+1 and to collect the coefficients
My dep variable is inv and indep variables are ta and cf.
If still there is a problem in my question, please let me know as I can rectify it at the earliest. Kindly help me to sort this issue