Hi everyone,
I am running a discrete-time survival analysis about firm survival on an unbalanced panel data by using xtcloglog command in Stata14.
The dependent variable(exit):The survival time of an enterprise is defined as the time from the establishment of the enterprise to the exit from the market, and the event of the enterprise exiting the market is called "exit". For a specific year, if the company withdraws from the sample, define exit=1, otherwise exit=0. In order to avoid the left censoring problem leading to the bias of the regression results, this paper selects Newly established companies from 1999 to 2007 as research objects[panel data] .If the company still does not withdraw from the market in 2007, it is also impossible to know the company's exact survival time, the so-called right-censored problem. To solve this problem, this article takes the outcome variable of the companies that have not withdrawn from the market in 2007 to be 0.
The baseline hazard function by:
bysort id: ge j = _n
ge lnt = ln(j)
The Main Independent variable:rate lnt size profit leverage HHI dummy variables of FC12 dummy variables of region/industry/year,and(newest_year)isYear of establishment.
I want to know the the Impact of Enterprise-level Variables(size profit leverage HHI FC12) and interest rates (rate)on Enterprise Survival,and i want to control the impact of region/industry/year.so i generate some dummies by : i.region i.industry i.year
Then:
xtcloglog exit rate lnt size profit leverage HHI i.FC12 i.region i.industry i.year
but there is wrong,the note is:
note: _Iyear_2007 != 0 predicts failure perfectly
_Iyear_2007 dropped and 217157 obs not used
I don’t know if it’s because of the model setting or the dependent variable setting.Because in order to solve the problem of right-censored, the dependent variable of a company that has not exited in 2007 is set to 0, so all its years are 0.Some papers said Cloglog survival analysis method has considered the problem of right-censored,like (Hess,2012)But I dont know how to solve this problem by survival analysis.Or whether the code is wrong?
Here are my data:
And I want to konw the influence direction of the interaction item ,I thnk:
1.if both variables are continuous variables,the code:
c.rate#c.profit
I dont know how to Judge the effect of interaction ,positive or negative ?
2.if one is Continuous variables and another one is dummy variables ,like
c.rate#i.FC12
Can i margins:
margins,dydx(rate) at(FC12=(0 1)) predict(pu0)
Thanks in advance.
Best regards,
JJ
I am running a discrete-time survival analysis about firm survival on an unbalanced panel data by using xtcloglog command in Stata14.
The dependent variable(exit):The survival time of an enterprise is defined as the time from the establishment of the enterprise to the exit from the market, and the event of the enterprise exiting the market is called "exit". For a specific year, if the company withdraws from the sample, define exit=1, otherwise exit=0. In order to avoid the left censoring problem leading to the bias of the regression results, this paper selects Newly established companies from 1999 to 2007 as research objects[panel data] .If the company still does not withdraw from the market in 2007, it is also impossible to know the company's exact survival time, the so-called right-censored problem. To solve this problem, this article takes the outcome variable of the companies that have not withdrawn from the market in 2007 to be 0.
The baseline hazard function by:
bysort id: ge j = _n
ge lnt = ln(j)
The Main Independent variable:rate lnt size profit leverage HHI dummy variables of FC12 dummy variables of region/industry/year,and(newest_year)isYear of establishment.
I want to know the the Impact of Enterprise-level Variables(size profit leverage HHI FC12) and interest rates (rate)on Enterprise Survival,and i want to control the impact of region/industry/year.so i generate some dummies by : i.region i.industry i.year
Then:
xtcloglog exit rate lnt size profit leverage HHI i.FC12 i.region i.industry i.year
but there is wrong,the note is:
note: _Iyear_2007 != 0 predicts failure perfectly
_Iyear_2007 dropped and 217157 obs not used
I don’t know if it’s because of the model setting or the dependent variable setting.Because in order to solve the problem of right-censored, the dependent variable of a company that has not exited in 2007 is set to 0, so all its years are 0.Some papers said Cloglog survival analysis method has considered the problem of right-censored,like (Hess,2012)But I dont know how to solve this problem by survival analysis.Or whether the code is wrong?
Here are my data:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float id1 int year float(newest_year exit rate lnt Size1_w Profit_w Leverage_w hhi_sales_revenue_w) byte FC12 float industry byte province 252669 1999 1998 0 7.475 0 9.518634 .008081699 .805231 .014029914 1 42 7 252669 2000 1998 0 4.91 .6931472 7.83992 .23385827 .11692914 .01443257 0 42 7 252669 2001 1998 0 5.15 1.0986123 8.737774 .04282964 .01973051 .0035610865 0 42 7 252669 2002 1998 0 6.2 1.3862944 8.782783 .05029903 .007162753 .005094071 0 42 7 252669 2003 1998 1 4.11 1.609438 8.859364 .02713068 .09318182 .001766508 0 42 7 252670 2004 2003 0 1.455 0 9.166493 .03886741 .4118692 .0019394945 0 42 7 252670 2005 2003 0 3.78 .6931472 9.103979 .06639973 .2146591 .0019328854 0 42 7 252670 2006 2003 0 4.35 1.0986123 9.107754 .0833241 .25130194 .0017858335 0 42 7 252670 2007 2003 0 1.8675 1.3862944 9.575608 .04483309 .51856476 .001880076 0 42 7 252671 2001 1999 0 5.15 0 8.821585 .06534887 .3299897 .004970909 0 19 7 252671 2002 1999 0 6.2 .6931472 9.172223 .08580927 .4762103 .0032530755 0 19 7 252671 2003 1999 0 4.11 1.0986123 9.280053 .10380526 .4529006 .0019974066 0 19 7 252671 2004 1999 0 1.455 1.3862944 9.254931 .06264346 .464518 .0019860866 0 19 7 252671 2005 1999 0 3.78 1.609438 8.918248 .0498192 .12361056 .0015521896 1 19 7 252671 2006 1999 1 4.35 1.7917595 8.9297 .014034159 .035747387 .0011524967 1 19 7 252672 2004 2001 0 1.455 0 9.206734 .04185066 .4134886 .015159502 1 37 7 252672 2005 2001 0 3.78 .6931472 9.507849 .036539175 .56227255 .013225916 1 37 7 252672 2006 2001 0 4.35 1.0986123 9.639587 .04192435 .8089317 .009611954 1 37 7 252672 2007 2001 0 1.8675 1.3862944 9.935471 .1453753 .7621792 .006236942 1 37 7 252673 2007 2006 0 1.8675 0 8.553911 .1174089 .04954695 .0021321066 0 24 7 252674 2004 2003 1 1.455 0 6.93537 .43039215 .8764706 .0019394945 0 42 7 252675 2004 2002 0 1.455 0 8.95377 .16104433 .5186765 .0019860866 1 19 7 252675 2005 2002 0 3.78 .6931472 8.942853 .05318176 .5268522 .0015521896 1 19 7 252675 2006 2002 1 4.35 1.0986123 8.818038 -.019985195 .5243523 .0011524967 1 19 7 252676 2002 2001 0 6.2 0 7.925519 .09251897 .7477412 .005094071 0 42 7 252676 2003 2001 0 4.11 .6931472 6.93537 .1233993 .3597206 .001766508 0 42 7 252676 2004 2001 1 1.455 1.0986123 6.93537 .204142 .1775148 .0019394945 0 42 7 252677 2004 2001 0 1.455 0 7.922986 .10869565 .490942 .009159756 0 29 7 252677 2005 2001 0 3.78 .6931472 8.295798 .05964562 .5852259 .007856431 0 29 7 252677 2006 2001 0 4.35 1.0986123 8.572249 .06416809 .7088775 .007256249 1 29 7 252677 2007 2001 0 1.8675 1.3862944 8.584104 .11522634 .6603068 .00656977 0 29 7 252678 2003 1999 0 4.11 0 10.8337 .070945345 .4626339 .0019974066 0 19 7 252678 2004 1999 0 1.455 .6931472 10.82365 .0924214 .4170419 .0019860866 0 19 7 252678 2005 1999 0 3.78 1.0986123 10.903384 .16396247 .412638 .0015521896 1 19 7 252678 2006 1999 0 4.35 1.3862944 11.31905 .692726 .5559629 .0011524967 1 19 7 252678 2007 1999 0 1.8675 1.609438 11.70678 .4296494 .5718993 .0010498159 1 19 7 252679 2006 2003 0 4.35 0 9.526975 .03992714 .02615665 .0018632548 1 22 7 252679 2007 2003 0 1.8675 .6931472 9.318566 .04451225 .017769003 .0017783066 1 22 7 252680 2004 1998 0 1.455 0 8.474912 .1514709 .5576883 .0005782071 0 31 7 252680 2005 1998 0 3.78 .6931472 8.755737 .04726642 .6434536 .0009551222 0 31 7 252680 2006 1998 0 4.35 1.0986123 8.981556 .074041486 .5744815 .0007238294 1 31 7 252680 2007 1998 0 1.8675 1.3862944 8.711279 .0648987 .3744029 .00047017305 1 31 7 252681 2001 2000 0 5.15 0 8.652947 .1382923 .18281823 .0035610865 0 42 7 252681 2002 2000 0 6.2 .6931472 8.275886 .01629328 .06186355 .005094071 1 42 7 252681 2003 2000 0 4.11 1.0986123 9.611664 .06868389 .14734235 .001766508 1 42 7 252681 2004 2000 0 1.455 1.3862944 9.108418 .11416233 .4322888 .0019394945 0 42 7 252681 2005 2000 0 3.78 1.609438 9.565985 .07813048 .551468 .0019328854 0 42 7 252681 2006 2000 0 4.35 1.7917595 9.784084 .24964787 .04625613 .0017858335 0 42 7 252681 2007 2000 0 1.8675 1.94591 9.82531 .14619377 .06212154 .001880076 1 42 7 252682 2004 2000 0 1.455 0 9.968245 .08351298 .6145843 .0019394945 0 42 7 252682 2005 2000 0 3.78 .6931472 9.692766 .1512963 .3743827 .0019328854 0 42 7 252682 2006 2000 0 4.35 1.0986123 10.203518 .10104452 .18782873 .0017858335 0 42 7 252682 2007 2000 0 1.8675 1.3862944 9.590077 .15787673 .007162753 .001880076 0 42 7 252683 2000 1998 1 4.91 0 9.507627 .013296687 .5410043 .02816603 1 29 7 252684 2000 1998 1 4.91 0 7.779048 .14058578 .13389121 .0040479684 0 18 7 252685 2003 1998 0 4.11 0 7.945201 .238129 .6973777 .030864984 0 41 7 252685 2004 1998 0 1.455 .6931472 8.367764 .10473757 .5996284 .015469057 0 41 7 252685 2005 1998 0 3.78 1.0986123 8.321908 .18696815 .438123 .016648494 0 41 7 252685 2006 1998 0 4.35 1.3862944 8.290794 .15625784 .52570856 .015672732 0 41 7 252685 2007 1998 0 1.8675 1.609438 8.50896 .10042347 .4035088 .014640527 0 41 7 252686 1999 1998 0 7.475 0 9.195227 .4049746 .7874112 .0373623 0 40 7 252686 2000 1998 0 4.91 .6931472 9.52661 .1919825 .4656706 .01867679 0 40 7 252686 2001 1998 0 5.15 1.0986123 10.18603 .2784772 .4627214 .029971246 0 40 7 252686 2002 1998 1 6.2 1.3862944 9.35988 .5950228 .26677 .02913001 0 40 7 252687 2003 1998 0 4.11 0 8.734077 .10610208 .3762679 .023751004 1 40 7 252687 2004 1998 0 1.455 .6931472 8.767485 .14497042 .3185923 .013991948 0 40 7 252687 2005 1998 0 3.78 1.0986123 8.756053 .04347141 .26728618 .015095025 0 40 7 252687 2006 1998 0 4.35 1.3862944 9.012743 .09942732 .3497015 .012782412 0 40 7 252687 2007 1998 0 1.8675 1.609438 9.158836 .03990314 .50326383 .01157745 1 40 7 252688 2002 1998 0 6.2 0 8.506132 .032153692 .7449949 .001796943 1 18 7 252688 2003 1998 1 4.11 .6931472 8.506132 0 .7449949 .0011531834 1 18 7 252689 2001 1998 0 5.15 0 7.845416 .10806578 .4659358 .0021332458 0 18 7 252689 2002 1998 0 6.2 .6931472 8.821437 .031867806 .8524638 .001796943 1 18 7 252689 2003 1998 0 4.11 1.0986123 8.108924 .1498195 .3829723 .0011531834 0 18 7 252689 2004 1998 0 1.455 1.3862944 7.797291 .1668036 .05998357 .0007083042 1 18 7 252689 2005 1998 0 3.78 1.609438 8.562166 .12313575 .4760994 .000777527 1 18 7 252689 2006 1998 1 4.35 1.7917595 8.427487 .05819296 .4893896 .0006529528 0 18 7 252690 2003 1998 0 4.11 0 7.655391 .03219697 .18229167 .0019974066 1 19 7 252690 2004 1998 0 1.455 .6931472 7.797291 .0673788 .3093673 .0019860866 1 19 7 252690 2005 1998 0 3.78 1.0986123 9.095378 .04352704 .795378 .0015521896 1 19 7 252690 2006 1998 0 4.35 1.3862944 8.754318 .013726728 .7155254 .0011524967 0 19 7 252690 2007 1998 0 1.8675 1.609438 9.326967 .005962445 .8609949 .0010498159 1 19 7 252691 2002 1998 0 6.2 0 7.5148 .23378746 .44196185 .0032530755 0 19 7 252691 2003 1998 0 4.11 .6931472 7.867105 .1678161 .52452105 .0019974066 0 19 7 252691 2004 1998 0 1.455 1.0986123 7.877397 .24725066 .5400076 .0019860866 0 19 7 252691 2005 1998 0 3.78 1.3862944 7.707512 .4013483 .4274157 .0015521896 0 19 7 252691 2006 1998 1 4.35 1.609438 7.162397 .26046512 .303876 .0011524967 0 19 7 252692 2001 1998 0 5.15 0 8.240385 .04616196 .7013981 .004970909 0 19 7 252692 2002 1998 0 6.2 .6931472 7.654917 .12742776 .3685457 .0032530755 0 19 7 252692 2003 1998 1 4.11 1.0986123 8.2361555 .06384106 .3512583 .0019974066 0 19 7 252693 2003 1998 1 4.11 0 8.527342 -.015838448 .6277965 .004205331 1 23 7 252694 2003 1998 0 4.11 0 8.028455 .16106945 .6951419 .001314685 0 30 7 252694 2004 1998 0 1.455 .6931472 8.916103 .0514025 .23647833 .0010938208 0 30 7 252694 2005 1998 0 3.78 1.0986123 9.132487 .10820452 .2449465 .0008426995 1 30 7 252694 2006 1998 0 4.35 1.3862944 9.213137 .1156761 .3417431 .000739972 1 30 7 252694 2007 1998 0 1.8675 1.609438 9.553504 .067617424 .3992479 .0006334392 1 30 7
Code:
end
And I want to konw the influence direction of the interaction item ,I thnk:
1.if both variables are continuous variables,the code:
c.rate#c.profit
I dont know how to Judge the effect of interaction ,positive or negative ?
2.if one is Continuous variables and another one is dummy variables ,like
c.rate#i.FC12
Can i margins:
margins,dydx(rate) at(FC12=(0 1)) predict(pu0)
Thanks in advance.
Best regards,
JJ