Hi all,
I am kindly seeking help regarding the Stata implementation of my Political Science research. I will try to be as concise as I can.
I am using a Cox hazard model to examine whether the hazard of political turnover (change in government) is affected by banking crises.
Therefore I believe I require an extended Cox model with the time-dependent covariate BankCrisis. As such, my variables are:
1) Spell: An ID for the government spell
2) Survival: The number of years a spell has survived before turnover occurs
3) Turnover: A dummy for whether turnover occurred (my data is uncensored so this is always a 1)
4) BankCrisis: The number of banking crises the country experienced during the spell
5) Controls
I will work with a fake dataset to illustrate. I begin with a dataset like this:
I then expand the dataset to allow for BankCrisis to be time-varying:
In my fake dataset, I have made it that if a government experiences a banking crisis there is a very strong chance its spell will end (see above).
I then stset my data: stset survival , f(turnover) id(spell)
Then I run my Cox regression: stcox bankcrisis, nohr
This does not work for me... I get insignificant results, even though I hardwired the data in this case to get an extreme positive correlation between the experience of a banking crisis and the experience of a turnover following the crisis.
I have spent weeks online and in books trying to understand where I am going wrong. I would greatly appreciate it if someone could take the time to explain whether a) I am approaching the problem correctly, and b) if I am, why this is not working.
Many Thanks,
Ben
I am kindly seeking help regarding the Stata implementation of my Political Science research. I will try to be as concise as I can.
I am using a Cox hazard model to examine whether the hazard of political turnover (change in government) is affected by banking crises.
Therefore I believe I require an extended Cox model with the time-dependent covariate BankCrisis. As such, my variables are:
1) Spell: An ID for the government spell
2) Survival: The number of years a spell has survived before turnover occurs
3) Turnover: A dummy for whether turnover occurred (my data is uncensored so this is always a 1)
4) BankCrisis: The number of banking crises the country experienced during the spell
5) Controls
I will work with a fake dataset to illustrate. I begin with a dataset like this:
Spell | Survival | BankCrisis | Turnover |
1 | 4 | 1 | 1 |
2 | 6 | 1 | 1 |
3 | 7 | 2 | 1 |
4 | 2 | 1 | 1 |
I then expand the dataset to allow for BankCrisis to be time-varying:
Spell | Survival | BankCrisis | Turnover |
1 | 1 | 0 | 1 |
1 | 2 | 0 | 1 |
1 | 3 | 0 | 1 |
1 | 4 | 1 | 1 |
2 | 1 | 0 | 1 |
2 | 2 | 0 | 1 |
2 | 3 | 0 | 1 |
2 | 4 | 0 | 1 |
2 | 5 | 0 | 1 |
2 | 6 | 1 | 1 |
3 | 1 | 0 | 1 |
3 | 2 | 0 | 1 |
3 | 3 | 1 | 1 |
3 | 4 | 1 | 1 |
3 | 5 | 1 | 1 |
3 | 6 | 1 | 1 |
3 | 7 | 2 | 1 |
4 | 1 | 0 | 1 |
4 | 2 | 1 | 1 |
I then stset my data: stset survival , f(turnover) id(spell)
Then I run my Cox regression: stcox bankcrisis, nohr
This does not work for me... I get insignificant results, even though I hardwired the data in this case to get an extreme positive correlation between the experience of a banking crisis and the experience of a turnover following the crisis.
I have spent weeks online and in books trying to understand where I am going wrong. I would greatly appreciate it if someone could take the time to explain whether a) I am approaching the problem correctly, and b) if I am, why this is not working.
Many Thanks,
Ben
Comment