Hi statalists,
I have unbalanced panel data for a set of firms for the period that extends from (2010-2018). The dependent variable coded (1) if the company meet specific criteria and (0) otherwise. Furthermore, if the company meet the criteria in specific year, then I will stop observing the data in the years after the year of meeting the criteria. I mean the latest observing year for the company will be the year of meeting the criteria. However, there is no specific year to meet the criteria. For instance, company (A) might meet the criteria in 2014, then in 2014 the dependent will be coded (1) and all previous years will be coded (0) for the dependent variable and all observation after 2014 will be deleted for the dep.var and indep. variables. While, other company might meet the criteria in 2015, then the dep.var will be coded (1) and all previous years will be coded (0) and all years after 2015 will be deleted.
Therefore, I tried to adopt the following codes:
encode CompanyName, gen (COMPID)
global id COMPID
ta year, ge (d)
xtset COMPID Year
xtlogit DEP X1 X2 X3, nolog re
(Then the output showed me the results of random-effect logistic regression).
But Prob >= chibar2 = 1.000,,, meaning no observed heterogeneity!!
Is my analysis correct??
Then I tried to include the year as dummies and adopted the following code:
xtlogit Dep.var X1 X2 X3 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 , nolog
(The Stata took long time to proceeds and I have got no results).!!! Is there something wrong?
Then, I have added <fe> to the above code and the case happened again??

May you please help me to find out the solution and I will be very grateful.
Appreciating your consideration and cooperation.